ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject git commit: AMBARI-3860 Should allow selecting hosts by components in config-groups dialog. (ababiichuk)
Date Fri, 22 Nov 2013 14:27:41 GMT
Updated Branches:
  refs/heads/trunk c33215607 -> ac38ac2b5


AMBARI-3860 Should allow selecting hosts by components in config-groups dialog. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: ac38ac2b5cf72d444379fe3d06cf94434eea1137
Parents: c332156
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Fri Nov 22 16:24:41 2013 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Fri Nov 22 16:27:18 2013 +0200

----------------------------------------------------------------------
 .../main/service/manage_config_groups_controller.js   | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ac38ac2b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
index 0055431..45f0b2d 100644
--- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
+++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
@@ -19,6 +19,7 @@
 
 var App = require('app');
 var hostsManagement = require('utils/hosts');
+var serviceComponents = require('data/service_components');
 
 App.ManageConfigGroupsController = Em.Controller.extend({
   name: 'manageConfigGroupsController',
@@ -159,10 +160,21 @@ App.ManageConfigGroupsController = Em.Controller.extend({
    * add hosts to group
    * @return {Array}
    */
+  componentsForFilter: function() {
+    var components = serviceComponents.filterProperty('service_name',this.get('serviceName'));
+    return components.map(function(component) {
+      return Em.Object.create({
+        displayName: component.display_name,
+        componentName: component.component_name,
+        selected: false
+      });
+    });
+  }.property('serviceName'),
+
   addHosts: function () {
     var availableHosts = this.get('selectedConfigGroup.availableHosts');
     var group = this.get('selectedConfigGroup');
-    hostsManagement.launchHostsSelectionDialog(availableHosts, [], false, [], function (selectedHosts)
{
+    hostsManagement.launchHostsSelectionDialog(availableHosts, [], false, this.get('componentsForFilter'),
function (selectedHosts) {
       if (selectedHosts) {
         var defaultHosts = group.get('parentConfigGroup.hosts');
         var configGroupHosts = group.get('hosts');


Mime
View raw message