Repository: ambari Updated Branches: refs/heads/branch-2.1 0d4003790 -> 50c9b23d5
AMBARI-12606 Add ZooKeeper Server action is disabled after filtering on hosts page. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/50c9b23d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/50c9b23d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/50c9b23d Branch: refs/heads/branch-2.1 Commit: 50c9b23d5dc420bca7839db613c74e93c98ac91e Parents: 0d40037 Author: Andrii Tkach <[email protected]> Authored: Fri Jul 31 14:14:02 2015 +0300 Committer: Andrii Tkach <[email protected]> Committed: Fri Jul 31 14:14:02 2015 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/service/item.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/50c9b23d/ambari-web/app/controllers/main/service/item.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js index 57bcc44..d12164a 100644 --- a/ambari-web/app/controllers/main/service/item.js +++ b/ambari-web/app/controllers/main/service/item.js @@ -49,14 +49,9 @@ App.MainServiceItemController = Em.Controller.extend({ initHosts: function() { if (App.get('components.masters').length !== 0) { - var self = this; - - var hostNames = App.Host.find().mapProperty('hostName'); - this.set('allHosts', hostNames); - ['HBASE_MASTER', 'HIVE_METASTORE', 'ZOOKEEPER_SERVER', 'FLUME_HANDLER', 'HIVE_SERVER', 'RANGER_KMS_SERVER', 'NIMBUS'].forEach(function(componentName) { - self.loadHostsWithoutComponent(componentName); - }); + this.loadHostsWithoutComponent(componentName); + }, this); } }.observes('App.components.masters', 'content.hostComponents.length'), @@ -64,7 +59,7 @@ App.MainServiceItemController = Em.Controller.extend({ var self = this; var hostsWithComponent = App.HostComponent.find().filterProperty('componentName', componentName).mapProperty('hostName'); - var hostsWithoutComponent = this.get('allHosts').filter(function(hostName) { + var hostsWithoutComponent = App.get('allHostNames').filter(function(hostName) { return !hostsWithComponent.contains(hostName); }); @@ -103,8 +98,6 @@ App.MainServiceItemController = Em.Controller.extend({ return !App.get('services.noConfigTypes').contains(this.get('content.serviceName')); }.property('App.services.noConfigTypes','content.serviceName'), - allHosts: [], - clientComponents: function () { var clientNames = []; var clients = App.StackServiceComponent.find().filterProperty('serviceName', this.get('content.serviceName')).filterProperty('isClient');
