ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject git commit: AMBARI-6629. Only client component is displayed on summary page for a new service added to stack. (jaimin)
Date Mon, 28 Jul 2014 20:22:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b0b58189c -> 3b9e4d1d1


AMBARI-6629. Only client component is displayed on summary page for a new service added to
stack. (jaimin)


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

Branch: refs/heads/trunk
Commit: 3b9e4d1d1f2f039899e01f04569958277bbb1109
Parents: b0b5818
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Mon Jul 28 13:19:28 2014 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Mon Jul 28 13:21:29 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/models/host_component.js         | 63 ++------------------
 .../main/service/info/components_list_view.js   |  2 +-
 .../app/views/main/service/info/summary.js      |  2 +-
 3 files changed, 6 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3b9e4d1d/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index adcecb2..6cf6b8f 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -57,34 +57,7 @@ App.HostComponent = DS.Model.extend({
    * @returns {bool}
    */
   isMaster: function () {
-    switch (this.get('componentName')) {
-      case 'NAMENODE':
-      case 'SECONDARY_NAMENODE':
-      case 'SNAMENODE':
-      case 'JOURNALNODE':
-      case 'JOBTRACKER':
-      case 'ZOOKEEPER_SERVER':
-      case 'HIVE_SERVER':
-      case 'HIVE_METASTORE':
-      case 'MYSQL_SERVER':
-      case 'HBASE_MASTER':
-      case 'NAGIOS_SERVER':
-      case 'GANGLIA_SERVER':
-      case 'OOZIE_SERVER':
-      case 'WEBHCAT_SERVER':
-      case 'HUE_SERVER':
-      case 'HISTORYSERVER':
-      case 'FALCON_SERVER':
-      case 'NIMBUS':
-      case 'STORM_UI_SERVER':
-      case 'DRPC_SERVER':
-      case 'STORM_REST_API':
-      case 'RESOURCEMANAGER':
-      case 'APP_TIMELINE_SERVER':
-        return true;
-      default:
-        return false;
-    }
+    return App.get('components.masters').contains(this.get('componentName'));
   }.property('componentName'),
 
   /**
@@ -92,19 +65,7 @@ App.HostComponent = DS.Model.extend({
    * @returns {bool}
    */
   isSlave: function(){
-    switch (this.get('componentName')) {
-      case 'DATANODE':
-      case 'TASKTRACKER':
-      case 'HBASE_REGIONSERVER':
-      case 'GANGLIA_MONITOR':
-      case 'NODEMANAGER':
-      case 'ZKFC':
-      case 'SUPERVISOR':
-      case 'FLUME_HANDLER':
-        return true;
-      default:
-        return false;
-    }
+    return App.get('components.slaves').contains(this.get('componentName'));
   }.property('componentName'),
   /**
    * Only certain components can be deleted.
@@ -114,24 +75,8 @@ App.HostComponent = DS.Model.extend({
    * @returns {bool}
    */
   isDeletable: function() {
-    var canDelete = false;
-    switch (this.get('componentName')) {
-      case 'DATANODE':
-      case 'TASKTRACKER':
-      case 'ZOOKEEPER_SERVER':
-      case 'HBASE_REGIONSERVER':
-      case 'GANGLIA_MONITOR':
-      case 'SUPERVISOR':
-      case 'NODEMANAGER':
-        canDelete = true;
-        break;
-      default:
-    }
-    if (!canDelete) {
-      canDelete = this.get('isClient');
-    }
-    return canDelete;
-  }.property('componentName', 'isClient'),
+    return App.get('components.deletable').contains(this.get('componentName'));
+  }.property('componentName'),
   /**
    * A host-component is decommissioning when it is in HDFS service's list of
    * decomNodes.

http://git-wip-us.apache.org/repos/asf/ambari/blob/3b9e4d1d/ambari-web/app/views/main/service/info/components_list_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/components_list_view.js b/ambari-web/app/views/main/service/info/components_list_view.js
index 5486f8b..6c98f3f 100644
--- a/ambari-web/app/views/main/service/info/components_list_view.js
+++ b/ambari-web/app/views/main/service/info/components_list_view.js
@@ -20,7 +20,7 @@ var App = require('app');
 
 App.SummaryMasterComponentsView = Em.View.extend({
   templateName: require('templates/main/service/info/summary/master_components'),
-  masterComp: null,
+  mastersComp: null,
   didInsertElement: function() {
     App.tooltip($('[rel=healthTooltip]'));
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/3b9e4d1d/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index 3d9a3f9..4106c5a 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -329,7 +329,7 @@ App.MainServiceInfoSummaryView = Em.View.extend({
     return graphs;
   }.property(''),
 
-  loadServiceSummary: function (serviceName) {
+  loadServiceSummary: function () {
     var serviceName = this.get('serviceName');
     var serviceSummaryView = null;
 


Mime
View raw message