Repository: ambari
Updated Branches:
  refs/heads/trunk bcf15099d -> eee2a7a88


AMBARI-12603 serviceAccounts page doesn't show user properties. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: eee2a7a8807982b71163a54f097f815fa9cb2eb9
Parents: bcf1509
Author: aBabiichuk <[email protected]>
Authored: Fri Jul 31 13:13:39 2015 +0300
Committer: aBabiichuk <[email protected]>
Committed: Fri Jul 31 13:13:39 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/global/cluster_controller.js      | 4 +++-
 .../app/controllers/main/admin/serviceAccounts_controller.js | 8 +++-----
 ambari-web/app/views/main/admin/serviceAccounts_view.js      | 5 ++++-
 3 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/eee2a7a8/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js 
b/ambari-web/app/controllers/global/cluster_controller.js
index e4a74c0..b9d9711 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -216,7 +216,9 @@ App.ClusterController = Em.Controller.extend({
       updater.updateServices(function () {
         self.updateLoadStatus('services');
         
App.config.loadConfigsFromStack(App.Service.find().mapProperty('serviceName')).complete(function
 () {
-          self.set('isConfigsPropertiesLoaded', true);
+          App.config.loadClusterConfigsFromStack().complete(function() {
+            self.set('isConfigsPropertiesLoaded', true);
+          });
         });
         // service metrics loading doesn't affect overall progress
         updater.updateServiceMetric(function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/eee2a7a8/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js 
b/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js
index ccbac3e..8629d67 100644
--- a/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js
+++ b/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js
@@ -56,8 +56,7 @@ App.MainAdminServiceAccountsController = 
App.MainServiceInfoConfigsController.ex
     this.setServiceConfigTags(loadedClusterSiteToTagMap);
     // load server stored configurations
     
App.router.get('configurationController').getConfigsByTags(this.get('serviceConfigTags')).done(function
 (serverConfigs) {
-      var stackConfigs = 
App.StackConfigProperty.find().filterProperty('displayType', 'user');
-      self.createConfigObject(serverConfigs, stackConfigs);
+      self.createConfigObject(serverConfigs);
     });
   },
 
@@ -102,10 +101,9 @@ App.MainAdminServiceAccountsController = 
App.MainServiceInfoConfigsController.ex
    * Generate configuration object that will be rendered
    *
    * @param {Object[]} serverConfigs
-   * @param {Object[]} stackConfigs
    */
-  createConfigObject: function(serverConfigs, stackConfigs) {
-    var configs = App.config.mergePredefinedWithSaved(serverConfigs, 
stackConfigs, this.get('selectedService'));
+  createConfigObject: function(serverConfigs) {
+    var configs = App.config.mergePredefinedWithSaved(serverConfigs, 
this.get('selectedService'));
     var miscConfigs = configs.filterProperty('displayType', 
'user').filterProperty('category', 'Users and 
Groups').filterProperty('isVisible', true);
 
     miscConfigs = App.config.miscConfigVisibleProperty(miscConfigs, 
App.Service.find().mapProperty('serviceName').concat('MISC'));

http://git-wip-us.apache.org/repos/asf/ambari/blob/eee2a7a8/ambari-web/app/views/main/admin/serviceAccounts_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/serviceAccounts_view.js 
b/ambari-web/app/views/main/admin/serviceAccounts_view.js
index 5ff90fd..904f2e3 100644
--- a/ambari-web/app/views/main/admin/serviceAccounts_view.js
+++ b/ambari-web/app/views/main/admin/serviceAccounts_view.js
@@ -21,6 +21,9 @@ var App = require('app');
 App.MainAdminServiceAccountsView = Em.View.extend({
   templateName: require('templates/main/admin/serviceAccounts'),
   didInsertElement: function() {
-    this.get('controller').loadUsers();
+    var self = this;
+    
App.router.get('mainController').isLoading.call(App.router.get('clusterController'),
 'isConfigsPropertiesLoaded').done(function () {
+      self.get('controller').loadUsers();
+    });
   }
 });

Reply via email to