Repository: ambari
Updated Branches:
  refs/heads/trunk eaddabf26 -> b67ddc7c1


AMBARI-8199 Title after install completion is still 'Ambari-Cluster Install 
Wizard'. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: a59bbb2bc8897bc3f204ac8ea119e5827a0404ac
Parents: eaddabf
Author: aBabiichuk <[email protected]>
Authored: Fri Nov 7 14:27:36 2014 +0200
Committer: aBabiichuk <[email protected]>
Committed: Fri Nov 7 14:28:03 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main.js | 8 ++++----
 ambari-web/app/messages.js         | 2 ++
 ambari-web/app/router.js           | 4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a59bbb2b/ambari-web/app/controllers/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main.js 
b/ambari-web/app/controllers/main.js
index ff2c3d4..d3d70ad 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -24,15 +24,15 @@ App.MainController = Em.Controller.extend({
 
   updateTitle: function(){
     var name = App.router.get('clusterController.clusterName');
-    if(App.clusterStatus.get('isInstalled')) {
-      if (name) {
+    if(App.router.get('clusterInstallCompleted')) {
+      if (name && App.router.get('clusterController').get('isLoaded')) {
         name = name.length > 13 ? name.substr(0, 10) + "..." : name;
       } else {
         name = Em.I18n.t('common.loading');
       }
-      $('title').text('Ambari - ' + name);
+      $('title').text(Em.I18n.t('app.name.subtitle').format(name));
     }
-  }.observes('App.router.clusterController.clusterName, 
App.clusterStatus.isInstalled'),
+  }.observes('App.router.clusterController.clusterName, 
App.router.clusterInstallCompleted', 'App.router.clusterController.isLoaded'),
 
   isClusterDataLoaded: function(){
     return App.router.get('clusterController.isLoaded');

http://git-wip-us.apache.org/repos/asf/ambari/blob/a59bbb2b/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e324659..282fdc5 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -19,6 +19,8 @@
 Em.I18n.translations = {
 
   'app.name':'Ambari',
+  'app.name.subtitle':'Ambari - {0}',
+  'app.name.subtitle.experimental':'Ambari Experimental',
   'app.reloadPopup.link': 'Reload Page',
   'app.reloadPopup.text': 'Trying to connect to server...',
   'app.reloadPopup.header': 'Reload Page',

http://git-wip-us.apache.org/repos/asf/ambari/blob/a59bbb2b/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 7509908..c8ab2d7 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -350,7 +350,7 @@ App.Router = Em.Router.extend({
   },
 
   logOff: function (context) {
-    $('title').text('Ambari');
+    $('title').text(Em.I18n.t('app.name'));
     var hash = window.btoa(this.get('loginController.loginName') + ":" + 
this.get('loginController.password'));
 
     App.router.get('mainController').stopPolling();
@@ -485,7 +485,7 @@ App.Router = Em.Router.extend({
       },
       connectOutlets: function (router, context) {
         if (App.get('isAdmin') && !App.get('isOperator')) {
-          $('title').text("Ambari Experimental");
+          $('title').text(Em.I18n.t('app.name.subtitle.experimental'));
           console.log('/experimental:connectOutlet');
           router.get('applicationController').connectOutlet('experimental');
         }

Reply via email to