Selaa lähdekoodia

Merge pull request #9145 from GordonSmith/HPCC-15704

HPCC-15704 Show error count

Reviewed-By: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 vuotta sitten
vanhempi
commit
e7431d08b0

+ 10 - 0
esp/src/eclwatch/InfoGridWidget.js

@@ -113,6 +113,13 @@ define([
 
             startup: function (args) {
                 this.inherited(arguments);
+                this.errorsCheckLabel = dom.byId(this.id + "ErrorsLabel");
+                this.errorsCheckLabelOrigText = this.errorsCheckLabel.textContent;
+                this.warningsCheckLabel = dom.byId(this.id + "WarningsLabel");
+                this.warningsCheckLabelOrigText = this.warningsCheckLabel.textContent;
+                this.infoCheckLabel = dom.byId(this.id + "InfoLabel");
+                this.infoCheckLabelOrigText = this.infoCheckLabel.textContent;
+
                 if (this.showToolbar) {
                     if (has("ie") <= 9 || has("ff")) {
                         this.widget.Download.set("disabled", true);
@@ -413,6 +420,9 @@ define([
                 }, this);
                 this.infoStore.setData(data);
                 this.infoGrid.refresh();
+                this.errorsCheckLabel.innerText = this._counts.error + " " + this.errorsCheckLabelOrigText;
+                this.warningsCheckLabel.innerText = this._counts.warning + " " + this.warningsCheckLabelOrigText;
+                this.infoCheckLabel.innerText = this._counts.info + " " + this.infoCheckLabelOrigText;
             },
 
             getSelected: function () {

+ 3 - 3
esp/src/eclwatch/templates/InfoGridWidget.html

@@ -13,13 +13,13 @@
         </div>
         <div id="${id}Filter" class="edgePanel" data-dojo-props="region: 'bottom'" data-dojo-type="dijit.layout.ContentPane">
             <input id="${id}Errors" data-dojo-attach-event="onClick:_onErrors" data-dojo-props="checked: true" data-dojo-type="dijit.form.CheckBox" />
-            <label for="${id}Errors">${i18n.Errors}</label>
+            <label id="${id}ErrorsLabel" for="${id}Errors">${i18n.Errors}</label>
             &nbsp;
             <input id="${id}Warnings" data-dojo-attach-event="onClick:_onWarnings" data-dojo-props="checked: true" data-dojo-type="dijit.form.CheckBox" />
-            <label for="${id}Warnings">${i18n.Warnings}</label>
+            <label id="${id}WarningsLabel" for="${id}Warnings">${i18n.Warnings}</label>
             &nbsp;
             <input id="${id}Info" data-dojo-attach-event="onClick:_onInfo" data-dojo-props="checked: true" data-dojo-type="dijit.form.CheckBox" />
-            <label for="${id}Info">${i18n.Info}</label>
+            <label id="${id}InfoLabel" for="${id}Info">${i18n.Info}</label>
         </div>
     </div>
     <div id="${id}ErrWarnDialog" title="${i18n.ManualCopy}" data-dojo-type="dijit.Dialog">