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 2012/12/09 13:21:30 UTC
svn commit: r1418909 [1/2] - in /incubator/ambari/branches/AMBARI-666: ./
ambari-web/app/ ambari-web/app/assets/data/apps/
ambari-web/app/assets/data/clusters/ ambari-web/app/assets/data/hosts/
ambari-web/app/controllers/ ambari-web/app/controllers/glo...
Author: yusaku
Date: Sun Dec 9 12:21:22 2012
New Revision: 1418909
URL: http://svn.apache.org/viewvc?rev=1418909&view=rev
Log:
AMBARI-1060. Data loading for App Browser. (yusaku)
Added:
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/jobs.json
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/runs.json
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/clusters/cluster.json
incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/runs_mapper.js
Removed:
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/background_operations_popup.hbs
Modified:
incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/cluster_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/background_operations_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/apps_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/server_data_mapper.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/job.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/protoRelations.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/rack.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/run.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step2.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step3.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step9.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/jquery.unique.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/details.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/test.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js
Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sun Dec 9 12:21:22 2012
@@ -398,6 +398,8 @@ AMBARI-666 branch (unreleased changes)
IMPROVEMENTS
+ AMBARI-1060. Data loading for App Browser. (yusaku)
+
AMBARI-993. Hook up login with server authentication. (yusaku)
AMBARI-1059. Refactor cluster management. (yusaku)
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/jobs.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/jobs.json?rev=1418909&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/jobs.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/jobs.json Sun Dec 9 12:21:22 2012
@@ -0,0 +1,198 @@
+{"jobs": [
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0036/job.xml",
+ "elapsedTime": 307122,
+ "inputBytes": 10409082,
+ "jobId": "job_201211040003_0036",
+ "jobName": "PigLatin:script2-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 59144990,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352095518432,
+ "userName": "root",
+ "workflowEntityName": "89",
+ "workflowId": "pig_b6d5cc44-ac51-4ecd-92c7-2e477c2fbed6"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0037/job.xml",
+ "elapsedTime": 251964,
+ "inputBytes": 59145376,
+ "jobId": "job_201211040003_0037",
+ "jobName": "PigLatin:script2-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 27259999,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352095842817,
+ "userName": "root",
+ "workflowEntityName": "97",
+ "workflowId": "pig_b6d5cc44-ac51-4ecd-92c7-2e477c2fbed6"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0038/job.xml",
+ "elapsedTime": 100200,
+ "inputBytes": 54520774,
+ "jobId": "job_201211040003_0038",
+ "jobName": "PigLatin:script2-hadoop.pig",
+ "maps": 2,
+ "outputBytes": 67032,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352096111311,
+ "userName": "root",
+ "workflowEntityName": "103",
+ "workflowId": "pig_b6d5cc44-ac51-4ecd-92c7-2e477c2fbed6"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0019/job.xml",
+ "elapsedTime": 70395,
+ "inputBytes": 650898,
+ "jobId": "job_201211040003_0019",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 64,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352016495104,
+ "userName": "root",
+ "workflowEntityName": "86",
+ "workflowId": "pig_7c779523-6bca-416e-89b3-b01b73a60174"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0016/job.xml",
+ "elapsedTime": 285448,
+ "inputBytes": 10409082,
+ "jobId": "job_201211040003_0016",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 57689830,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352015770967,
+ "userName": "root",
+ "workflowEntityName": "72",
+ "workflowId": "pig_7c779523-6bca-416e-89b3-b01b73a60174"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0017/job.xml",
+ "elapsedTime": 254621,
+ "inputBytes": 57690215,
+ "jobId": "job_201211040003_0017",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 27259999,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352016076858,
+ "userName": "root",
+ "workflowEntityName": "80",
+ "workflowId": "pig_7c779523-6bca-416e-89b3-b01b73a60174"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0020/job.xml",
+ "elapsedTime": 81568,
+ "inputBytes": 650898,
+ "jobId": "job_201211040003_0020",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 659755,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352016582226,
+ "userName": "root",
+ "workflowEntityName": "103",
+ "workflowId": "pig_7c779523-6bca-416e-89b3-b01b73a60174"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0018/job.xml",
+ "elapsedTime": 123283,
+ "inputBytes": 27260386,
+ "jobId": "job_201211040003_0018",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 650512,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352016352319,
+ "userName": "root",
+ "workflowEntityName": "83",
+ "workflowId": "pig_7c779523-6bca-416e-89b3-b01b73a60174"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0001/job.xml",
+ "elapsedTime": 293486,
+ "inputBytes": 10409082,
+ "jobId": "job_201211040003_0001",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 57689830,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352012856094,
+ "userName": "root",
+ "workflowEntityName": "72",
+ "workflowId": "pig_5750f4cf-f0d2-4e3d-a7ce-90912b309c12"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0003/job.xml",
+ "elapsedTime": 126758,
+ "inputBytes": 27260386,
+ "jobId": "job_201211040003_0003",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 650512,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352013446101,
+ "userName": "root",
+ "workflowEntityName": "83",
+ "workflowId": "pig_5750f4cf-f0d2-4e3d-a7ce-90912b309c12"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0005/job.xml",
+ "elapsedTime": 83965,
+ "inputBytes": 650899,
+ "jobId": "job_201211040003_0005",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 659755,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352013682420,
+ "userName": "root",
+ "workflowEntityName": "103",
+ "workflowId": "pig_5750f4cf-f0d2-4e3d-a7ce-90912b309c12"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0002/job.xml",
+ "elapsedTime": 256616,
+ "inputBytes": 57690216,
+ "jobId": "job_201211040003_0002",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 27259999,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352013170737,
+ "userName": "root",
+ "workflowEntityName": "80",
+ "workflowId": "pig_5750f4cf-f0d2-4e3d-a7ce-90912b309c12"
+ },
+ {
+ "confPath": "hdfs://localhost:8020/tmp/hadoop-root/mapred/staging/root/.staging/job_201211040003_0004/job.xml",
+ "elapsedTime": 76603,
+ "inputBytes": 650899,
+ "jobId": "job_201211040003_0004",
+ "jobName": "PigLatin:script1-hadoop.pig",
+ "maps": 1,
+ "outputBytes": 64,
+ "reduces": 1,
+ "status": "SUCCESS",
+ "submitTime": 1352013590129,
+ "userName": "root",
+ "workflowEntityName": "86",
+ "workflowId": "pig_5750f4cf-f0d2-4e3d-a7ce-90912b309c12"
+ }
+ ]
+}
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/runs.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/runs.json?rev=1418909&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/runs.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/apps/runs.json Sun Dec 9 12:21:22 2012
@@ -0,0 +1,108 @@
+{"workflows": [
+ {
+ "elapsedTime": 693129,
+ "numJobsCompleted": 3,
+ "numJobsTotal": 3,
+ "startTime": 1352095518432,
+ "userName": "root",
+ "workflowContext": {
+ "workflowDag": {
+ "entries": [
+ {
+ "source": "89",
+ "targets": [
+ "97"
+ ]
+ },
+ {
+ "source": "97",
+ "targets": [
+ "103"
+ ]
+ }
+ ]
+ }
+ },
+ "workflowId": "pig_b6d5cc44-ac51-4ecd-92c7-2e477c2fbed6",
+ "workflowName": "script2-hadoop.pig"
+ },
+ {
+ "elapsedTime": 892896,
+ "numJobsCompleted": 5,
+ "numJobsTotal": 5,
+ "startTime": 1352015770967,
+ "userName": "root",
+ "workflowContext": {
+ "workflowDag": {
+ "entries": [
+ {
+ "source": "80",
+ "targets": [
+ "83"
+ ]
+ },
+ {
+ "source": "83",
+ "targets": [
+ "86"
+ ]
+ },
+ {
+ "source": "86",
+ "targets": [
+ "103"
+ ]
+ },
+ {
+ "source": "72",
+ "targets": [
+ "80"
+ ]
+ }
+ ]
+ }
+ },
+ "workflowId": "pig_7c779523-6bca-416e-89b3-b01b73a60174",
+ "workflowName": "script1-hadoop.pig"
+ },
+ {
+ "elapsedTime": 910360,
+ "numJobsCompleted": 5,
+ "numJobsTotal": 5,
+ "startTime": 1352012856094,
+ "userName": "root",
+ "workflowContext": {
+ "workflowDag": {
+ "entries": [
+ {
+ "source": "80",
+ "targets": [
+ "83"
+ ]
+ },
+ {
+ "source": "83",
+ "targets": [
+ "86"
+ ]
+ },
+ {
+ "source": "86",
+ "targets": [
+ "103"
+ ]
+ },
+ {
+ "source": "72",
+ "targets": [
+ "80"
+ ]
+ }
+ ]
+ }
+ },
+ "workflowId": "pig_5750f4cf-f0d2-4e3d-a7ce-90912b309c12",
+ "workflowName": "script1-hadoop.pig"
+ }
+ ]
+}
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/clusters/cluster.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/clusters/cluster.json?rev=1418909&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/clusters/cluster.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/clusters/cluster.json Sun Dec 9 12:21:22 2012
@@ -0,0 +1,10 @@
+{
+ "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster?fields=Clusters",
+ "Clusters" : {
+ "cluster_name" : "mycluster",
+ "cluster_id" : 1,
+ "version" : "HDP-0.1",
+ "stack_name" : "HDP",
+ "max_hosts_per_rack" : 10
+ }
+}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json Sun Dec 9 12:21:22 2012
@@ -2,122 +2,177 @@
"href" : "http://localhost:8080/api/hosts?fields=*",
"items" : [
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host01",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack1",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host01",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.1"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host02",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack1",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host02",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.2"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host03",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack1",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host03",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.3"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host04",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack1",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host04",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.4"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host05",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack1",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host05",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.5"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host06",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack2",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host06",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.6"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host07",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack2",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host07",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.7"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host08",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack2",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host08",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.8"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host09",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack2",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host09",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.9"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host10",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack2",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host10",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.10"
}
},
{
- "href" : "http://localhost:8080/api/hosts/host1",
+ "href" : "http://localhost:8080/api/hosts/host11",
"Hosts" : {
"cpu_count" : 1,
+ "cluster_name" : "mycluster",
+ "last_registration_time" : 1352357436171,
+ "rack_info" : "/rack3",
"total_mem" : 2055208,
"os_arch" : "x86_64",
"host_name" : "host11",
+ "disk_info" : "[{\"available\":\"47476780\",\"mountpoint\":\"/\",\"used\":\"3605224\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1027100\",\"mountpoint\":\"/dev/shm\",\"used\":\"364\",\"percent\":\"1%\",\"size\":\"1027464\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459808\",\"mountpoint\":\"/home\",\"used\":\"184284\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"0\",\"mountpoint\":\"/media/VBOXADDITIONS_4.1.23_80858\",\"used\":\"52206\",\"percent\":\"100%\",\"size\":\"52206\",\"type\":\"iso9660\"}]",
+ "last_heartbeat_time" : 1352357625241,
"os_type" : "centos6",
"ip" : "10.0.2.11"
}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/cluster_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/cluster_controller.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/cluster_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/cluster_controller.js Sun Dec 9 12:21:22 2012
@@ -30,12 +30,14 @@ App.ClusterController = Em.Controller.ex
loaded = false;
}
}
-
return loaded;
}.property('dataLoadList'),
dataLoadList: Em.Object.create({
- 'hosts': true,
- 'services': false
+ 'hosts': false,
+ 'jobs': false,
+ 'runs': false,
+ 'services': false,
+ 'cluster' : false
}),
/**
* load cluster name
@@ -50,7 +52,6 @@ App.ClusterController = Em.Controller.ex
timeout: 5000,
success: function (data) {
self.set('cluster', data.items[0]);
- self.loadClusterData();
},
error: function (request, ajaxOptions, error) {
//do something
@@ -59,6 +60,10 @@ App.ClusterController = Em.Controller.ex
statusCode: require('data/statusCodes')
});
},
+
+ getUrl: function(testUrl, url){
+ return (App.testMode) ? testUrl: '/api/clusters/' + this.get('clusterName') + url;
+ },
/**
*
* load all data and update load status
@@ -68,13 +73,34 @@ App.ClusterController = Em.Controller.ex
if(!this.get('clusterName')){
return;
}
- // TODO: load all models
- /*App.HttpClient.get("/data/hosts/hosts.json", App.hostsMapper,{
+ var clusterUrl = (App.testMode) ? '/data/clusters/cluster.json': '/api/clusters/mycluster?fields=Clusters';
+ var jobsUrl = (App.testMode) ? "/data/apps/jobs.json" : "/api/jobs?fields=*";
+ var runsUrl = (App.testMode) ? "/data/apps/runs.json" : "/api/runs?fields=*";
+ var hostsUrl = (App.testMode) ? "/data/hosts/hosts.json" : "/api/hosts?fields=*";
+ var servicesUrl = (App.testMode) ?
+ "/data/dashboard/services.json" :
+ "/api/clusters/mycluster/services?ServiceInfo/service_name!=MISCELLANEOUS&ServiceInfo/service_name!=DASHBOARD&fields=components/host_components/*";
+ App.HttpClient.get(clusterUrl, App.clusterMapper,{
+ complete:function(jqXHR, textStatus){
+ self.set('dataLoadList.cluster', true);
+ }
+ });
+ App.HttpClient.get(jobsUrl, App.jobsMapper,{
+ complete:function(jqXHR, textStatus) {
+ self.set('dataLoadList.jobs', true);
+ }
+ });
+ App.HttpClient.get(runsUrl, App.runsMapper,{
+ complete:function(jqXHR, textStatus) {
+ self.set('dataLoadList.runs', true);
+ }
+ });
+ App.HttpClient.get(hostsUrl, App.hostsMapper,{
complete:function(jqXHR, textStatus){
self.set('dataLoadList.hosts', true);
}
- });*/
- App.HttpClient.get("/data/dashboard/services.json", App.servicesMapper,{
+ });
+ App.HttpClient.get(servicesUrl, App.servicesMapper,{
complete:function(jqXHR, textStatus){
self.set('dataLoadList.services', true);
}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/background_operations_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/background_operations_controller.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/background_operations_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/background_operations_controller.js Sun Dec 9 12:21:22 2012
@@ -72,6 +72,10 @@ App.BackgroundOperationsController = Em.
}
},
+ getOperationsForRequestId: function(requestId){
+ return this.get('allOperations').filterProperty('request_id', requestId);
+ },
+
updateInterval: 6000,
url : '',
@@ -169,6 +173,25 @@ App.BackgroundOperationsController = Em.
}
this.set('allOperationsCount', currentTasks.length);
+
+ var eventsArray = this.get('eventsArray');
+ if(eventsArray.length){
+
+ var itemsToRemove = [];
+ eventsArray.forEach(function(item){
+ //if when returns true
+ if(item.when(this)){
+ //fire do method
+ item.do();
+ //and remove it
+ itemsToRemove.push(item);
+ }
+ }, this);
+
+ itemsToRemove.forEach(function(item){
+ eventsArray.splice(eventsArray.indexOf(item), 1);
+ });
+ }
},
/**
@@ -189,6 +212,22 @@ App.BackgroundOperationsController = Em.
},
secondary : null
});
- }
+ },
+
+ /**
+ * Exaple of data inside:
+ * {
+ * when : function(backgroundOperationsController){
+ * return backgroundOperationsController.getOperationsForRequestId(requestId).length == 0;
+ * },
+ * do : function(){
+ * component.set('status', 'cool');
+ * }
+ * }
+ *
+ * Function <code>do</code> will be fired once, when <code>when</code> returns true.
+ * Example, how to use it, you can see in app\controllers\main\host\details.js
+ */
+ eventsArray : []
});
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/apps_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/apps_controller.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/apps_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/apps_controller.js Sun Dec 9 12:21:22 2012
@@ -28,9 +28,6 @@ App.MainAppsController = Em.ArrayControl
routeHome:function () {
App.router.transitionTo('main.dashboard');
var view = Ember.View.views['main_menu'];
- $.each(view._childViews, function () {
- this.set('active', this.get('content.routing') == 'dashboard' ? "active" : "");
- });
},
clearFilteredRuns: function() {
this.set('filteredRuns', []);
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js Sun Dec 9 12:21:22 2012
@@ -22,74 +22,49 @@ App.MainHostDetailsController = Em.Contr
name: 'mainHostDetailsController',
content: null,
isFromHosts: false,
- backgroundOperations: [],
- isStarting: true,
- isStopping: function(){
- return !this.get('isStarting');
- }.property('isStarting'),
- intervalId: false,
- checkOperationsInterval: 5000,
- init: function(){
- this._super();
- this.startCheckOperationsLifeTime();
- },
+
routeHome:function () {
App.router.transitionTo('main.dashboard');
- var view = Ember.View.views['main_menu'];
- $.each(view._childViews, function () {
- this.set('active', this.get('content.routing') == 'dashboard' ? "active" : "");
- });
},
setBack: function(isFromHosts){
this.set('isFromHosts', isFromHosts);
},
- startCheckOperationsLifeTime: function() {
- this.intervalId = setInterval(this.checkOperationsLifeTime, this.get('checkOperationsInterval'));
- },
- stopCheckOperationsLifeTime:function () {
- if(this.intervalId) {
- clearInterval(this.intervalId);
- }
- this.intervalId = false;
- },
-
- checkOperationsLifeTime: function(){
- var self = App.router.get('mainHostDetailsController');
- var backgroundOperations = self.get('backgroundOperations');
- var time = new Date().getTime();
- if(backgroundOperations.length){
- backgroundOperations.forEach(function(operation){
- if (time - operation.time >= 60*1000){
- backgroundOperations.removeObject(operation);
+ /**
+ * Send specific command to server
+ * @param url
+ * @param data Object to send
+ */
+ sendCommandToServer : function(url, postData, callback){
+ var url = (App.testMode) ?
+ '/data/wizard/deploy/poll_1.json' : //content is the same as ours
+ '/api/clusters/' + App.router.getClusterName() + url;
+
+ var method = App.testMode ? 'GET' : 'PUT';
+
+ $.ajax({
+ type: method,
+ url: url,
+ data: JSON.stringify(postData),
+ dataType: 'json',
+ timeout: 5000,
+ success: function(data){
+ if(data && data.Requests){
+ callback(data.Requests.id);
+ } else{
+ callback(null);
+ console.log('cannot get request id from ', data);
}
- })
- }
- },
+ },
- hostOperations: function(){
- var hostName = this.get('content.hostName');
- return this.get('backgroundOperations').filterProperty('hostName', hostName);
- }.property('backgroundOperations.length', 'content'),
-
- hostOperationsCount: function() {
- return this.get('hostOperations.length');
- }.property('backgroundOperations.length', 'content'),
+ error: function (request, ajaxOptions, error) {
+ //do something
+ callback(null);
+ console.log('error on change component host status')
+ },
- showBackgroundOperationsPopup: function(){
- App.ModalPopup.show({
- headerClass: Ember.View.extend({
- controllerBinding: 'App.router.mainHostDetailsController',
- template:Ember.Handlebars.compile('{{hostOperationsCount}} Background Operations Running')
- }),
- bodyClass: Ember.View.extend({
- controllerBinding: 'App.router.mainHostDetailsController',
- templateName: require('templates/main/host/background_operations_popup')
- }),
- onPrimary: function() {
- this.hide();
- }
+ statusCode: require('data/statusCodes')
});
},
@@ -102,30 +77,41 @@ App.MainHostDetailsController = Em.Contr
secondary: 'No',
onPrimary: function() {
var component = event.context;
- component.set('workStatus', "STARTING");
- self.componentIndicatorBlink(component);
- self.setComponentButtonStatus(component,"disabled");
- //TODO: here must be call to server side
- setTimeout(function(){
- self.setComponentButtonStatus(component,"enabled");
- component.set('workStatus', "STARTED");
- },10000);
- var backgroundOperations = self.get('backgroundOperations');
- backgroundOperations.pushObject({
- "hostName": self.get('content.hostName'),
- "role":component.get('componentName'),
- "command": "START",
- "time": new Date().getTime(),
- "details": [
- {"startTime":"4 min ago", "name":"Some intermediate operation"},
- {"startTime":"5 min ago", "name":"Component started"}
- ],
- "logs":{"exitcode":"404", "stdout":27, "stderror":501}
+
+ self.sendCommandToServer('/hosts/' + self.get('content.hostName') + '/host_components/' + component.get('componentName').toUpperCase(),{
+ HostRoles:{
+ state: 'STARTED'
+ }
+ }, function(requestId){
+
+ if(!requestId){
+ return;
+ }
+
+ console.log('Send request for STARTING successfully');
+ component.set('workStatus', "STARTING");
+
+ if(App.testMode){
+ setTimeout(function(){
+ component.set('workStatus', "STARTED");
+ },10000);
+ } else{
+ App.router.get('backgroundOperationsController.eventsArray').push({
+ "when" : function(controller){
+ var result = (controller.getOperationsForRequestId(requestId).length == 0);
+ console.log('startComponent.when = ', result)
+ return result;
+ },
+ "do" : function(){
+ component.set('workStatus', "STARTED");
+ }
+ });
+ }
+
+ App.router.get('backgroundOperationsController').showPopup();
+
});
- self.showBackgroundOperationsPopup();
- var stopped = self.get('content.components').filterProperty('workStatus', "STOPPING");
- if (stopped.length == 0)
- self.set('isStarting', true);
+
this.hide();
},
onSecondary: function() {
@@ -142,30 +128,41 @@ App.MainHostDetailsController = Em.Contr
secondary: 'No',
onPrimary: function() {
var component = event.context;
- component.set('workStatus', "STOPPING");
- self.componentIndicatorBlink(component);
- self.setComponentButtonStatus(component,"disabled");
- //TODO: here must be call to server side
- setTimeout(function(){
- self.setComponentButtonStatus(component,"enabled");
- component.set('workStatus', "STOPPED");
- },10000);
- var backgroundOperations = self.get('backgroundOperations');
- backgroundOperations.pushObject({
- "hostName": self.get('content.hostName'),
- "role": component.get('componentName'),
- "command": "STOP",
- "time": new Date().getTime(),
- "details": [
- {"startTime":"4 min ago", "name":"Some intermediate operation"},
- {"startTime":"5 min ago", "name":"Component stopped"}
- ],
- "logs":{"exitcode":"404", "stdout":15, "stderror":501}
+
+ self.sendCommandToServer('/hosts/' + self.get('content.hostName') + '/host_components/' + component.get('componentName').toUpperCase(),{
+ HostRoles:{
+ state: 'INSTALLED'
+ }
+ }, function(requestId){
+ if(!requestId){
+ return
+ }
+
+ console.log('Send request for STOPPING successfully');
+
+ component.set('workStatus', "STOPPING");
+
+ if(App.testMode){
+ setTimeout(function(){
+ component.set('workStatus', "STOPPED");
+ },10000);
+ } else{
+ App.router.get('backgroundOperationsController.eventsArray').push({
+ "when" : function(controller){
+ var result = (controller.getOperationsForRequestId(requestId).length == 0);
+ console.log('stopComponent.when = ', result)
+ return result;
+ },
+ "do" : function(){
+ component.set('workStatus', "STOPPED");
+ }
+ });
+ }
+
+ App.router.get('backgroundOperationsController').showPopup();
+
});
- self.showBackgroundOperationsPopup();
- var started = self.get('content.components').filterProperty('workStatus', "STARTING");
- if (started.length == 0)
- self.set('isStarting', false);
+
this.hide();
},
onSecondary: function() {
@@ -174,21 +171,6 @@ App.MainHostDetailsController = Em.Contr
});
},
- setComponentButtonStatus: function(component,status){
- if(status=="disabled"){
- $("#component-button-" + component.get("id") ).addClass("disabled");
- }else{
- $("#component-button-" + component.get("id") ).removeClass("disabled");
- }
- },
- componentIndicatorBlink: function(component){
- var self=this;
- $("#component-button-"+component.get("id")).find(".components-health").effect("pulsate", { times:1 }, "slow", function () {
- if(component.get('workStatus')==="STOPPING" || component.get('workStatus')==="STARTING")
- self.componentIndicatorBlink(component);
- });
- },
-
decommission: function(event){
var self = this;
App.ModalPopup.show({
@@ -199,19 +181,9 @@ App.MainHostDetailsController = Em.Contr
onPrimary: function() {
var component = event.context;
component.set('decommissioned', true);
- var backgroundOperations = self.get('backgroundOperations');
- backgroundOperations.pushObject({
- "hostName": self.get('content.hostName'),
- "role":component.get('componentName'),
- "command": "DECOMMISSION",
- "time": new Date().getTime(),
- "details": [
- {"startTime":"4 min ago", "name":"Some intermediate operation"},
- {"startTime":"5 min ago", "name":"Component decommissioned"}
- ],
- "logs":{"exitcode":"404", "stdout":27, "stderror":501}
- });
- self.showBackgroundOperationsPopup();
+
+ //todo:call to server
+ App.router.get('backgroundOperationsController').showPopup();
this.hide();
},
onSecondary: function() {
@@ -230,53 +202,8 @@ App.MainHostDetailsController = Em.Contr
onPrimary: function() {
var component = event.context;
component.set('decommissioned', false);
- var backgroundOperations = self.get('backgroundOperations');
- backgroundOperations.pushObject({
- "hostName": self.get('content.hostName'),
- "role":component.get('componentName'),
- "command": "RECOMMISSION",
- "time": new Date().getTime(),
- "details": [
- {"startTime":"4 min ago", "name":"Some intermediate operation"},
- {"startTime":"5 min ago", "name":"Component recommissioned"}
- ],
- "logs":{"exitcode":"404", "stdout":27, "stderror":501}
- });
- self.showBackgroundOperationsPopup();
- this.hide();
- },
- onSecondary: function() {
- this.hide();
- }
- });
- },
- startConfirmPopup: function (event) {
- var self = this;
- App.ModalPopup.show({
- header: Em.I18n.t('hosts.host.start.popup.header'),
- body: Em.I18n.t('hosts.host.start.popup.body'),
- primary: 'Yes',
- secondary: 'No',
- onPrimary: function() {
- self.get('content.components').setEach('workStatus', "STARTING");
- self.set('isStarting', !self.get('isStarting'));
- this.hide();
- },
- onSecondary: function() {
- this.hide();
- }
- });
- },
- stopConfirmPopup: function (event) {
- var self = this;
- App.ModalPopup.show({
- header: Em.I18n.t('hosts.host.stop.popup.header'),
- body: Em.I18n.t('hosts.host.stop.popup.body'),
- primary: 'Yes',
- secondary: 'No',
- onPrimary: function() {
- self.get('content.components').setEach('workStatus', "STOPPING");
- self.set('isStarting', !self.get('isStarting'));
+ //todo: call to server
+ App.router.get('backgroundOperationsController').showPopup();
this.hide();
},
onSecondary: function() {
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/item.js Sun Dec 9 12:21:22 2012
@@ -31,7 +31,7 @@ App.MainServiceItemController = Em.Contr
'/data/wizard/deploy/poll_1.json' : //content is the same as ours
'/api/clusters/' + App.router.getClusterName() + url; //'/services/' + this.get('content.serviceName').toUpperCase();
- var method = App.testMode ? 'GET' : 'PUT';
+ var method = App.testMode ? 'GET' : (postData ? 'PUT' : 'POST');
$.ajax({
type: method,
@@ -159,6 +159,11 @@ App.MainServiceItemController = Em.Contr
secondary: 'No',
onPrimary: function() {
self.content.set('runSmokeTest', true);
+
+ var serviceName = self.get('content.serviceName').toUpperCase();
+ var smokeName = serviceName + "_SERVICE_CHECK";
+ self.sendCommandToServer('/services/' + serviceName + '/actions/' + smokeName);
+
App.router.get('backgroundOperationsController').showPopup();
this.hide();
},
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js Sun Dec 9 12:21:22 2012
@@ -34,6 +34,9 @@ require('router');
require('mappers/server_data_mapper');
require('mappers/services_mapper');
require('mappers/hosts_mapper');
+require('mappers/cluster_mapper');
+require('mappers/jobs_mapper');
+require('mappers/runs_mapper');
require('utils/http_client');
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js?rev=1418909&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js Sun Dec 9 12:21:22 2012
@@ -0,0 +1,40 @@
+/**
+ * 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.
+ */
+
+
+App.clusterMapper = App.QuickDataMapper.create({
+ model : App.Cluster,
+ map:function(json){
+ if(!this.get('model')) {return;}
+ if(json){
+ var result = json;
+ result = this.parseIt(result, this.config);
+ App.store.load(this.get('model'), result);
+ }
+ },
+ config : {
+ id:'Clusters.cluster_id',
+ cluster_name: 'Clusters.cluster_name',
+ stackName: 'Clusters.stack_name',
+ version: 'Clusters.version',
+ $hosts: "",
+ $racks: [1,2,3,4],
+ maxHostsPerRack: 'Clusters.max_hosts_per_rack'
+ }
+
+});
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js Sun Dec 9 12:21:22 2012
@@ -16,7 +16,28 @@
* limitations under the License.
*/
-//todo: refactor it
-App.hostsMapper = App.ServerDataMapper.create({
- config: {}
+
+App.hostsMapper = App.QuickDataMapper.create({
+ model : App.Host,
+ config : {
+ id : 'Hosts.host_name',
+ host_name : 'Hosts.host_name',
+ cluster_id: 'Hosts.cluster_name',//1
+ $components: [1,2,3],
+ cpu : 'Hosts.cpu_count',
+ memory : 'Hosts.total_mem',
+ disk_info: 'Hosts.disk_info',
+ $disk_usage: '40',
+ $health_status: 'LIVE',
+ $load_avg: '0.2, 1.2, 2.4',
+ $cpu_usage: 33,
+ $memory_usage: 26,
+ $network_usage: 36,
+ $io_usage: 39,
+ last_heart_beat_time : "Hosts.last_heartbeat_time",
+ os : 'Hosts.os_arch',
+ os_type : 'Hosts.os_type',
+ ip : 'Hosts.ip'
+ }
+
});
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js?rev=1418909&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/jobs_mapper.js Sun Dec 9 12:21:22 2012
@@ -0,0 +1,63 @@
+/**
+ * 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.jobsMapper = App.QuickDataMapper.create({
+ model : App.Job,
+ map : function(json) {
+ if(!this.get('model')) {
+ return;
+ }
+ if(json.jobs) {
+ var result = [];
+ json.jobs.forEach(function(item) {
+ result.push(this.parseIt(item, this.config));
+ }, this);
+ App.store.loadMany(this.get('model'), result);
+ }
+ },
+ config : {
+ job_id : 'jobId',
+ $workflow : 1,
+ job_name : 'jobName',
+ workflow_entity_name : 'workflowEntityName',
+ user_name : 'userName',
+ $queue : 'default',
+ $acls : null,
+ conf_path : 'confPath',
+ submit_time : 'submitTime',
+ //"launch_time":1348174627650,
+ //"finish_time":1348174669539,
+ maps : 'maps',
+ reduces : 'reduces',
+ status : 'status',
+ $priority : null,
+ //"finished_maps":12,
+ //"finished_reduces":5,
+ $failed_maps : null,
+ $failed_reduces : null,
+ //"maps_runtime":22299,
+ //"reduces_runtime":11470,
+ $map_counters : null,
+ $reduce_counters : null,
+ $job_counters : null,
+ input : 'inputBytes',
+ output : 'outputBytes'
+ }
+});
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/runs_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/runs_mapper.js?rev=1418909&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/runs_mapper.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/runs_mapper.js Sun Dec 9 12:21:22 2012
@@ -0,0 +1,47 @@
+/**
+ * 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.runsMapper = App.QuickDataMapper.create({
+ model : App.Run,
+ map : function(json) {
+ console.log('json', json.workflows);
+ if(!this.get('model')) {
+ return;
+ }
+ if(json.workflows) {
+ var result = [];
+ json.workflows.forEach(function(item) {
+ result.push(this.parseIt(item, this.config));
+ }, this);
+ console.log('result', result);
+ App.store.loadMany(this.get('model'), result);
+ }
+ },
+ config : {
+ run_id: 'workflowName',
+ $parent_run_id: null,
+ //workflow_context:'{dag: {"1":["2","3"],"2":["3","4"],"4":["2","5"]}}',
+ user_name:'userName',
+ start_time: 'startTime',
+ //last_update_time:'1347639541501',
+ app_id: 'workflowId'
+ //jobs:[1, 2, 3, 4, 5]
+ }
+});
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/server_data_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/server_data_mapper.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/server_data_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/server_data_mapper.js Sun Dec 9 12:21:22 2012
@@ -39,27 +39,34 @@ App.ServerDataMapper = Em.Object.extend(
App.QuickDataMapper = App.ServerDataMapper.extend({
config : {},
+ model : null,
map:function(json){
+ if(!this.get('model')) {return;}
if(json.items){
var result = [];
json.items.forEach(function(item){
result.push(this.parseIt(item, this.config));
- }, this)
- App.store.loadMany(App.Service1, result);
+ }, this)
+ App.store.loadMany(this.get('model'), result);
}
},
parseIt : function(data, config){
var result = {};
for(var i in config){
+ if(i.substr(0, 1) === '$'){
+ i = i.substr(1, i.length);
+ result[i] = config['$'+i];
+ } else {
if(i.substr(-4) !== '_key' && typeof config[i] == 'string'){
result[i] = this.getJsonProperty(data, config[i]);
} else if(typeof config[i] == 'object'){
- result[i] = [];
- var _data = data[config[i+'_key']];
- var l = _data.length;
- for(var index = 0; index<l; index++){
- result[i].push(this.parseIt(_data[index], config[i]));
- }
+ result[i] = [];
+ var _data = data[config[i+'_key']];
+ var l = _data.length;
+ for(var index = 0; index<l; index++){
+ result[i].push(this.parseIt(_data[index], config[i]));
+ }
+ }
}
}
return result;
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/services_mapper.js Sun Dec 9 12:21:22 2012
@@ -59,6 +59,7 @@ App.servicesMapper = App.ServerDataMappe
});
*/
App.servicesMapper = App.QuickDataMapper.create({
+ model : App.Service1,
config : {
id : 'ServiceInfo.service_name',
service_name : 'ServiceInfo.service_name',
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js Sun Dec 9 12:21:22 2012
@@ -118,7 +118,7 @@ Em.I18n.translations = {
'installer.step8.body': 'Please review the cluster configuration before installation',
'installer.step9.header': 'Install, Start and Test',
- 'installer.step9.body': 'Wait to complete the cluster installation. Installing, Starting and Testing selected services',
+ 'installer.step9.body': 'Please wait while the selected services are installed, started, and tested on your new cluster.',
'installer.step9.status.success': 'Successfully installed the cluster',
'installer.step9.status.failed': 'Failure in installation',
'installer.step9.host.status.success': 'Success',
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js Sun Dec 9 12:21:22 2012
@@ -19,46 +19,16 @@
var App = require('app');
-App.User = Em.Object.extend({
- username: DS.attr("string")
-});
-
-App.User.FIXTURES = [
- {},
- {}
-];
-
-App.ClusterModel = Em.Object.extend({
- clusterName: null,
- hosts: [],
- services: []
-
-});
-
-// uncomment if column names are camelized in JSON (or fixture), rather than _ separated
-/*
-DS.Model.reopen({
- namingConvention: {
- keyToJSONKey: function(key) {
- return key;
- },
-
- foreignKey: function(key) {
- return key;
- }
- }
-});
-*/
-
App.Cluster = DS.Model.extend({
clusterName: DS.attr('string'),
stackName: DS.attr('string'),
+ version: DS.attr('string'),
hosts: DS.hasMany('App.Host'),
racks: DS.hasMany('App.Rack'),
maxHostsPerRack: DS.attr('number')
});
-App.Cluster.FIXTURES = [
+App.Cluster.FIXTURES = [/*
{
id: 1,
cluster_name: 'cluster1',
@@ -66,11 +36,5 @@ App.Cluster.FIXTURES = [
hosts: [1, 2, 3, 4],
racks: [1, 2, 3, 4, 5, 6],
max_hosts_per_rack: 10
- },
- {
- id: 2,
- cluster_name: 'cluster2',
- stack_name: 'BigTop',
- hosts: [5, 6, 7]
- }
+ }*/
];
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js?rev=1418909&r1=1418908&r2=1418909&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js Sun Dec 9 12:21:22 2012
@@ -35,6 +35,8 @@ App.Host = DS.Model.extend({
networkUsage: DS.attr('number'),
ioUsage: DS.attr('number'),
lastHeartBeatTime: DS.attr('number'),
+ osType: DS.attr("string"),
+ diskInfo: DS.attr('string'),
/**
@@ -78,12 +80,12 @@ App.Host = DS.Model.extend({
}.property('healthStatus')
});
-App.Host.FIXTURES = [
+App.Host.FIXTURES = [/*
{
id: 1,
- host_name: 'z_host1',
+ host_name: 'dev.hortonworks.com',
cluster_id: 1,
- components:[1, 3],
+ components:[1, 2, 3, 4, 5],
cpu: '2x2.5GHz',
memory: '8GB',
disk_usage: '40',
@@ -95,140 +97,5 @@ App.Host.FIXTURES = [
network_usage: 36,
io_usage: 39,
last_heart_beat_time : 1351536732366
- },
- {
- id: 2,
- host_name: 'host2',
- cluster_id: 1,
- components:[4, 5, 8],
- cpu: '2x2.5GHz',
- memory: '8GB',
- disk_usage: '20',
- load_avg: '0.2, 1.2, 2.4',
- ip: '255.255.255.255',
- health_status: 'DEAD-ORANGE',
- cpu_usage: 36,
- memory_usage: 29,
- network_usage: 56,
- io_usage: 69,
- lastHeartBeatTime : 1351536732366
- },
- {
- id: 3,
- host_name: 'n_host3',
- cluster_id: 2,
- components:[7],
- health_status: 'DEAD-YELLOW',
- cpu_usage: 23,
- memory_usage: 16,
- network_usage: 16,
- io_usage: 49
- },
- {
- id: 4,
- host_name: 'b_host4',
- cluster_id: 2,
- components:[],
- health_status: 'DEAD',
- cpu_usage: 23,
- memory_usage: 36,
- network_usage: 46,
- io_usage: 39
- },
- {
- id: 5,
- host_name: 'host5',
- cluster_id: 1,
- components:[],
- cpu: '2x2.5GHz',
- memory: '8GB',
- disk_usage: '20',
- load_avg: '0.2, 1.2, 2.4',
- ip: '255.255.255.255',
- health_status: 'DEAD',
- cpu_usage: 53,
- memory_usage: 16,
- network_usage: 16,
- io_usage: 29
- },
- {
- id: 6,
- host_name: 'a_host6',
- cluster_id: 1,
- components:[],
- cpu: '2x2.5GHz',
- memory: '8GB',
- disk_usage: '20',
- load_avg: '0.2, 1.2, 2.4',
- ip: '255.255.255.255',
- health_status: 'LIVE',
- cpu_usage: 33,
- memory_usage: 26,
- network_usage: 36,
- io_usage: 39
- },
- {
- id: 7,
- host_name: 'host7',
- cluster_id: 1,
- components:[],
- cpu: '2x2.5GHz',
- memory: '8GB',
- disk_usage: '20',
- load_avg: '0.2, 1.2, 2.4',
- ip: '255.255.255.255',
- health_status: 'LIVE',
- cpu_usage: 53,
- memory_usage: 16,
- network_usage: 16,
- io_usage: 29
- },
- {
- id: 8,
- host_name: 'host8',
- cluster_id: 1,
- components:[],
- cpu: '2x2.5GHz',
- memory: '8GB',
- disk_usage: '20',
- load_avg: '0.2, 1.2, 2.4',
- ip: '255.255.255.255',
- health_status: 'LIVE',
- cpu_usage: 53,
- memory_usage: 11,
- network_usage: 14,
- io_usage: 27
- },
- {
- id: 9,
- host_name: 'host9',
- cluster_id: 1,
- components:[],
- cpu: '2x2.5GHz',
- memory: '8GB',
- disk_usage: '20',
- load_avg: '0.2, 1.2, 2.4',
- ip: '255.255.255.255',
- health_status: 'LIVE',
- cpu_usage: 53,
- memory_usage: 26,
- network_usage: 56,
- io_usage: 19
- },
- {
- id: 10,
- host_name: 'host10',
- cluster_id: 1,
- components:[],
- cpu: '2x2.5GHz',
- memory: '8GB',
- disk_usage: '20',
- load_avg: '0.2, 1.2, 2.4',
- ip: '255.255.255.255',
- health_status: 'LIVE',
- cpu_usage: 53,
- memory_usage: 16,
- network_usage: 16,
- io_usage: 29
- }
+ }*/
];
\ No newline at end of file