From 2d32462a8516fc097e103374a2e72c7381a678ec Mon Sep 17 00:00:00 2001 From: "Benjamin D. Plessinger" Date: Mon, 9 Sep 2019 08:14:44 -0400 Subject: [PATCH 1/2] rename summay to dashboard --- configuration/assets.d/appkernels.json | 2 +- .../roles.d/appkernels:dashboard.json | 34 +++++++++++++++++++ configuration/roles.d/appkernels:summary.json | 34 ------------------- .../CenterReportCardComponent.js} | 30 ++++++++-------- 4 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 configuration/roles.d/appkernels:dashboard.json delete mode 100644 configuration/roles.d/appkernels:summary.json rename html/gui/js/modules/{summary/CenterReportCardPortlet.js => dashboard/CenterReportCardComponent.js} (93%) diff --git a/configuration/assets.d/appkernels.json b/configuration/assets.d/appkernels.json index 867a1bd..c3c167c 100644 --- a/configuration/assets.d/appkernels.json +++ b/configuration/assets.d/appkernels.json @@ -8,7 +8,7 @@ "gui/js/modules/app_kernels/AppKernelExplorer.js", "gui/js/modules/app_kernels/AppKernelNotificationPanel.js", "gui/js/modules/app_kernels/AppKerPerformanceMapPanel.js", - "gui/js/modules/summary/CenterReportCardPortlet.js", + "gui/js/modules/dashboard/CenterReportCardComponent.js", "internal_dashboard/js/AppKernel/InstancePanel.js", "internal_dashboard/js/AppKernel/InstanceWindow.js", "internal_dashboard/js/AppKernel/InstanceStore.js", diff --git a/configuration/roles.d/appkernels:dashboard.json b/configuration/roles.d/appkernels:dashboard.json new file mode 100644 index 0000000..31d3f9e --- /dev/null +++ b/configuration/roles.d/appkernels:dashboard.json @@ -0,0 +1,34 @@ +{ + "+roles": { + "+cd": { + "+dashboard_components": [ + { + "name": "Center Report Card", + "type": "xdmod-dash-centerrepcard-cmp", + "location": { + "row": 0, + "column": 1 + }, + "config": { + "timeframe": "Year to date" + } + } + ] + }, + "+cs": { + "+dashboard_components": [ + { + "name": "Center Report Card", + "type": "xdmod-dash-centerrepcard-cmp", + "location": { + "row": 0, + "column": 1 + }, + "config": { + "timeframe": "30 day" + } + } + ] + } + } +} diff --git a/configuration/roles.d/appkernels:summary.json b/configuration/roles.d/appkernels:summary.json deleted file mode 100644 index 6d2a64d..0000000 --- a/configuration/roles.d/appkernels:summary.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "+roles": { - "+cd": { - "summary_portlets": [ - { - "name": "Center Report Card", - "type": "CenterReportCardPortlet", - "location": { - "row": 0, - "column": 1 - }, - "config": { - "timeframe": "Year to date" - } - } - ] - }, - "+cs": { - "summary_portlets": [ - { - "name": "Center Report Card", - "type": "CenterReportCardPortlet", - "location": { - "row": 0, - "column": 1 - }, - "config": { - "timeframe": "30 day" - } - } - ] - } - } -} diff --git a/html/gui/js/modules/summary/CenterReportCardPortlet.js b/html/gui/js/modules/dashboard/CenterReportCardComponent.js similarity index 93% rename from html/gui/js/modules/summary/CenterReportCardPortlet.js rename to html/gui/js/modules/dashboard/CenterReportCardComponent.js index aac6d70..aa5aa7e 100644 --- a/html/gui/js/modules/summary/CenterReportCardPortlet.js +++ b/html/gui/js/modules/dashboard/CenterReportCardComponent.js @@ -1,10 +1,10 @@ /* global Ext, XDMoD, CCR, window */ -Ext.namespace('XDMoD.Modules.SummaryPortlets'); +Ext.namespace('XDMoD.Module.Dashboard'); /** - * XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet + * XDMoD.Module.Dashboard.CenterReportCardComponent * - * This portlet is responsible for displaying data that could be used to determine + * This component is responsible for displaying data that could be used to determine * the "health" of a center. Specifically, this implementation shows App Kernel * data for a given XDMoD Installation. Specifically it will display a horizontal * stacked barchart of the failed, in control, and under / over performing runs @@ -16,7 +16,7 @@ Ext.namespace('XDMoD.Modules.SummaryPortlets'); * `modw.resourcefact.organization_id`. * * - * This portlet is driven by the REST Endpoint at + * This component is driven by the REST Endpoint at * `/app_kernels/performance_map/raw`. Which in turn is served by * the `AppKernelControllerProvider::getRawPerformanceMap` function. * @@ -31,7 +31,7 @@ Ext.namespace('XDMoD.Modules.SummaryPortlets'); * - `this.gridstore.listeners.load` * - `this.gridstore.listeners.exception` */ -XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portlet, { +XDMoD.Module.Dashboard.CenterReportCardComponent = Ext.extend(Ext.ux.Portlet, { layout: 'fit', autoScroll: true, @@ -77,7 +77,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle ], /** - * Constructor for the CenterReportCardPortlet. + * Constructor for the CenterReportCardComponent. */ initComponent: function () { var self = this; @@ -94,7 +94,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle } } /** - * The main datastore for this portlet. It retrieves app kernel run data + * The main datastore for this component. It retrieves app kernel run data * for the specified time period from `this.config.start_date` to * `this.config.end_date`. These values are populated w/ the value from * the XDMoD Duration Toolbar. @@ -121,7 +121,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle }, listeners: { load: function () { - // Make sure that once we're loaded we remove this portlets + // Make sure that once we're loaded we remove this components // mask. This was added during the `afterrender` event. self.el.unmask(); }, @@ -262,7 +262,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle }; // var valueRenderer = function (value, metaData, record) { /** - * The main visual element for this portlet. Displays App Kernels by + * The main visual element for this component. Displays App Kernels by * resource, name, and a stacked horizontal bar chart of the failed, * under performing, in control and over performing runs. */ @@ -333,12 +333,12 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle this.updateTitle(this.config.start_date, this.config.end_date); - XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet.superclass.initComponent.apply(this, arguments); + XDMoD.Module.Dashboard.CenterReportCardComponent.superclass.initComponent.apply(this, arguments); }, // initComponent listeners: { duration_change: function (timeframe) { - // Mask the portlet as we're going to be loading new data. + // Mask the component as we're going to be loading new data. this.el.mask('Loading...'); this.gridStore.load({ @@ -348,7 +348,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle } }); - // Make sure that the portlet title reflects the updated start / end + // Make sure that the component title reflects the updated start / end // date this.updateTitle(timeframe.start_date, timeframe.end_date); @@ -363,7 +363,7 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle }, // listeners: { /** - * A helper function that will update this portlet's title attribute w/ + * A helper function that will update this component's title attribute w/ * the start / end date used to generate the data it is displaying. * * @param {Date} startDate @@ -383,6 +383,6 @@ XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portle ('' + date.getDate()).padStart(2, '0'); } // formatDate: function(date) { -}); // XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet = Ext.extend(Ext.ux.Portlet, { +}); // XDMoD.Module.Dashboard.CenterReportCardComponent = Ext.extend(Ext.ux.Portlet, { -Ext.reg('CenterReportCardPortlet', XDMoD.Modules.SummaryPortlets.CenterReportCardPortlet); +Ext.reg('xdmod-dash-centerrepcard-cmp', XDMoD.Module.Dashboard.CenterReportCardComponent); From 5cb34b0377a034a5d37fc18c2e9365c16336eaa4 Mon Sep 17 00:00:00 2001 From: Ben Plessinger Date: Mon, 9 Sep 2019 09:12:36 -0400 Subject: [PATCH 2/2] Update html/gui/js/modules/dashboard/CenterReportCardComponent.js Co-Authored-By: Jeffrey T. Palmer --- html/gui/js/modules/dashboard/CenterReportCardComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/gui/js/modules/dashboard/CenterReportCardComponent.js b/html/gui/js/modules/dashboard/CenterReportCardComponent.js index aa5aa7e..356812e 100644 --- a/html/gui/js/modules/dashboard/CenterReportCardComponent.js +++ b/html/gui/js/modules/dashboard/CenterReportCardComponent.js @@ -121,7 +121,7 @@ XDMoD.Module.Dashboard.CenterReportCardComponent = Ext.extend(Ext.ux.Portlet, { }, listeners: { load: function () { - // Make sure that once we're loaded we remove this components + // Make sure that once we're loaded we remove this component's // mask. This was added during the `afterrender` event. self.el.unmask(); },