From 401283e219f764566d687b3056bf235cdef48a46 Mon Sep 17 00:00:00 2001 From: "Mohammad K. Zia" Date: Fri, 6 Sep 2019 17:51:03 -0400 Subject: [PATCH 1/2] Bug fixes: Add mask and make chart name unique --- .../dashboard/ReportThumbnailsComponent.js | 15 +++++++++++---- .../js/modules/metric_explorer/MetricExplorer.js | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/html/gui/js/modules/dashboard/ReportThumbnailsComponent.js b/html/gui/js/modules/dashboard/ReportThumbnailsComponent.js index e1995ed9d5..d984991f98 100644 --- a/html/gui/js/modules/dashboard/ReportThumbnailsComponent.js +++ b/html/gui/js/modules/dashboard/ReportThumbnailsComponent.js @@ -99,6 +99,7 @@ XDMoD.Module.Dashboard.ReportThumbnailsComponent = Ext.extend(Ext.Panel, { listeners: { click: { fn: function (dataView, index, node, e) { + var win; // Window to display the chart this.tmpHpc = new CCR.xdmod.ui.HighChartPanel({ chartOptions: { chart: { @@ -137,7 +138,12 @@ XDMoD.Module.Dashboard.ReportThumbnailsComponent = Ext.extend(Ext.Panel, { proxy: new Ext.data.HttpProxy({ method: 'POST', url: 'controllers/metric_explorer.php' - }) + }), + listeners: { + load: function () { + win.el.unmask(); + } + } }) @@ -148,7 +154,7 @@ XDMoD.Module.Dashboard.ReportThumbnailsComponent = Ext.extend(Ext.Panel, { for (var key in config) { if (key === 'data_series') { this.tmpHpc.store.setBaseParam(key, Ext.util.JSON.encode(config[key])); - var data_series = {}; + let data_series = {}; data_series.data = config[key]; data_series.total = config[key].length; config.data_series = data_series; @@ -175,7 +181,7 @@ XDMoD.Module.Dashboard.ReportThumbnailsComponent = Ext.extend(Ext.Panel, { this.tmpHpc.store.setBaseParam('operation', 'get_data'); - var win = new Ext.Window({ + win = new Ext.Window({ layout: 'fit', width: 800, height: 600, @@ -187,7 +193,7 @@ XDMoD.Module.Dashboard.ReportThumbnailsComponent = Ext.extend(Ext.Panel, { text: 'Open in Metric Explorer', handler: function () { win.destroy(); - XDMoD.Module.MetricExplorer.setConfig(config, config.title, false); + XDMoD.Module.MetricExplorer.setConfig(config, config.title, true); } }, { text: 'Close', @@ -201,6 +207,7 @@ XDMoD.Module.Dashboard.ReportThumbnailsComponent = Ext.extend(Ext.Panel, { if (viewer.el) { viewer.el.mask(); } + win.el.mask('Loading...'); }, destroy: function () { var viewer = CCR.xdmod.ui.Viewer.getViewer(); diff --git a/html/gui/js/modules/metric_explorer/MetricExplorer.js b/html/gui/js/modules/metric_explorer/MetricExplorer.js index da41f5535f..79aa83f593 100644 --- a/html/gui/js/modules/metric_explorer/MetricExplorer.js +++ b/html/gui/js/modules/metric_explorer/MetricExplorer.js @@ -6359,7 +6359,7 @@ Ext.extend(XDMoD.Module.MetricExplorer, XDMoD.PortalModule, { this.updateRawDataWindowVisibility(); if (location.hash.split('config=')[1]) { var config = JSON.parse(window.atob(location.hash.split('config=')[1])); - XDMoD.Module.MetricExplorer.setConfig(config, config.title, false); + XDMoD.Module.MetricExplorer.setConfig(config, config.title, true); } }, // activate From c1c2cf56af484aa2967cb50395083df884a0805c Mon Sep 17 00:00:00 2001 From: "Mohammad K. Zia" Date: Tue, 10 Sep 2019 13:04:48 -0400 Subject: [PATCH 2/2] Refresh clears the search field --- html/gui/js/modules/dashboard/ReportThumbnailsComponent.js | 2 +- html/gui/js/modules/dashboard/SavedChartsReportsComponent.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/html/gui/js/modules/dashboard/ReportThumbnailsComponent.js b/html/gui/js/modules/dashboard/ReportThumbnailsComponent.js index d984991f98..a6104ba889 100644 --- a/html/gui/js/modules/dashboard/ReportThumbnailsComponent.js +++ b/html/gui/js/modules/dashboard/ReportThumbnailsComponent.js @@ -154,7 +154,7 @@ XDMoD.Module.Dashboard.ReportThumbnailsComponent = Ext.extend(Ext.Panel, { for (var key in config) { if (key === 'data_series') { this.tmpHpc.store.setBaseParam(key, Ext.util.JSON.encode(config[key])); - let data_series = {}; + var data_series = {}; data_series.data = config[key]; data_series.total = config[key].length; config.data_series = data_series; diff --git a/html/gui/js/modules/dashboard/SavedChartsReportsComponent.js b/html/gui/js/modules/dashboard/SavedChartsReportsComponent.js index 1d66f3ef6e..a166862dc8 100644 --- a/html/gui/js/modules/dashboard/SavedChartsReportsComponent.js +++ b/html/gui/js/modules/dashboard/SavedChartsReportsComponent.js @@ -106,6 +106,7 @@ XDMoD.Module.Dashboard.SavedChartsReportsComponent = Ext.extend(CCR.xdmod.ui.Por text: 'Refresh', scope: this, handler: function () { + searchField.onTrigger1Click(); this.chartReportStore.reload(); } }