summaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/ConfigurationPolicy
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-03-04 15:47:39 -0800
committersebdet <sebastien.determe@intl.att.com>2020-03-09 09:07:45 -0700
commit2dd4e997c1ccf5dab4dfb7665ce74c0fd1f13e49 (patch)
treeddea40175352505c75e8eac343587e62c99a49dc /ui-react/src/components/dialogs/ConfigurationPolicy
parent897a3e004a858ef68d989dad15dde91a69e151a5 (diff)
Rework tosca converter
New code to convert the Policy Tosca Yaml to Json Schema for the Clamp UI Issue-ID: CLAMP-647 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: Id15ddedc1910f6a40bf6e407b34e343e00135571
Diffstat (limited to 'ui-react/src/components/dialogs/ConfigurationPolicy')
-rw-r--r--ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js23
-rw-r--r--ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js1
2 files changed, 12 insertions, 12 deletions
diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
index 3fa0c0ca..da65ac9f 100644
--- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
+++ b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
@@ -85,19 +85,20 @@ export default class ConfigurationPolicyModal extends React.Component {
}
var editorData = this.state.loopCache.getMicroServicePropertiesForName(this.state.policyName);
- JSONEditor.defaults.options.theme = 'bootstrap4';
- //JSONEditor.defaults.options.iconlib = 'bootstrap2';
- 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.show_errors = 'always';
-
this.setState({
jsonEditor: new JSONEditor(document.getElementById("editor"),
- { schema: toscaModel.schema, startval: editorData })
+ {
+ schema: toscaModel,
+ startval: editorData,
+ theme: 'bootstrap4',
+ 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,
+ show_errors: 'always'
+ })
})
}
diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js
index 4d527b71..a19c18c9 100644
--- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js
+++ b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js
@@ -25,7 +25,6 @@ import { mount } from 'enzyme';
import ConfigurationPolicyModal from './ConfigurationPolicyModal';
import LoopCache from '../../../api/LoopCache';
-
describe('Verify ConfigurationPolicyModal', () => {
beforeEach(() => {
fetch.resetMocks();