diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-02-26 15:47:30 -0800 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2020-02-27 06:17:02 -0800 |
commit | d2a4df0b62b6a32c42bac45b4bee344016faa8fb (patch) | |
tree | a4d49be5501c1016de3af41f7e8935cd5187ec85 /ui-react/src/api/LoopService.js | |
parent | c11160ecfdce03091917e2728f80848f4d8feb95 (diff) |
Add Create loop dialog
Add create loop dialog and backend part associated (this is based on this PR https://gerrit.onap.org/r/c/clamp/+/102156)
Issue-ID: CLAMP-587
Change-Id: I58524bc2d5bfbf5ca5a3acf5c59823df06fd4cd9
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/api/LoopService.js')
-rw-r--r-- | ui-react/src/api/LoopService.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js index 432eabecd..d665f8148 100644 --- a/ui-react/src/api/LoopService.js +++ b/ui-react/src/api/LoopService.js @@ -38,6 +38,24 @@ export default class LoopService { }); } + static createLoop(loopName, templateName) { + return fetch('/restservices/clds/v2/loop/create/' + loopName + '?templateName=' + templateName, { + method: 'POST', + headers: { + "Content-Type": "application/json" + }, + credentials: 'same-origin' + }) + .then(function (response) { + console.debug("CreateLoop response received: ", response.status); + return response.json(); + }) + .catch(function (error) { + console.error("CreateLoop error received", error); + return ""; + }); + } + static getLoop(loopName) { return fetch('/restservices/clds/v2/loop/' + loopName, { method: 'GET', |