diff options
author | Xue Gao <xg353y@intl.att.com> | 2020-03-10 10:18:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-03-10 10:18:34 +0000 |
commit | 0c4e6af85daabe730917898f466a1d45cbc16f92 (patch) | |
tree | 7fe94ceecd7d69e57858ae8b25babdaaedb6ca3f /ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js | |
parent | 5c3a825851bb1a345620c5c4951726c5b94a0341 (diff) | |
parent | 2dd4e997c1ccf5dab4dfb7665ce74c0fd1f13e49 (diff) |
Merge "Rework tosca converter"
Diffstat (limited to 'ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js')
-rw-r--r-- | ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js index dc7c0a489..7ed8ba6f1 100644 --- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js +++ b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js @@ -94,20 +94,8 @@ export default class OperationalPolicyModal extends React.Component { return liel; } }); - JSONEditor.defaults.options.theme = 'myBootstrap4'; - JSONEditor.defaults.options.object_layout = 'grid'; - JSONEditor.defaults.options.disable_properties = true; - JSONEditor.defaults.options.disable_edit_json = false; - JSONEditor.defaults.options.disable_array_reorder = true; - JSONEditor.defaults.options.disable_array_delete_last_row = true; - JSONEditor.defaults.options.disable_array_delete_all_rows = false; - JSONEditor.defaults.options.array_controls_top=true; - JSONEditor.defaults.options.show_errors = 'always'; - JSONEditor.defaults.options.keep_oneof_values=false; - JSONEditor.defaults.options.collapsed=true; - //JSONEditor.defaults.options.template = 'default'; } - + renderJsonEditor() { console.debug("Rendering OperationalPolicyModal"); var schema_json = this.state.loopCache.getOperationalPolicyJsonSchema(); @@ -120,7 +108,21 @@ export default class OperationalPolicyModal extends React.Component { this.setState({ jsonEditor: new JSONEditor(document.getElementById("editor"), - { schema: schema_json.schema, startval: operationalPoliciesData }) + { + schema: schema_json.schema, + startval: operationalPoliciesData, + theme: 'myBootstrap4', + object_layout: 'grid', + disable_properties: true, + disable_edit_json: false, + disable_array_reorder: true, + disable_array_delete_last_row: true, + disable_array_delete_all_rows: false, + array_controls_top: true, + show_errors: 'always', + keep_oneof_values: false, + collapsed:true + }) }) } |