You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2014/02/24 20:23:56 UTC
[2/2] git commit: AMBARI-4789. FE changes to match API rename for
Maintenance Mode. (atkach via yusaku)
AMBARI-4789. FE changes to match API rename for Maintenance Mode. (atkach via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/40fca9c8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40fca9c8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40fca9c8
Branch: refs/heads/trunk
Commit: 40fca9c833fc27911068afdd39179f7fa14ecd53
Parents: e1f4f2e
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Mon Feb 24 11:23:26 2014 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Mon Feb 24 11:23:26 2014 -0800
----------------------------------------------------------------------
.../data/dashboard/HDP2/master_components.json | 9 +
.../assets/data/hosts/HDP2/hc_host_status.json | 43 ++-
.../app/assets/data/hosts/HDP2/hosts.json | 284 +------------------
.../app/assets/data/hosts/HDP2/hosts_init.json | 125 +++++---
.../app/assets/data/services/HDP2/services.json | 16 +-
.../controllers/global/cluster_controller.js | 6 +-
.../app/controllers/global/update_controller.js | 6 +-
ambari-web/app/controllers/main/host.js | 18 +-
ambari-web/app/controllers/main/host/details.js | 18 +-
ambari-web/app/controllers/main/service/item.js | 4 +-
ambari-web/app/mappers/hosts_mapper.js | 2 +-
ambari-web/app/mappers/service_mapper.js | 2 +-
.../app/mappers/service_metrics_mapper.js | 4 +-
ambari-web/app/mappers/status_mapper.js | 8 +-
ambari-web/app/models/host.js | 6 +-
ambari-web/app/models/host_component.js | 2 +-
ambari-web/app/utils/ajax.js | 10 +-
.../app/views/common/rolling_restart_view.js | 2 +-
ambari-web/app/views/main/dashboard/service.js | 2 +-
ambari-web/app/views/main/host.js | 2 +-
ambari-web/app/views/main/host/details.js | 2 +-
.../main/host/details/host_component_view.js | 14 +-
.../host_component_views/decommissionable.js | 2 +-
.../views/main/host/hosts_table_menu_view.js | 8 +-
ambari-web/app/views/main/service/item.js | 4 +-
ambari-web/test/controllers/main/host_test.js | 60 ++--
.../host/details/host_component_view_test.js | 62 ++--
.../decommissionable_test.js | 14 +-
28 files changed, 287 insertions(+), 448 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/assets/data/dashboard/HDP2/master_components.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/dashboard/HDP2/master_components.json b/ambari-web/app/assets/data/dashboard/HDP2/master_components.json
index 1de962f..b991d0c 100644
--- a/ambari-web/app/assets/data/dashboard/HDP2/master_components.json
+++ b/ambari-web/app/assets/data/dashboard/HDP2/master_components.json
@@ -16,6 +16,7 @@
"cluster_name" : "perf",
"component_name" : "GANGLIA_SERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
}
@@ -36,6 +37,7 @@
"cluster_name" : "perf",
"component_name" : "HBASE_MASTER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
},
"metrics" : {
@@ -70,6 +72,7 @@
"cluster_name" : "perf",
"component_name" : "NAMENODE",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
},
"metrics" : {
@@ -126,6 +129,7 @@
"cluster_name" : "perf",
"component_name" : "SECONDARY_NAMENODE",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
}
@@ -146,6 +150,7 @@
"cluster_name" : "perf",
"component_name" : "HISTORYSERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
},
"metrics" : {
@@ -172,6 +177,7 @@
"cluster_name" : "perf",
"component_name" : "NAGIOS_SERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
}
@@ -192,6 +198,7 @@
"cluster_name" : "perf",
"component_name" : "OOZIE_SERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
}
@@ -212,6 +219,7 @@
"cluster_name" : "perf",
"component_name" : "RESOURCEMANAGER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
},
"metrics" : {
@@ -297,6 +305,7 @@
"cluster_name" : "perf",
"component_name" : "ZOOKEEPER_SERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/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 824ded0..c2b19fb 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
@@ -6,7 +6,8 @@
"Hosts" : {
"cluster_name" : "perf",
"host_name" : "dev01.hortonworks.com",
- "host_status" : "HEALTHY"
+ "host_status" : "HEALTHY",
+ "maintenance_state" : "OFF"
},
"host_components" : [
{
@@ -15,6 +16,7 @@
"cluster_name" : "perf",
"component_name" : "DATANODE",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -24,6 +26,7 @@
"cluster_name" : "perf",
"component_name" : "GANGLIA_MONITOR",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -33,6 +36,7 @@
"cluster_name" : "perf",
"component_name" : "GANGLIA_SERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -42,6 +46,7 @@
"cluster_name" : "perf",
"component_name" : "HBASE_CLIENT",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "INSTALLED"
}
},
@@ -51,6 +56,7 @@
"cluster_name" : "perf",
"component_name" : "HBASE_MASTER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -60,6 +66,7 @@
"cluster_name" : "perf",
"component_name" : "HBASE_REGIONSERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -69,6 +76,7 @@
"cluster_name" : "perf",
"component_name" : "HDFS_CLIENT",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "INSTALLED"
}
},
@@ -78,6 +86,7 @@
"cluster_name" : "perf",
"component_name" : "HISTORYSERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -87,6 +96,7 @@
"cluster_name" : "perf",
"component_name" : "MAPREDUCE2_CLIENT",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "INSTALLED"
}
},
@@ -96,6 +106,7 @@
"cluster_name" : "perf",
"component_name" : "NAGIOS_SERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -105,6 +116,7 @@
"cluster_name" : "perf",
"component_name" : "NAMENODE",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -114,6 +126,7 @@
"cluster_name" : "perf",
"component_name" : "NODEMANAGER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -123,6 +136,7 @@
"cluster_name" : "perf",
"component_name" : "OOZIE_CLIENT",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "INSTALLED"
}
},
@@ -132,6 +146,7 @@
"cluster_name" : "perf",
"component_name" : "OOZIE_SERVER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -141,6 +156,7 @@
"cluster_name" : "perf",
"component_name" : "PIG",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "INSTALLED"
}
},
@@ -150,6 +166,7 @@
"cluster_name" : "perf",
"component_name" : "RESOURCEMANAGER",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -159,6 +176,7 @@
"cluster_name" : "perf",
"component_name" : "SECONDARY_NAMENODE",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "STARTED"
}
},
@@ -168,6 +186,7 @@
"cluster_name" : "perf",
"component_name" : "SQOOP",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "INSTALLED"
}
},
@@ -176,6 +195,7 @@
"HostRoles" : {
"cluster_name" : "perf",
"component_name" : "YARN_CLIENT",
+ "maintenance_state" : "OFF",
"host_name" : "dev01.hortonworks.com",
"state" : "INSTALLED"
}
@@ -184,6 +204,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/APP_TIMELINE_SERVER",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "APP_TIMELINE_SERVER",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
@@ -193,6 +214,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/TEZ_CLIENT",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "TEZ_CLIENT",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
@@ -202,6 +224,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/ZOOKEEPER_CLIENT",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "ZOOKEEPER_CLIENT",
"host_name" : "dev01.hortonworks.com",
"state" : "INSTALLED"
@@ -211,6 +234,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/ZOOKEEPER_SERVER",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "ZOOKEEPER_SERVER",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
@@ -220,6 +244,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/NIMBUS",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "NIMBUS",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
@@ -229,6 +254,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/LOGVIEWER_SERVER",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "LOGVIEWER_SERVER",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
@@ -238,6 +264,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/STORM_UI_SERVER",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "STORM_UI_SERVER",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
@@ -247,15 +274,27 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/DRPC_SERVER",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "DRPC_SERVER",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
}
},
{
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HIVE_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HIVE_SERVER",
+ "host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
+ }
+ },
+ {
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/SUPERVISOR",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "SUPERVISOR",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
@@ -265,6 +304,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/FALCON_SERVER",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "OFF",
"component_name" : "FALCON_SERVER",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
@@ -274,6 +314,7 @@
"href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/FALCON_CLIENT",
"HostRoles" : {
"cluster_name" : "perf",
+ "maintenance_state" : "ON",
"component_name" : "FALCON_CLIENT",
"host_name" : "dev01.hortonworks.com",
"state" : "STARTED"
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/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 5ae93d7..41b5e7e 100644
--- a/ambari-web/app/assets/data/hosts/HDP2/hosts.json
+++ b/ambari-web/app/assets/data/hosts/HDP2/hosts.json
@@ -55,6 +55,7 @@
"os_arch" : "x86_64",
"os_type" : "centos6",
"public_host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"total_mem" : 2055208
},
"metrics" : {
@@ -66,289 +67,6 @@
"load_one" : 1.51880555556
}
},
- "host_components" : [
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/DATANODE",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "DATANODE",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/GANGLIA_MONITOR",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "GANGLIA_MONITOR",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/GANGLIA_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "GANGLIA_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HBASE_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HBASE_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HBASE_MASTER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HBASE_MASTER",
- "ha_status" : "passive",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HBASE_REGIONSERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HBASE_REGIONSERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HCAT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HCAT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HDFS_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HDFS_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HISTORYSERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HISTORYSERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HIVE_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HIVE_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HIVE_METASTORE",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HIVE_METASTORE",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HIVE_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "HIVE_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/MAPREDUCE2_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "MAPREDUCE2_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/MYSQL_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "MYSQL_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NAGIOS_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "NAGIOS_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NAMENODE",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "NAMENODE",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NODEMANAGER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "NODEMANAGER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/OOZIE_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "OOZIE_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/OOZIE_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "OOZIE_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/PIG",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "PIG",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/RESOURCEMANAGER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "RESOURCEMANAGER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/SECONDARY_NAMENODE",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "SECONDARY_NAMENODE",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/WEBHCAT_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "WEBHCAT_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/YARN_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "YARN_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/APP_TIMELINE_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "APP_TIMELINE_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/TEZ_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "TEZ_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/ZOOKEEPER_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "ZOOKEEPER_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/ZOOKEEPER_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "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/LOGVIEWER_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "LOGVIEWER_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/STORM_UI_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "STORM_UI_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/DRPC_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "DRPC_SERVER",
- "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"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/FALCON_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "FALCON_SERVER",
- "host_name" : "dev01.hortonworks.com"
- }
- },
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/FALCON_CLIENT",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "FALCON_CLIENT",
- "host_name" : "dev01.hortonworks.com"
- }
- }
- ],
"alerts" : {
"summary" : {
"CRITICAL" : 9,
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/assets/data/hosts/HDP2/hosts_init.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/hosts/HDP2/hosts_init.json b/ambari-web/app/assets/data/hosts/HDP2/hosts_init.json
index 3ac66c4..d178559 100644
--- a/ambari-web/app/assets/data/hosts/HDP2/hosts_init.json
+++ b/ambari-web/app/assets/data/hosts/HDP2/hosts_init.json
@@ -55,6 +55,7 @@
"os_arch" : "x86_64",
"os_type" : "centos6",
"public_host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"total_mem" : 2055208
},
"metrics" : {
@@ -70,10 +71,10 @@
{
"href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/DATANODE",
"HostRoles" : {
- "cluster_name" : "c1",
"component_name" : "DATANODE",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "ON",
+ "state" : "STARTED"
}
},
{
@@ -82,7 +83,8 @@
"cluster_name" : "c1",
"component_name" : "GANGLIA_MONITOR",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -91,7 +93,8 @@
"cluster_name" : "c1",
"component_name" : "GANGLIA_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -100,7 +103,8 @@
"cluster_name" : "c1",
"component_name" : "HBASE_CLIENT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -110,7 +114,8 @@
"component_name" : "HBASE_MASTER",
"ha_status" : "passive",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -119,7 +124,8 @@
"cluster_name" : "c1",
"component_name" : "HBASE_REGIONSERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -128,7 +134,8 @@
"cluster_name" : "c1",
"component_name" : "HCAT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -137,7 +144,8 @@
"cluster_name" : "c1",
"component_name" : "HDFS_CLIENT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -146,7 +154,8 @@
"cluster_name" : "c1",
"component_name" : "HISTORYSERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -155,7 +164,8 @@
"cluster_name" : "c1",
"component_name" : "HIVE_CLIENT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -164,7 +174,8 @@
"cluster_name" : "c1",
"component_name" : "HIVE_METASTORE",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -173,7 +184,8 @@
"cluster_name" : "c1",
"component_name" : "HIVE_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -182,7 +194,8 @@
"cluster_name" : "c1",
"component_name" : "MAPREDUCE2_CLIENT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -191,7 +204,8 @@
"cluster_name" : "c1",
"component_name" : "MYSQL_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -200,7 +214,8 @@
"cluster_name" : "c1",
"component_name" : "NAGIOS_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -209,7 +224,8 @@
"cluster_name" : "c1",
"component_name" : "NAMENODE",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -218,7 +234,8 @@
"cluster_name" : "c1",
"component_name" : "NODEMANAGER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -227,7 +244,8 @@
"cluster_name" : "c1",
"component_name" : "OOZIE_CLIENT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -236,7 +254,8 @@
"cluster_name" : "c1",
"component_name" : "OOZIE_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -245,7 +264,8 @@
"cluster_name" : "c1",
"component_name" : "PIG",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -254,7 +274,8 @@
"cluster_name" : "c1",
"component_name" : "RESOURCEMANAGER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -263,7 +284,8 @@
"cluster_name" : "c1",
"component_name" : "SECONDARY_NAMENODE",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -272,7 +294,8 @@
"cluster_name" : "c1",
"component_name" : "WEBHCAT_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -281,7 +304,8 @@
"cluster_name" : "c1",
"component_name" : "YARN_CLIENT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -290,7 +314,8 @@
"cluster_name" : "c1",
"component_name" : "APP_TIMELINE_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -299,7 +324,8 @@
"cluster_name" : "c1",
"component_name" : "TEZ_CLIENT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -308,7 +334,8 @@
"cluster_name" : "c1",
"component_name" : "ZOOKEEPER_CLIENT",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -317,7 +344,8 @@
"cluster_name" : "c1",
"component_name" : "ZOOKEEPER_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -326,7 +354,8 @@
"cluster_name" : "c1",
"component_name" : "NIMBUS",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -334,7 +363,9 @@
"HostRoles" : {
"cluster_name" : "c1",
"component_name" : "LOGVIEWER_SERVER",
- "host_name" : "dev01.hortonworks.com"
+ "host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -342,7 +373,9 @@
"HostRoles" : {
"cluster_name" : "c1",
"component_name" : "STORM_UI_SERVER",
- "host_name" : "dev01.hortonworks.com"
+ "host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -350,7 +383,9 @@
"HostRoles" : {
"cluster_name" : "c1",
"component_name" : "DRPC_SERVER",
- "host_name" : "dev01.hortonworks.com"
+ "host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
}
},
{
@@ -359,6 +394,17 @@
"cluster_name" : "c1",
"component_name" : "SUPERVISOR",
"host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
+ }
+ },
+ {
+ "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/SQOOP",
+ "HostRoles" : {
+ "cluster_name" : "perf",
+ "component_name" : "SQOOP",
+ "host_name" : "dev01.hortonworks.com",
+ "maintenance_state" : "OFF",
"state" : "INSTALLED"
}
},
@@ -368,7 +414,18 @@
"cluster_name" : "c1",
"component_name" : "FALCON_SERVER",
"host_name" : "dev01.hortonworks.com",
- "state" : "INSTALLED"
+ "maintenance_state" : "OFF",
+ "state" : "STARTED"
+ }
+ },
+ {
+ "href" : "http://192.168.56.101:8080/api/v1/clusters/perf/hosts/dev01.hortonworks.com/host_components/FALCON_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "perf",
+ "maintenance_state" : "ON",
+ "component_name" : "FALCON_CLIENT",
+ "host_name" : "dev01.hortonworks.com",
+ "state" : "STARTED"
}
}
],
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/assets/data/services/HDP2/services.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/services/HDP2/services.json b/ambari-web/app/assets/data/services/HDP2/services.json
index 7859651..1f6c5c8 100644
--- a/ambari-web/app/assets/data/services/HDP2/services.json
+++ b/ambari-web/app/assets/data/services/HDP2/services.json
@@ -4,6 +4,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/GANGLIA",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "GANGLIA"
},
@@ -18,6 +19,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/HBASE",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "HBASE"
},
@@ -32,6 +34,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/HCATALOG",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "HCATALOG"
},
@@ -46,6 +49,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/HDFS",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "HDFS"
},
@@ -60,6 +64,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/MAPREDUCE2",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "MAPREDUCE2"
},
@@ -74,6 +79,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/NAGIOS",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "NAGIOS"
},
@@ -88,6 +94,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/OOZIE",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "OOZIE"
},
@@ -102,6 +109,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/SQOOP",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "SQOOP"
},
@@ -116,6 +124,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/PIG",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "PIG"
},
@@ -130,6 +139,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/YARN",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "YARN"
},
@@ -144,6 +154,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/ZOOKEEPER",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "ZOOKEEPER"
},
@@ -158,6 +169,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/FALCON",
"ServiceInfo" : {
+ "maintenance_state" : "OFF",
"cluster_name" : "cl",
"service_name" : "FALCON"
},
@@ -172,6 +184,7 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/STORM",
"ServiceInfo" : {
+ "maintenance_state" : "ON",
"cluster_name" : "cl",
"service_name" : "STORM"
},
@@ -186,7 +199,8 @@
{
"href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/TEZ",
"ServiceInfo" : {
- "cluster_name" : "cl",
+ "maintenance_state" : "OFF",
+ "state": "STARTED",
"service_name" : "TEZ"
},
"alerts" : {
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index 049e59c..0437d51 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -233,11 +233,11 @@ App.ClusterController = Em.Controller.extend({
return false;
}
var testUrl = App.get('isHadoop2Stack') ? '/data/hosts/HDP2/hc_host_status.json' : '/data/dashboard/services.json';
- var statusUrl = '/hosts?fields=Hosts/host_status,Hosts/passive_state,host_components/HostRoles/state,host_components/HostRoles/passive_state,alerts/summary&minimal_response=true';
+ var statusUrl = '/hosts?fields=Hosts/host_status,Hosts/maintenance_state,host_components/HostRoles/state,host_components/HostRoles/maintenance_state,alerts/summary&minimal_response=true';
if (isInitialLoad) {
testUrl = '/data/hosts/HDP2/hosts_init.json';
- statusUrl = '/hosts?fields=Hosts/host_name,Hosts/passive_state,Hosts/public_host_name,Hosts/cpu_count,Hosts/ph_cpu_count,Hosts/total_mem,' +
- 'Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components/HostRoles/state,host_components/HostRoles/passive_state,' +
+ statusUrl = '/hosts?fields=Hosts/host_name,Hosts/maintenance_state,Hosts/public_host_name,Hosts/cpu_count,Hosts/ph_cpu_count,Hosts/total_mem,' +
+ 'Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components/HostRoles/state,host_components/HostRoles/maintenance_state,' +
'Hosts/disk_info,metrics/disk,metrics/load/load_one,metrics/cpu/cpu_system,metrics/cpu/cpu_user,' +
'metrics/memory/mem_total,metrics/memory/mem_free,alerts/summary&minimal_response=true';
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index 3fa6b33..2aaad03 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -80,7 +80,7 @@ App.UpdateController = Em.Controller.extend({
updateHost:function(callback) {
var testUrl = App.get('isHadoop2Stack') ? '/data/hosts/HDP2/hosts.json' : '/data/hosts/hosts.json';
- var hostsUrl = this.getUrl(testUrl, '/hosts?fields=Hosts/host_name,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/disk_info,Hosts/passive_state,' +
+ var hostsUrl = this.getUrl(testUrl, '/hosts?fields=Hosts/host_name,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/disk_info,Hosts/maintenance_state,' +
'metrics/disk,metrics/load/load_one,metrics/cpu/cpu_system,metrics/cpu/cpu_user,metrics/memory/mem_total,metrics/memory/mem_free'+
'&minimal_response=true');
App.HttpClient.get(hostsUrl, App.hostsMapper, {
@@ -155,7 +155,7 @@ App.UpdateController = Em.Controller.extend({
'ServiceComponentInfo/service_name,' +
'host_components/HostRoles/host_name,' +
'host_components/HostRoles/state,' +
- 'host_components/HostRoles/passive_state,' +
+ 'host_components/HostRoles/maintenance_state,' +
'host_components/HostRoles/stale_configs,' +
'host_components/metrics/jvm/memHeapUsedM,' +
'host_components/metrics/jvm/HeapMemoryMax,' +
@@ -186,7 +186,7 @@ App.UpdateController = Em.Controller.extend({
},
updateServices: function (callback) {
var testUrl = '/data/services/HDP2/services.json';
- var componentConfigUrl = this.getUrl(testUrl, '/services?fields=alerts/summary,ServiceInfo/state,ServiceInfo/passive_state&minimal_response=true');
+ var componentConfigUrl = this.getUrl(testUrl, '/services?fields=alerts/summary,ServiceInfo/state,ServiceInfo/maintenance_state&minimal_response=true');
App.HttpClient.get(componentConfigUrl, App.serviceMapper, {
complete: callback
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/controllers/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js
index 20d97a9..f26086b 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -187,7 +187,7 @@ App.MainHostController = Em.ArrayController.extend({
var subQuery = '(HostRoles/component_name.in(%@)&HostRoles/host_name=' + host.get('hostName') + ')';
var components = [];
host.get('hostComponents').forEach(function(hostComponent) {
- if (hostComponent.get('passiveState') == 'ACTIVE') {
+ if (hostComponent.get('passiveState') == 'OFF') {
if (hostComponent.get('isMaster') || hostComponent.get('isSlave')) {
if (hostComponent.get('workStatus') === operationData.actionToCheck) {
components.push(hostComponent.get('componentName'));
@@ -229,7 +229,7 @@ App.MainHostController = Em.ArrayController.extend({
bulkOperationForHostsRestart: function(operationData, hosts) {
var hostComponents = [];
hosts.forEach(function(host) {
- hostComponents.pushObjects(host.get('hostComponents').filterProperty('passiveState','ACTIVE').toArray());
+ hostComponents.pushObjects(host.get('hostComponents').filterProperty('passiveState','OFF').toArray());
});
batchUtils.restartHostComponents(hostComponents);
},
@@ -280,7 +280,7 @@ App.MainHostController = Em.ArrayController.extend({
bulkOperationForHostComponents: function(operationData, hosts) {
var service = App.Service.find(operationData.serviceName);
var components = service.get('hostComponents').filter(function(hc) {
- if (hc.get('componentName') != operationData.componentName || hc.get('passiveState') != 'ACTIVE' ) {
+ if (hc.get('componentName') != operationData.componentName || hc.get('passiveState') != 'OFF' ) {
return false;
}
if(hc.get('workStatus') == operationData.action) {
@@ -320,7 +320,7 @@ App.MainHostController = Em.ArrayController.extend({
bulkOperationForHostComponentsDecommission: function(operationData, hosts) {
var service = App.Service.find(operationData.serviceName);
var components = service.get('hostComponents').filter(function(hc) {
- if (hc.get('componentName') != operationData.realComponentName || hc.get('passiveState') != 'ACTIVE' ) {
+ if (hc.get('componentName') != operationData.realComponentName || hc.get('passiveState') != 'OFF' ) {
return false;
}
return hosts.contains(hc.get('host'));
@@ -369,7 +369,7 @@ App.MainHostController = Em.ArrayController.extend({
bulkOperationForHostComponentsRestart: function(operationData, hosts) {
var service = App.Service.find(operationData.serviceName);
var components = service.get('hostComponents').filter(function(hc) {
- if (hc.get('componentName') != operationData.componentName || hc.get('passiveState') != 'ACTIVE') {
+ if (hc.get('componentName') != operationData.componentName || hc.get('passiveState') != 'OFF') {
return false;
}
return hosts.contains(hc.get('host'));
@@ -399,18 +399,18 @@ App.MainHostController = Em.ArrayController.extend({
if (hostComponent.get('componentName') == operationData.componentName) {
if (hostComponent.get('passiveState') !== operationData.state) {
if (hostComponent.get('passiveState') === 'IMPLIED') {
- if (operationData.state === 'ACTIVE') {
+ if (operationData.state === 'OFF') {
affectedHosts.push(host.get('hostName'));
}
}
else {
- if (hostComponent.get('passiveState') === 'PASSIVE') {
- if (operationData.state === 'ACTIVE') {
+ if (hostComponent.get('passiveState') === 'ON') {
+ if (operationData.state === 'OFF') {
affectedHosts.push(host.get('hostName'));
}
}
else {
- if (operationData.state === 'PASSIVE') {
+ if (operationData.state === 'ON') {
affectedHosts.push(host.get('hostName'));
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 5f95ac7..4cd2daf 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -105,7 +105,7 @@ App.MainHostDetailsController = Em.Controller.extend({
sendStartComponentCommand: function(component, context) {
var url = component !== null ?
'/hosts/' + this.get('content.hostName') + '/host_components/' + component.get('componentName').toUpperCase() :
- '/hosts/' + this.get('content.hostName') + '/host_components?HostRoles/passive_state=ACTIVE';
+ '/hosts/' + this.get('content.hostName') + '/host_components?HostRoles/maintenance_state=OFF';
var dataToSend = {
RequestInfo : {
"context" : context
@@ -120,7 +120,7 @@ App.MainHostDetailsController = Em.Controller.extend({
var allComponents = this.get('content.hostComponents');
var startable = [];
allComponents.forEach(function (c) {
- if (c.get('passiveState') == 'ACTIVE') {
+ if (c.get('passiveState') == 'OFF') {
if (c.get('isMaster') || c.get('isSlave')) {
startable.push(c.get('componentName'));
}
@@ -312,7 +312,7 @@ App.MainHostDetailsController = Em.Controller.extend({
sendStopComponentCommand: function(component, context){
var url = component !== null ?
'/hosts/' + this.get('content.hostName') + '/host_components/' + component.get('componentName').toUpperCase() :
- '/hosts/' + this.get('content.hostName') + '/host_components?HostRoles/passive_state=ACTIVE';
+ '/hosts/' + this.get('content.hostName') + '/host_components?HostRoles/maintenance_state=OFF';
var dataToSend = {
RequestInfo : {
"context" : context
@@ -327,7 +327,7 @@ App.MainHostDetailsController = Em.Controller.extend({
var allComponents = this.get('content.hostComponents');
var startable = [];
allComponents.forEach(function (c) {
- if (c.get('passiveState') == 'ACTIVE') {
+ if (c.get('passiveState') == 'OFF') {
if (c.get('isMaster') || c.get('isSlave')) {
startable.push(c.get('componentName'));
}
@@ -978,7 +978,7 @@ App.MainHostDetailsController = Em.Controller.extend({
},
onOffPassiveModeForHost: function(context) {
- var state = context.active ? 'PASSIVE' : 'ACTIVE';
+ var state = context.active ? 'ON' : 'OFF';
var self = this;
var message = context.label + ' for host';
App.showConfirmationPopup(function() {
@@ -1031,7 +1031,7 @@ App.MainHostDetailsController = Em.Controller.extend({
},
doRestartAllComponents: function() {
- var components = this.get('content.hostComponents').filterProperty('passiveState','ACTIVE');
+ var components = this.get('content.hostComponents').filterProperty('passiveState','OFF');
var componentsLength = components == null ? 0 : components.get('length');
if (componentsLength > 0) {
App.showConfirmationPopup(function() {
@@ -1234,13 +1234,13 @@ App.MainHostDetailsController = Em.Controller.extend({
var self = this;
var component = event.context;
var state, onOff, message;
- if (component.get("passiveState") == "PASSIVE") {
+ if (component.get("passiveState") == "ON") {
onOff = "Off";
- state = "ACTIVE";
+ state = "OFF";
message = Em.I18n.t('passiveState.turnOffFor').format(component.get('displayName'));
} else {
onOff = "On";
- state = "PASSIVE";
+ state = "ON";
message = Em.I18n.t('passiveState.turnOnFor').format(component.get('displayName'));
}
App.showConfirmationPopup(function() {
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index 5b39f6d..ec85194 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -195,8 +195,8 @@ App.MainServiceItemController = Em.Controller.extend({
turnOnOffPassive: function(label) {
var self = this;
- var state = this.get('content.passiveState') == 'ACTIVE' ? 'PASSIVE' : 'ACTIVE';
- var onOff = state === 'PASSIVE' ? "On" : "Off";
+ var state = this.get('content.passiveState') == 'OFF' ? 'ON' : 'OFF';
+ var onOff = state === 'ON' ? "On" : "Off";
App.showConfirmationPopup(function() {
self.turnOnOffPassiveRequest(state, label)
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/mappers/hosts_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/hosts_mapper.js b/ambari-web/app/mappers/hosts_mapper.js
index cda00ac..066d0f8 100644
--- a/ambari-web/app/mappers/hosts_mapper.js
+++ b/ambari-web/app/mappers/hosts_mapper.js
@@ -57,7 +57,7 @@ App.hostsMapper = App.QuickDataMapper.create({
os_arch: 'Hosts.os_arch',
os_type: 'Hosts.os_type',
ip: 'Hosts.ip',
- passive_state: 'Hosts.passive_state'
+ passive_state: 'Hosts.maintenance_state'
},
map: function (json) {
console.time('App.hostsMapper execution time');
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/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 4cf04d6..981e4db 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -27,7 +27,7 @@ App.serviceMapper = App.QuickDataMapper.create({
ServiceInfo: {
service_name: service.ServiceInfo.service_name,
state: service.ServiceInfo.state,
- passive_state: service.ServiceInfo.passive_state
+ passive_state: service.ServiceInfo.maintenance_state
},
host_components: [],
components: []
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/mappers/service_metrics_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js
index db3bdad..65eebda 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -131,7 +131,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
config3: {
id: 'id',
work_status: 'HostRoles.state',
- passive_state:'HostRoles.passive_state',
+ passive_state:'HostRoles.maintenance_state',
desired_status: 'HostRoles.desired_state',
component_name: 'HostRoles.component_name',
host_id: 'HostRoles.host_name',
@@ -163,7 +163,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
component.host_components.forEach(function (host_component) {
host_component.id = host_component.HostRoles.component_name + "_" + host_component.HostRoles.host_name;
previousComponentStatuses[host_component.id] = host_component.HostRoles.state;
- previousComponentPassiveStates[host_component.id] = host_component.HostRoles.passive_state;
+ previousComponentPassiveStates[host_component.id] = host_component.HostRoles.maintenance_state;
if (host_component.HostRoles.component_name == "HBASE_MASTER") {
this.config3.ha_status = 'metrics.hbase.master.IsActiveMaster';
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/mappers/status_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/status_mapper.js b/ambari-web/app/mappers/status_mapper.js
index 85ae758..b44b86d 100644
--- a/ambari-web/app/mappers/status_mapper.js
+++ b/ambari-web/app/mappers/status_mapper.js
@@ -57,14 +57,14 @@ App.statusMapper = App.QuickDataMapper.create({
if (existedComponent || existedPassiveComponent) {
//update host-components, which have status changed
- if (existedComponent !== host_component.HostRoles.state || existedPassiveComponent !== host_component.HostRoles.passive_state) {
+ if (existedComponent !== host_component.HostRoles.state || existedPassiveComponent !== host_component.HostRoles.maintenance_state) {
updatedHostComponents.push(host_component);
}
} else {
addedHostComponents.push({
id: host_component.id,
component_name: host_component.HostRoles.component_name,
- passive_state: host_component.HostRoles.passive_state,
+ passive_state: host_component.HostRoles.maintenance_state,
work_status: host_component.HostRoles.state,
host_id: hostName,
service_id: service
@@ -73,7 +73,7 @@ App.statusMapper = App.QuickDataMapper.create({
if (hostsCache[hostName]) hostsCache[hostName].is_modified = true;
}
currentComponentStatuses[host_component.id] = host_component.HostRoles.state;
- currentComponentPassiveStates[host_component.id] = host_component.HostRoles.passive_state;
+ currentComponentPassiveStates[host_component.id] = host_component.HostRoles.maintenance_state;
//host-components to host relations
hostComponentsOnHost.push(host_component.id);
//host-component to service relations
@@ -109,7 +109,7 @@ App.statusMapper = App.QuickDataMapper.create({
var hostComponentRecord = hostComponentRecordsMap[hostComponent.id];
if (hostComponentRecord) {
hostComponentRecord.set('workStatus', hostComponent.HostRoles.state);
- hostComponentRecord.set('passiveState', hostComponent.HostRoles.passive_state);
+ hostComponentRecord.set('passiveState', hostComponent.HostRoles.maintenance_state);
}
}, this);
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/models/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host.js b/ambari-web/app/models/host.js
index d392498..0924ba6 100644
--- a/ambari-web/app/models/host.js
+++ b/ambari-web/app/models/host.js
@@ -93,7 +93,7 @@ App.Host = DS.Model.extend({
*/
componentsInPassiveStateCount: function() {
return this.get('hostComponents').filter(function(component) {
- return component.get('passiveState') !== 'ACTIVE';
+ return component.get('passiveState') !== 'OFF';
}).length;
}.property('hostComponents.@each.passiveState'),
@@ -201,7 +201,7 @@ App.Host = DS.Model.extend({
* @returns {String}
*/
healthClass: function(){
- if (this.get('passiveState')!= 'ACTIVE') {
+ if (this.get('passiveState')!= 'OFF') {
return 'icon-medkit';
}
var statusMap = {
@@ -223,7 +223,7 @@ App.Host = DS.Model.extend({
return item.get('workStatus') !== App.HostComponentStatus.started;
});
var output = '';
- if (this.get('passiveState') != 'ACTIVE') {
+ if (this.get('passiveState') != 'OFF') {
return Em.I18n.t('hosts.host.passive.mode');
}
switch (this.get('healthClass')){
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/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 31b16dd..1bc2e3c 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -158,7 +158,7 @@ App.HostComponent = DS.Model.extend({
* @returns {String}
*/
isActive: function() {
- return (this.get('passiveState') == 'ACTIVE');
+ return (this.get('passiveState') == 'OFF');
}.property('passiveState'),
passiveTooltip: function() {
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index 4b7e733..396ad16 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -110,7 +110,7 @@ var urls = {
},
Body: {
ServiceInfo: {
- passive_state: data.passive_state
+ maintenance_state: data.passive_state
}
}
})
@@ -238,7 +238,7 @@ var urls = {
},
Body: {
HostRoles: {
- passive_state: data.passive_state
+ maintenance_state: data.passive_state
}
}
})
@@ -1633,7 +1633,7 @@ var urls = {
data: JSON.stringify({
RequestInfo: {
context: data.requestInfo,
- query: 'HostRoles/component_name=' + data.componentName + '&HostRoles/host_name.in(' + data.hostNames + ')&HostRoles/passive_state=ACTIVE'
+ query: 'HostRoles/component_name=' + data.componentName + '&HostRoles/host_name.in(' + data.hostNames + ')&HostRoles/maintenance_state=OFF'
},
Body: {
HostRoles: {
@@ -1698,7 +1698,7 @@ var urls = {
},
Body: {
Hosts: {
- passive_state: data.passive_state
+ maintenance_state: data.passive_state
}
}
})
@@ -1719,7 +1719,7 @@ var urls = {
},
Body: {
HostRoles: {
- passive_state: data.passive_state
+ maintenance_state: data.passive_state
}
}
})
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/views/common/rolling_restart_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/rolling_restart_view.js b/ambari-web/app/views/common/rolling_restart_view.js
index fc01345..eee978c 100644
--- a/ambari-web/app/views/common/rolling_restart_view.js
+++ b/ambari-web/app/views/common/rolling_restart_view.js
@@ -129,7 +129,7 @@ App.RollingRestartView = Em.View.extend({
*/
nonMaintainanceHostComponents : function() {
return this.get('allHostComponents').filter(function(item) {
- return item.get('passiveState') == 'ACTIVE';
+ return item.get('passiveState') == 'OFF';
});
}.property('allHostComponents', 'allHostComponents.@each.passiveState'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/views/main/dashboard/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service.js b/ambari-web/app/views/main/dashboard/service.js
index 95f73ab..943272a 100644
--- a/ambari-web/app/views/main/dashboard/service.js
+++ b/ambari-web/app/views/main/dashboard/service.js
@@ -62,7 +62,7 @@ App.MainDashboardServiceHealthView = Em.View.extend({
if (this.get('service.isClientsOnly')) {
return 'icon-laptop';
}
- if (this.get('service.passiveState') != 'ACTIVE') {
+ if (this.get('service.passiveState') != 'OFF') {
return 'icon-medkit';
}
var status = this.get('service.healthStatus');
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/views/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js
index a0671dd..9ff5de1 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -233,7 +233,7 @@ App.MainHostView = App.TableView.extend({
*/
componentsInPassiveStateMessage: function() {
var componentsInPassiveState = this.get('content.hostComponents').filter(function(component) {
- return component.get('passiveState') !== 'ACTIVE';
+ return component.get('passiveState') !== 'OFF';
});
var count = componentsInPassiveState.length;
if (count <= 5) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/views/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details.js b/ambari-web/app/views/main/host/details.js
index 13e666e..785a7a1 100644
--- a/ambari-web/app/views/main/host/details.js
+++ b/ambari-web/app/views/main/host/details.js
@@ -27,7 +27,7 @@ App.MainHostDetailsView = Em.View.extend({
}.property('App.router.mainHostDetailsController.content'),
isActive: function() {
- return this.get('controller.content.passiveState') === "ACTIVE";
+ return this.get('controller.content.passiveState') === "OFF";
}.property('controller.content.passiveState'),
maintenance: function(){
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/views/main/host/details/host_component_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js
index 31e9b99..30a8076 100644
--- a/ambari-web/app/views/main/host/details/host_component_view.js
+++ b/ambari-web/app/views/main/host/details/host_component_view.js
@@ -71,7 +71,7 @@ App.HostComponentView = Em.View.extend({
* @type {String}
*/
componentStatusTooltip: function() {
- if (this.get('content.passiveState') != 'ACTIVE') {
+ if (this.get('content.passiveState') != 'OFF') {
return Em.I18n.t('hosts.component.passive.short.mode');
} else {
return this.get('componentTextStatus');
@@ -82,11 +82,11 @@ App.HostComponentView = Em.View.extend({
* @type {String}
*/
passiveImpliedTextStatus: function() {
- if(this.get('parentView.content.passiveState') === 'PASSIVE') {
+ if(this.get('parentView.content.passiveState') === 'ON') {
return Em.I18n.t('hosts.component.passive.implied.host.mode.tooltip');
}
else
- if(this.get('content.service.passiveState') === 'PASSIVE') {
+ if(this.get('content.service.passiveState') === 'ON') {
return Em.I18n.t('hosts.component.passive.implied.service.mode.tooltip').format(this.get('content.service.serviceName'));
}
return '';
@@ -108,7 +108,7 @@ App.HostComponentView = Em.View.extend({
}
//Class when maintenance
- if (this.get('content.passiveState') != "ACTIVE") {
+ if (this.get('content.passiveState') != "OFF") {
return 'icon-medkit';
}
@@ -189,11 +189,11 @@ App.HostComponentView = Em.View.extend({
}.property('workStatus'),
/**
- * For ACTIVE <code>passiveState</code> of host component
+ * For OFF <code>passiveState</code> of host component
* @type {bool}
*/
isActive: function () {
- return (this.get('content.passiveState') == "ACTIVE");
+ return (this.get('content.passiveState') == "OFF");
}.property('content.passiveState'),
/**
@@ -201,7 +201,7 @@ App.HostComponentView = Em.View.extend({
* @type {bool}
*/
isImplied: function() {
- return (this.get('parentView.content.passiveState') === 'PASSIVE' || this.get('content.service.passiveState') === 'PASSIVE');
+ return (this.get('parentView.content.passiveState') === 'ON' || this.get('content.service.passiveState') === 'ON');
}.property('parentView.content.passiveState', 'content.service.passiveState'),
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/views/main/host/details/host_component_views/decommissionable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details/host_component_views/decommissionable.js b/ambari-web/app/views/main/host/details/host_component_views/decommissionable.js
index b17f2c9..6da5d7c 100644
--- a/ambari-web/app/views/main/host/details/host_component_views/decommissionable.js
+++ b/ambari-web/app/views/main/host/details/host_component_views/decommissionable.js
@@ -79,7 +79,7 @@ App.Decommissionable = Em.Mixin.create({
}
//Class when maintenance
- if (this.get('content.passiveState') != "ACTIVE") {
+ if (this.get('content.passiveState') != "OFF") {
return 'icon-medkit';
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/views/main/host/hosts_table_menu_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/hosts_table_menu_view.js b/ambari-web/app/views/main/host/hosts_table_menu_view.js
index de6d6c3..7e185fe 100644
--- a/ambari-web/app/views/main/host/hosts_table_menu_view.js
+++ b/ambari-web/app/views/main/host/hosts_table_menu_view.js
@@ -91,7 +91,7 @@ App.HostTableMenuView = Em.View.extend({
Em.Object.create({
label: Em.I18n.t('passiveState.turnOn'),
operationData: Em.Object.create({
- state: 'PASSIVE',
+ state: 'ON',
action: 'PASSIVE_STATE',
message: Em.I18n.t('passiveState.turnOnFor').format(App.format.components[componentNameForOtherActions]),
componentName: componentNameForOtherActions
@@ -100,7 +100,7 @@ App.HostTableMenuView = Em.View.extend({
Em.Object.create({
label: Em.I18n.t('passiveState.turnOff'),
operationData: Em.Object.create({
- state: 'ACTIVE',
+ state: 'OFF',
action: 'PASSIVE_STATE',
message: Em.I18n.t('passiveState.turnOffFor').format(App.format.components[componentNameForOtherActions]),
componentName: componentNameForOtherActions
@@ -150,7 +150,7 @@ App.HostTableMenuView = Em.View.extend({
Em.Object.create({
label: Em.I18n.t('passiveState.turnOn'),
operationData: Em.Object.create({
- state: 'PASSIVE',
+ state: 'ON',
action: 'PASSIVE_STATE',
message: Em.I18n.t('passiveState.turnOnFor').format('hosts')
})
@@ -158,7 +158,7 @@ App.HostTableMenuView = Em.View.extend({
Em.Object.create({
label: Em.I18n.t('passiveState.turnOff'),
operationData: Em.Object.create({
- state: 'ACTIVE',
+ state: 'OFF',
action: 'PASSIVE_STATE',
message: Em.I18n.t('passiveState.turnOffFor').format('hosts')
})
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index 76461f1..33df5ee 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -63,10 +63,10 @@ App.MainServiceItemView = Em.View.extend({
default:
options.push({action: 'runSmokeTest', cssClass: 'icon-thumbs-up-alt', 'label': Em.I18n.t('services.service.actions.run.smoke'), disabled:disabled});
}
- var requestLabel = service.get('passiveState') === "ACTIVE" ?
+ var requestLabel = service.get('passiveState') === "OFF" ?
Em.I18n.t('passiveState.turnOnFor').format(App.Service.DisplayNames[serviceName]) :
Em.I18n.t('passiveState.turnOffFor').format(App.Service.DisplayNames[serviceName]);
- var passiveLabel = service.get('passiveState') === "ACTIVE" ?
+ var passiveLabel = service.get('passiveState') === "OFF" ?
Em.I18n.t('passiveState.turnOn') :
Em.I18n.t('passiveState.turnOff');
options.push({action:'turnOnOffPassive', cssClass: 'icon-medkit', context:requestLabel, 'label':passiveLabel , disabled: false});
http://git-wip-us.apache.org/repos/asf/ambari/blob/40fca9c8/ambari-web/test/controllers/main/host_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/host_test.js b/ambari-web/test/controllers/main/host_test.js
index 15004ca..7183b9d 100644
--- a/ambari-web/test/controllers/main/host_test.js
+++ b/ambari-web/test/controllers/main/host_test.js
@@ -171,8 +171,8 @@ describe('MainHostController', function () {
hosts: [
Em.Object.create({
hostComponents: Em.A([
- Em.Object.create({isMaster: true, isSlave: false, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'NAMENODE', passiveState: 'ACTIVE'}),
- Em.Object.create({isMaster: false, isSlave: true, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'DATANODE', passiveState: 'ACTIVE'})
+ Em.Object.create({isMaster: true, isSlave: false, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'NAMENODE', passiveState: 'OFF'}),
+ Em.Object.create({isMaster: false, isSlave: true, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'DATANODE', passiveState: 'OFF'})
])
})
],
@@ -186,8 +186,8 @@ describe('MainHostController', function () {
hosts: [
Em.Object.create({
hostComponents: Em.A([
- Em.Object.create({isMaster: true, isSlave: false, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'NAMENODE', passiveState: 'ACTIVE'}),
- Em.Object.create({isMaster: false, isSlave: true, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'DATANODE', passiveState: 'ACTIVE'})
+ Em.Object.create({isMaster: true, isSlave: false, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'NAMENODE', passiveState: 'OFF'}),
+ Em.Object.create({isMaster: false, isSlave: true, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'DATANODE', passiveState: 'OFF'})
])
})
],
@@ -201,8 +201,8 @@ describe('MainHostController', function () {
hosts: [
Em.Object.create({
hostComponents: Em.A([
- Em.Object.create({isMaster: true, isSlave: false, host: {hostName:'host1'}, workStatus: 'INSTALLED', componentName: 'NAMENODE', passiveState: 'ACTIVE'}),
- Em.Object.create({isMaster: false, isSlave: true, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'DATANODE', passiveState: 'ACTIVE'})
+ Em.Object.create({isMaster: true, isSlave: false, host: {hostName:'host1'}, workStatus: 'INSTALLED', componentName: 'NAMENODE', passiveState: 'OFF'}),
+ Em.Object.create({isMaster: false, isSlave: true, host: {hostName:'host1'}, workStatus: 'STARTED', componentName: 'DATANODE', passiveState: 'OFF'})
])
})
],
@@ -240,7 +240,7 @@ describe('MainHostController', function () {
{
hosts: Em.A([
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({passiveState: 'ACTIVE'}), Em.Object.create({passiveState: 'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({passiveState: 'OFF'}), Em.Object.create({passiveState: 'OFF'})])
})
]),
m: 'One host',
@@ -278,11 +278,11 @@ describe('MainHostController', function () {
{
hosts: Em.A([
Em.Object.create({
- passiveState: 'ACTIVE'
+ passiveState: 'OFF'
})
]),
operationData: {
- state: 'ACTIVE'
+ state: 'OFF'
},
m: 'One host, but in state that should get',
e: false
@@ -290,11 +290,11 @@ describe('MainHostController', function () {
{
hosts: Em.A([
Em.Object.create({
- passiveState: 'ACTIVE'
+ passiveState: 'OFF'
})
]),
operationData: {
- state: 'PASSIVE'
+ state: 'ON'
},
m: 'One host with proper state',
e: true
@@ -331,15 +331,15 @@ describe('MainHostController', function () {
{
hosts: Em.A([
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'ACTIVE'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'OFF'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
}),
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'ACTIVE'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'OFF'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
})
]),
operationData: {
componentName: 'CN',
- state: 'ACTIVE'
+ state: 'OFF'
},
m: 'Two hosts with components in state that they should get',
e: false
@@ -347,65 +347,65 @@ describe('MainHostController', function () {
{
hosts: Em.A([
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'ACTIVE'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'OFF'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
}),
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'PASSIVE'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'ON'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
})
]),
operationData: {
componentName: 'CN',
- state: 'PASSIVE'
+ state: 'ON'
},
- m: 'One host with component in proper state (ACTIVE)',
+ m: 'One host with component in proper state (OFF)',
e: true
},
{
hosts: Em.A([
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'ACTIVE'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'OFF'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
}),
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'PASSIVE'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'ON'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
})
]),
operationData: {
componentName: 'CN',
- state: 'PASSIVE'
+ state: 'ON'
},
- m: 'One host with component in proper state (PASSIVE)',
+ m: 'One host with component in proper state (ON)',
e: true
},
{
hosts: Em.A([
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'ACTIVE'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'OFF'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
}),
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'IMPLIED'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'IMPLIED'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
})
]),
operationData: {
componentName: 'CN',
- state: 'PASSIVE'
+ state: 'ON'
},
- m: 'One host with component in proper state (ACTIVE)',
+ m: 'One host with component in proper state (OFF)',
e: true
},
{
hosts: Em.A([
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'ACTIVE'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'OFF'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
}),
Em.Object.create({
- hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'IMPLIED'}), Em.Object.create({componentName:'ACN',passiveState:'ACTIVE'})])
+ hostComponents: Em.A([Em.Object.create({componentName:'CN',passiveState:'IMPLIED'}), Em.Object.create({componentName:'ACN',passiveState:'OFF'})])
})
]),
operationData: {
componentName: 'CN',
- state: 'ACTIVE'
+ state: 'OFF'
},
- m: 'One host with component in proper state (PASSIVE)',
+ m: 'One host with component in proper state (ON)',
e: true
}
];