ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-4062. Components in Select Group Hosts popup. (onechiporenko)
Date Fri, 13 Dec 2013 15:54:08 GMT
Updated Branches:
  refs/heads/trunk 7f92051d0 -> 3a1fc7db9


AMBARI-4062. Components in Select Group Hosts popup. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 3a1fc7db946ad70356e8517d0c3f059e85d4a91d
Parents: 7f92051
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Fri Dec 13 17:51:47 2013 +0200
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Fri Dec 13 17:51:47 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/app.js                              | 17 +++++++++++++++--
 .../service/manage_config_groups_controller.js     |  8 ++++----
 ambari-web/app/utils/component.js                  |  3 ++-
 3 files changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3a1fc7db/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 2273a42..f7e9b0f 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -60,7 +60,20 @@ module.exports = Em.Application.create({
   isHadoop2Stack: function(){
     return (stringUtils.compareVersions(this.get('currentStackVersionNumber'), "2.0") ===
1 ||
       stringUtils.compareVersions(this.get('currentStackVersionNumber'), "2.0") === 0)
-  }.property('currentStackVersionNumber')
+  }.property('currentStackVersionNumber'),
+
+  /**
+   * If High Availability is enabled
+   * Based on <code>clusterStatus.isInstalled</code>, stack version, <code>SNameNode</code>
availability
+   *
+   * @type {Boolean}
+   */
+  isHaEnabled: function() {
+    if (!this.clusterStatus.get('isInstalled')) return false;
+    if (!this.get('isHadoop2Stack')) return false;
+    return !this.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE');
+  }.property('clusterStatus.isInstalled')
+
 });
 
 /**
@@ -117,7 +130,7 @@ DS.attr.transforms.date = {
       return null;
     }
   }
-}
+};
 
 DS.attr.transforms.object = {
   from: function(serialized) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3a1fc7db/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 0488c1d..b9af51e 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,7 +19,7 @@
 
 var App = require('app');
 var hostsManagement = require('utils/hosts');
-var serviceComponents = require('data/service_components');
+var componentHelper = require('utils/component');
 
 App.ManageConfigGroupsController = Em.Controller.extend({
   name: 'manageConfigGroupsController',
@@ -180,11 +180,11 @@ App.ManageConfigGroupsController = Em.Controller.extend({
    * @return {Array}
    */
   componentsForFilter: function() {
-    var components = serviceComponents.filterProperty('service_name',this.get('serviceName'));
+    var components = componentHelper.getInstalledComponents().filterProperty('serviceName',
this.get('serviceName'));
     return components.map(function(component) {
       return Em.Object.create({
-        displayName: component.display_name,
-        componentName: component.component_name,
+        displayName: component.displayName,
+        componentName: component.id,
         selected: false
       });
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/3a1fc7db/ambari-web/app/utils/component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/component.js b/ambari-web/app/utils/component.js
index e8f27ed..dec45a7 100644
--- a/ambari-web/app/utils/component.js
+++ b/ambari-web/app/utils/component.js
@@ -46,7 +46,8 @@ module.exports = {
         isMaster: component.get('isMaster'),
         isSlave: component.get('isSlave'),
         isClient: component.get('isClient'),
-        displayName: component.get('displayName')
+        displayName: component.get('displayName'),
+        serviceName: component.get('service.id')
       }));
     });
 


Mime
View raw message