aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-04-21 14:57:57 +0200
committersebdet <sebastien.determe@intl.att.com>2021-04-21 14:57:57 +0200
commitc727ca5a823487f37bb725750e4f8cbab5991c36 (patch)
tree5780b1f5ff48b24a3789fc8cd4c382b1b641b9bb /ui-react/src
parent3d2de0bf73022f07c75e3b9c828f5e7f37b30347 (diff)
Fix wrong PDP operations send by UI
The code that was computing the operations to execute was wrong. THe command POST was missing Issue-ID: POLICY-3225 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I0de307e782bf99ed3cb4274c587c9c71955bab74
Diffstat (limited to 'ui-react/src')
-rw-r--r--ui-react/src/components/dialogs/Policy/PolicyDeploymentEditor.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui-react/src/components/dialogs/Policy/PolicyDeploymentEditor.js b/ui-react/src/components/dialogs/Policy/PolicyDeploymentEditor.js
index a2422e2ad..48d02e38e 100644
--- a/ui-react/src/components/dialogs/Policy/PolicyDeploymentEditor.js
+++ b/ui-react/src/components/dialogs/Policy/PolicyDeploymentEditor.js
@@ -77,8 +77,12 @@ export default class PolicyDeploymentEditor extends React.Component {
let newStateFound = newStates.find(newElement => newElement.name === initElem.name);
if (initElem.value !== newStateFound.value) {
let newPdpGroupsArray = newStateFound.name.split("/");
- commandsArray.push("DELETE/"+newPdpGroupsArray[0] + "/"+newPdpGroupsArray[1] + "/"+this.state.policyData.name
- + "/" + this.state.policyData.version);
+ let operation = "POST/";
+ if (initElem.value) {
+ operation = "DELETE/";
+ }
+ commandsArray.push(operation + newPdpGroupsArray[0] + "/"+newPdpGroupsArray[1] + "/"
+ +this.state.policyData.name + "/" + this.state.policyData.version);
}
});
return commandsArray.length > 0 ? {"PdpActions":commandsArray} : undefined;