Fix not refreshed Tosca list 99/120899/1
authorsebdet <sebastien.determe@intl.att.com>
Mon, 26 Apr 2021 11:10:55 +0000 (13:10 +0200)
committersebdet <sebastien.determe@intl.att.com>
Mon, 26 Apr 2021 11:11:34 +0000 (13:11 +0200)
The refresh must be don inside the asynchronous block to fix the refreshing of the tosca list

Issue-ID: POLICY-3229
Change-Id: I89d4964b68d88e28bd8d0dfef19c2382d52fa7bf
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
src/main/resources/clds/sdc-controllers-config.json
ui-react/src/components/dialogs/Policy/PolicyToscaFileSelector.js

index b86732e..be9d02c 100644 (file)
@@ -6,7 +6,7 @@
         "consumerId": "clamp",
         "environmentName": "AUTO",
         "sdcAddress": "sdc.api.simpledemo.onap.org:8443",
-        "password": "b7acccda32b98c5bb7acccda32b98c5b05D511BD6D93626E90D18E9D24D9B78CD34C7EE8012F0A189A28763E82271E50A5D4EC10C7D93E06E0A2D27CAE66B981",
+        "password": "enc:JPV4p067JlSXt2Fet9bfuI8JpkS4ZGYVcgypcPs98gXjgjCjTze_d3JxqmlKaaakdiOjIcEC_MJh6-5pJTLgdc",
         "pollingInterval":30,
         "pollingTimeout":30,
         "activateServerTLSAuth":"false",
index 8753c78..9cd3d41 100644 (file)
@@ -79,6 +79,7 @@ export default class PolicyToscaFileSelector extends React.Component {
                             };
                         });
                       } else {
+                        this.props.toscaTableUpdateFunction();
                         this.setState(state => {
                             return {
                                 alertMessages: [...state.alertMessages,(<Alert variant="success"><Alert.Heading>{file.name}</Alert.Heading><p>Policy Tosca Model Created Successfully</p><hr/><p>Type: {file.type}</p><p>Size: {file.size}</p></Alert>)]
@@ -88,7 +89,7 @@ export default class PolicyToscaFileSelector extends React.Component {
                 });
             };
         });
-        this.props.toscaTableUpdateFunction();
+
     }
 
     render() {