Forráskód Böngészése

Merge pull request #9172 from miguelvazq/HPCC-16225

HPCC-16225 Add employee ID to user areas

Reviewed-By: Gordon Smith <gordon.smith@lexisnexis.com>
Richard Chapman 8 éve
szülő
commit
24b7587cc7

+ 3 - 1
esp/src/eclwatch/UserDetailsWidget.js

@@ -87,7 +87,8 @@ define([
                     request: {
                         username: this.user,
                         firstname: formInfo.firstname,
-                        lastname: formInfo.lastname
+                        lastname: formInfo.lastname,
+                        employeeID: formInfo.employeeID
                     }
                 });
 
@@ -112,6 +113,7 @@ define([
             this.user = params.Username;
             if (this.user) {
                 this.updateInput("User", null, this.user);
+                this.updateInput("EmployeeID", null, params.EmployeeID);
                 this.updateInput("Username", null, this.user);
                 this.updateInput("PasswordExpiration", null, params.Passwordexpiration);
 

+ 10 - 3
esp/src/eclwatch/UserQueryWidget.js

@@ -301,6 +301,7 @@ define([
             for (var i = selections.length - 1; i >= 0; --i) {
                 var tab = this.ensureUserPane(selections[i].username, {
                     Username: selections[i].username,
+                    EmployeeID: selections[i].employeeID,
                     Fullname: selections[i].fullname,
                     Passwordexpiration: selections[i].passwordexpiration
                 });
@@ -345,9 +346,10 @@ define([
             window.open(base.getBaseURL("ws_access") + "/UserAccountExport?" + usernames);
         },
 
-        _onUsersRowDblClick: function (username, fullname, passwordexpiration) {
+        _onUsersRowDblClick: function (username, employeeID, fullname, passwordexpiration) {
             var userTab = this.ensureUserPane(username, {
                 Username: username,
+                EmployeeID: employeeID,
                 Fullname: fullname,
                 Passwordexpiration: passwordexpiration
             });
@@ -609,6 +611,10 @@ define([
                             return "<a href='#' class='dgrid-row-url'>" + _name + "</a>"
                         }
                     },
+                    employeeID: {
+                        width: 180,
+                        label: this.i18n.EmployeeID
+                    },
                     fullname: {
                         label: this.i18n.FullName
                     },
@@ -623,13 +629,13 @@ define([
             this.usersGrid.on(".dgrid-row-url:click", function (evt) {
                 if (context._onUsersRowDblClick) {
                     var item = context.usersGrid.row(evt).data;
-                    context._onUsersRowDblClick(item.username,item.fullname,item.passwordexpiration);
+                    context._onUsersRowDblClick(item.username,item.employeeID,item.fullname,item.passwordexpiration);
                 }
             });
             this.usersGrid.on(".dgrid-row:dblclick", function (evt) {
                 if (context._onUsersRowDblClick) {
                     var item = context.usersGrid.row(evt).data;
-                    context._onUsersRowDblClick(item.username,item.fullname,item.passwordexpiration);
+                    context._onUsersRowDblClick(item.username,item.employeeID,item.fullname,item.passwordexpiration);
                 }
             });
             this.usersGrid.onSelectionChanged(function (event) {
@@ -825,6 +831,7 @@ define([
             if (currSel && !currSel.initalized) {
                 if (currSel.id === this.groupsTab.id) {
                 } else if (currSel.id === this.usersTab.id) {
+                    this.refreshUsersGrid();
                 } else if (currSel.id === this.permissionsTab.id) {
                 } else {
                     if (!currSel.initalized) {

+ 1 - 0
esp/src/eclwatch/nls/hpcc.js

@@ -142,6 +142,7 @@ define({root:
     EditDOT: "Edit DOT",
     EditGraphAttributes: "Edit Graph Attributes",
     EditXGMML: "Edit XGMML",
+    EmployeeID: "Employee ID",
     Empty: "(Empty)",
     Enable: "Enable",
     EnableScopeScans: "Enable Scope Scans",

+ 4 - 0
esp/src/eclwatch/templates/UserDetailsWidget.html

@@ -18,6 +18,10 @@
                                 <div id="${id}Username"></div>
                             </li>
                             <li>
+                                <label class="Prompt" for="${id}EmployeeID">${i18n.EmployeeID}:</label>
+                                <input id="${id}EmployeeID" name="employeeID" data-dojo-props="trim: true, placeHolder:'${i18n.EmployeeID}'" data-dojo-type="dijit.form.TextBox" />
+                            </li>
+                            <li>
                                 <label class="Prompt" for="${id}FirstName">${i18n.FirstName}:</label>
                                 <input id="${id}FirstName" name="firstname" data-dojo-props="trim: true, placeHolder:'${i18n.PlaceholderFirstName}'" data-dojo-type="dijit.form.TextBox" />
                             </li>

+ 4 - 0
esp/src/eclwatch/templates/UserQueryWidget.html

@@ -17,6 +17,10 @@
                                             <td><input id="${id}AddUsername" name="username" data-dojo-props="trim: true, required: true" data-dojo-type="dijit.form.ValidationTextBox" /></td>
                                         </tr>
                                         <tr>
+                                            <td><label for="name">${i18n.EmployeeID}:</label></td>
+                                            <td><input id="${id}employeeID" name="employeeID" data-dojo-props="trim: true, required: false" data-dojo-type="dijit.form.ValidationTextBox" /></td>
+                                        </tr>
+                                        <tr>
                                             <td><label for="name">${i18n.FirstName}:</label></td>
                                             <td><input id="${id}AddUserFirstName" name="firstname" data-dojo-props="trim: true, placeHolder:'${i18n.PlaceholderFirstName}'" data-dojo-type="dijit.form.ValidationTextBox" /></td>
                                         </tr>