incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1437200 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/data/statusCodes.js ambari-web/app/messages.js ambari-web/app/models/user.js ambari-web/app/views/main/admin/user/create.js
Date Tue, 22 Jan 2013 21:51:22 GMT
Author: yusaku
Date: Tue Jan 22 21:51:21 2013
New Revision: 1437200

URL: http://svn.apache.org/viewvc?rev=1437200&view=rev
Log:
AMBARI-1246. Add user minor improvements. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/data/statusCodes.js
    incubator/ambari/trunk/ambari-web/app/messages.js
    incubator/ambari/trunk/ambari-web/app/models/user.js
    incubator/ambari/trunk/ambari-web/app/views/main/admin/user/create.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1437200&r1=1437199&r2=1437200&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Jan 22 21:51:21 2013
@@ -17,6 +17,8 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-1246. Add user minor improvements. (yusaku)
+
  AMBARI-1245. Do not let the user go back to the previous step while host
  bootstrap is in progress. (yusaku)
 

Modified: incubator/ambari/trunk/ambari-web/app/data/statusCodes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/statusCodes.js?rev=1437200&r1=1437199&r2=1437200&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/statusCodes.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/statusCodes.js Tue Jan 22 21:51:21 2013
@@ -44,7 +44,7 @@ module.exports = {
 		console.log("Error code 500: Internal Error on server side.");
 	},
 	501: function () {
-		console.log("Error code 501: Not implementd yet.");
+		console.log("Error code 501: Not implemented yet.");
 	},
 	502: function () {
 		console.log("Error code 502: Services temporarily overloaded.");

Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1437200&r1=1437199&r2=1437200&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Tue Jan 22 21:51:21 2013
@@ -168,7 +168,7 @@ Em.I18n.translations = {
   'form.password':'Password',
   'form.passwordRetype':'Retype Password',
   'form.saveSuccess':'Successfully saved.',
-  'form.saveError':'Sorry, errors occured.',
+  'form.saveError':'Sorry, errors occurred.',
 
   'form.validator.invalidIp':'Please enter valid ip address',
 
@@ -224,6 +224,8 @@ Em.I18n.translations = {
   'admin.users.password':'Password',
   'admin.users.passwordRetype':'Retype Password',
   'admin.users.username':'Username',
+  'admin.users.createSuccess': 'User successfully created.',
+  'admin.users.createError': 'Error occurred while user creating.',
 
   'question.sure':'Are you sure?',
   'yes':'Yes',

Modified: incubator/ambari/trunk/ambari-web/app/models/user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/user.js?rev=1437200&r1=1437199&r2=1437200&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/user.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/user.js Tue Jan 22 21:51:21 2013
@@ -111,7 +111,7 @@ App.CreateUserForm = App.Form.extend({
   }.property('App.router.mainAdminUserCreateController.content'),
 
   fieldsOptions:[
-    { name:"userName", displayName:"Username" },
+    { name:"userName", displayName:"Username", toLowerCase: function(){var v = this.get('value');
this.set('value', v.toLowerCase())}.observes('value') },
     { name:"password", displayName:"Password", displayType:"password", isRequired: function(){
return this.get('form.isObjectNew'); }.property('form.isObjectNew') },
     { name:"passwordRetype", displayName:"Retype Password", displayType:"password", validator:"passwordRetype",
isRequired: false },
     { name:"admin", displayName:"Admin", displayType:"checkbox", isRequired:false },

Modified: incubator/ambari/trunk/ambari-web/app/views/main/admin/user/create.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/admin/user/create.js?rev=1437200&r1=1437199&r2=1437200&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/admin/user/create.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/admin/user/create.js Tue Jan 22 21:51:21
2013
@@ -41,9 +41,26 @@ App.MainAdminUserCreateView = Em.View.ex
       }, function (success) {
 
         if (!success) {
+          App.ModalPopup.show({
+            header: Em.I18n.t('admin.users.addButton'),
+            body: Em.I18n.t('admin.users.createError'),
+            primary: 'Ok',
+            secondary: null,
+            onPrimary: function() {
+              this.hide();
+            }
+          });
           return;
         }
-
+        App.ModalPopup.show({
+          header: Em.I18n.t('admin.users.addButton'),
+          body: Em.I18n.t('admin.users.createSuccess'),
+          primary: 'Ok',
+          secondary: null,
+          onPrimary: function() {
+            this.hide();
+          }
+        });
         form.save();
 
         App.router.transitionTo("allUsers");



Mime
View raw message