webui: user management bug fixes
Bug fixes in user management
- Removed granular error messages which is causing
issues in non-redfish (rest api) case.
- Set default password show button state.
- Delete button missing in table issue fix.
- Role dropdown not proper issue fix.
- Associating label element with 'for' attributes.
Change-Id: I6c5bb25837bb2fcbcb131a88060e6acf603ca5a2
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
diff --git a/app/users/controllers/user-accounts-controller.js b/app/users/controllers/user-accounts-controller.js
index 4148f54..b76d812 100644
--- a/app/users/controllers/user-accounts-controller.js
+++ b/app/users/controllers/user-accounts-controller.js
@@ -22,6 +22,9 @@
$scope.loading = true;
$scope.isUserSelected = false;
$scope.selectedUser = null;
+ $scope.togglePassword = false;
+ $scope.toggleVerify = false;
+
$q.all([
APIUtils.getAllUserAccounts().then(
function(res) {
@@ -89,14 +92,7 @@
},
function(error) {
$scope.state = 'error';
- if ((error.data.error['@Message.ExtendedInfo'] !=
- undefined) &&
- (error.data.error['@Message.ExtendedInfo'].length != 0)) {
- $scope.outMsg =
- error.data.error['@Message.ExtendedInfo'][0].Message;
- } else {
- $scope.outMsg = 'Failed to create new user.';
- }
+ $scope.outMsg = 'Failed to create new user';
})
.finally(function() {
loadUserInfo();
@@ -136,14 +132,7 @@
},
function(error) {
$scope.state = 'error';
- if ((error.data.error['@Message.ExtendedInfo'] !=
- undefined) &&
- (error.data.error['@Message.ExtendedInfo'].length != 0)) {
- $scope.outMsg =
- error.data.error['@Message.ExtendedInfo'][0].Message;
- } else {
- $scope.outMsg = 'Updating user failed.';
- }
+ $scope.outMsg = 'Updating user failed';
})
.finally(function() {
loadUserInfo();
@@ -163,14 +152,7 @@
},
function(error) {
$scope.state = 'error';
- if ((error.data.error['@Message.ExtendedInfo'] !=
- undefined) &&
- (error.data.error['@Message.ExtendedInfo'].length != 0)) {
- $scope.outMsg =
- error.data.error['@Message.ExtendedInfo'][0].Message;
- } else {
- $scope.outMsg = 'Deleting user failed.';
- }
+ $scope.outMsg = 'Deleting user failed';
})
.finally(function() {
loadUserInfo();