From b09e7df8439398fc094a56ec33fa33950ac8fa9e Mon Sep 17 00:00:00 2001 From: xuegao Date: Tue, 23 Jul 2019 14:13:06 +0200 Subject: Rework Loop properties window Rework the loop properties window with React libraries. Issue-ID: CLAMP-447 Change-Id: I5eba63aab39aeefe23d5fdc4732ce0d3d4a1682a Signed-off-by: xuegao --- ui-react/src/api/LoopService.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'ui-react/src/api/LoopService.js') diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js index 020a3bf7..031ec638 100644 --- a/ui-react/src/api/LoopService.js +++ b/ui-react/src/api/LoopService.js @@ -104,4 +104,28 @@ export default class LoopService { return ""; }); } + + static updateGlobalProperties(loopName, jsonData) { + return fetch('/restservices/clds/v2/loop/updateGlobalProperties/' + loopName, { + method: 'POST', + credentials: 'same-origin', + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(jsonData), + }) + .then(function (response) { + console.debug("updateGlobalProperties response received: ", response.status); + if (response.ok) { + return response.text(); + } else { + console.error("updateGlobalProperties query failed"); + return ""; + } + }) + .catch(function (error) { + console.error("updateGlobalProperties error received", error); + return ""; + }); + } } -- cgit 1.2.3-korg