From: sebdet Date: Thu, 16 Apr 2020 14:14:45 +0000 (+0200) Subject: Remove policy from PEF when removing op policy X-Git-Tag: 6.0.0~11^2~120 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=6e7d04895c9133f772f3d781e84dbfc7b32f2874;p=policy%2Fclamp.git Remove policy from PEF when removing op policy The operational policy must be removed from the PEF when the user remove an operational policy (at least attempt to purge the PEF) Issue-ID: CLAMP-824 Signed-off-by: sebdet Change-Id: I793212adcfb36675c3aae9edbc077f29b14b262e --- diff --git a/ui-react/src/components/dialogs/Loop/ModifyLoopModal.js b/ui-react/src/components/dialogs/Loop/ModifyLoopModal.js index 11e935338..8886dbfdf 100644 --- a/ui-react/src/components/dialogs/Loop/ModifyLoopModal.js +++ b/ui-react/src/components/dialogs/Loop/ModifyLoopModal.js @@ -133,7 +133,7 @@ export default class ModifyLoopModal extends React.Component { var selectedPolicyModels = []; for (var policy in operationalPolicies) { var newRow = operationalPolicies[policy]["policyModel"]; - newRow.add("policyName", operationalPolicies[policy].name); + newRow["policyName"] = operationalPolicies[policy].name; selectedPolicyModels.push(newRow); } diff --git a/ui-react/src/components/dialogs/Policy/PolicyModal.js b/ui-react/src/components/dialogs/Policy/PolicyModal.js index 05db8e14d..5930386c2 100644 --- a/ui-react/src/components/dialogs/Policy/PolicyModal.js +++ b/ui-react/src/components/dialogs/Policy/PolicyModal.js @@ -74,6 +74,10 @@ export default class PolicyModal extends React.Component { if (errors.length !== 0) { console.error("Errors detected during policy data validation ", errors); + this.setState({ + showFailAlert: true, + showMessage: "Errors detected during policy data validation " + errors + }); return; } else {