You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2013/11/28 16:51:10 UTC
git commit: AMBARI-3917 Config Groups: 'Restart required' bar still
show up on service config even though the target host had been deleted.
(atkach)
Updated Branches:
refs/heads/trunk 964584518 -> 46df4981c
AMBARI-3917 Config Groups: 'Restart required' bar still show up on service config even though the target host had been deleted. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/46df4981
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/46df4981
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/46df4981
Branch: refs/heads/trunk
Commit: 46df4981cce82b8ee72a92c9a5b4c932cbad8f3a
Parents: 9645845
Author: atkach <an...@gmail.com>
Authored: Thu Nov 28 17:51:06 2013 +0200
Committer: atkach <an...@gmail.com>
Committed: Thu Nov 28 17:51:06 2013 +0200
----------------------------------------------------------------------
ambari-web/app/mappers/service_mapper.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/46df4981/ambari-web/app/mappers/service_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_mapper.js b/ambari-web/app/mappers/service_mapper.js
index 75bab15..d65cc03 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -186,10 +186,13 @@ App.servicesMapper = App.QuickDataMapper.create({
services.forEach(function (item) {
var finalJson = [];
var serviceData = App.cache['hostComponentsOnService'][item.ServiceInfo.service_name];
- item.host_components = serviceData.host_components;
- item.running_host_components = serviceData.running_host_components;
- item.unknown_host_components = serviceData.unknown_host_components;
- item.host_components.sort();
+ //service can have zero number of host-components
+ if (serviceData) {
+ item.host_components = serviceData.host_components;
+ item.running_host_components = serviceData.running_host_components;
+ item.unknown_host_components = serviceData.unknown_host_components;
+ item.host_components.sort();
+ }
if (item && item.ServiceInfo && item.ServiceInfo.service_name == "HDFS") {
finalJson = this.hdfsMapper(item);