From 21b5929195ac471c227cb019cb7e2a437d99b36a Mon Sep 17 00:00:00 2001 From: "Joseph P. White" Date: Wed, 11 Dec 2019 20:41:01 -0500 Subject: [PATCH] Fix stderr checkbox disablement in Metric Explorer. The "Err Bars" and "Err Labels" columns in the "Data" menu in the metric explorer were incorrectly shown or incorrectly not shown in certian circumstances. a) if a chart was 'geared over' from the Usage Tab then the "Data" menu would always show the "Err Bars" and "Err Labels" checkboxes regardless of whether they should have been shown. b) if data were added to the metric explorer from the "Metric Catalog" then the "Data" menu would never show the checkboxes regardless of whether they should have been shown. If data are added to a chart via the "Data Series Definition" dialog then the checkboxes are correct. This change fixes it so the checkboxes work correctly. --- html/gui/js/modules/Usage.js | 2 +- html/gui/js/modules/metric_explorer/MetricExplorer.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/html/gui/js/modules/Usage.js b/html/gui/js/modules/Usage.js index 8c35b61c57..3f285348bb 100644 --- a/html/gui/js/modules/Usage.js +++ b/html/gui/js/modules/Usage.js @@ -2174,7 +2174,7 @@ Ext.extend(XDMoD.Module.Usage, XDMoD.PortalModule, { group_by: n.attributes.group_by, x_axis: false, log_scale: chartToolbar.getLogScale() == 'y', - has_std_err: 'y', + has_std_err: chartToolbar.getEnableErrors(), std_err: chartToolbar.getShowErrorBars() == 'y', std_err_labels: chartToolbar.getShowErrorLabels() == 'y', value_labels: chartToolbar.getShowAggregateLabels() == 'y' || dt == 'pie', diff --git a/html/gui/js/modules/metric_explorer/MetricExplorer.js b/html/gui/js/modules/metric_explorer/MetricExplorer.js index 5331281f1e..c6f12f27b0 100644 --- a/html/gui/js/modules/metric_explorer/MetricExplorer.js +++ b/html/gui/js/modules/metric_explorer/MetricExplorer.js @@ -2829,6 +2829,7 @@ Ext.extend(XDMoD.Module.MetricExplorer, XDMoD.PortalModule, { singleClickExpand: true, type: 'metric', text: realm_metrics[rm].text, + has_std_err: realm_metrics[rm].std_err, iconCls: 'chart', category: category, realm: realm, @@ -2861,6 +2862,7 @@ Ext.extend(XDMoD.Module.MetricExplorer, XDMoD.PortalModule, { group_by: d, metric: n.attributes.metric, realm: n.attributes.realm, + has_std_err: n.attributes.has_std_err, category: n.attributes.category }; Ext.apply(config, this.defaultDatasetConfig);