You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/01/17 14:35:17 UTC
git commit: AMBARI-4331. Storm: Update Service -> Summary. Show
Supervisors live hosts. (Denys Buzhor via alexantonenko)
Updated Branches:
refs/heads/trunk 2e22a2c33 -> c5072ed1d
AMBARI-4331. Storm: Update Service -> Summary. Show Supervisors live hosts. (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/c5072ed1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c5072ed1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c5072ed1
Branch: refs/heads/trunk
Commit: c5072ed1df2f2ea0c5add9fa698b352955dcc925
Parents: 2e22a2c
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Jan 17 15:35:06 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jan 17 15:35:06 2014 +0200
----------------------------------------------------------------------
.../assets/data/hosts/HDP2/hc_host_status.json | 27 ++++++++++++++
ambari-web/app/messages.js | 4 +++
ambari-web/app/models/host_component.js | 3 +-
ambari-web/app/templates.js | 1 -
.../templates/main/dashboard/service/storm.hbs | 33 +++++++++++++++++
.../app/templates/main/service/info/summary.hbs | 2 +-
.../main/service/info/summary/storm.hbs | 19 ----------
ambari-web/app/views.js | 3 ++
.../app/views/main/dashboard/service/storm.js | 37 ++++++++++++++++++++
9 files changed, 106 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/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 44262bc..efaf5e6 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
@@ -208,6 +208,33 @@
}
},
{
+ "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/LOGVIEWER_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "perf",
+ "component_name" : "LOGVIEWER_SERVER",
+ "host_name" : "dev01.hortonworks.com",
+ "state" : "STARTED"
+ }
+ },
+ {
+ "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/STORM_UI_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "perf",
+ "component_name" : "STORM_UI_SERVER",
+ "host_name" : "dev01.hortonworks.com",
+ "state" : "STARTED"
+ }
+ },
+ {
+ "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/DRPC_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "perf",
+ "component_name" : "DRPC_SERVER",
+ "host_name" : "dev01.hortonworks.com",
+ "state" : "STARTED"
+ }
+ },
+ {
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/SUPERVISOR",
"HostRoles" : {
"cluster_name" : "perf",
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 30fa4d4..4531281 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -945,6 +945,8 @@ Em.I18n.translations = {
'services.service.summary.TrackersLive':'Trackers Live',
'services.service.summary.RegionServersLIVE':'RegionServers Live',
'services.service.summary.GangliaMonitorsLIVE':'Ganglia Monitors Live',
+ 'services.service.summary.SuperVisorsLIVE':'SuperVisors Live',
+ 'services.service.summary.SuperVisorLIVE':'SuperVisor Lives',
'services.service.summary.nameNode':'NameNode Web UI',
'services.service.summary.nameNodeUptime':'NameNode Uptime',
'services.service.summary.nameNodeHeap':'NameNode Heap',
@@ -1644,6 +1646,8 @@ Em.I18n.translations = {
'dashboard.services.oozie.clients':'Oozie Clients',
'dashboard.services.oozie.client':'Oozie Client',
+ 'dashboard.services.storm.supervisor': 'SuperVisor',
+ 'dashboard.services.storm.supervisors': 'SuperVisors',
'dashboard.services.configs.popup.stopService.header':'Stop service',
'dashboard.services.configs.popup.stopService.body' : 'Service needs to be stopped for reconfiguration',
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/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 17887ac..eee253f 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -31,7 +31,7 @@ App.HostComponent = DS.Model.extend({
* @returns {bool}
*/
isClient:function () {
- if(['PIG', 'SQOOP', 'HCAT', 'MAPREDUCE2_CLIENT'].contains(this.get('componentName'))){
+ if(['PIG', 'SQOOP', 'HCAT', 'MAPREDUCE2_CLIENT','SUPERVISOR'].contains(this.get('componentName'))){
return true;
}
@@ -101,7 +101,6 @@ App.HostComponent = DS.Model.extend({
case 'GANGLIA_MONITOR':
case 'NODEMANAGER':
case 'ZKFC':
- case 'SUPERVISOR':
return true;
default:
return false;
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/ambari-web/app/templates.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates.js b/ambari-web/app/templates.js
index a88e2a4..7e330e8 100644
--- a/ambari-web/app/templates.js
+++ b/ambari-web/app/templates.js
@@ -27,5 +27,4 @@ require('templates/main/service/info/summary/mapreduce2');
require('templates/main/service/info/summary/hive');
require('templates/main/service/info/summary/hue');
require('templates/main/service/info/summary/falcon');
-require('templates/main/service/info/summary/storm');
require('templates/main/admin/highAvailability/progress');
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/ambari-web/app/templates/main/dashboard/service/storm.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/service/storm.hbs b/ambari-web/app/templates/main/dashboard/service/storm.hbs
new file mode 100644
index 0000000..7411f87
--- /dev/null
+++ b/ambari-web/app/templates/main/dashboard/service/storm.hbs
@@ -0,0 +1,33 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+{{view view.parentView.sumMasterComponentView}}
+<tr>
+ <td>
+ <a href="#" {{action filterHosts view.superVisorComponents.[0]}}>
+ {{pluralize view.superVisorComponents.length singular="t:dashboard.services.storm.supervisor" plural="t:dashboard.services.storm.supervisors"}}
+ </a>
+ </td>
+ <td>
+ <span>
+ {{#view view.superVisorsLiveTextView}}
+ {{view.liveComponents}}/{{view.totalComponents}}
+ {{/view}}
+ </span> {{pluralize view.superVisorComponents.length singular="t:services.service.summary.SuperVisorLIVE" plural="t:services.service.summary.SuperVisorsLIVE"}}
+ </td>
+</tr>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/ambari-web/app/templates/main/service/info/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary.hbs b/ambari-web/app/templates/main/service/info/summary.hbs
index 1eac1f8..0fc8205 100644
--- a/ambari-web/app/templates/main/service/info/summary.hbs
+++ b/ambari-web/app/templates/main/service/info/summary.hbs
@@ -66,7 +66,7 @@
{{template "templates/main/service/info/summary/falcon"}}
{{/if}}
{{#if view.serviceStatus.storm}}
- {{template "templates/main/service/info/summary/storm"}}
+ {{view App.MainDashboardServiceStormView showOnlyRows=true serviceBinding="view.service"}}
{{/if}}
</tbody>
</table>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/ambari-web/app/templates/main/service/info/summary/storm.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary/storm.hbs b/ambari-web/app/templates/main/service/info/summary/storm.hbs
deleted file mode 100644
index ff62e54..0000000
--- a/ambari-web/app/templates/main/service/info/summary/storm.hbs
+++ /dev/null
@@ -1,19 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-{{!<!-- @todo create correct view after api implementing-->}}
-{{view view.sumMasterComponentView}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index ed21192..f2df482 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -93,6 +93,7 @@ require('views/main/admin/security/add/step1');
require('views/main/admin/security/add/step2');
require('views/main/admin/security/add/step3');
require('views/main/admin/security/add/step4');
+
require('views/main/dashboard');
require('views/main/dashboard/service');
require('views/main/dashboard/service/hdfs');
@@ -104,6 +105,8 @@ require('views/main/dashboard/service/hive');
require('views/main/dashboard/service/zookeeper');
require('views/main/dashboard/service/oozie');
require('views/main/dashboard/service/flume');
+require('views/main/dashboard/service/storm');
+
require('views/main/dashboard/cluster_metrics/cpu');
require('views/main/dashboard/cluster_metrics/load');
require('views/main/dashboard/cluster_metrics/memory');
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5072ed1/ambari-web/app/views/main/dashboard/service/storm.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service/storm.js b/ambari-web/app/views/main/dashboard/service/storm.js
new file mode 100644
index 0000000..94132bf
--- /dev/null
+++ b/ambari-web/app/views/main/dashboard/service/storm.js
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({
+ templateName: require('templates/main/dashboard/service/storm'),
+ serviceName: 'storm',
+
+ superVisorComponents: function() {
+ return this.get('service.hostComponents').filterProperty('componentName', 'SUPERVISOR');
+ }.property('service.hostComponents.@each'),
+
+ superVisorsLiveTextView: App.ComponentLiveTextView.extend({
+ liveComponents: function () {
+ return this.get('parentView.superVisorComponents').filterProperty('workStatus','STARTED').length;
+ }.property('parentView.superVisorComponents.@each.workStatus'),
+ totalComponents: function() {
+ return this.get('parentView.superVisorComponents').length;
+ }.property('parentView.superVisorComponents.length')
+ })
+});