From c488fed6bb0d06acad9aefda54e77c5c687eb941 Mon Sep 17 00:00:00 2001 From: xuegao Date: Thu, 19 Dec 2019 11:58:45 +0100 Subject: Update op policy UI Change the React UI accordingly so that we read OperationalPolicy Object Issue-ID: CLAMP-583 Change-Id: Ifd14a7eb115dc75acb35f1e7591ee383066a45f1 Signed-off-by: xuegao --- .../components/dialogs/OperationalPolicy/OperationalPolicyModal.js | 2 +- .../dialogs/OperationalPolicy/OperationalPolicyModal.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ui-react/src/components/dialogs/OperationalPolicy') diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js index 5c5f0241a..c7363f6e5 100644 --- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js +++ b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js @@ -114,7 +114,7 @@ export default class OperationalPolicyModal extends React.Component { console.error("NO Operational policy schema found"); return; } - var operationalPoliciesData = this.state.loopCache.getOperationalPolicies(); + var operationalPoliciesData = this.state.loopCache.getOperationalPoliciesNoJsonSchema(); this.setState({ jsonEditor: new JSONEditor(document.getElementById("editor"), diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js index 9c7da3108..522a3f681 100644 --- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js +++ b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js @@ -46,9 +46,9 @@ describe('Verify OperationalPolicyModal', () => { "controlLoop": {}, "policies": [] } - } - }], - "operationalPolicySchema": {"schema": {}} + }, + "jsonRepresentation" : {"schema": {}} + }] }); const historyMock = { push: jest.fn() }; const flushPromises = () => new Promise(setImmediate); -- cgit 1.2.3-korg