summaryrefslogtreecommitdiff
path: root/ambari-web
diff options
context:
space:
mode:
authorYusaku Sako <yusaku@apache.org>2012-12-09 14:56:58 +0000
committerYusaku Sako <yusaku@apache.org>2012-12-09 14:56:58 +0000
commit26429c08a436ed8561e0e770bd9109352dcfbc29 (patch)
treeb9668a035d37b557291d1a3787417bdda599c798 /ambari-web
parent67cc2e29819521cedc833e169359e39dc42b8637 (diff)
AMBARI-1059. Refactor cluster management. (yusaku)
git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1418993 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'ambari-web')
-rw-r--r--ambari-web/app/assets/data/hosts/hosts.json95
-rw-r--r--ambari-web/app/controllers/application.js16
-rw-r--r--ambari-web/app/controllers/installer.js10
-rw-r--r--ambari-web/app/controllers/main.js3
-rw-r--r--ambari-web/app/controllers/wizard/step3_controller.js12
-rw-r--r--ambari-web/app/controllers/wizard/step9_controller.js2
-rw-r--r--ambari-web/app/data/config_properties.js28
-rw-r--r--ambari-web/app/data/service_configs.js4
-rw-r--r--ambari-web/app/messages.js3
-rw-r--r--ambari-web/app/models/host.js6
-rw-r--r--ambari-web/app/routes/add_host_routes.js25
-rw-r--r--ambari-web/app/routes/add_service_routes.js24
-rw-r--r--ambari-web/app/styles/application.less35
-rw-r--r--ambari-web/app/styles/apps.less31
-rw-r--r--ambari-web/app/templates/application.hbs13
-rw-r--r--ambari-web/app/templates/main/background_operations_popup.hbs2
-rw-r--r--ambari-web/app/templates/main/host/add.hbs2
-rw-r--r--ambari-web/app/templates/main/host/details.hbs4
-rw-r--r--ambari-web/app/templates/main/service/add.hbs2
-rw-r--r--ambari-web/app/templates/main/service/info/configs.hbs7
-rw-r--r--ambari-web/app/templates/wizard/step3_host_log_popup.hbs2
-rw-r--r--ambari-web/app/templates/wizard/step7.hbs7
-rw-r--r--ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs20
-rw-r--r--ambari-web/app/utils/misc.js4
-rw-r--r--ambari-web/app/views/common/chart/linear_time.js9
-rw-r--r--ambari-web/app/views/main.js6
-rw-r--r--ambari-web/app/views/main/service/info/configs.js12
-rw-r--r--ambari-web/app/views/wizard/step7_view.js12
-rw-r--r--ambari-web/app/views/wizard/step9_view.js57
29 files changed, 338 insertions, 115 deletions
diff --git a/ambari-web/app/assets/data/hosts/hosts.json b/ambari-web/app/assets/data/hosts/hosts.json
index 5e6ef20c35..95ac9ac956 100644
--- a/ambari-web/app/assets/data/hosts/hosts.json
+++ b/ambari-web/app/assets/data/hosts/hosts.json
@@ -11,15 +11,18 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev1.hortonworks.com",
+ "public_host_name" : "dev1.hortonworks.com",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_one" : 8.24583333333,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -91,14 +94,17 @@
"total_mem" : 3086813,
"os_arch" : "x86_64",
"host_name" : "dev2.hortonworks.com",
+ "public_host_name" : "dev2.hortonworks.com",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
- "os_type" : "centos6","load" : {
+ "os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
+ "load" : {
"load_fifteen" : 9.13213888889,
"load_five" : 8.68588888889
- },
-
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -170,14 +176,17 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev3.hortonworks.com",
+ "public_host_name" : "dev3.hortonworks.com",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_one" : 8.24583333333,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -248,14 +257,17 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com2",
+ "public_host_name" : "dev.hortonworks.com2",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_one" : 8.24583333333
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -318,13 +330,16 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com3",
+ "public_host_name" : "dev.hortonworks.com3",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -387,13 +402,16 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com4",
+ "public_host_name" : "dev.hortonworks.com4",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -456,15 +474,18 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com5",
+ "public_host_name" : "dev.hortonworks.com5",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_one" : 8.24583333333,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -527,15 +548,18 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com6",
+ "public_host_name" : "dev.hortonworks.com6",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_one" : 8.24583333333,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -598,15 +622,18 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com7",
+ "public_host_name" : "dev.hortonworks.com7",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_one" : 8.24583333333,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -669,14 +696,17 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com8",
+ "public_host_name" : "dev.hortonworks.com8",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -739,15 +769,18 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com9",
+ "public_host_name" : "dev.hortonworks.com9",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_one" : 8.24583333333,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -810,15 +843,18 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com10",
+ "public_host_name" : "dev.hortonworks.com10",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_one" : 8.24583333333,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
@@ -881,15 +917,18 @@
"total_mem" : 3082813,
"os_arch" : "x86_64",
"host_name" : "dev.hortonworks.com11",
+ "public_host_name" : "dev.hortonworks.com11",
"disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
"last_heartbeat_time" : 1352461939047,
"os_type" : "centos6",
+ "ip" : "10.0.2.15"
+ },
+ "metrics" : {
"load" : {
"load_fifteen" : 9.13213888889,
"load_one" : 8.24583333333,
"load_five" : 8.68588888889
- },
- "ip" : "10.0.2.15"
+ }
},
"host_components" : [
{
diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js
index edd00594fd..7d370c3e95 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -21,6 +21,20 @@ var App = require('app');
App.ApplicationController = Em.Controller.extend({
- name: 'applicationController'
+ name: 'applicationController',
+ clusterName: function () {
+ var name = App.db.getClusterName();
+ if (name) {
+ return name.capitalize();
+ }
+ return 'My Cluster';
+ }.property(),
+ isClusterDataLoaded: function() {
+ return App.router.get('clusterController.isLoaded');
+ }.property('App.router.clusterController.isLoaded'),
+ init: function(){
+ this._super();
+ $('title').text('Ambari - ' + this.get('clusterName'));
+ }
}); \ No newline at end of file
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index 4b010b9ba3..29d1aeb7d8 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -527,19 +527,15 @@ App.InstallerController = App.WizardController.extend({
var data = [];
// loop through all the service components
- for (var i = 0 ; i < displayOrderConfig.length ; i++) {
- var entry = jsonData.services.filterProperty("name",displayOrderConfig[i].serviceName)[0];
-
- // dont show the service whose isHidden is true
- if ( displayOrderConfig[i].isHidden ) {
- continue;
- }
+ for (var i = 0; i < displayOrderConfig.length; i++) {
+ var entry = jsonData.services.findProperty("name", displayOrderConfig[i].serviceName);
var myService = Service.create({
serviceName: entry.name,
displayName: displayOrderConfig[i].displayName,
isDisabled: i === 0 ,
isSelected: true,
+ isHidden: displayOrderConfig[i].isHidden,
description: entry.comment,
version: entry.version
});
diff --git a/ambari-web/app/controllers/main.js b/ambari-web/app/controllers/main.js
index 597cab2026..efd588eb9d 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -24,7 +24,8 @@ App.MainController = Em.Controller.extend({
clusterName: function () {
var name = App.db.getClusterName();
if (name) {
- return name.capitalize();
+ var displayName = name.length > 13 ? name.substr(0, 10) + "..." : name;
+ return displayName.capitalize();
}
return 'My Cluster';
}.property(),
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index b1b95d307a..5dc12a0e34 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -271,7 +271,13 @@ App.WizardStep3Controller = Em.Controller.extend({
// keep polling until all hosts are registered
var allRegistered = true;
- hosts.forEach(function (_host) {
+ hosts.forEach(function (_host, index) {
+ // Change name of first host for test mode.
+ if (App.testMode === true) {
+ if (index == 0) {
+ _host.set('name', 'localhost.localdomain');
+ }
+ }
if (jsonData.items.someProperty('Hosts.host_name', _host.name)) {
if (_host.get('bootStatus') != 'REGISTERED') {
_host.set('bootStatus', 'REGISTERED');
@@ -398,7 +404,7 @@ App.WizardStep3Controller = Em.Controller.extend({
host: host,
didInsertElement: function () {
var self = this;
- var button = $(this.get('element')).find('#textTrigger');
+ var button = $(this.get('element')).find('.textTrigger');
button.click(function () {
if(self.get('isTextArea')){
$(this).text('click to highlight');
@@ -428,7 +434,7 @@ App.WizardStep3Controller = Em.Controller.extend({
element.select();
element.css('resize', 'none');
},
- disabled: true,
+ readOnly: true,
value: function(){
return this.get('content');
}.property('content')
diff --git a/ambari-web/app/controllers/wizard/step9_controller.js b/ambari-web/app/controllers/wizard/step9_controller.js
index 88b05916db..7e3161b735 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -211,7 +211,7 @@ App.WizardStep9Controller = Em.Controller.extend({
var method = 'PUT';
if (App.testMode) {
- debugger;
+ //debugger;
url = '/data/wizard/deploy/poll_6.json';
method = 'GET';
this.numPolls = 6;
diff --git a/ambari-web/app/data/config_properties.js b/ambari-web/app/data/config_properties.js
index 4ec39a54d2..a6d506c7f5 100644
--- a/ambari-web/app/data/config_properties.js
+++ b/ambari-web/app/data/config_properties.js
@@ -617,7 +617,7 @@ module.exports =
"isVisible": true,
"filename": "core-site.xml",
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1057,7 +1057,7 @@ module.exports =
"displayType": "advanced",
"isVisible": false,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1069,7 +1069,7 @@ module.exports =
"displayType": "advanced",
"isVisible": false,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1638,7 +1638,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1650,7 +1650,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1662,7 +1662,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1674,7 +1674,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1686,7 +1686,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1698,7 +1698,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1710,7 +1710,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1746,7 +1746,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1782,7 +1782,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1794,7 +1794,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
@@ -1806,7 +1806,7 @@ module.exports =
"displayType": "user",
"isVisible": true,
"serviceName": "MISC",
- "category": "Users/Groups"
+ "category": "Users and Groups"
},
{
"id": "puppet var",
diff --git a/ambari-web/app/data/service_configs.js b/ambari-web/app/data/service_configs.js
index c7fd23ffcf..5f18c4cfc0 100644
--- a/ambari-web/app/data/service_configs.js
+++ b/ambari-web/app/data/service_configs.js
@@ -107,8 +107,8 @@ module.exports = [
serviceName: 'MISC',
displayName: 'Misc',
configCategories: [
- App.ServiceConfigCategory.create({ name: 'General'}),
- App.ServiceConfigCategory.create({ name: 'Users/Groups'})
+ // App.ServiceConfigCategory.create({ name: 'General'}),
+ App.ServiceConfigCategory.create({ name: 'Users and Groups'})
],
configs: configProperties.filterProperty('serviceName', 'MISC')
}
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 2253b58453..dbd61c5a34 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -37,7 +37,8 @@ Em.I18n.translations = {
'services.zookeeper.description':'ZooKeeper desc',
'services.hbase.description':'Non-relational distributed database and centralized service for configuration management & synchronization',
- 'topnav.help.href':'http://incubator.apache.org/ambari/install.html',
+ 'topnav.logo.href':'http://incubator.apache.org/ambari/',
+ 'topnav.help.href':'https://cwiki.apache.org/confluence/display/AMBARI/Ambari',
'installer.header':'Cluster Install Wizard',
'installer.navigation.warning.header':'Navigation Warning',
diff --git a/ambari-web/app/models/host.js b/ambari-web/app/models/host.js
index c5c6e92bd5..bdbec4a69f 100644
--- a/ambari-web/app/models/host.js
+++ b/ambari-web/app/models/host.js
@@ -59,9 +59,9 @@ App.Host = DS.Model.extend({
}.property('lastHeartBeatTime'),
loadAvg: function() {
- if (this.get('loadOne') != null) return this.get('loadOne');
- if (this.get('loadFive') != null) return this.get('loadFive');
- if (this.get('loadFifteen') != null) return this.get('loadFifteen');
+ if (this.get('loadOne') != null) return this.get('loadOne').toFixed(2);
+ if (this.get('loadFive') != null) return this.get('loadFive').toFixed(2);
+ if (this.get('loadFifteen') != null) return this.get('loadFifteen').toFixed(2);
}.property('loadOne', 'loadFive', 'loadFifteen'),
updateHostStatus: function(){
diff --git a/ambari-web/app/routes/add_host_routes.js b/ambari-web/app/routes/add_host_routes.js
index 7c49a8e354..bdfceef4a5 100644
--- a/ambari-web/app/routes/add_host_routes.js
+++ b/ambari-web/app/routes/add_host_routes.js
@@ -24,15 +24,33 @@ module.exports = Em.Route.extend({
Ember.run.next(function () {
var addHostController = router.get('addHostController');
+ App.ModalPopup.show({
+ classNames: ['full-width-modal'],
+ header:Em.I18n.t('hosts.add.header'),
+ bodyClass: App.AddHostView.extend({
+ controllerBinding: 'App.router.addHostController'
+ }),
+ primary:Em.I18n.t('form.cancel'),
+ secondary: null,
+
+ onPrimary:function () {
+ this.hide();
+ router.transitionTo('hosts.index');
+ },
+ onClose: function() {
+ this.hide();
+ router.transitionTo('hosts.index');
+ }
+ });
router.transitionTo('step' + addHostController.get('currentStep'));
});
},
- connectOutlets: function (router, context) {
+ /*connectOutlets: function (router, context) {
console.log('in /hosts/add:connectOutlets');
router.get('mainController').connectOutlet('addHost');
- },
+ },*/
step1: Em.Route.extend({
route: '/step1',
@@ -221,9 +239,10 @@ module.exports = Em.Route.extend({
if (true) { // this function will be moved to installerController where it will validate
var addHostController = router.get('addHostController');
addHostController.finish();
- router.transitionTo('hosts');
+ $(context.currentTarget).parents("#modal").find(".close").trigger('click');
} else {
console.log('cluster installation failure');
+ //$(context.currentTarget).parents("#modal").find(".close").trigger('click');
}
}
}),
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index bec1cdc81a..9eb1a2aff2 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -24,6 +24,24 @@ module.exports = Em.Route.extend({
if (App.db.getUser().admin) {
Em.run.next(function () {
var addServiceController = router.get('addServiceController');
+ App.ModalPopup.show({
+ classNames: ['full-width-modal'],
+ header:Em.I18n.t('services.add.header'),
+ bodyClass: App.AddServiceView.extend({
+ controllerBinding: 'App.router.addServiceController'
+ }),
+ primary:Em.I18n.t('form.cancel'),
+ secondary: null,
+
+ onPrimary:function () {
+ this.hide();
+ App.router.transitionTo('main.services');
+ },
+ onClose: function() {
+ this.hide();
+ App.router.transitionTo('main.services')
+ }
+ });
router.transitionTo('step' + addServiceController.get('currentStep'));
});
} else {
@@ -34,10 +52,10 @@ module.exports = Em.Route.extend({
},
- connectOutlets: function (router) {
+ /*connectOutlets: function (router) {
console.log('in /service/add:connectOutlets');
router.get('mainController').connectOutlet('addService');
- },
+ },*/
step1: Em.Route.extend({
route: '/step1',
@@ -221,7 +239,7 @@ module.exports = Em.Route.extend({
complete: function (router, context) {
if (true) { // this function will be moved to installerController where it will validate
router.get('addServiceController').finish();
- router.transitionTo('services');
+ $(context.currentTarget).parents("#modal").find(".close").trigger('click');
}
}
}),
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index f1114c3aca..3a5d26a722 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -61,16 +61,21 @@ footer {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
- .navbar .brand {
- color: #666666;
- display: block;
- font-size: 16px;
- font-weight: normal;
- line-height: 1;
- margin-left: 0;
- margin-right: 40px;
- margin-top: 3px;
- padding: 14px 10px;
+ .navbar {
+ .brand {
+ color: #666666;
+ display: block;
+ font-size: 16px;
+ font-weight: normal;
+ line-height: 1;
+ margin-left: 0;
+ margin-top: 3px;
+ padding: 14px 5px 14px 10px;
+ }
+
+ .brand.cluster-name {
+ padding-left: 0px;
+ }
}
/*
.navbar-inner {
@@ -112,10 +117,6 @@ footer {
text-decoration: none;
}
- .navbar .brand {
- margin-right: 40px;
- }
-
.navbar #logo {
float: left;
padding-top: 7px;
@@ -1884,7 +1885,7 @@ ul.inline li {
}
.content-area {
position: relative;
- #textTrigger {
+ .textTrigger {
cursor: pointer;
position: absolute;
right: 0;
@@ -1907,10 +1908,10 @@ ul.inline li {
background-position: 0;
}
// COMBOBOX FIXES END
-@media all and (max-width: 1024px) {
+@media all and (max-width: 1152px) {
#main-nav {
li.span2 {
- width: 125px;
+ width: 120px;
}
}
}
diff --git a/ambari-web/app/styles/apps.less b/ambari-web/app/styles/apps.less
index 4f0212301b..30c6ee5642 100644
--- a/ambari-web/app/styles/apps.less
+++ b/ambari-web/app/styles/apps.less
@@ -359,6 +359,37 @@
}
}
+/*90% width modal window*/
+.full-width-modal {
+ .modal {
+ width: 90%;
+ margin: -350px 0 0 -45%;
+ }
+
+ .clear {
+ clear:both;
+ }
+ > div > .dataTable {
+ border: 1px solid silver;
+ th {
+ border-top:none;
+ }
+ }
+ .content {
+ padding: 0;
+ }
+
+
+//fix stripped in inner table
+ .table-striped tbody tr:nth-child(odd)
+ td .table-striped tbody
+ tr:nth-child(odd) td,
+ tr:nth-child(even) th{
+ background-color: none;
+ }
+
+}
+
@media all and (max-width: 1024px) {
.big-modal {
.modal {
diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs
index 7d25fee267..6545c8070d 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -21,8 +21,17 @@
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container">
- <a {{action gotoStep1}}><img id="logo" src="/img/logo-small.gif"></a>
- <a class="brand" href="#">{{t app.name}}</a>
+ <a {{translateAttr href="topnav.logo.href"}} target="_blank"><img id="logo" src="/img/logo-small.gif"></a>
+ <a class="brand" {{translateAttr href="topnav.logo.href"}} target="_blank">{{t app.name}}</a>
+ {{#if isClusterDataLoaded}}
+ <a class="brand cluster-name" href="#">
+ - {{clusterName}}
+ </a>
+ {{else}}
+ <a class="brand cluster-name" href="#">
+ loading...
+ </a>
+ {{/if}}
<ul class="nav">
<li class="right"><a class="help" {{translateAttr href="topnav.help.href"}} target="_blank">Help</a></li>
{{#if App.router.loggedIn}}
diff --git a/ambari-web/app/templates/main/background_operations_popup.hbs b/ambari-web/app/templates/main/background_operations_popup.hbs
index 6fc753c3df..75f61869c1 100644
--- a/ambari-web/app/templates/main/background_operations_popup.hbs
+++ b/ambari-web/app/templates/main/background_operations_popup.hbs
@@ -24,7 +24,7 @@
{{#if view.isOpen}}Hide{{else}}Show{{/if}} info about {{operation.command}} {{operation.role}} on {{operation.host_name}}
</a>
<div class="content-area">
- <div id="textTrigger">click to highlight</div>
+ <div class="textTrigger">click to highlight</div>
{{#if view.isOpen}}
{{#if view.isTextArea}}
<div>
diff --git a/ambari-web/app/templates/main/host/add.hbs b/ambari-web/app/templates/main/host/add.hbs
index 67eb5aa151..fa7e76c444 100644
--- a/ambari-web/app/templates/main/host/add.hbs
+++ b/ambari-web/app/templates/main/host/add.hbs
@@ -20,7 +20,7 @@
<div class="container">
<div class="container-fluid">
- <a class="btn back" {{action backToHostsList}}>← Back to Hosts</a>
+ <!--<a class="btn back" {{action backToHostsList}}>← Back to Hosts</a>-->
<div class="row-fluid">
<div class="span3">
diff --git a/ambari-web/app/templates/main/host/details.hbs b/ambari-web/app/templates/main/host/details.hbs
index 25850b92af..e345d6b320 100644
--- a/ambari-web/app/templates/main/host/details.hbs
+++ b/ambari-web/app/templates/main/host/details.hbs
@@ -17,8 +17,8 @@
}}
<div id="host-details">
- <a href='#' {{action "routeHome" target="controller"}}><i class="icon-home"></i></a> /
- <a href="javascript:void(null)" data-toggle="modal" {{action backToHostsList}}>Hosts</a> /
+ <a href="javascript:void(null)" data-toggle="modal" {{action backToHostsList}}><i class="icon-arrow-left"></i>&nbsp;Back to Hosts</a>
+ &nbsp;/&nbsp;
<span {{bindAttr class=":host-title view.content.healthClass"}}>{{unbound view.content.publicHostName}}</span>
{{#if controller.isAdmin}}
<div class="host-maintenance">
diff --git a/ambari-web/app/templates/main/service/add.hbs b/ambari-web/app/templates/main/service/add.hbs
index f88bebbd22..5726147ef4 100644
--- a/ambari-web/app/templates/main/service/add.hbs
+++ b/ambari-web/app/templates/main/service/add.hbs
@@ -20,7 +20,7 @@
<div class="container">
<div class="container-fluid">
- <a class="btn back" {{action backToServices}}>← Back to Services</a>
+ <!--<a class="btn back" {{action backToServices}}>← Back to Services</a>-->
<div class="row-fluid">
<div class="span3">
diff --git a/ambari-web/app/templates/main/service/info/configs.hbs b/ambari-web/app/templates/main/service/info/configs.hbs
index d1ee8e35a0..a4d13cbcc0 100644
--- a/ambari-web/app/templates/main/service/info/configs.hbs
+++ b/ambari-web/app/templates/main/service/info/configs.hbs
@@ -139,7 +139,12 @@
<div class="accordion-group">
<div class="accordion-heading">
- <a class="accordion-toggle" {{action "onToggleBlock" category.name target="view"}}>
+ {{#if category.isCollapsed}}
+ <i class='icon-caret-left pull-right accordion-toggle'></i>
+ {{else}}
+ <i class='icon-caret-down pull-right accordion-toggle'></i>
+ {{/if}}
+ <a class="accordion-toggle" {{action "onToggleBlock" category target="view"}}>
{{category.name}}
</a>
</div>
diff --git a/ambari-web/app/templates/wizard/step3_host_log_popup.hbs b/ambari-web/app/templates/wizard/step3_host_log_popup.hbs
index 6a61b590da..f91827a346 100644
--- a/ambari-web/app/templates/wizard/step3_host_log_popup.hbs
+++ b/ambari-web/app/templates/wizard/step3_host_log_popup.hbs
@@ -19,7 +19,7 @@
<div id="host-log">
<div class="content-area">
- <div id="textTrigger">click to highlight</div>
+ <div class="textTrigger">click to highlight</div>
{{#if view.isTextArea}}
<div>
{{view view.textArea contentBinding="view.host.bootLog"}}
diff --git a/ambari-web/app/templates/wizard/step7.hbs b/ambari-web/app/templates/wizard/step7.hbs
index d47d645251..b3c28f98f8 100644
--- a/ambari-web/app/templates/wizard/step7.hbs
+++ b/ambari-web/app/templates/wizard/step7.hbs
@@ -37,7 +37,12 @@
<div class="accordion">
{{#each category in selectedService.configCategories}}
<div class="accordion-group {{unbound category.name}}">
- <div class="accordion-heading" {{action "onToggleBlock" category.name target="view"}}>
+ <div class="accordion-heading" {{action "onToggleBlock" category target="view"}}>
+ {{#if category.isCollapsed}}
+ <i class='icon-caret-left pull-right accordion-toggle'></i>
+ {{else}}
+ <i class='icon-caret-down pull-right accordion-toggle'></i>
+ {{/if}}
<a class="accordion-toggle">
{{category.name}}
</a>
diff --git a/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs b/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
index 42ea55e68f..bdfb18395e 100644
--- a/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
+++ b/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
@@ -19,17 +19,27 @@
<p>Click on the task to see the log:</p>
<div id="host-log">
{{#each role in view.roles}}
- {{#each taskInfo in role.taskInfos}}
- <div>
- <a href="#" {{action toggleTaskLog taskInfo}}>{{#if taskInfo.isLogHidden}}Show{{else}}Hide{{/if}} {{role.roleName}} {{taskInfo.command}} log ({{taskInfo.status}})</a>
- <div {{bindAttr class="taskInfo.isLogHidden:hidden"}}>
+ {{#each taskInfo in role.taskInfos}}
+ <div>
+ <a href="#" {{action toggleTaskLog taskInfo}}>{{#if taskInfo.isLogHidden}}Show{{else}}Hide{{/if}} {{role.roleName}}
+ {{taskInfo.command}} log ({{taskInfo.status}})</a>
+ <div class="content-area" {{bindAttr class="taskInfo.isLogHidden:hidden"}}>
+ <div class="textTrigger" {{action "textTrigger" taskInfo target="view"}}>{{taskInfo.buttonLabel}}</div>
+ {{#if taskInfo.isTextArea}}
+ <div>
+ {{view view.textArea contentBinding="taskInfo" roleBinding="role"}}
+ </div>
+ {{else}}
+ <div>
<h5>stderr:</h5>
<pre class="stderr">{{taskInfo.stderr}}</pre>
<h5>stdout:</h5>
<pre class="stdout">{{taskInfo.stdout}}</pre>
</div>
+ {{/if}}
</div>
- {{/each}}
+ </div>
+ {{/each}}
{{/each}}
</div>
diff --git a/ambari-web/app/utils/misc.js b/ambari-web/app/utils/misc.js
index 76d7782488..f57bf5af57 100644
--- a/ambari-web/app/utils/misc.js
+++ b/ambari-web/app/utils/misc.js
@@ -25,9 +25,9 @@ module.exports = {
value = '<1KB';
} else {
if (value < 1048576) {
- value = Math.round(value / 102.4) / 10 + 'KB';
+ value = (Math.round(value / 102.4) / 10).toFixed(1) + 'KB';
} else {
- value = Math.round(value / 104857.6) / 10 + 'MB';
+ value = (Math.round(value / 104857.6) / 10).toFixed(1) + 'MB';
}
}
}
diff --git a/ambari-web/app/views/common/chart/linear_time.js b/ambari-web/app/views/common/chart/linear_time.js
index 1e1c183ebd..9191a7bee6 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -317,6 +317,7 @@ App.ChartLinearTimeView = Ember.View.extend({
scheme: this._paletteScheme
});
var self = this;
+ var series_min_length = 100000000;
seriesData.forEach(function (series, index) {
series.color = /*this.colorForSeries(series) ||*/ palette.color();
series.stroke = 'rgba(0,0,0,0.3)';
@@ -338,7 +339,15 @@ App.ChartLinearTimeView = Ember.View.extend({
}
series.name = string_utils.pad(series.name, 30, '&nbsp;', 2) + string_utils.pad('min', 5, '&nbsp;', 3) + string_utils.pad(this.get('yAxisFormatter')(min), 12, '&nbsp;', 3) + string_utils.pad('avg', 5, '&nbsp;', 3) + string_utils.pad(this.get('yAxisFormatter')(avg/series.data.length), 12, '&nbsp;', 3) + string_utils.pad('max', 12, '&nbsp;', 3) + string_utils.pad(this.get('yAxisFormatter')(max), 5, '&nbsp;', 3);
}
+ if (series.data.length < series_min_length) {
+ series_min_length = series.data.length;
+ }
}.bind(this));
+ seriesData.forEach(function(series, index) {
+ if (series.data.length > series_min_length) {
+ series.data.length = series_min_length;
+ }
+ });
var chartId = "#" + this.id + "-chart" + p;
var chartOverlayId = "#" + this.id + "-container" + p;
var xaxisElementId = "#" + this.id + "-xaxis" + p;
diff --git a/ambari-web/app/views/main.js b/ambari-web/app/views/main.js
index fa7fab8d83..ebd648204e 100644
--- a/ambari-web/app/views/main.js
+++ b/ambari-web/app/views/main.js
@@ -36,7 +36,7 @@ App.MainBackgroundOperation = Em.View.extend({
this.set('isTextArea', false);
},
buttonLabel:function(){
- var button = $(this.get('element')).find('#textTrigger');
+ var button = $(this.get('element')).find('.textTrigger');
if(this.get('isTextArea')){
button.text('press CTRL+C');
} else {
@@ -45,7 +45,7 @@ App.MainBackgroundOperation = Em.View.extend({
}.observes('isTextArea'),
didInsertElement: function () {
var self = this;
- var button = $(this.get('element')).find('#textTrigger');
+ var button = $(this.get('element')).find('.textTrigger');
button.click(function () {
self.set('isTextArea', !self.get('isTextArea'));
});
@@ -70,7 +70,7 @@ App.MainBackgroundOperation = Em.View.extend({
element.select();
element.css('resize', 'none');
},
- disabled: true,
+ readOnly: true,
value: function(){
var operation = this.get('content');
var content = "";
diff --git a/ambari-web/app/views/main/service/info/configs.js b/ambari-web/app/views/main/service/info/configs.js
index f939e81c09..3367dc228d 100644
--- a/ambari-web/app/views/main/service/info/configs.js
+++ b/ambari-web/app/views/main/service/info/configs.js
@@ -25,7 +25,8 @@ App.MainServiceInfoConfigsView = Em.View.extend({
controller.loadStep();
},
onToggleBlock: function(event){
- $("#" + event.context).toggle('blind', 500);
+ $(document.getElementById(event.context.name)).toggle('blind', 500);
+ event.context.set('isCollapsed', !event.context.get('isCollapsed'));
}
});
@@ -40,8 +41,13 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
categoryConfigs: function () {
return this.get('serviceConfigs').filterProperty('category', this.get('category.name'))
}.property('serviceConfigs.@each').cacheable(),
- didInsertElement: function(){
- $("#Advanced").hide();
+ didInsertElement: function () {
+ if (this.get('category.name') == 'Advanced') {
+ this.set('category.isCollapsed', true);
+ $("#Advanced").hide();
+ } else {
+ this.set('category.isCollapsed', false);
+ }
},
layout: Ember.Handlebars.compile('<div {{bindAttr id="view.category.name"}} class="accordion-body collapse in"><div class="accordion-inner">{{yield}}</div></div>')
}); \ No newline at end of file
diff --git a/ambari-web/app/views/wizard/step7_view.js b/ambari-web/app/views/wizard/step7_view.js
index e02b3ade44..0f41fe7e91 100644
--- a/ambari-web/app/views/wizard/step7_view.js
+++ b/ambari-web/app/views/wizard/step7_view.js
@@ -28,7 +28,8 @@ App.WizardStep7View = Em.View.extend({
controller.loadStep();
},
onToggleBlock: function(event){
- $("#" + event.context).toggle('blind', 500);
+ $(document.getElementById(event.context.name)).toggle('blind', 500);
+ event.context.set('isCollapsed', !event.context.get('isCollapsed'));
}
});
@@ -49,8 +50,13 @@ App.WizardStep7.ServiceConfigsByCategoryView = Ember.View.extend({
categoryConfigs: function () {
return this.get('serviceConfigs').filterProperty('category', this.get('category.name'))
}.property('serviceConfigs.@each').cacheable(),
- didInsertElement: function(){
- $("#Advanced").hide();
+ didInsertElement: function () {
+ if (this.get('category.name') == 'Advanced') {
+ this.set('category.isCollapsed', true);
+ $("#Advanced").hide();
+ } else {
+ this.set('category.isCollapsed', false);
+ }
},
layout: Ember.Handlebars.compile('<div {{bindAttr id="view.category.name"}} class="accordion-body collapse in"><div class="accordion-inner">{{yield}}</div></div>')
});
diff --git a/ambari-web/app/views/wizard/step9_view.js b/ambari-web/app/views/wizard/step9_view.js
index cea9bba71d..e0d0bbf657 100644
--- a/ambari-web/app/views/wizard/step9_view.js
+++ b/ambari-web/app/views/wizard/step9_view.js
@@ -140,7 +140,7 @@ App.HostStatusView = Em.View.extend({
roles: function () {
var roleArr = [];
- var tasks = this.get('startedTasks');
+ var tasks = this.getStartedTasks(host);
if (tasks.length) {
var _roles = tasks.mapProperty('Tasks.role').uniq();
_roles.forEach(function (_role) {
@@ -148,11 +148,16 @@ App.HostStatusView = Em.View.extend({
var roleObj = {};
roleObj.roleName = App.format.role(_role);
tasks.filterProperty('Tasks.role', _role).forEach(function (_task) {
- var taskInfo = Ember.Object.create();
+ var taskInfo = Ember.Object.create({
+ isTextArea: false,
+ buttonLabel: function(){
+ return (this.get('isTextArea')) ? 'Press CTRL+C': 'Click to highlight';
+ }.property('isTextArea')
+ });
taskInfo.set('command', _task.Tasks.command.toLowerCase());
taskInfo.set('status', App.format.taskStatus(_task.Tasks.status));
taskInfo.set('url', _task.href);
- taskInfo.set('isLogHidden', true);
+ taskInfo.set('isLogHidden', false);
taskInfos.pushObject(taskInfo);
}, this);
roleObj.taskInfos = taskInfos;
@@ -164,7 +169,26 @@ App.HostStatusView = Em.View.extend({
didInsertElement: function () {
console.log('The value of event context is: ' + host.name);
- this.set('startedTasks', this.getStartedTasks(host));
+ this.get('roles').forEach(function(role){
+ role.taskInfos.forEach(function(task){
+ task.set('isLogHidden', true);
+ });
+ });
+ $(this.get('element')).find('.content-area').each(function(index, value){
+ var button = $(value).find('.textTrigger');
+ $(value).mouseenter(
+ function () {
+ var element = $(this);
+ element.css('border', '1px solid #dcdcdc');
+ button.css('visibility', 'visible');
+ }).mouseleave(
+ function () {
+ var element = $(this);
+ element.css('border', 'none');
+ button.css('visibility', 'hidden');
+ })
+ });
+
},
getStartedTasks: function (host) {
@@ -187,6 +211,7 @@ App.HostStatusView = Em.View.extend({
taskInfo.set('stdout', task.Tasks.stdout);
taskInfo.set('stderr', task.Tasks.stderr);
taskInfo.set('isLogHidden', false);
+ taskInfo.set('isTextArea', false);
},
error: function () {
alert('Failed to retrieve task log');
@@ -195,7 +220,29 @@ App.HostStatusView = Em.View.extend({
} else {
taskInfo.set('isLogHidden', true);
}
- }
+ },
+ textTrigger: function(event){
+ var task = event.context;
+ task.set('isTextArea', !task.get('isTextArea'));
+ },
+ textArea: Em.TextArea.extend({
+ didInsertElement: function(){
+ var element = $(this.get('element'));
+ element.width($(this.get('parentView').get('element')).width() - 10);
+ element.height($(this.get('parentView').get('element')).height());
+ element.select();
+ element.css('resize', 'none');
+ },
+ readOnly: true,
+ value: function(){
+ var taskInfo = this.get('content');
+ var content = "";
+ content += this.get('role').role + " " + taskInfo.command + " log " + taskInfo.status + "\n";
+ content += "stderr: " + taskInfo.stderr + "\n";
+ content += "stdout: " + taskInfo.stdout + "\n";
+ return content;
+ }.property('content')
+ })
})
});
}