Sfoglia il codice sorgente

Merge pull request #10950 from kunalaswani/HPCC-18850new

HPCC-18850 Username Only Login does not display username

Reviewed-By: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 anni fa
parent
commit
f5b624a150
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      esp/src/eclwatch/HPCCPlatformWidget.js

+ 7 - 2
esp/src/eclwatch/HPCCPlatformWidget.js

@@ -20,6 +20,7 @@ define([
     "dojo/i18n!./nls/hpcc",
     "dojo/_base/array",
     "dojo/dom",
+    "dojo/dom-construct",
     "dojo/dom-class",
     "dojo/dom-form",
     "dojo/dom-style",
@@ -72,7 +73,7 @@ define([
     "hpcc/TableContainer",
     "hpcc/InfoGridWidget"
 
-], function (declare, lang, i18n, nlsHPCC, arrayUtil, dom, domClass, domForm, domStyle, domGeo, cookie, on, query, topic, xhr,
+], function (declare, lang, i18n, nlsHPCC, arrayUtil, dom, domConstruct, domClass, domForm, domStyle, domGeo, cookie, on, query, topic, xhr,
                 registry, Tooltip,
                 UpgradeBar, ColorPicker,
                 CodeMirror,
@@ -161,7 +162,11 @@ define([
         },
 
         refreshUserName: function () {
-            dom.byId(this.id + "UserID").textContent = this.userName ? this.userName : "";
+            if (this.username) {
+                dom.byId(this.id + "UserID").textContent = this.username;
+            } else {
+                domConstruct.place("<span>" + dojo.cookie("ESPUserName") + "</span>", this.id + "UserID", "replace");
+            }
         },
 
         init: function (params) {