ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [07/50] ambari git commit: AMBARI-20231. Don't recalculate side-menu content when moving to the views (onechiporenko)
Date Wed, 01 Mar 2017 20:38:24 GMT
AMBARI-20231. Don't recalculate side-menu content when moving to the views (onechiporenko)


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: a23467bf03ca2fd10aa9183038b59bcd7ad841e0
Parents: 44e44ba
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Tue Feb 28 13:53:34 2017 +0200
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Tue Feb 28 13:53:34 2017 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/views_controller.js           | 2 ++
 ambari-web/app/views/application.js                           | 7 ++-----
 ambari-web/app/views/main/menu.js                             | 1 -
 ambari-web/app/views/main/views_view.js                       | 2 +-
 .../admin/highAvailability/nameNode/step4_controller_test.js  | 2 +-
 .../admin/highAvailability/nameNode/step7_controller_test.js  | 2 --
 .../admin/highAvailability/nameNode/step8_controller_test.js  | 2 --
 .../admin/highAvailability/nameNode/wizard_controller_test.js | 2 --
 8 files changed, 6 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/app/controllers/main/views_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/views_controller.js b/ambari-web/app/controllers/main/views_controller.js
index e2e9281..eb5775d 100644
--- a/ambari-web/app/controllers/main/views_controller.js
+++ b/ambari-web/app/controllers/main/views_controller.js
@@ -25,6 +25,8 @@ App.MainViewsController = Em.Controller.extend({
 
   ambariViews: [],
 
+  visibleAmbariViews: Em.computed.filterBy('ambariViews', 'visible', true),
+
   dataLoading: function () {
     var viewsController = this;
     var dfd = $.Deferred();

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/app/views/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/application.js b/ambari-web/app/views/application.js
index 207e77f..ef9df6a 100644
--- a/ambari-web/app/views/application.js
+++ b/ambari-web/app/views/application.js
@@ -23,11 +23,8 @@ App.ApplicationView = Em.View.extend({
   templateName: require('templates/application'),
 
   views: function () {

-    if (App.router.get('loggedIn')) {

-      return App.router.get('mainViewsController.ambariViews').filterProperty('visible');

-    } else {

-      return [];

-    }
}.property('App.router.mainViewsController.ambariViews.length', 'App.router.loggedIn'),
+    return App.router.get('loggedIn') ? App.router.get('mainViewsController.visibleAmbariViews')
: [];
+  
}.property('App.router.mainViewsController.visibleAmbariViews.[]', 'App.router.loggedIn'),
 
   /**
    * Create the breadcrums showing on ambari top bar

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/app/views/main/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/menu.js b/ambari-web/app/views/main/menu.js
index 91aaad7..6e79aba 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -49,7 +49,6 @@ App.MainSideMenuView = Em.CollectionView.extend({
     return result;
   }.property(
       'App.router.loggedIn',
-      'views.length',
       'App.router.clusterController.isLoaded',
       'App.router.clusterInstallCompleted',
       'App.router.wizardWatcherController.isWizardRunning'

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/app/views/main/views_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/views_view.js b/ambari-web/app/views/main/views_view.js
index 46b3e43..846ecd9 100644
--- a/ambari-web/app/views/main/views_view.js
+++ b/ambari-web/app/views/main/views_view.js
@@ -26,7 +26,7 @@ App.MainViewsView = Em.View.extend({
 
   views: function() {
     return App.router.get('mainViewsController.ambariViews');
-  }.property('App.router.mainViewsController.ambariViews.@each'),
+  }.property('App.router.mainViewsController.ambariViews.[]'),
 
   selectedViewBinding: 'controller.selectedView'
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
index e850339..bfc991f 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
@@ -144,7 +144,7 @@ describe('App.HighAvailabilityWizardStep4Controller', function() {
   });
 
   describe('#done', function() {
-    var mock  = {
+    var mock = {
       getKDCSessionState: Em.clb
     };
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step7_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step7_controller_test.js
b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step7_controller_test.js
index d2b385a..a285952 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step7_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step7_controller_test.js
@@ -17,8 +17,6 @@
  */
 
 var App = require('app');
-var testHelpers = require('test/helpers');
-
 
 describe('App.HighAvailabilityWizardStep7Controller', function() {
   var controller;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step8_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step8_controller_test.js
b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step8_controller_test.js
index 4af3aa9..f6b861b 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step8_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step8_controller_test.js
@@ -17,8 +17,6 @@
  */
 
 var App = require('app');
-var testHelpers = require('test/helpers');
-
 
 describe('App.HighAvailabilityWizardStep8Controller', function() {
   var controller;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/test/controllers/main/admin/highAvailability/nameNode/wizard_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/wizard_controller_test.js
b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/wizard_controller_test.js
index 577f07b..b92433e 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/wizard_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/wizard_controller_test.js
@@ -17,8 +17,6 @@
  */
 
 var App = require('app');
-var testHelpers = require('test/helpers');
-
 
 describe('App.HighAvailabilityWizardController', function() {
   var controller;


Mime
View raw message