ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-8142. Admin View: Modifying group membership does not report error with bogus users (alexantonenko)
Date Tue, 04 Nov 2014 22:46:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk ca12fe436 -> 0e5804f4c


AMBARI-8142. Admin View: Modifying group membership does not report error with bogus users
(alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e5804f4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e5804f4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e5804f4

Branch: refs/heads/trunk
Commit: 0e5804f4cc927fa86ae1195d99d08f722fcbf24c
Parents: ca12fe4
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Tue Nov 4 20:28:23 2014 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Nov 5 00:38:09 2014 +0200

----------------------------------------------------------------------
 .../scripts/controllers/groups/GroupsEditCtrl.js    | 16 +++++++++++-----
 .../main/resources/ui/admin-web/app/styles/main.css |  3 +++
 2 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0e5804f4/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
index 48ec98f..b886fef 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
@@ -44,12 +44,18 @@ angular.module('ambariAdminConsole')
     $scope.group.editingUsers = '';
   };
   $scope.updateMembers = function() {
-    var newMembers = $scope.group.editingUsers.toString().split(',').filter(function(item)
{return item.trim();}).map(function(item) {return item.trim()});
+    var newMembers = $scope.group.editingUsers.toString().split(',').filter(function(item)
{
+      return item.trim();}
+    ).map(function(item) {
+        return item.trim()
+      }
+    );
     $scope.group.members = newMembers;
-    $scope.group.saveMembers().then(loadMembers)
-    .catch(function(data) {
-      Alert.error('Cannot update group members', data.data.message);
-    });
+    $scope.group.saveMembers().catch(function(data) {
+        Alert.error('Cannot update group members', "<div class='break-word'>" + data.message
+ "</div>");
+      }).finally(function() {
+        loadMembers();
+      });
     $scope.isMembersEditing = false;
   };
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e5804f4/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index f55de27..17d36ef 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -1246,3 +1246,6 @@ button.btn.btn-xs{
 accordion .panel-group .panel{
   overflow: visible;
 }
+.break-word {
+    word-break: break-all;
+}
\ No newline at end of file


Mime
View raw message