Updated Branches: refs/heads/trunk 7a25e8557 -> d025b06e6
AMBARI-4239. Storm: Update Hosts / Host Detail pages to support Storm (Denys Buzhor via alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d025b06e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d025b06e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d025b06e Branch: refs/heads/trunk Commit: d025b06e68600852ceb45e7cf11b22ed3f8efd5e Parents: 7a25e85 Author: Alex Antonenko <[email protected]> Authored: Wed Jan 8 18:14:08 2014 +0200 Committer: Alex Antonenko <[email protected]> Committed: Wed Jan 8 18:14:08 2014 +0200 ---------------------------------------------------------------------- .../assets/data/hosts/HDP2/hc_host_status.json | 20 +++++++++++++++++++- .../app/assets/data/hosts/HDP2/hosts.json | 18 +++++++++++++++++- .../app/assets/data/wizard/stack/stacks.json | 13 ++++++++++++- ambari-web/app/data/service_components.js | 16 ++++++++++++++++ ambari-web/app/data/services.js | 8 ++++++++ ambari-web/app/mappers/server_data_mapper.js | 4 +++- ambari-web/app/models/host_component.js | 3 +++ ambari-web/app/templates/main/host/summary.hbs | 4 ++-- ambari-web/app/utils/helper.js | 4 ++++ ambari-web/app/views/main/host/summary.js | 14 +++++++++++--- 10 files changed, 95 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/assets/data/hosts/HDP2/hc_host_status.json ---------------------------------------------------------------------- diff --git a/ambari-web/app/assets/data/hosts/HDP2/hc_host_status.json b/ambari-web/app/assets/data/hosts/HDP2/hc_host_status.json index 3f8a1a3..0c01dcb 100644 --- a/ambari-web/app/assets/data/hosts/HDP2/hc_host_status.json +++ b/ambari-web/app/assets/data/hosts/HDP2/hc_host_status.json @@ -197,8 +197,26 @@ "host_name" : "dev01.hortonworks.com", "state" : "STARTED" } + }, + { + "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/NIMBUS", + "HostRoles" : { + "cluster_name" : "perf", + "component_name" : "NIMBUS", + "host_name" : "dev01.hortonworks.com", + "state" : "STARTED" + } + }, + { + "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/NIMBUS", + "HostRoles" : { + "cluster_name" : "perf", + "component_name" : "SUPERVISOR", + "host_name" : "dev01.hortonworks.com", + "state" : "STARTED" + } } ] } ] -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/assets/data/hosts/HDP2/hosts.json ---------------------------------------------------------------------- diff --git a/ambari-web/app/assets/data/hosts/HDP2/hosts.json b/ambari-web/app/assets/data/hosts/HDP2/hosts.json index e1b1966..b0972e3 100644 --- a/ambari-web/app/assets/data/hosts/HDP2/hosts.json +++ b/ambari-web/app/assets/data/hosts/HDP2/hosts.json @@ -275,8 +275,24 @@ "component_name" : "ZOOKEEPER_SERVER", "host_name" : "dev01.hortonworks.com" } + }, + { + "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NIMBUS", + "HostRoles" : { + "cluster_name" : "c1", + "component_name" : "NIMBUS", + "host_name" : "dev01.hortonworks.com" + } + }, + { + "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/SUPERVISOR", + "HostRoles" : { + "cluster_name" : "c1", + "component_name" : "SUPERVISOR", + "host_name" : "dev01.hortonworks.com" + } } ] } ] -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/assets/data/wizard/stack/stacks.json ---------------------------------------------------------------------- diff --git a/ambari-web/app/assets/data/wizard/stack/stacks.json b/ambari-web/app/assets/data/wizard/stack/stacks.json index fd9fd86..878f5bc 100644 --- a/ambari-web/app/assets/data/wizard/stack/stacks.json +++ b/ambari-web/app/assets/data/wizard/stack/stacks.json @@ -873,8 +873,19 @@ "stack_version" : "2.0.5", "user_name" : "root" } + }, + { + "href" : "http://192.168.56.101:8080/api/v1/stacks2/HDP/versions/2.0.5/stackServices/STORM", + "StackServices" : { + "comments" : "Storm makes it easy to reliably process unbounded streams of data.", + "service_name" : "STORM", + "service_version" : "0.9.0.1", + "stack_name" : "HDP", + "stack_version" : "2.0.5", + "user_name" : "root" + } } ] } ] -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/data/service_components.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/service_components.js b/ambari-web/app/data/service_components.js index db430e7..74390f6 100644 --- a/ambari-web/app/data/service_components.js +++ b/ambari-web/app/data/service_components.js @@ -329,5 +329,21 @@ module.exports = new Ember.Set([ isMaster: false, isClient: true, description: 'Client component for GLUSTERFS' + }, + { + service_name: 'STORM', + component_name: 'NIMBUS', + display_name: 'Nimbus', + isMaster: true, + isClient: false, + description: 'Master component for STORM' + }, + { + service_name: 'STORM', + component_name: 'SUPERVISOR', + display_name: 'Supervisor', + isMaster: false, + isClient: false, + description: 'Client component for STORM' } ]); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/data/services.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/services.js b/ambari-web/app/data/services.js index dcf7424..d82e64b 100644 --- a/ambari-web/app/data/services.js +++ b/ambari-web/app/data/services.js @@ -155,5 +155,13 @@ module.exports = [ isSelected: App.supports.hue, canBeSelected: App.supports.hue, isHidden: !App.supports.hue + }, + { + serviceName: 'STORM', + displayName: 'Storm', + isDisabled: false, + isSelected: App.testMode, + canBeSelected: App.testMode, + isHidden: !App.testMode } ] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/mappers/server_data_mapper.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mappers/server_data_mapper.js b/ambari-web/app/mappers/server_data_mapper.js index c03e065..fad25ad 100644 --- a/ambari-web/app/mappers/server_data_mapper.js +++ b/ambari-web/app/mappers/server_data_mapper.js @@ -211,5 +211,7 @@ App.QuickDataMapper.componentServiceMap = { 'KERBEROS_ADMIN_CLIENT': 'KERBEROS', 'KERBEROS_CLIENT': 'KERBEROS', 'HUE_SERVER': 'HUE', - 'GLUSTERFS_CLIENT': 'GLUSTERFS' + 'GLUSTERFS_CLIENT': 'GLUSTERFS', + 'NIMBUS': 'STORM', + 'SUPERVISOR': 'STORM' }; http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/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 ca65b75..614a019 100644 --- a/ambari-web/app/models/host_component.js +++ b/ambari-web/app/models/host_component.js @@ -77,6 +77,7 @@ App.HostComponent = DS.Model.extend({ case 'HUE_SERVER': case 'HISTORYSERVER': case 'FLUME_SERVER': + case 'NIMBUS': case 'RESOURCEMANAGER': return true; default: @@ -96,6 +97,7 @@ App.HostComponent = DS.Model.extend({ case 'GANGLIA_MONITOR': case 'NODEMANAGER': case 'ZKFC': + case 'SUPERVISOR': return true; default: return false; @@ -116,6 +118,7 @@ App.HostComponent = DS.Model.extend({ case 'ZOOKEEPER_SERVER': case 'HBASE_REGIONSERVER': case 'GANGLIA_MONITOR': + case 'SUPERVISOR': case 'NODEMANAGER': canDelete = true; break; http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/templates/main/host/summary.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/host/summary.hbs b/ambari-web/app/templates/main/host/summary.hbs index 1216f9b..d3dc8d7 100644 --- a/ambari-web/app/templates/main/host/summary.hbs +++ b/ambari-web/app/templates/main/host/summary.hbs @@ -95,8 +95,8 @@ </li> {{/if}} {{/if}} - {{#if view.isHBaseMaster}} - <li {{bindAttr class="view.isDeleteHBaseMasterDisabled:disabled"}}> + {{#if view.isDeletableComponent}} + <li {{bindAttr class="view.isDeleteComponentDisabled:disabled"}}> <a href="javascript:void(null)" data-toggle="modal" {{action "deleteComponent" view.content target="controller"}}> {{t common.delete}} </a> http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/utils/helper.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js index bb1267d..aca32dd 100644 --- a/ambari-web/app/utils/helper.js +++ b/ambari-web/app/utils/helper.js @@ -348,6 +348,10 @@ App.format = { return 'Flume Agent'; case 'ZKFC': return 'ZKFailoverController'; + case 'NIMBUS': + return 'Nimbus'; + case 'SUPERVISOR': + return 'Supervisor'; } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/d025b06e/ambari-web/app/views/main/host/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js index 7f4aab0..67f8595 100644 --- a/ambari-web/app/views/main/host/summary.js +++ b/ambari-web/app/views/main/host/summary.js @@ -478,10 +478,18 @@ App.MainHostSummaryView = Em.View.extend({ /** * Shows whether we need to show Delete button */ - isHBaseMaster: function () { - return this.get('content.componentName') === 'HBASE_MASTER'; + isDeletableComponent: function () { + var canDelete = false; + switch (this.get('content.componentName')) { + case 'HBASE_MASTER': + case 'SUPERVISOR': + canDelete = true; + break; + default: + } + return canDelete; }.property('content'), - isDeleteHBaseMasterDisabled: function () { + isDeleteComponentDisabled: function () { return !(this.get('workStatus') == App.HostComponentStatus.stopped || this.get('workStatus') == App.HostComponentStatus.unknown || this.get('workStatus') == App.HostComponentStatus.install_failed || this.get('workStatus') == App.HostComponentStatus.upgrade_failed); }.property('workStatus'),
