Repository: ambari
Updated Branches:
  refs/heads/trunk 074a7a52a -> fcdb56205


AMBARI-15318. Fix dependent keys for CP (onechiporenko)


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

Branch: refs/heads/trunk
Commit: fcdb5620592fd1263a8b6fe847fad6e24733e0ef
Parents: 074a7a5
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Mar 7 17:12:39 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Mar 7 20:13:03 2016 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/application.js                    | 4 +---
 ambari-web/app/controllers/experimental.js                   | 8 +++-----
 ambari-web/app/controllers/main.js                           | 2 +-
 .../main/service/widgets/create/wizard_controller.js         | 4 +---
 ambari-web/app/views/main/service/reassign/step3_view.js     | 2 +-
 ambari-web/test/controllers/application_test.js              | 2 ++
 ambari-web/test/controllers/main_test.js                     | 2 +-
 7 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdb5620/ambari-web/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/application.js 
b/ambari-web/app/controllers/application.js
index 0102741..90c2727 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -45,9 +45,7 @@ App.ApplicationController = 
Em.Controller.extend(App.UserPref, {
 
   isExistingClusterDataLoaded: 
Em.computed.and('App.router.clusterInstallCompleted', 'isClusterDataLoaded'),
 
-  enableLinks: function() {
-    return this.get('isExistingClusterDataLoaded') && 
!App.get('isOnlyViewUser');
-  }.property('isExistingClusterDataLoaded'),
+  enableLinks: Em.computed.and('isExistingClusterDataLoaded', 
'!App.isOnlyViewUser'),
 
   /**
    * Determines if "Exit" menu-item should be shown

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdb5620/ambari-web/app/controllers/experimental.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/experimental.js 
b/ambari-web/app/controllers/experimental.js
index 917a104..9fa6da5 100644
--- a/ambari-web/app/controllers/experimental.js
+++ b/ambari-web/app/controllers/experimental.js
@@ -20,14 +20,12 @@ var App = require('app');
 App.ExperimentalController = Em.Controller.extend(App.UserPref, {
   name: 'experimentalController',
   supports: function () {
-    var supports = [];
-    Em.keys(App.get('supports')).forEach(function (sup) {
-      supports.push(Ember.Object.create({
+    return Em.keys(App.get('supports')).map(function (sup) {
+      return Ember.Object.create({
         name: sup,
         selected: App.get('supports')[sup]
-      }));
+      });
     });
-    return supports;
   }.property('App.supports'),
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdb5620/ambari-web/app/controllers/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main.js 
b/ambari-web/app/controllers/main.js
index b99866b..87a483e 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -37,7 +37,7 @@ App.MainController = Em.Controller.extend({
       }
       $('title').text(Em.I18n.t('app.name.subtitle').format(name));
     }
-  }.observes('App.router.clusterController.clusterName, 
App.router.clusterInstallCompleted', 'App.router.clusterController.isLoaded'),
+  }.observes('App.router.clusterController.clusterName', 
'App.router.clusterInstallCompleted', 'App.router.clusterController.isLoaded'),
 
   isClusterDataLoaded: 
Em.computed.alias('App.router.clusterController.isLoaded'),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdb5620/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
index d45b936..e833ead 100644
--- 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
+++ 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
@@ -90,9 +90,7 @@ App.WidgetWizardController = App.WizardController.extend({
     widgetValues: [],
     widgetName: "",
     widgetDescription: "",
-    widgetAuthor: function () {
-      return App.router.get('loginName');
-    }.property('App.router.loginName'),
+    widgetAuthor: Em.computed.alias('App.router.loginName'),
     widgetScope: null
   }),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdb5620/ambari-web/app/views/main/service/reassign/step3_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/reassign/step3_view.js 
b/ambari-web/app/views/main/service/reassign/step3_view.js
index 20d08d8..003fcb6 100644
--- a/ambari-web/app/views/main/service/reassign/step3_view.js
+++ b/ambari-web/app/views/main/service/reassign/step3_view.js
@@ -41,5 +41,5 @@ App.ReassignMasterWizardStep3View = Em.View.extend({
     }
 
     return false;
-  }.property('controller.content.reassign.display_name, 
controller.content.databaseType')
+  }.property('controller.content.reassign.display_name', 
'controller.content.databaseType')
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdb5620/ambari-web/test/controllers/application_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/application_test.js 
b/ambari-web/test/controllers/application_test.js
index cdeb06e..e8c4cfc 100644
--- a/ambari-web/test/controllers/application_test.js
+++ b/ambari-web/test/controllers/application_test.js
@@ -33,6 +33,8 @@ describe('App.ApplicationController', function () {
 
   App.TestAliases.testAsComputedAnd(getController(), 
'isExistingClusterDataLoaded', 
['App.router.clusterInstallCompleted','isClusterDataLoaded']);
 
+  App.TestAliases.testAsComputedAnd(getController(), 'enableLinks', 
['isExistingClusterDataLoaded','!App.isOnlyViewUser']);
+
   describe('#showAboutPopup', function() {
     var dataToShowRes = {};
     beforeEach(function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdb5620/ambari-web/test/controllers/main_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main_test.js 
b/ambari-web/test/controllers/main_test.js
index b0429b0..ce5e021 100644
--- a/ambari-web/test/controllers/main_test.js
+++ b/ambari-web/test/controllers/main_test.js
@@ -142,7 +142,7 @@ describe('App.MainController', function () {
     });
   });
 
-  describe.skip('#updateTitle', function() {
+  describe('#updateTitle', function() {
     beforeEach(function () {
       sinon.stub(App.router, 'get', function(message){
         if (message === 'clusterController.clusterName') {

Reply via email to