summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/admins
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-08-23 18:27:19 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-08-23 21:12:56 -0400
commit978dbcf0a196acbafad72fe1e2478ec0e384f02f (patch)
tree17e1ceaa4a12a599320cbb317947e990bf1a5383 /ecomp-portal-FE-common/client/app/views/admins
parentbc7350dce5b7b1dcd1c472a3922b42c4ea99809d (diff)
Deliver centralized role management feature
Repair multiple defects also. Revise deployment to use docker-compose. Remove all zip archives. Issue: PORTAL-21, PORTAL-25, PORTAL-28, PORTAL-52, PORTAL-69, PORTAL-74, PORTAL-76, PORTAL-80, PORTAL-82 Change-Id: Ie72fec7d35ba78beb162bba6ed27b2caee340c61 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/admins')
-rw-r--r--ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js15
-rw-r--r--ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html131
-rw-r--r--ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less51
-rw-r--r--ecomp-portal-FE-common/client/app/views/admins/admins.controller.js48
-rw-r--r--ecomp-portal-FE-common/client/app/views/admins/admins.tpl.html4
5 files changed, 160 insertions, 89 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js
index 9aec9b4f..a5ba0215 100644
--- a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js
@@ -21,15 +21,14 @@
'use strict';
(function () {
class NewAdminModalCtrl {
- constructor($log, adminsService, $scope, confirmBoxService, utilsService, $location) {
-
+ constructor($log, adminsService, $scope, confirmBoxService, utilsService, $location, items) {
let init = () => {
this.isSaving = false;
this.originalApps = [];
/* istanbul ignore if */
- if ($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState) {
- this.selectedUser = $scope.ngDialogData.selectedUser;
- this.dialogState = $scope.ngDialogData.dialogState;
+ if (items && items.selectedUser && items.dialogState) {
+ this.selectedUser = items.selectedUser;
+ this.dialogState = items.dialogState;
this.isShowBack = false;
if (this.dialogState === 2) {
this.getAdminAppsRoles();
@@ -162,7 +161,7 @@
$log.debug('Admin apps roles updated successfully!', res);
//close and resolve dialog promise with true (to update the table)
this.remindToAddUserIfNecessary();
- $scope.closeThisDialog(true);
+ $scope.$dismiss('cancel');
}).catch(err => {
$log.error('NewAdminModalCtrl.updateAdminAppsRoles:: Failed - ' + err);
}).finally(()=> {
@@ -193,7 +192,7 @@
* add it to the user administrated apps list
*/
$scope.$watch('newAdmin.selectedNewApp.value', (newVal) => {
- var newVal= JSON.parse(newVal);
+ if(newVal) var newVal= JSON.parse(newVal);
if (!newVal || newVal.isAdmin === undefined) {
return;
}
@@ -248,6 +247,6 @@
}
}
- NewAdminModalCtrl.$inject = ['$log', 'adminsService', '$scope', 'confirmBoxService', 'utilsService', '$location'];
+ NewAdminModalCtrl.$inject = ['$log', 'adminsService', '$scope', 'confirmBoxService', 'utilsService', '$location', 'items'];
angular.module('ecompApp').controller('NewAdminModalCtrl', NewAdminModalCtrl);
})();
diff --git a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html
index a18b8f60..f186fc58 100644
--- a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html
+++ b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html
@@ -17,59 +17,102 @@
limitations under the License.
================================================================================
-->
-<div class="new-admin-modal">
+ <style>
+ .title{
+ border-bottom: none !important;
+ }
+
+ .b2b-modal-footer .cta-button-group {
+ border-top: 0px solid #d2d2d2;
+ }
+
+</style>
- <div class="search-users" ng-show="newAdmin.dialogState===1">
+<div>
+ <div ng-if="newAdmin.dialogState===1">
- <search-users search-title="New Admin"
- selected-user="newAdmin.selectedUser"></search-users>
+ <div class="b2b-modal-header">
+ <h2 class="heading-medium" id="newAdmin">New Admin</h2>
- <div class="dialog-control">
- <button id="search-users-button-next" class="btn btn-alt btn-small" ng-click="newAdmin.selectedUser && newAdmin.getAdminAppsRoles()"
- ng-class="{disabled: !newAdmin.selectedUser}">Next
- </button>
- <button id="search-users-button-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
- </div>
- </div>
- <br>
- <div id="div-admin-app-roles" class="admin-app-roles" ng-show="newAdmin.dialogState===2">
- <div class="title" id="title"
- ng-bind="newAdmin.selectedUser.firstName + ' ' + newAdmin.selectedUser.lastName + ' (' + newAdmin.selectedUser.orgUserId + ')'"></div>
- <div class="app-roles-main">
- <div id="div-app-roles-main-title" class="app-roles-main-title">
- <span class="left">Administrates:</span>
- <!--<span class="right" ng-click="newAdmin.addAdministratedApp()">+Add</span>-->
- </div>
+ <div class="corner-button in">
+ <button type="button" class="close" aria-label="Close" id="admin-button-cancel"
+ ng-click="$dismiss('cancel')"></button>
+ </div>
+ </div>
+ <div class="b2b-modal-body" tabindex="0"
+ aria-label="Modal header text content" role="region">
+ <search-users search-title="" selected-user="newAdmin.selectedUser"></search-users>
+ </div>
- <div class="adminAppsRoles_dropdown">
- <select id="dropdown1" name="dropdown1" b2b-dropdown
- placeholder-text="Select application"
- ng-model="newAdmin.selectedNewApp.value">
- <option b2b-dropdown-list option-repeat="app in (filteredApps = (newAdmin.adminAppsRoles | filter:{isAdmin:'false'})) track by app.id " ng-disabled="!filteredApps.length" value="{{app}}">{{app.appName}}</option>
- </select>
- </div>
- <br>
+ <div class="b2b-modal-footer">
+ <div class="cta-button-group in">
+ <button id="search-users-button-next" class="btn btn-alt btn-small"
+ ng-click="newAdmin.selectedUser && newAdmin.getAdminAppsRoles()"
+ ng-class="{disabled: !newAdmin.selectedUser}">Next</button>
+ <button id="search-users-button-cancel"
+ class="btn btn-alt btn-small" id="div-cancel-button" ng-click="$dismiss('cancel')">Cancel</button>
+ </div>
+ </div>
- <div class="admin-roles-list">
- <div ng-repeat="app in (newAdmin.adminAppsRoles | orderBy:newAdmin.orderFilter) track by app.id" ng-show="app.isAdmin">
- <div id="select-app-{{app.appName.split(' ').join('-')}}" class="administrated-application" ng-bind="app.appName | elipsis: 57"></div>
- <i id="i-delete-application" class="icon-misc-trash" ng-click="newAdmin.unadminApp(app)"> </i>
- </div>
- </div>
+ </div>
+
+ <div id="div-admin-app-roles" class="app-roles-main" ng-if="newAdmin.dialogState===2">
+ <div class="b2b-modal-header">
+ <div class="title" id="title"
+ ng-bind="newAdmin.selectedUser.firstName + ' ' + newAdmin.selectedUser.lastName + ' (' + newAdmin.selectedUser.orgUserId + ')'">
+ </div>
- <div class="dialog-control">
- <span class="ecomp-save-spinner" ng-show="newAdmin.isSaving"></span>
- <button id="button-back" ng-show="newAdmin.isShowBack" class="btn btn-alt btn-small" ng-click="newAdmin.navigateBack()">Back</button>
- <button id="div-updateAdminAppsRoles" class="btn btn-alt btn-small" ng-click="newAdmin.updateAdminAppsRoles()"
- ng-class="{disabled: false}">Save
- </button>
- <button id="div-cancel-button" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
- </div>
+ <div class="corner-button in">
+ <button type="button" class="close" aria-label="Close"
+ ng-click="$dismiss('cancel')"></button>
+ </div>
+ </div>
- </div>
- </div>
+ <div class="b2b-modal-body">
+ <div id="div-app-roles-main-title" class="app-roles-main-title">
+ <span class="left">Administrates:</span>
+ <!--<span class="right" ng-click="newAdmin.addAdministratedApp()">+Add</span>-->
+ </div>
+ <div class="adminAppsRoles_dropdown">
+ <select id="dropdown1" name="dropdown1" b2b-dropdown
+ placeholder-text="Select application"
+ ng-model="newAdmin.selectedNewApp.value">
+ <option b2b-dropdown-list
+ option-repeat="app in (filteredApps = (newAdmin.adminAppsRoles | filter:{isAdmin:'false'})) track by app.id "
+ ng-disabled="!filteredApps.length" value="{{app}}">{{app.appName}}</option>
+ </select>
+ </div>
+ <br>
+ <div class="admin-roles-list">
+ <div
+ ng-repeat="app in (newAdmin.adminAppsRoles | orderBy:newAdmin.orderFilter) track by app.id"
+ ng-show="app.isAdmin">
+ <span id="select-app-{{app.appName.split(' ').join('-')}}"
+ class="administrated-application"
+ ng-bind="app.appName | elipsis: 57"></span> <i
+ id="i-delete-application" class="icon-misc-trash"
+ ng-click="newAdmin.unadminApp(app)"> </i>
+ </div>
+ </div>
+ </div>
+ <br>
+ <div class="b2b-modal-footer">
+ <div class="cta-button-group in">
+
+ <span class="ecomp-save-spinner" ng-show="newAdmin.isSaving"></span>
+ <button id="button-back" ng-show="newAdmin.isShowBack"
+ class="btn btn-alt btn-small" ng-click="newAdmin.navigateBack()">Back</button>
+ <button id="div-updateAdminAppsRoles" class="btn btn-alt btn-small"
+ ng-click="newAdmin.updateAdminAppsRoles()"
+ ng-class="{disabled: false}">Save</button>
+ <button id="div-cancel-button" class="btn btn-alt btn-small"
+ ng-click="$dismiss('cancel')">Cancel</button>
+
+ </div>
+ </div>
+ </div>
</div>
diff --git a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less
index f7c1111d..1ac5963f 100644
--- a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less
+++ b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less
@@ -1,6 +1,7 @@
.new-admin-modal {
height: 430px;
margin-left: 20px;
+ height: 350px;
.search-users {
}
@@ -8,7 +9,7 @@
.admin-app-roles {
.title {
//.n18r;
- .dGray18r; //AT&T Dark Gray
+ .dGray18r;
border-bottom: @blue-active 3px solid;
}
@@ -81,5 +82,53 @@
}
}
+
+ .adminForm-title {
+ color: #5a5a5a;
+ font-size: 18px;
+ border-bottom: #067ab4 3px solid;
+ margin-left:0px;
+ }
+
+ .adminForm-name-property-label {
+ margin-bottom: 5px;
+ color: #5a5a5a;
+ font-size: 14px;
+ font-weight: bold;
+ padding-top: 20px;
+ }
+
+ .adminForm-requiredId {
+ color: red;
+ }
+
+ .adminForm-name-property-required {
+ color: #cf2a2a;
+ font-size: 10px;
+ }
+
+ .adminForm-property-required-small {
+ position: absolute;
+ }
+
+ .adminForm-code-property-label {
+ margin-bottom: 5px;
+ color: #5a5a5a;
+ font-size: 14px;
+ font-weight: bold;
+ padding-top: 20px;
+ }
+
+ .adminForm-code-property-input {
+ display: inline-block;
+ width: 338px;
+ //height: 40px;
+ }
+
+ .adminForm-code-property-required {
+ color: #cf2a2a;
+ font-size: 10px;
+ }
+
}
diff --git a/ecomp-portal-FE-common/client/app/views/admins/admins.controller.js b/ecomp-portal-FE-common/client/app/views/admins/admins.controller.js
index 05f9db3b..28144ed7 100644
--- a/ecomp-portal-FE-common/client/app/views/admins/admins.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/admins/admins.controller.js
@@ -20,7 +20,7 @@
'use strict';
(function () {
class AdminsCtrl {
- constructor($log, adminsService, applicationsService, ngDialog) {
+ constructor($log, adminsService, applicationsService, ngDialog, $modal) {
let allPortalsFilterObject = {index: 0, title: 'All applications', value: ''};
@@ -119,43 +119,23 @@
}
}
}
- ngDialog.open({
+ var modalInstance = $modal.open({
templateUrl: 'app/views/admins/add-admin-dialogs/new-admin.modal.html',
- controller: 'NewAdminModalCtrl',
- controllerAs: 'newAdmin',
- data: data
- }).closePromise.then(needUpdate => {
- if(needUpdate.value === true){
- // $log.debug('AdminsCtrl:openAddNewAdminModal:: updating table data...');
- updateTableData();
- }
+ controller: 'NewAdminModalCtrl as newAdmin',
+ sizeClass: 'modal-medium',
+ resolve: {
+ items: function () {
+ return data;
+ }
+ }
});
+
+ modalInstance.result.finally(function () {
+ updateTableData();
+ });
};
-
- this.openEditUserModal = (loginId) => {
- var data = {
- loginId : loginId,
- updateRemoteApp : false,
- appId : this.selectedApp!=null?this.selectedApp.id:''
- }
- var modalInstance = ngDialog.open({
- templateUrl: 'app/views/header/user-edit/edit-user.tpl.html',
- controller: 'editUserController',
- data: data,
- resolve: {
- message: function message() {
- var message = {
- type: 'Contact',
- };
- return message;
- }
- }
- }).closePromise.then(needUpdate => {
- updateTableData();
- });
- }
}
}
- AdminsCtrl.$inject = ['$log', 'adminsService', 'applicationsService', 'ngDialog'];
+ AdminsCtrl.$inject = ['$log', 'adminsService', 'applicationsService', 'ngDialog', '$modal'];
angular.module('ecompApp').controller('AdminsCtrl', AdminsCtrl);
})();
diff --git a/ecomp-portal-FE-common/client/app/views/admins/admins.tpl.html b/ecomp-portal-FE-common/client/app/views/admins/admins.tpl.html
index f9ea3ff9..45bd184c 100644
--- a/ecomp-portal-FE-common/client/app/views/admins/admins.tpl.html
+++ b/ecomp-portal-FE-common/client/app/views/admins/admins.tpl.html
@@ -26,14 +26,14 @@
<div class="table-control">
<div class="table-control-fields">
<div class="table-dropdown">
- <select id="dropdown1" name="dropdown1" b2b-dropdown placeholder-text="All application" ng-model="admins.filterByApp.value">
+ <select id="dropdown1" name="dropdown1" b2b-dropdown ng-model="admins.filterByApp.value">
<option b2b-dropdown-list option-repeat="d in admins.availableApps" value="{{d.value}}">{{d.title}}</option>
</select>
</div>
<div >
<input id="input-table-search" placeholder="Search in entire table" class="table-search-field" type="text" data-ng-model="admins.searchString">
</div>
- <button class="btn btn-alt btn-small" ng-click="admins.openAddNewAdminModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Admin</button>
+ <button class="btn btn-alt btn-small" id="admin-button-add" ng-click="admins.openAddNewAdminModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Admin</button>
</div>
</div>
<span class="ecomp-spinner" ng-show="admins.isLoadingTable"></span>