+ jsonEditor: new JSONEditor(document.getElementById("editor"),
+ {
+ 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
+ })
+ })
+ }
+
+ handleRefresh() {
+ LoopService.refreshOpPolicyJson(this.state.loopCache.getLoopName()).then(data => {
+ var newLoopCache = new LoopCache(data);
+ var schema_json = newLoopCache.getOperationalPolicyJsonSchema();
+ var operationalPoliciesData = newLoopCache.getOperationalPoliciesNoJsonSchema();
+ document.getElementById("editor").innerHTML = "";
+ this.setState({
+ loopCache: newLoopCache,