Remove policy from PEF when removing op policy 02/106102/1
authorsebdet <sebastien.determe@intl.att.com>
Thu, 16 Apr 2020 14:14:45 +0000 (16:14 +0200)
committersebdet <sebastien.determe@intl.att.com>
Thu, 16 Apr 2020 14:14:45 +0000 (16:14 +0200)
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 <sebastien.determe@intl.att.com>
Change-Id: I793212adcfb36675c3aae9edbc077f29b14b262e

ui-react/src/components/dialogs/Loop/ModifyLoopModal.js
ui-react/src/components/dialogs/Policy/PolicyModal.js

index 11e9353..8886dbf 100644 (file)
@@ -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);
                }
 
index 05db8e1..5930386 100644 (file)
@@ -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 {