Author: srimanth
Date: Mon Jan 28 23:43:35 2013
New Revision: 1439697
URL: http://svn.apache.org/viewvc?rev=1439697&view=rev
Log:
AMBARI-1273. Edit User: No error message is shown when the user does not enter
the correct "old password". (srimanth)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/user.js
incubator/ambari/trunk/ambari-web/app/messages.js
incubator/ambari/trunk/ambari-web/app/views/main/admin/user/edit.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1439697&r1=1439696&r2=1439697&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon Jan 28 23:43:35 2013
@@ -160,6 +160,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-1273. Edit User: No error message is shown when the user does not
+ enter the correct "old password". (srimanth)
+
AMBARI-1172. Alert status change does not change time for the alerts.
(srimanth via yusaku)
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/user.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/user.js?rev=1439697&r1=1439696&r2=1439697&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/user.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/user.js Mon
Jan 28 23:43:35 2013
@@ -92,12 +92,14 @@ App.MainAdminUserController = Em.Control
dataType: 'json',
timeout: App.timeout,
success: function(data){
- callback(true);
+ callback(true, '');
},
error: function (request, ajaxOptions, error) {
//do something
- callback(false);
+ var message = $.parseJSON(request.responseText).message;
+ message = message.substr(message.indexOf(':') + 1); // Remove classname
+ callback(false, message);
console.log('error on change component host status')
},
Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1439697&r1=1439696&r2=1439697&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Mon Jan 28 23:43:35 2013
@@ -223,6 +223,7 @@ Em.I18n.translations = {
'admin.users.delete.header':'Delete {0}',
'admin.users.addButton':'Add Local User',
+ 'admin.users.editButton': 'Edit Local User',
'admin.users.delete':'delete',
'admin.users.edit':'edit',
'admin.users.privileges':'Admin',
Modified: incubator/ambari/trunk/ambari-web/app/views/main/admin/user/edit.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/admin/user/edit.js?rev=1439697&r1=1439696&r2=1439697&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/admin/user/edit.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/admin/user/edit.js Mon Jan
28 23:43:35 2013
@@ -42,9 +42,17 @@ App.MainAdminUserEditView = Em.View.exte
parent_controller.sendCommandToServer('/users/' +
form.getField("userName").get('value'), "PUT" , {
Users:Users
- }, function (success) {
- console.log('success', success);
+ }, function (success, message) {
if (!success) {
+ App.ModalPopup.show({
+ header: Em.I18n.t('admin.users.editButton'),
+ body: message,
+ primary: 'Ok',
+ secondary: null,
+ onPrimary: function() {
+ this.hide();
+ }
+ });
return;
}