From 1aee8833b60900c8ae08fdb9acfea0ab71196abe Mon Sep 17 00:00:00 2001 From: Paul Cuddihy Date: Fri, 11 Mar 2022 14:52:06 -0500 Subject: [PATCH] fixed disappearing report after accessing nodegroup store in SPARQLgraph --- sparqlGraphWeb/sparqlGraph/js/reporttab.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sparqlGraphWeb/sparqlGraph/js/reporttab.js b/sparqlGraphWeb/sparqlGraph/js/reporttab.js index f2b476853..15c57d095 100644 --- a/sparqlGraphWeb/sparqlGraph/js/reporttab.js +++ b/sparqlGraphWeb/sparqlGraph/js/reporttab.js @@ -469,11 +469,10 @@ define([ // properly require.config'ed editElem.remove(); } // grab report json - var jsonStr = JSON.stringify(this.editor.getValue(), null, 4); + var json = this.editor.getValue(); // launch with new schema - this.launchEditor(); - this.setReport(jsonStr); + this.launchEditor(json); }, @@ -527,6 +526,7 @@ define([ // properly require.config'ed iconlib: "fontawesome5" }; this.editor = new JSONEditor.JSONEditor(this.editorDiv, options); + if (optReport) this.editor.setValue(optReport); this.initValidator(); this.editor.on('ready',function() { @@ -570,7 +570,7 @@ define([ // properly require.config'ed // set the report setReport : function(reportJsonStr) { var json = JSON.parse(reportJsonStr); - this.editor.setValue(JSON.parse(reportJsonStr)); + this.editor.setValue(json); this.storeDialog.suggestId(json.title || ""); this.expandOrCollapseAll(false); this.setReportAsUnchanged();