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/10/20 19:12:56 UTC
svn commit: r1400489 [1/3] - in /incubator/ambari/branches/AMBARI-666: ./
ambari-web/app/ ambari-web/app/controllers/installer/
ambari-web/app/controllers/main/ ambari-web/app/controllers/main/host/
ambari-web/app/controllers/wizard/ ambari-web/app/rou...
Author: yusaku
Date: Sat Oct 20 17:12:55 2012
New Revision: 1400489
URL: http://svn.apache.org/viewvc?rev=1400489&view=rev
Log:
AMBARI-891. Initial work to refactor Wizards in Ambari Web. (yusaku)
Added:
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts_popup.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step6.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/time_range.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step6_view.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/jquery-ui-timepicker-addon.js
Modified:
incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/dashboard.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step5.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/metric.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step7_view.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/horizon/chart.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hdfs.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/mapreduce.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step5_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=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sat Oct 20 17:12:55 2012
@@ -303,6 +303,8 @@ AMBARI-666 branch (unreleased changes)
IMPROVEMENTS
+ AMBARI-891. Initial work to refactor the Wizards in Ambari Web. (yusaku)
+
AMBARI-883. Improve user interactions on Confirm Hosts page of the
Installer. (yusaku)
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js Sat Oct 20 17:12:55 2012
@@ -59,4 +59,5 @@ require('controllers/main/rack');
require('controllers/wizard/step2_controller');
require('controllers/wizard/step3_controller');
require('controllers/wizard/step4_controller');
-require('controllers/wizard/step5_controller');
\ No newline at end of file
+require('controllers/wizard/step5_controller');
+require('controllers/wizard/step6_controller');
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js Sat Oct 20 17:12:55 2012
@@ -202,26 +202,56 @@ App.SlaveComponentGroupsController = Emb
}.property('App.router.installerStep7Controller.selectedService'),
selectedSlaveComponent: function () {
- var component = this.findProperty('componentName', this.get('selectedComponentName'));
- return component;
+ if (this.get('selectedComponentName') !== null && this.get('selectedComponentName') !== undefined) {
+ return this.findProperty('componentName', this.get('selectedComponentName'));
+ }
}.property('selectedComponentName'),
showAddSlaveComponentGroup: function (event) {
var componentName = event.context;
+ var component = this.get('selectedSlaveComponent');
App.ModalPopup.show({
header: componentName + ' Groups',
bodyClass: Ember.View.extend({
controllerBinding: 'App.router.slaveComponentGroupsController',
- templateName: require('templates/installer/slave_hosts_popup')
+ templateName: require('templates/installer/slave_component_hosts_popup')
}),
- onPrimary: function () {
+ onPrimary: function (event) {
+ if (component.tempSelectedGroups !== undefined && component.tempSelectedGroups.length){
+ component.tempSelectedGroups.forEach(function(item){
+ var changed = component.hosts.filterProperty('hostname', item.hostName);
+ changed.setEach('group', item.groupName);
+ })
+ }
+ delete component.tempSelectedGroups;
+ this.hide();
+ },
+ onSecondary: function (event) {
+ delete component.tempSelectedGroups;
+ this.hide();
+ },
+ onClose: function (event) {
+ delete component.tempSelectedGroups;
+ this.hide();
}
});
},
+ changeHostGroup: function(host, groupName){
+ var component = this.get('selectedSlaveComponent');
+ if (component.tempSelectedGroups === undefined){
+ component.tempSelectedGroups = [];
+ }
+ var values = component.tempSelectedGroups.filterProperty('hostName', host.hostname);
+ if (values.length === 0)
+ component.tempSelectedGroups.pushObject({hostName: host.hostname, groupName:groupName});
+ else
+ values.setEach('groupName', groupName);
+
+ },
+
addSlaveComponentGroup: function (event) {
- var componentName = event.context;
- var component = this.findProperty('componentName', componentName);
+ var component = this.get('selectedSlaveComponent');
var newGroupName;
component.groups.setEach('active', false);
var newGroups = component.groups.filterProperty('type', 'new');
@@ -234,6 +264,7 @@ App.SlaveComponentGroupsController = Emb
}
var newGroup = {name: newGroupName, index: component.newGroupIndex, type: 'new', active: true};
component.groups.pushObject(newGroup);
+ $('.remove-group-error').hide();
},
showEditSlaveComponentGroups: function (event) {
@@ -260,7 +291,7 @@ App.SlaveComponentGroupsController = Emb
componentGroups: function () {
if (this.get('selectedComponentName') !== null) {
- var component = this.findProperty('componentName', this.get('selectedComponentName'));
+ var component = this.get('selectedSlaveComponent');
if (component !== undefined && component !== null) {
if (component.groups === undefined){
component.groups = [];
@@ -272,20 +303,35 @@ App.SlaveComponentGroupsController = Emb
}
}.property('selectedComponentName'),
-// activeGroup: function(){
-// return this.get('componentGroups').findProperty('active', true);
-// }.property('selectedComponentName', 'componentGroups.@each'),
+ getHostsByGroup: function(group){
+ var component = this.get('selectedSlaveComponent');
+ return component.hosts.filterProperty('group', group.name);
+ },
+
+ getGroupsForDropDown: function(){
+ return this.get('componentGroups').getEach('name');
+ }.property('selectedComponentName', 'componentGroups.@each'),
+
+ activeGroup: function(){
+ var active = this.get('componentGroups').findProperty('active', true);
+ if (active !== undefined)
+ return active;
+ }.property('selectedComponentName', 'componentGroups.@each.active'),
showSlaveComponentGroup: function(event){
- var component = this.findProperty('componentName', this.get('selectedComponentName'));
+ var component = this.get('selectedSlaveComponent');
component.groups.setEach('active', false);
var group = component.groups.filterProperty('name', event.context.name);
group.setEach('active', true);
+ var assignedHosts = component.hosts.filterProperty('group', event.context.name);
+ if (assignedHosts.length === 0){
+ $('.remove-group-error').hide();
+ }
},
removeSlaveComponentGroup: function(event){
var group = event.context;
- var component = this.findProperty('componentName', this.get('selectedComponentName'));
+ var component = this.get('selectedSlaveComponent');
var assignedHosts = component.hosts.filterProperty('group', group.name);
if (assignedHosts.length !== 0){
$('.remove-group-error').show();
@@ -293,10 +339,13 @@ App.SlaveComponentGroupsController = Emb
$('.remove-group-error').hide();
var key = component.groups.indexOf(group);
component.groups.removeObject(component.groups[key]);
-// $('#slave-group'+ group.index).remove();
- if(group.type === 'new' && component.newGroupIndex === group.index){
- component.newGroupIndex--;
+ var newGroups = component.groups.filterProperty('type', 'new');
+ if (newGroups.length == 0)
+ component.newGroupIndex = 0;
+ else {
+ var lastNewGroup = newGroups[newGroups.length - 1];
+ component.newGroupIndex = lastNewGroup.index;
}
if (group.active){
var lastGroup;
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/dashboard.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/dashboard.js?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/dashboard.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/dashboard.js Sat Oct 20 17:12:55 2012
@@ -21,6 +21,70 @@ var App = require('app');
App.MainDashboardController = Em.Controller.extend({
name:'mainDashboardController',
alerts: App.Alert.find(),
+ data: {
+ hdfs:{
+ "namenode_addr":"namenode:50070",
+ "secondary_namenode_addr":"snamenode:50090",
+ "namenode_starttime":1348935028,
+ "total_nodes":"1",
+ "live_nodes":1,
+ "dead_nodes":0,
+ "decommissioning_nodes":0,
+ "dfs_blocks_underreplicated":145,
+ "safemode":false,
+ "pending_upgrades":false,
+ "dfs_configured_capacity":885570207744,
+ "dfs_percent_used":0.01,
+ "dfs_percent_remaining":95.09,
+ "dfs_total_bytes":885570207744,
+ "dfs_used_bytes":104898560,
+ "nondfs_used_bytes":43365113856,
+ "dfs_free_bytes":842100195328,
+ // additionals
+ "total_files_and_dirs": 1354,
+ "namenode_heap_used":63365113856,
+ "namenode_heap_total": 163365113856
+ },
+ mapreduce: {
+ "jobtracker_addr": "jobtracker:50030",
+ "jobtracker_starttime": 1348935243,
+ "running_jobs": 1,
+ "waiting_jobs": 0,
+ "trackers_total": "1",
+ "trackers_live": 1,
+ "trackers_graylisted": 0,
+ "trackers_blacklisted": 0,
+ "chart": [4,8,7,2,1,4,3,3,3],
+ // additionals
+ "map_slots_occuped": 4,
+ "map_slots_reserved": 8,
+ "map_slots_total": 12,
+
+ "reduce_slots_occuped": 3,
+ "reduce_slots_reserved": 7,
+ "reduce_slots_total": 11,
+
+ "completed_jobs": 3,
+ "failed_jobs": 2,
+
+ "trackers_heap_used": 1348935243,
+ "trackers_heap_total": 6648935243
+ },
+ hbase : {
+ "hbasemaster_addr": "hbasemaster:60010",
+ "total_regionservers": "1",
+ "hbasemaster_starttime": 1348935496,
+ "live_regionservers": 1,
+ "dead_regionservers": 0,
+ "regions_in_transition_count": 0,
+ "chart": [3,7,7,5,5,3,5,3,7],
+
+ "master_server_heap_used": 2348935243,
+ "master_server_heap_total": 5648935243,
+ "average_load": 1.4
+ }
+ },
+
services:function(){
return App.router.get('mainServiceController.content');
}.property('App.router.mainServiceController.content'),
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js Sat Oct 20 17:12:55 2012
@@ -178,7 +178,7 @@ App.AddHostController = Em.Controller.ex
* localRepoPath: ''
* }
*/
- loadHosts: function () {
+ loadInstallOptions: function () {
if (!this.content.hosts) {
this.content.hosts = Em.Object.create();
@@ -249,8 +249,7 @@ App.AddHostController = Em.Controller.ex
});
hosts.pushObject(hostInfo);
- }
- ;
+ };
console.log('TRACE: pushing ' + hosts);
return hosts;
@@ -281,6 +280,15 @@ App.AddHostController = Em.Controller.ex
});
console.log('addHostController:saveConfirmedHosts: save hosts ', hostInfo);
App.db.setHosts(hostInfo);
+ this.set('content.hostsInfo', hostInfo);
+ },
+
+ /**
+ * Load confirmed hosts.
+ * Will be used at <code>Assign Masters(step5)</code> step
+ */
+ loadConfirmedHosts : function(){
+ this.set('content.hostsInfo', App.db.getHosts());
},
/**
@@ -309,6 +317,7 @@ App.AddHostController = Em.Controller.ex
});
this.set('content.services', servicesInfo);
console.log('addHostController.loadServices: loaded data ', servicesInfo);
+ console.log('selected services ', servicesInfo.filterProperty('isSelected', true).mapProperty('serviceName'));
},
/**
@@ -317,6 +326,8 @@ App.AddHostController = Em.Controller.ex
*/
saveServices: function (stepController) {
var serviceNames = [];
+ // we can also do it without stepController since all data,
+ // changed at page, automatically changes in model(this.content.services)
App.db.setService(stepController.get('content'));
stepController.filterProperty('isSelected', true).forEach(function (item) {
serviceNames.push(item.serviceName);
@@ -326,30 +337,115 @@ App.AddHostController = Em.Controller.ex
},
/**
+ * Save Master Component Hosts data to Main Controller
+ * @param stepController App.WizardStep5Controller
+ */
+ saveMasterComponentHosts: function (stepController) {
+ var obj = stepController.get('selectedServicesMasters');
+ var masterComponentHosts = [];
+ obj.forEach(function (_component) {
+ masterComponentHosts.push({
+ component: _component.component_name,
+ hostName: _component.selectedHost
+ });
+ });
+
+ console.log("AddHostController.saveComponentHosts: saved hosts ", masterComponentHosts);
+ App.db.setMasterComponentHosts(masterComponentHosts);
+ this.set('content.masterComponentHosts', masterComponentHosts);
+ },
+
+ /**
+ * Load master component hosts data for using in required step controllers
+ */
+ loadMasterComponentHosts: function () {
+ var masterComponentHosts = App.db.getMasterComponentHosts();
+ this.set("content.masterComponentHosts", masterComponentHosts);
+ console.log("AddHostController.loadMasterComponentHosts: loaded hosts ", masterComponentHosts);
+ },
+
+ /**
+ * Save slaveHostComponents to main controller
+ * @param stepController
+ */
+ saveSlaveComponentHosts : function(stepController){
+
+ var hosts = stepController.get('hosts');
+ var isMrSelected = stepController.get('isMrSelected');
+ var isHbSelected = stepController.get('isHbSelected');
+
+ App.db.setHostSlaveComponents(hosts);
+ this.set('content.hostSlaveComponents', hosts);
+
+ var dataNodeHosts = [];
+ var taskTrackerHosts = [];
+ var regionServerHosts = [];
+
+ hosts.forEach(function (host) {
+ if (host.get('isDataNode')) {
+ dataNodeHosts.push({
+ hostname: host.hostname,
+ group: 'Default'
+ });
+ }
+ if (isMrSelected && host.get('isTaskTracker')) {
+ taskTrackerHosts.push({
+ hostname: host.hostname,
+ group: 'Default'
+ });
+ }
+ if (isHbSelected && host.get('isRegionServer')) {
+ regionServerHosts.push({
+ hostname: host.hostname,
+ group: 'Default'
+ });
+ }
+ }, this);
+
+ var slaveComponentHosts = [];
+ slaveComponentHosts.push({
+ componentName: 'DATANODE',
+ displayName: 'DataNode',
+ hosts: dataNodeHosts
+ });
+ if (isMrSelected) {
+ slaveComponentHosts.push({
+ componentName: 'TASKTRACKER',
+ displayName: 'TaskTracker',
+ hosts: taskTrackerHosts
+ });
+ }
+ if (isHbSelected) {
+ slaveComponentHosts.push({
+ componentName: 'HBASE_REGIONSERVER',
+ displayName: 'RegionServer',
+ hosts: regionServerHosts
+ });
+ }
+
+ App.db.setSlaveComponentHosts(slaveComponentHosts);
+ this.set('content.slaveComponentHosts', slaveComponentHosts);
+ },
+
+ /**
* Load data for all steps until <code>current step</code>
*/
loadAllPriorSteps: function () {
var step = this.get('currentStep');
switch (step) {
- /*case '10':
- this.get('installerStep9Controller').loadStep();
- case '9':
- this.get('installerStep8Controller').loadStep();
- case '8':
- this.get('installerStep7Controller').loadStep();
- case '7':
- this.get('installerStep6Controller').loadStep();
- case '6':
- this.get('installerStep5Controller').loadStep();
- case '5':
- this.get('installerStep4Controller').loadStep();*/
+ case '7':
+ //current
+ case '6':
+ //Sasha
+ case '5':
+ this.loadMasterComponentHosts();
case '4':
- //this.get('installerStep3Controller').loadStep();
+ this.loadConfirmedHosts();
case '3':
this.loadServices();
case '2':
case '1':
- this.loadHosts();
+ this.loadInstallOptions();
}
},
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step5_controller.js Sat Oct 20 17:12:55 2012
@@ -19,17 +19,16 @@
var App = require('app');
App.WizardStep5Controller = Em.Controller.extend({
- //properties
- name: "wizardStep5Controller",
- hosts: [],
- selectedServices: [],
- selectedServicesMasters: [],
- zId: 0,
- components: require('data/service_components'),
- /*
- Below function retrieves host information from local storage
- */
+ name:"wizardStep5Controller",
+
+ hosts:[],
+
+ selectedServices:[],
+ selectedServicesMasters:[],
+ zId:0,
+
+ components: require('data/service_components'),
clearStep: function () {
this.set('hosts', []);
@@ -41,56 +40,52 @@ App.WizardStep5Controller = Em.Controlle
loadStep: function () {
console.log("TRACE: Loading step5: Assign Masters");
this.clearStep();
- this.renderHostInfo(this.loadHostInfo());
- this.renderComponents(this.loadComponents(this.loadServices()));
+ this.renderHostInfo();
+ this.renderComponents(this.loadComponents());
},
- loadHostInfo: function () {
- var hostInfo = [];
- hostInfo = App.db.getHosts();
- var hosts = new Ember.Set();
- for (var index in hostInfo) {
- hosts.add(hostInfo[index]);
- console.log("TRACE: host name is: " + hostInfo[index].name);
- }
- return hosts.filterProperty('bootStatus', 'success');
- },
+ /**
+ * Load active host list to <code>hosts</code> variable
+ */
+ renderHostInfo: function () {
+ var hostInfo = this.get('content.hostsInfo');
- renderHostInfo: function (hostsInfo) {
+ for (var index in hostInfo) {
+ var _host = hostInfo[index];
+ if(_host.bootStatus === 'success'){
- //wrap the model data into
+ var hostObj = Ember.Object.create({
+ host_name: _host.name,
+ cpu: _host.cpu,
+ memory: _host.memory,
+ host_info: "%@ ( %@GB %@cores )".fmt(_host.name, _host.memory, _host.cpu)
+ });
- hostsInfo.forEach(function (_host) {
- var hostObj = Ember.Object.create({
- host_name: _host.name,
- cpu: _host.cpu,
- memory: _host.memory
- });
- console.log('pushing ' + hostObj.host_name);
- hostObj.set("host_info", "" + hostObj.get("host_name") + " ( " + hostObj.get("memory") + "GB" + " " + hostObj.get("cpu") + "cores )");
- this.get("hosts").pushObject(hostObj);
- }, this);
+ this.get("hosts").pushObject(hostObj);
+ }
+ }
+ },
+ /**
+ * Load services info to appropriate variable and return masterComponentHosts
+ * @return {Ember.Set}
+ */
+ loadComponents: function () {
- },
+ var services = this.get('content.services')
+ .filterProperty('isSelected', true).mapProperty('serviceName');
- loadServices: function () {
- var serviceInfo = App.db.getService();
- var services = serviceInfo.filterProperty('isSelected', true).mapProperty('serviceName');
services.forEach(function (item) {
- console.log("TRACE: service name is: " + item);
this.get("selectedServices").pushObject(Ember.Object.create({service_name: item}));
}, this);
- return services;
-
- },
+ var masterHosts = this.get('content.masterHosts');
- loadComponents: function (services) {
var components = new Ember.Set();
- if (App.db.getMasterComponentHosts() === undefined) {
- var masterComponents = this.components.filterProperty('isMaster', true);
+ if (!masterHosts) {
+
+ var masterComponents = this.get('components').filterProperty('isMaster', true);
for (var index in services) {
var componentInfo = masterComponents.filterProperty('service_name', services[index]);
componentInfo.forEach(function (_componentInfo) {
@@ -102,27 +97,28 @@ App.WizardStep5Controller = Em.Controlle
components.add(componentObj);
}, this);
}
+
} else {
- var masterComponentHosts = App.db.getMasterComponentHosts();
- masterComponentHosts.forEach(function (_masterComponentHost) {
+
+ masterHosts.forEach(function (_masterComponentHost) {
var componentObj = {};
- componentObj.component_name = _masterComponentHost.component;
+ componentObj.component_name =_masterComponentHost.component;
componentObj.selectedHost = _masterComponentHost.hostName; // call the method that plays selectNode algorithm or fetches from server
componentObj.availableHosts = [];
components.add(componentObj);
}, this);
+
}
return components;
},
- getMasterComponents: function () {
- return (this.get('selectedServicesMasters').slice(0));
- },
-
+ /**
+ * Put master components to <code>selectedServicesMasters</code>, which will be automatically rendered in template
+ * @param masterComponents
+ */
renderComponents: function (masterComponents) {
var zookeeperComponent = null, componentObj = null;
- var services = [];
- services = this.getMasterComponents();
+ var services = this.get('selectedServicesMasters').slice(0);
if (services.length) {
this.set('selectedServicesMasters', []);
}
@@ -312,6 +308,11 @@ App.WizardStep5Controller = Em.Controlle
},
+ /**
+ * Return hostName of masterNode for specified service
+ * @param componentName
+ * @return {*}
+ */
selectHost: function (componentName) {
var noOfHosts = this.get('hosts').length;
if (componentName === 'KERBEROS_SERVER') {
@@ -561,31 +562,7 @@ App.WizardStep5Controller = Em.Controlle
else {
return -1;
}
- },
-
- saveComponentHostsToDb: function () {
- var obj = this.get('selectedServicesMasters');
- var masterComponentHosts = [];
- var inc = 0;
- var array = [];
- obj.forEach(function (_component) {
- var hostArr = [];
- masterComponentHosts.push({
- component: _component.component_name,
- hostName: _component.selectedHost
- });
- });
-
- App.db.setMasterComponentHosts(masterComponentHosts);
-
- },
-
- submit: function () {
- this.saveComponentHostsToDb();
- App.router.send('next');
}
-
-
});
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js?rev=1400489&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step6_controller.js Sat Oct 20 17:12:55 2012
@@ -0,0 +1,210 @@
+/**
+ * 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');
+var db = require('utils/db');
+
+/**
+ * By Step 6, we have the following information stored in App.db and set on this
+ * controller by the router:
+ *
+ * hosts: App.db.hosts (list of all hosts the user selected in Step 3)
+ * selectedServiceNames: App.db.selectedServiceNames (the services that the user selected in Step 4)
+ * masterComponentHosts: App.db.masterComponentHosts (master-components-to-hosts mapping the user selected in Step 5)
+ *
+ * Step 6 will set the following information in App.db:
+ * hostSlaveComponents: App.db.hostSlaveComponents (hosts-to-slave-components mapping the user selected in Steo 6)
+ * slaveComponentHosts: App.db.slaveComponentHosts (slave-components-to-hosts mapping the user selected in Step 6)
+ *
+ */
+App.WizardStep6Controller = Em.Controller.extend({
+
+ hosts: [],
+ // TODO: hook up with user host selection
+ rawHosts: [],
+ masterComponentHosts: require('data/mock/master_component_hosts'),
+
+ isAllDataNodes: function () {
+ return this.get('hosts').everyProperty('isDataNode', true);
+ }.property('hosts.@each.isDataNode'),
+
+ isAllTaskTrackers: function () {
+ return this.get('hosts').everyProperty('isTaskTracker', true);
+ }.property('hosts.@each.isTaskTracker'),
+
+ isAllRegionServers: function () {
+ return this.get('hosts').everyProperty('isRegionServer', true);
+ }.property('hosts.@each.isRegionServer'),
+
+ isNoDataNodes: function () {
+ return this.get('hosts').everyProperty('isDataNode', false);
+ }.property('hosts.@each.isDataNode'),
+
+ isNoTaskTrackers: function () {
+ return this.get('hosts').everyProperty('isTaskTracker', false);
+ }.property('hosts.@each.isTaskTracker'),
+
+ isNoRegionServers: function () {
+ return this.get('hosts').everyProperty('isRegionServer', false);
+ }.property('hosts.@each.isRegionServer'),
+
+ /**
+ * Return whether Hbase service was selected or not.
+ * Calculate this information on <code>content.services</code> variable
+ * @return Boolean
+ */
+ isHbSelected: function () {
+ return this.get('content.services').findProperty('serviceName', 'HBASE').get('isSelected');
+ }.property('content'),
+
+ /**
+ * Return whether MapReduce service was selected or not.
+ * Calculate this information on <code>content.services</code> variable
+ * @return Boolean
+ */
+ isMrSelected: function () {
+ return this.get('content.services').findProperty('serviceName', 'MAPREDUCE').get('isSelected');
+ }.property('content'),
+
+ /**
+ * Check whether current host is currently selected as master
+ * @param hostname
+ * @return {Boolean}
+ */
+ hasMasterComponents: function (hostname) {
+ return this.get('content.masterComponentHosts').someProperty('hostName', hostname);
+ },
+
+ selectAllDataNodes: function () {
+ this.get('hosts').setEach('isDataNode', true);
+ },
+
+ selectAllTaskTrackers: function () {
+ this.get('hosts').setEach('isTaskTracker', true);
+ },
+
+ selectAllRegionServers: function () {
+ this.get('hosts').setEach('isRegionServer', true);
+ },
+
+ deselectAllDataNodes: function () {
+ this.get('hosts').setEach('isDataNode', false);
+ },
+
+ deselectAllTaskTrackers: function () {
+ this.get('hosts').setEach('isTaskTracker', false);
+ },
+
+ deselectAllRegionServers: function () {
+ this.get('hosts').setEach('isRegionServer', false);
+ },
+
+ clearStep: function () {
+ this.set('hosts', []);
+ },
+
+ loadStep: function () {
+ console.log("TRACE: Loading step6: Assign Slaves");
+ this.clearStep();
+ this.renderSlaveHosts();
+ },
+
+ /**
+ * Get active host names
+ * @return {Array}
+ */
+ getHostNames: function () {
+ var hostInfo = this.get('content.hostsInfo');
+ var hostNames = [];
+ for (var index in hostInfo) {
+ if (hostInfo[index].bootStatus === 'success')
+ hostNames.push(hostInfo[index].name);
+ }
+ return hostNames;
+ },
+
+ /**
+ * Load all data needed for this module. Then it automatically renders in template
+ * @return {Ember.Set}
+ */
+ renderSlaveHosts: function () {
+ var hostsObj = Em.Set.create();
+ var allHosts = this.getHostNames();
+ var slaveHosts = this.get('content.slaveComponentHosts');
+
+ allHosts.forEach(function (_hostName) {
+ hostsObj.push(Em.Object.create({
+ hostname: _hostName
+ }));
+ });
+
+ if (!slaveHosts) { // we are at this page for the first time
+
+ hostsObj.forEach(function (host) {
+ host.isDataNode = host.isTaskTracker
+ = host.isRegionServer = !this.hasMasterComponents(host.hostname);
+ }, this);
+
+ } else {
+
+ var dataNodes = slaveHosts.findProperty('componentName', 'DATANODE');
+ dataNodes.hosts.forEach(function (_dataNode) {
+ var dataNode = hostsObj.findProperty('hostname', _dataNode.hostname);
+ if (dataNode) {
+ dataNode.isDataNode = true;
+ }
+ });
+
+ var taskTrackers = slaveHosts.findProperty('componentName', 'TASKTRACKER');
+ taskTrackers.hosts.forEach(function (_taskTracker) {
+ var taskTracker = hostsObj.findProperty('hostname', _taskTracker.hostname);
+ if (taskTracker) {
+ taskTracker.isTaskTracker = true;
+ }
+ });
+
+ if (this.get('isHbSelected')) {
+ var regionServers = slaveHosts.findProperty('componentName', 'HBASE_REGIONSERVER');
+ regionServers.hosts.forEach(function (_regionServer) {
+ var regionServer = hostsObj.findProperty('hostname', _regionServer.hostname);
+ if (regionServer) {
+ regionServer.isRegionServer = true;
+ }
+ });
+ }
+
+ }
+
+ hostsObj.forEach(function(host){
+ this.get('hosts').pushObject(host);
+ }, this);
+ },
+
+ /**
+ * Validate form. Return do we have errors or not
+ * @return {Boolean}
+ */
+ validate: function () {
+ var isOK = !(this.get('isNoDataNodes') || ( this.get('isMrSelected') && this.get('isNoTaskTrackers')) || ( this.get('isHbSelected') &&this.get('isNoRegionServers')));
+ if(!isOK){
+ this.set('errorMessage', Ember.I18n.t('installer.step6.error.mustSelectOne'));
+ }
+ return isOK;
+ }
+
+});
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=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js Sat Oct 20 17:12:55 2012
@@ -18,269 +18,286 @@
Em.I18n.translations = {
- 'app.name': 'Ambari',
+ 'app.name':'Ambari',
- 'login.header': 'Sign in',
- 'login.username': 'Username',
- 'login.password': 'Password',
- 'login.loginButton': 'Sign in',
- 'login.error': 'Invalid username/password combination.',
-
- 'services.nagios.description': 'Nagios desc',
- 'services.ganglia.description': 'Ganglia desc',
- 'services.hdfs.description': 'HDFS desc',
- 'services.mapreduce.description': 'MapReduce desc',
- 'services.sqoop.description': 'Sqoop desc',
- 'services.pig.description': 'Pig desc',
- 'services.hive.description': 'Hive/HCat desc',
- 'services.oozie.description': 'Oozie desc',
- 'services.zookeeper.description': 'ZooKeeper desc',
- 'services.hbase.description': 'HBase desc',
-
- 'topnav.help.href': 'http://incubator.apache.org/ambari/install.html',
-
- 'installer.header': 'Cluster Install Wizard',
- 'installer.step1.header': 'Welcome',
- 'installer.step1.body.header': 'Welcome to Apache Ambari!',
- 'installer.step1.body': 'Ambari makes it easy to install, manage, and monitor Hadoop clusters.<br>' +
+ 'login.header':'Sign in',
+ 'login.username':'Username',
+ 'login.password':'Password',
+ 'login.loginButton':'Sign in',
+ 'login.error':'Invalid username/password combination.',
+
+ 'services.nagios.description':'Nagios desc',
+ 'services.ganglia.description':'Ganglia desc',
+ 'services.hdfs.description':'HDFS desc',
+ 'services.mapreduce.description':'MapReduce desc',
+ 'services.sqoop.description':'Sqoop desc',
+ 'services.pig.description':'Pig desc',
+ 'services.hive.description':'Hive/HCat desc',
+ 'services.oozie.description':'Oozie desc',
+ 'services.zookeeper.description':'ZooKeeper desc',
+ 'services.hbase.description':'HBase desc',
+
+ 'topnav.help.href':'http://incubator.apache.org/ambari/install.html',
+
+ 'installer.header':'Cluster Install Wizard',
+ 'installer.step1.header':'Welcome',
+ 'installer.step1.body.header':'Welcome to Apache Ambari!',
+ 'installer.step1.body':'Ambari makes it easy to install, manage, and monitor Hadoop clusters.<br>' +
'We will walk you through the cluster installation process with this step-by-step wizard.',
- 'installer.step1.clusterName': 'Name your cluster',
- 'installer.step1.clusterName.tooltip.title': 'Cluster Name',
- 'installer.step1.clusterName.tooltip.content': 'Enter a unique cluster name. Cluster name cannot be changed later.',
- 'installer.step1.clusterName.error.required': 'Cluster Name is required',
- 'installer.step1.clusterName.error.whitespaces': 'Cluster Name cannot contain white spaces',
- 'installer.step1.clusterName.error.specialChar': 'Cluster Name cannot contain special characters',
-
- 'installer.step2.header': 'Install Options',
- 'installer.step2.body': 'Enter the list of hosts to be included in the cluster, provide your SSH key, and optionally specify a local repository.',
- 'installer.step2.targetHosts': 'Target Hosts',
- 'installer.step2.targetHosts.info': 'Enter a list of host names, one per line',
- 'installer.step2.hostPattern.tooltip.title': 'Pattern Expressions',
- 'installer.step2.hostPattern.tooltip.content': 'You can use pattern expressions to specify a number of target hosts. Explain brackets.',
- 'installer.step2.hostName.error.required': 'Host Names cannot be left empty',
- 'installer.step2.hostName.error.notRequired': 'Host Names will be ignored if not using SSH to automatically configure hosts',
- 'installer.step2.hostName.error.invalid': 'Invalid Host Name(s) - cannot start or end with a hyphen',
- 'installer.step2.sshKey': 'Host Connectivity Information',
- 'installer.step2.sshKey.info': 'Provide your SSH Private Key (<b>id_rsa</b> for <b>root</b>)',
- 'installer.step2.sshKey.error.required': 'SSH Private Key is required',
- 'installer.step2.passphrase.error.match': 'Passphrases do not match',
- 'installer.step2.manualInstall.label': 'Do not use SSH to automatically configure hosts ',
- 'installer.step2.manualInstall.info': 'By not using SSH to connect to the target hosts, you must manually install and start the ' +
+ 'installer.step1.clusterName':'Name your cluster',
+ 'installer.step1.clusterName.tooltip.title':'Cluster Name',
+ 'installer.step1.clusterName.tooltip.content':'Enter a unique cluster name. Cluster name cannot be changed later.',
+ 'installer.step1.clusterName.error.required':'Cluster Name is required',
+ 'installer.step1.clusterName.error.whitespaces':'Cluster Name cannot contain white spaces',
+ 'installer.step1.clusterName.error.specialChar':'Cluster Name cannot contain special characters',
+
+ 'installer.step2.header':'Install Options',
+ 'installer.step2.body':'Enter the list of hosts to be included in the cluster, provide your SSH key, and optionally specify a local repository.',
+ 'installer.step2.targetHosts':'Target Hosts',
+ 'installer.step2.targetHosts.info':'Enter a list of host names, one per line',
+ 'installer.step2.hostPattern.tooltip.title':'Pattern Expressions',
+ 'installer.step2.hostPattern.tooltip.content':'You can use pattern expressions to specify a number of target hosts. Explain brackets.',
+ 'installer.step2.hostName.error.required':'Host Names cannot be left empty',
+ 'installer.step2.hostName.error.notRequired':'Host Names will be ignored if not using SSH to automatically configure hosts',
+ 'installer.step2.hostName.error.invalid':'Invalid Host Name(s) - cannot start or end with a hyphen',
+ 'installer.step2.sshKey':'Host Connectivity Information',
+ 'installer.step2.sshKey.info':'Provide your SSH Private Key (<b>id_rsa</b> for <b>root</b>)',
+ 'installer.step2.sshKey.error.required':'SSH Private Key is required',
+ 'installer.step2.passphrase.error.match':'Passphrases do not match',
+ 'installer.step2.manualInstall.label':'Do not use SSH to automatically configure hosts ',
+ 'installer.step2.manualInstall.info':'By not using SSH to connect to the target hosts, you must manually install and start the ' +
'Ambari Agent on each host in order for the wizard to perform the necessary configurations and software installs.',
- 'installer.step2.advancedOption': 'Advanced Options',
- 'installer.step2.repoConf': 'Software Repository Configuration File Path',
- 'installer.step2.localRepo.header': 'Software repository',
- 'installer.step2.localRepo.label': 'Use a local software repository',
- 'installer.step2.localRepo.error.required': 'Local repository file path is required',
- 'installer.step2.localRepo.info': 'The repository configuration file should be installed on each host in your cluster. ' +
+ 'installer.step2.advancedOption':'Advanced Options',
+ 'installer.step2.repoConf':'Software Repository Configuration File Path',
+ 'installer.step2.localRepo.header':'Software repository',
+ 'installer.step2.localRepo.label':'Use a local software repository',
+ 'installer.step2.localRepo.error.required':'Local repository file path is required',
+ 'installer.step2.localRepo.info':'The repository configuration file should be installed on each host in your cluster. ' +
'This file instructs the package manager to use your local software repository to retrieve software packages, instead of ' +
'downloading them from the internet.',
- 'installer.step2.localRepo.tooltip.title': 'Local Software Repository',
- 'installer.step2.localRepo.tooltip.content': 'The repository configuration file should be installed on each host ' +
+ 'installer.step2.localRepo.tooltip.title':'Local Software Repository',
+ 'installer.step2.localRepo.tooltip.content':'The repository configuration file should be installed on each host ' +
'in your cluster. This file instructs package manager to use your local' +
'software repository to retrieve software packages, instead of using the internet.',
- 'installer.step2.manualInstall.tooltip.title': 'Not Using SSH (Manual Install)',
- 'installer.step2.manualInstall.tooltip.content': 'If you do not wish Ambari to automatically configure the target hosts via SSH,' +
+ 'installer.step2.manualInstall.tooltip.title':'Not Using SSH (Manual Install)',
+ 'installer.step2.manualInstall.tooltip.content':'If you do not wish Ambari to automatically configure the target hosts via SSH,' +
' you have the option of configuring them yourself. This involves installing and starting Ambari Agent on each of your target hosts.',
- 'installer.step2.manualInstall.popup.header': 'Before You Proceed',
- 'installer.step2.manualInstall.popup.body': 'You must install Ambari Agents on each host you want to manage before you proceed. <a href="#" target="_blank">Learn more</a>',
+ 'installer.step2.manualInstall.popup.header':'Before You Proceed',
+ 'installer.step2.manualInstall.popup.body':'You must install Ambari Agents on each host you want to manage before you proceed. <a href="#" target="_blank">Learn more</a>',
- 'installer.step3.header': 'Confirm Hosts',
- 'installer.step3.body': 'Here are the results of the host discovery process.<br>' +
+ 'installer.step3.header':'Confirm Hosts',
+ 'installer.step3.body':'Here are the results of the host discovery process.<br>' +
'Please verify and remove the ones that you do not want to be part of the cluster.',
- 'installer.step3.hostLog.popup.header': 'Log file for the host',
- 'installer.step3.hostLog.popup.body': 'Placeholder for the log file',
- 'installer.step3.hosts.remove.popup.header': 'Remove Hosts',
- 'installer.step3.hosts.remove.popup.body': 'Are you sure you want to remove the selected host(s)?',
- 'installer.step3.hosts.retry.popup.header': 'Retry Host Discovery',
- 'installer.step3.hosts.retry.popup.body': 'Are you sure you want to retry discovery of the selected host(s)?',
-
- 'installer.step4.header': 'Choose Services',
- 'installer.step4.body': 'Choose which services you want to install on your cluster.<br>Note that some services have dependencies (e.g., HBase requires ZooKeeper.)',
- 'installer.step4.mapreduceCheck.popup.header': 'MapReduce Needed',
- 'installer.step4.mapreduceCheck.popup.body': 'You did not select MapReduce, but it is needed by other services you selected. We will automatically add MapReduce. Is this OK?',
- 'installer.step4.monitoringCheck.popup.header': 'Limited Functionality Warning',
- 'installer.step4.monitoringCheck.popup.body': 'You did not select Nagios and/or Ganglia. If both are not selected, monitoring and alerts will not function properly. Is this OK?',
-
- 'installer.step5.header': 'Assign Masters',
- 'installer.step5.attention': ' hosts not running master services',
- 'installer.step5.body': 'Assign master components to hosts you want to run them on.',
-
- 'installer.step6.header': 'Assign Slaves',
- 'installer.step6.body': 'Assign slave components to hosts you want to run them on.',
- 'installer.step6.error.mustSelectOne': 'You must assign at least one host to each.',
-
- 'installer.step7.header': 'Customize Services',
- 'installer.step7.body': 'We have come up with recommended configurations for the services you selected. Customize them as you see fit.',
- 'installer.step7.attentionNeeded': '<strong>Attention:</strong> Some configurations need your attention before you can proceed.',
-
- 'installer.step8.header': 'Review',
- '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.status.success': 'Successfully installed the cluster',
- 'installer.step9.status.failed': 'Failure in installation',
- 'installer.step9.host.status.success': 'success',
- 'installer.step9.host.status.warning': 'tolerable failures encountered',
- 'installer.step9.host.status.failed': 'failures encountered',
-
- 'installer.step10.header': 'Summary',
-
- 'form.create': 'Create',
- 'form.save': 'Save',
- 'form.cancel': 'Cancel',
- 'form.password': 'Password',
- 'form.passwordRetype': 'Retype Password',
- 'form.saveSuccess': 'Successfully saved.',
- 'form.saveError': 'Sorry, errors occured.',
-
- 'form.validator.invalidIp': 'Please enter valid ip address',
-
- 'admin.advanced.title': 'Advanced',
- 'admin.advanced.caution': 'This section is for advanced user only.<br/>Proceed with caution.',
- 'admin.advanced.button.uninstallIncludingData': 'Uninstall cluster including all data.',
- 'admin.advanced.button.uninstallKeepData': 'Uninstall cluster but keep data.',
+ 'installer.step3.hostLog.popup.header':'Log file for the host',
+ 'installer.step3.hostLog.popup.body':'Placeholder for the log file',
+ 'installer.step3.hosts.remove.popup.header':'Remove Hosts',
+ 'installer.step3.hosts.remove.popup.body':'Are you sure you want to remove the selected host(s)?',
+ 'installer.step3.hosts.retry.popup.header':'Retry Host Discovery',
+ 'installer.step3.hosts.retry.popup.body':'Are you sure you want to retry discovery of the selected host(s)?',
+
+ 'installer.step4.header':'Choose Services',
+ 'installer.step4.body':'Choose which services you want to install on your cluster.<br>Note that some services have dependencies (e.g., HBase requires ZooKeeper.)',
+ 'installer.step4.mapreduceCheck.popup.header':'MapReduce Needed',
+ 'installer.step4.mapreduceCheck.popup.body':'You did not select MapReduce, but it is needed by other services you selected. We will automatically add MapReduce. Is this OK?',
+ 'installer.step4.monitoringCheck.popup.header':'Limited Functionality Warning',
+ 'installer.step4.monitoringCheck.popup.body':'You did not select Nagios and/or Ganglia. If both are not selected, monitoring and alerts will not function properly. Is this OK?',
+
+ 'installer.step5.header':'Assign Masters',
+ 'installer.step5.attention':' hosts not running master services',
+ 'installer.step5.body':'Assign master components to hosts you want to run them on.',
+
+ 'installer.step6.header':'Assign Slaves',
+ 'installer.step6.body':'Assign slave components to hosts you want to run them on.',
+ 'installer.step6.error.mustSelectOne':'You must assign at least one host to each.',
+
+ 'installer.step7.header':'Customize Services',
+ 'installer.step7.body':'We have come up with recommended configurations for the services you selected. Customize them as you see fit.',
+ 'installer.step7.attentionNeeded':'<strong>Attention:</strong> Some configurations need your attention before you can proceed.',
+
+ 'installer.step8.header':'Review',
+ '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.status.success':'Successfully installed the cluster',
+ 'installer.step9.status.failed':'Failure in installation',
+ 'installer.step9.host.status.success':'success',
+ 'installer.step9.host.status.warning':'tolerable failures encountered',
+ 'installer.step9.host.status.failed':'failures encountered',
+
+ 'installer.step10.header':'Summary',
+
+ 'form.create':'Create',
+ 'form.save':'Save',
+ 'form.cancel':'Cancel',
+ 'form.password':'Password',
+ 'form.passwordRetype':'Retype Password',
+ 'form.saveSuccess':'Successfully saved.',
+ 'form.saveError':'Sorry, errors occured.',
+
+ 'form.validator.invalidIp':'Please enter valid ip address',
+
+ 'admin.advanced.title':'Advanced',
+ 'admin.advanced.caution':'This section is for advanced user only.<br/>Proceed with caution.',
+ 'admin.advanced.button.uninstallIncludingData':'Uninstall cluster including all data.',
+ 'admin.advanced.button.uninstallKeepData':'Uninstall cluster but keep data.',
- 'admin.advanced.popup.header': 'Uninstall Cluster',
+ 'admin.advanced.popup.header':'Uninstall Cluster',
/*'admin.advanced.popup.text':'Uninstall Cluster',*/
- 'admin.audit.grid.date': "Date/Time",
- 'admin.audit.grid.category': "Category",
- 'admin.audit.grid.operationName': "Operation",
- 'admin.audit.grid.performedBy': "Performed By",
- 'admin.audit.grid.service': "Category",
-
- 'admin.authentication.form.method.database': 'Use Ambari Database to authenticate users',
- 'admin.authentication.form.method.ldap': 'Use LDAP/Active Directory to authenticate',
- 'admin.authentication.form.primaryServer': 'Primary Server',
- 'admin.authentication.form.secondaryServer': 'Secondary Server',
- 'admin.authentication.form.useSsl': 'Use SSL',
- 'admin.authentication.form.bind.anonymously': "Bind Anonymously",
- 'admin.authentication.form.bind.useCrenedtials': "Use Credentials To Bind",
- 'admin.authentication.form.bindUserDN': 'Bind User DN',
- 'admin.authentication.form.searchBaseDN': 'Search Base DN',
- 'admin.authentication.form.usernameAttribute': 'Username Attribute',
-
- 'admin.authentication.form.userDN': 'User DN',
- 'admin.authentication.form.password': 'Password',
- 'admin.authentication.form.configurationTest': 'Configuration Test',
- 'admin.authentication.form.testConfiguration': 'Test Configuration',
-
- 'admin.authentication.form.test.success': 'The configuration passes the test',
- 'admin.authentication.form.test.fail': 'The configuration fails the test',
-
- 'admin.security.title': 'Kerberos Security has not been enabled on this cluster.',
- 'admin.security.button.enable': 'Enable Kerberos Security on this cluster',
-
- 'admin.users.ldapAuthentionUsed': 'LDAP Authentication is being used to authenticate users',
- 'admin.users.deleteYourselfMessage': 'You can\'t delete yourself',
- 'admin.users.addButton': 'Add User',
- 'admin.users.delete': 'delete',
- 'admin.users.edit': 'edit',
- 'admin.users.privileges': 'Admin',
- 'admin.users.password': 'Password',
- 'admin.users.passwordRetype': 'Retype Password',
- 'admin.users.username': 'Username',
-
- 'question.sure': 'Are you sure?',
-
- 'services.service.start': 'Start',
- 'services.service.stop': 'Stop',
- 'services.service.start.popup.header': 'Confirmation',
- 'services.service.stop.popup.header': 'Confirmation',
- 'services.service.start.popup.body': 'Are you sure?',
- 'services.service.stop.popup.body': 'Are you sure?',
- 'services.service.summary.version': 'Version',
- 'services.service.summary.nameNode': 'NameNode Web UI',
- 'services.service.summary.nameNodeUptime': 'NameNode Uptime',
- 'services.service.summary.nameNodeHeap': 'NameNode Heap',
- 'services.service.summary.pendingUpgradeStatus': 'HDFS Pending Upgrade Status',
- 'services.service.summary.safeModeStatus': 'HDFS Safe Mode Status',
- 'services.service.summary.dataNodes': 'DataNodes (live/dead/decom)',
- 'services.service.summary.diskCapacity': 'HDFS Disk Capacity',
- 'services.service.summary.blocksTotal': 'Blocks (total)',
- 'services.service.summary.blockErrors': 'Block Errors (corr./miss./underrep.)',
- 'services.service.summary.totalFiles': 'Total Files + Directory Count',
- 'services.service.summary.jobTracker': 'Job Tracker Web UI',
- 'services.service.summary.jobTrackerUptime': 'Job Tracker Uptime',
- 'services.service.summary.trackersLiveTotal': 'Trackers (live/total)',
- 'services.service.summary.trackersBlacklistGraylist': 'Trackers (blacklist/graylist/excl.)',
- 'services.service.summary.jobTrackerHeap': 'Job Tracker Heap (used/max)',
- 'services.service.summary.totalSlotsCapacity': 'Total Slots Capacity (maps/reduces/avg per node)',
- 'services.service.summary.totalJobs': 'Total Jobs (submitted/completed)',
- 'services.service.summary.currentSlotUtiliMaps': 'Current Slot Utilization: Maps (occupied/reserved)',
- 'services.service.summary.currentSlotUtiliReduces': 'Current Slot Utilization: Reduces (occupied/reserved)',
- 'services.service.summary.tasksMaps': 'Tasks: Maps (running/waiting)',
- 'services.service.summary.tasksReduces': 'Tasks: Reduces (running/waiting)',
- 'services.service.summary.hbaseMaster': 'HBase Master Web UI',
- 'services.service.summary.regionServerCount': 'Region Server Count (live/dead)',
- 'services.service.summary.regionInTransition': 'Region In Transition',
- 'services.service.summary.masterStarted': 'Master Started',
- 'services.service.summary.masterActivated': 'Master Activated',
- 'services.service.summary.averageLoad': 'Average Load (regions per regionServer)',
- 'services.service.summary.masterHeap': 'Master Heap (used/max)',
- 'services.service.summary.moreStats': 'more stats here',
-
- 'hosts.host.start.popup.header': 'Confirmation',
- 'hosts.host.stop.popup.header': 'Confirmation',
- 'hosts.host.start.popup.body': 'Are you sure?',
- 'hosts.host.stop.popup.body': 'Are you sure?',
- 'hosts.assignedToRack.popup.body': 'Are you sure?',
- 'hosts.assignedToRack.popup.header': 'Confirmation',
- 'hosts.decommission.popup.body': 'Are you sure?',
- 'hosts.decommission.popup.header': 'Confirmation',
- 'hosts.delete.popup.body': 'Are you sure?',
- 'hosts.delete.popup.header': 'Confirmation',
-
- 'charts.horizon.chart.showText': 'show',
- 'charts.horizon.chart.hideText': 'hide',
- 'charts.horizon.chart.attributes.cpu': 'CPU',
- 'charts.horizon.chart.attributes.memory': 'Memory',
- 'charts.horizon.chart.attributes.network': 'Network',
- 'charts.horizon.chart.attributes.io': 'I/O',
-
- 'metric.default': 'default',
- 'metric.cpu': 'cpu',
- 'metric.memory': 'disk used',
- 'metric.network': 'network',
- 'metric.io': 'io',
-
- 'hosts.add.header' : 'Add Host Wizard',
- 'hosts.add.step2.warning' : 'Hosts are already part of the cluster and will be ignored',
-
- 'dashboard.services': 'Services',
- 'dashboard.services.hosts': 'Hosts',
- 'dashboard.services.uptime': '{0} days {1} hrs {2} mins',
- 'dashboard.services.hdfs.summary': '{0} of {1} nodes live, {2}% capacity free',
- 'dashboard.services.hdfs.capacity': 'HDFS Capacity',
- 'dashboard.services.hdfs.capacityUsed': '{0} of {1} ({2}% used)',
- 'dashboard.services.hdfs.totalFilesAndDirs': 'Total Files + Directories',
- 'dashboard.services.hdfs.nodes': 'Data Nodes',
+ 'admin.audit.grid.date':"Date/Time",
+ 'admin.audit.grid.category':"Category",
+ 'admin.audit.grid.operationName':"Operation",
+ 'admin.audit.grid.performedBy':"Performed By",
+ 'admin.audit.grid.service':"Category",
+
+ 'admin.authentication.form.method.database':'Use Ambari Database to authenticate users',
+ 'admin.authentication.form.method.ldap':'Use LDAP/Active Directory to authenticate',
+ 'admin.authentication.form.primaryServer':'Primary Server',
+ 'admin.authentication.form.secondaryServer':'Secondary Server',
+ 'admin.authentication.form.useSsl':'Use SSL',
+ 'admin.authentication.form.bind.anonymously':"Bind Anonymously",
+ 'admin.authentication.form.bind.useCrenedtials':"Use Credentials To Bind",
+ 'admin.authentication.form.bindUserDN':'Bind User DN',
+ 'admin.authentication.form.searchBaseDN':'Search Base DN',
+ 'admin.authentication.form.usernameAttribute':'Username Attribute',
+
+ 'admin.authentication.form.userDN':'User DN',
+ 'admin.authentication.form.password':'Password',
+ 'admin.authentication.form.configurationTest':'Configuration Test',
+ 'admin.authentication.form.testConfiguration':'Test Configuration',
+
+ 'admin.authentication.form.test.success':'The configuration passes the test',
+ 'admin.authentication.form.test.fail':'The configuration fails the test',
+
+ 'admin.security.title':'Kerberos Security has not been enabled on this cluster.',
+ 'admin.security.button.enable':'Enable Kerberos Security on this cluster',
+
+ 'admin.users.ldapAuthentionUsed':'LDAP Authentication is being used to authenticate users',
+ 'admin.users.deleteYourselfMessage':'You can\'t delete yourself',
+ 'admin.users.addButton':'Add User',
+ 'admin.users.delete':'delete',
+ 'admin.users.edit':'edit',
+ 'admin.users.privileges':'Admin',
+ 'admin.users.password':'Password',
+ 'admin.users.passwordRetype':'Retype Password',
+ 'admin.users.username':'Username',
+
+ 'question.sure':'Are you sure?',
+
+ 'services.service.start':'Start',
+ 'services.service.stop':'Stop',
+ 'services.service.start.popup.header':'Confirmation',
+ 'services.service.stop.popup.header':'Confirmation',
+ 'services.service.start.popup.body':'Are you sure?',
+ 'services.service.stop.popup.body':'Are you sure?',
+ 'services.service.summary.version':'Version',
+ 'services.service.summary.nameNode':'NameNode Web UI',
+ 'services.service.summary.nameNodeUptime':'NameNode Uptime',
+ 'services.service.summary.nameNodeHeap':'NameNode Heap',
+ 'services.service.summary.pendingUpgradeStatus':'Upgrade Status',
+ 'services.service.summary.safeModeStatus':'Safe Mode Status',
+ 'services.service.summary.dataNodes':'DataNodes',
+ 'services.service.summary.diskCapacity':'HDFS Disk Capacity',
+ 'services.service.summary.blocksTotal':'Blocks (total)',
+ 'services.service.summary.blockErrors':'Block Errors',
+ 'services.service.summary.totalFiles':'Total Files + Dirs',
+ 'services.service.summary.jobTracker':'JobTracker Web UI',
+ 'services.service.summary.jobTrackerUptime':'JobTracker Uptime',
+ 'services.service.summary.trackersLiveTotal':'Trackers',
+ 'services.service.summary.trackersBlacklistGraylist':'Trackers',
+ 'services.service.summary.jobTrackerHeap':'JobTracker Heap',
+ 'services.service.summary.totalSlotsCapacity':'Total Slots Capacity',
+ 'services.service.summary.totalJobs':'Total Jobs',
+ 'services.service.summary.currentSlotUtiliMaps':'Map Slots',
+ 'services.service.summary.currentSlotUtiliReduces':'Reduce Slots',
+ 'services.service.summary.tasksMaps':'Tasks: Maps',
+ 'services.service.summary.tasksReduces':'Tasks: Reduces',
+ 'services.service.summary.hbaseMaster':'HBase Master Web UI',
+ 'services.service.summary.regionServerCount':'Region Server Count',
+ 'services.service.summary.regionInTransition':'Region In Transition',
+ 'services.service.summary.masterStarted':'Master Started',
+ 'services.service.summary.masterActivated':'Master Activated',
+ 'services.service.summary.averageLoad':'Average Load',
+ 'services.service.summary.masterHeap':'Master Heap',
+ 'services.service.summary.moreStats':'more stats here',
+
+ 'hosts.host.start.popup.header':'Confirmation',
+ 'hosts.host.stop.popup.header':'Confirmation',
+ 'hosts.host.start.popup.body':'Are you sure?',
+ 'hosts.host.stop.popup.body':'Are you sure?',
+ 'hosts.assignedToRack.popup.body':'Are you sure?',
+ 'hosts.assignedToRack.popup.header':'Confirmation',
+ 'hosts.decommission.popup.body':'Are you sure?',
+ 'hosts.decommission.popup.header':'Confirmation',
+ 'hosts.delete.popup.body':'Are you sure?',
+ 'hosts.delete.popup.header':'Confirmation',
+
+ 'charts.horizon.chart.showText':'show',
+ 'charts.horizon.chart.hideText':'hide',
+ 'charts.horizon.chart.attributes.cpu':'CPU',
+ 'charts.horizon.chart.attributes.memory':'Memory',
+ 'charts.horizon.chart.attributes.network':'Network',
+ 'charts.horizon.chart.attributes.io':'I/O',
+
+ 'metric.default':'combined',
+ 'metric.cpu':'cpu',
+ 'metric.memory':'disk used',
+ 'metric.network':'network',
+ 'metric.io':'io',
+ 'metric.more':'more',
+ 'metric.more.cpu':'Cpu',
+
+ 'metric.more.memory':'Memory',
+ 'metric.more.memory.swapFree': 'swap_free',
+ 'metric.more.memory.memCached': 'mem_cached',
+
+ 'hosts.add.header':'Add Host Wizard',
+ 'hosts.add.step2.warning':'Hosts are already part of the cluster and will be ignored',
+
+ 'dashboard.services':'Services',
+ 'dashboard.services.hosts':'Hosts',
+ 'dashboard.services.uptime':'{0} days {1} hrs {2} mins',
+ 'dashboard.services.hdfs.summary':'{0} of {1} nodes live, {2}% capacity free',
+ 'dashboard.services.hdfs.capacity':'HDFS Capacity',
+ 'dashboard.services.hdfs.capacityUsed':'{0} of {1} ({2}% used)',
+ 'dashboard.services.hdfs.totalFilesAndDirs':'Total Files + Directories',
+ 'dashboard.services.hdfs.nodes':'Data Nodes',
'dashboard.services.hdfs.nodes.live':'live',
'dashboard.services.hdfs.nodes.dead':'dead',
'dashboard.services.hdfs.nodes.decom':'decom',
- 'dashboard.services.hdfs.nodes.uptime': 'NameNode Uptime',
- 'dashboard.services.hdfs.nodes.heap': 'NameNode Heap',
- 'dashboard.services.hdfs.nodes.heapUsed': '{0} of {1}, {2}% used',
- 'dashboard.services.hdfs.chart.label': 'Capacity (Free/Used)',
-
- 'dashboard.services.mapreduce.summary': '{0} of {1} trackers live, {2} jobs running',
- 'dashboard.services.mapreduce.trackers': 'Trackers',
- 'dashboard.services.mapreduce.trackersSummary': '{0} live / {1} total',
- 'dashboard.services.mapreduce.jobs': 'Jobs',
- 'dashboard.services.mapreduce.jobsSummary': '{0} running / {1} completed / {2} failed',
- 'dashboard.services.mapreduce.mapSlots': 'Map Slots',
- 'dashboard.services.mapreduce.reduceSlots': 'Reduce Slots',
- 'dashboard.services.mapreduce.jobTrackerHeap': 'JobTracker Heap',
- 'dashboard.services.mapreduce.jobTrackerUptime': 'Job Trackers Uptime',
- 'dashboard.services.mapreduce.chart.label': 'Jobs Running',
-
- 'dashboard.services.hbase.summary': '{0} of {1} region servers up, {2} average load',
- 'dashboard.services.hbase.masterServerHeap': 'Master Server Heap',
- 'dashboard.services.hbase.masterServerUptime': 'Master Server Uptime',
- 'dashboard.services.hbase.averageLoad': 'Average Load',
- 'dashboard.services.hbase.regionServers': 'Region Servers',
- 'dashboard.services.hbase.regionServersSummary': '{0} live / {1} total',
- 'dashboard.services.hbase.chart.label': 'Request Count'
+ 'dashboard.services.hdfs.nodes.uptime':'NameNode Uptime',
+ 'dashboard.services.hdfs.nodes.heap':'NameNode Heap',
+ 'dashboard.services.hdfs.nodes.heapUsed':'{0} of {1}, {2}% used',
+ 'dashboard.services.hdfs.chart.label':'Capacity (Free/Used)',
+
+ 'dashboard.services.mapreduce.summary':'{0} of {1} trackers live, {2} jobs running',
+ 'dashboard.services.mapreduce.trackers':'Trackers',
+ 'dashboard.services.mapreduce.trackersSummary':'{0} live / {1} total',
+ 'dashboard.services.mapreduce.jobs':'Jobs',
+ 'dashboard.services.mapreduce.jobsSummary':'{0} running / {1} completed / {2} failed',
+ 'dashboard.services.mapreduce.mapSlots':'Map Slots',
+ 'dashboard.services.mapreduce.mapSlotsSummary':'{0} occuped / {1} reserved / {2} total',
+ 'dashboard.services.mapreduce.reduceSlots':'Reduce Slots',
+ 'dashboard.services.mapreduce.reduceSlotsSummary':'{0} occuped / {1} reserved / {2} total',
+ 'dashboard.services.mapreduce.jobTrackerHeap':'JobTracker Heap',
+ 'dashboard.services.mapreduce.jobTrackerHeapSummary':'{0} of {1} ({2}% used)',
+ 'dashboard.services.mapreduce.jobTrackerUptime':'Job Trackers Uptime',
+ 'dashboard.services.mapreduce.chart.label':'Jobs Running',
+
+ 'dashboard.services.hbase.summary':'{0} of {1} region servers up, {2} average load',
+ 'dashboard.services.hbase.masterServerHeap':'Master Server Heap',
+ 'dashboard.services.hbase.masterServerHeap.summary':'{0} of {1} ({2}% used)',
+ 'dashboard.services.hbase.masterServerUptime':'Master Server Uptime',
+ 'dashboard.services.hbase.averageLoad':'Average Load',
+ 'dashboard.services.hbase.regionServers':'Region Servers',
+ 'dashboard.services.hbase.regionServersSummary':'{0} live / {1} total',
+ 'dashboard.services.hbase.chart.label':'Request Count',
+
+ 'timeRange.presets.1hour':'1h',
+ 'timeRange.presets.12hour':'12h',
+ 'timeRange.presets.1day':'1d',
+ 'timeRange.presets.1week':'1wk',
+ 'timeRange.presets.1month':'1mo',
+ 'timeRange.presets.1year':'1yr'
};
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js Sat Oct 20 17:12:55 2012
@@ -122,26 +122,39 @@ module.exports = Em.Route.extend({
var controller = router.get('addHostController');
controller.setCurrentStep('4', false);
controller.loadAllPriorSteps();
- controller.connectOutlet('wizardStep5' /*, controller.get('content.services')*/);
+ controller.connectOutlet('wizardStep5', controller.get('content'));
},
back: Em.Router.transitionTo('step3'),
next: function (router, context) {
- console.warn('next is not ready now');
+ var addHostController = router.get('addHostController');
+ var wizardStep5Controller = router.get('wizardStep5Controller');
+ addHostController.saveMasterComponentHosts( wizardStep5Controller );
+ router.transitionTo('step5');
+ }
+ }),
+
+ step5: Em.Route.extend({
+ route: '/step5',
+ connectOutlets: function (router, context) {
+ console.log('in addHost.step5:connectOutlets');
+ var controller = router.get('addHostController');
+ controller.setCurrentStep('5', false);
+ controller.loadAllPriorSteps();
+ controller.connectOutlet('wizardStep6', controller.get('content'));
+ },
+ back: Em.Router.transitionTo('step4'),
+ next: function(router){
+ var addHostController = router.get('addHostController');
+ var wizardStep6Controller = router.get('wizardStep6Controller');
+
+ if(wizardStep6Controller.validate()){
+ addHostController.saveSlaveComponentHosts(wizardStep6Controller);
+ router.transitionTo('step7');
+ }
}
}),
-// step5: Em.Route.extend({
-// route: '/step5',
-// connectOutlets: function (router, context) {
-// router.setNavigationFlow('step5');
-// router.setInstallerCurrentStep('5', false);
-// router.get('installerController').connectOutlet('installerStep5');
-// },
-// back: Em.Router.transitionTo('step4'),
-// next: Em.Router.transitionTo('step6')
-// }),
-//
// step6: Em.Route.extend({
// route: '/step6',
// connectOutlets: function (router, context) {
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css Sat Oct 20 17:12:55 2012
@@ -163,7 +163,8 @@
}
/*End Carousel*//*End Hosts*/
-#add-host .back{
+#add-host .back,
+#add-service .back{
display: block;
width: 105px;
margin-bottom: 10px;
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Sat Oct 20 17:12:55 2012
@@ -167,13 +167,13 @@ h1 {
/***************
* Ambari wide icon colors
***************/
-.icon-ok{
- color: #5AB400;
+.icon-ok {
+ color: #5AB400;
}
-.icon-remove{
- color: #FF4B4B;
+
+.icon-remove {
+ color: #FF4B4B;
}
-
#installer, #add-host {
h2 {
@@ -242,12 +242,12 @@ h1 {
}
.slave-component-group-menu {
float: left;
- .nav{
+ .nav {
margin-bottom: 10px;
}
- .nav li{
+ .nav li {
position: relative;
- a{
+ a {
padding-right: 24px;
}
i {
@@ -256,13 +256,14 @@ h1 {
right: 7px;
top: 10px;
z-index: 2;
+ cursor: default;
}
i:hover {
border: 1px solid grey;
}
}
}
- .remove-group-error{
+ .remove-group-error {
display: none;
}
.add-slave-component-group {
@@ -404,11 +405,11 @@ a:focus {
}
.service {
- position:relative;
+ position: relative;
margin-top: 10px;
border-bottom: 1px solid #b8b8b8;
padding-left: 10px;
- width: 540px;
+ margin-right: 20px;
.name {
line-height: 21px;
@@ -426,15 +427,19 @@ a:focus {
margin-top: 14px;
color: #7b7b7b;
font-size: 13px;
- width: 410px;
+ width: 80%;
+ tr > td:first-child {
+ padding-right: 10px;
+ text-align: right !important;
+ }
th, td {
- line-height: 8px !important;
+ padding: 4px;
}
}
.chart {
right: 0;
- top: 5px;
+ top: 27px;
position: absolute;
overflow: visible; // for quick links
text-align: center;
@@ -446,14 +451,19 @@ a:focus {
}
}
}
+
#summary-info {
- margin: 10px 0;
-/*
+ border-top: none;
+ border-collapse: collapse;
+
+ td.summary-label {
+ text-align: right;
+ }
+
tr td:first-child {
- font-weight: bold;
- background: #d0d0d0;
+ text-align: right;
}
-*/
+
a {
text-decoration: underline;
&:hover {
@@ -461,6 +471,7 @@ a:focus {
}
}
}
+
.more-stats {
display: block;
width: 100%;
@@ -478,6 +489,7 @@ a:focus {
/*start alerts summary*/
.alerts {
+ border: 1px solid #ddd;
margin: 0px;
max-height: 500px;
overflow-y: auto;
@@ -518,7 +530,7 @@ a:focus {
padding-left: 7px;
}
}
-
+
}
.go-to {
@@ -565,6 +577,12 @@ a:focus {
margin-top: -48px;
}
+.service-content {
+ #summary-info {
+ margin-bottom: 0;
+ }
+}
+
/*End Services*/
/*Hosts*/
@@ -594,7 +612,7 @@ a:focus {
margin-bottom: 5px;
}
.box-header .host-title {
- margin:0;
+ margin: 0;
padding-left: 17px;
}
.box-header .button-section {
@@ -623,7 +641,7 @@ a:focus {
background: #F5F5F5;
}
.host-components .btn-group {
- margin:0 5px 10px 0;
+ margin: 0 5px 10px 0;
}
}
@@ -948,7 +966,7 @@ ul.filter {
display: block !important;
}
-.displayInline {
+.display-inline-block {
display: inline-block !important;
}
@@ -1074,4 +1092,80 @@ ul.inline li {
.table.no-borders th, .table.no-borders td {
border-top: none;
}
+
/* UNIVERSAL STYLES END */
+
+/* METRIC FILTERING WIDGET */
+.metric-filtering-widget {
+
+ .title {
+ padding-top: 4px;
+ }
+
+ .accordion {
+ background: none repeat scroll 0 0 #FFFFFF;
+ border: 1px solid;
+ font-size: 12px;
+ padding: 5px 0;
+ position: absolute;
+
+ .accordion-group {
+ border: none;
+
+ .accordion-heading {
+ .accordion-toggle {
+ padding: 0 5px;
+ }
+ i {
+ text-decoration: none;
+ }
+ }
+
+ .accordion-body {
+ .accordion-inner {
+ border: none;
+ padding: 0 8px;
+ width: 160px;
+
+ ul.items {
+ border: 1px solid #000;
+ list-style: none;
+ border-bottom: none;
+
+ li {
+ border-bottom: 1px solid;
+ line-height: 12px;
+ padding: 2px 5px;
+ padding: 2px 5px;
+ }
+
+ li.disabled {
+ a {
+ color: #999999;
+ }
+ }
+
+ }
+ }
+ }
+ }
+ }
+}
+
+/* METRIC FILTERING WIDGET END */
+
+/* TIME RANGE WIDGET */
+
+/* css for timepicker */
+.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
+.ui-timepicker-div dl { text-align: left; }
+.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
+.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
+.ui-timepicker-div td { font-size: 90%; }
+.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
+
+.ui-timepicker-rtl{ direction: rtl; }
+.ui-timepicker-rtl dl { text-align: right; }
+.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }
+
+/* TIME RANGE WIDGET END */
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs Sat Oct 20 17:12:55 2012
@@ -15,9 +15,46 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
-Metrics <i class="icon-question-sign"></i>
-<ul class="displayInline nav nav-pills">
+<div class="span title">
+ Metrics <i class="icon-question-sign"></i>
+</div>
+<ul class="display-inline-block nav nav-pills">
{{#each metric in view.metrics}}
- {{view view.itemView metricBinding="metric"}}
+ {{view view.itemView metricBinding="metric" widgetBinding="view"}}
{{/each}}
+
+ <li class="dropdown">
+ <a {{action toggleMore target="view"}} href="#">
+ {{t metric.more}}
+ <b class="caret"></b>
+ </a>
+
+ {{#if view.showMore}}
+ <div class="accordion" id="metricAccordion">
+ {{#each view.moreMetrics}}
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#metricAccordion"
+ href="#{{unbound code}}Collapse">
+ <i class="icon-play"></i>{{unbound label}}
+ </a>
+ </div>
+ <div id="{{unbound code}}Collapse" class="accordion-body collapse">
+ <div class="accordion-inner">
+ {{#if items.length }}
+ <ul class="items">
+ {{#each metric in items}}
+ {{view view.moreItemView metricBinding="metric" widgetBinding="view"}}
+ {{/each}}
+ </ul>
+ {{else}}
+ no items found
+ {{/if}}
+ </div>
+ </div>
+ </div>
+ {{/each}}
+ </div>
+ {{/if}}
+ </li>
</ul>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs?rev=1400489&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs Sat Oct 20 17:12:55 2012
@@ -0,0 +1,27 @@
+<!--
+* 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.
+-->
+<div class="span title">
+ Time Range <i class="icon-question-sign"></i>
+</div>
+<ul class="display-inline-block nav nav-pills">
+ {{#each preset in view.presets}}
+ {{view view.presetView presetBinding="preset" widgetBinding="view"}}
+ {{/each}}
+ From {{view view.dateFromView}}
+ To {{view view.dateToView}}
+</ul>
\ No newline at end of file
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts.hbs?rev=1400489&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts.hbs Sat Oct 20 17:12:55 2012
@@ -0,0 +1,15 @@
+{{#if view.hasNoHosts}}
+ none -
+ <a href="#" {{action showEditSlaveComponentGroups view.serviceConfig.category target="App.router.slaveComponentGroupsController"}}>
+ select hosts for this group
+ </a>
+{{else}}
+<a href="#" {{action showEditSlaveComponentGroups view.serviceConfig.category target="App.router.slaveComponentGroupsController"}}>
+ {{#if view.hasOneHost}}
+ {{view.hosts.firstObject.hostname}}
+ {{/if}}
+ {{#if view.hasMultipleHosts}}
+ {{view.hosts.firstObject.hostname}} and {{view.otherLength}}
+ {{/if}}
+</a>
+{{/if}}
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts_popup.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts_popup.hbs?rev=1400489&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts_popup.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/slave_component_hosts_popup.hbs Sat Oct 20 17:12:55 2012
@@ -0,0 +1,31 @@
+<div id="slave-hosts-popup" class="alert alert-info">Select which hosts should belong to which {{selectedComponentName}} group.</div>
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Host</th>
+ <th>Group</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#each host in hosts}}
+ <tr>
+ <td>
+ <label>{{host.hostname}}</label>
+ </td>
+ <td>
+ {{#view App.SlaveComponentDropDownGroupView contentBinding="host"}}
+ <select>
+ {{#each groupName in controller.getGroupsForDropDown}}
+ {{#view view.optionTag contentBinding="groupName"}}
+ <option value="{{unbound groupName}}" {{bindAttr selected="view.selected"}} {{action changeGroup target="view"}}>
+ {{unbound groupName}}
+ </option>
+ {{/view}}
+ {{/each}}
+ </select>
+ {{/view}}
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+</table>
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs Sat Oct 20 17:12:55 2012
@@ -57,24 +57,13 @@
{{/if}}
<form class="form-horizontal">
{{#if category.isForSlaveComponent}}
- {{#each group in App.router.slaveComponentGroupsController.componentGroups}}
- {{#if group.active}}
- {{#view App.SlaveComponentGroupView contentBinding="group" }}
- <div class="control-group">
- <label class="control-label">Group name</label>
- <div class="controls">
- <input class="span6" type="text" value="{{unbound group.name}}">
- <span class="help-inline"></span>
- </div>
- </div>
- <!--<div class="control-group">-->
- <!--<label class="control-label">DataNode hosts</label>-->
- <!--<div class="controls">-->
- <!--</div>-->
- <!--</div>-->
- {{/view}}
- {{/if}}
- {{/each}}
+ <div class="control-group">
+ <label class="control-label">Group name</label>
+ <div class="controls">
+ <input class="span6" type="text" {{bindAttr value="App.router.slaveComponentGroupsController.activeGroup.name"}}>
+ <span class="help-inline"></span>
+ </div>
+ </div>
{{/if}}
{{#each view.categoryConfigs}}
<div {{bindAttr class="errorMessage:error: :control-group"}}>
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs Sat Oct 20 17:12:55 2012
@@ -17,5 +17,6 @@
-->
{{view App.MetricFilteringWidget controllerBinding="App.router.mainChartsController"}}
- {{view App.MainChartsMenuView}}
+{{view App.TimeRangeWidget controllerBinding="App.router.mainChartsController"}}
+{{view App.MainChartsMenuView}}
{{outlet}}
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs Sat Oct 20 17:12:55 2012
@@ -25,12 +25,12 @@
<h4>{{t dashboard.services}}</h4>
</div>
<dl class="dl-horizontal services">
- {{view App.MainDashboardServiceHdfsView servicesBinding="controller.services"}}
- {{view App.MainDashboardServiceMapreduceView servicesBinding="controller.services"}}
- {{view App.MainDashboardServiceHbaseView servicesBinding="controller.services"}}
- {{view App.MainDashboardServiceHiveView servicesBinding="controller.services"}}
- {{view App.MainDashboardServiceZookeperView servicesBinding="controller.services"}}
- {{view App.MainDashboardServiceOozieView servicesBinding="controller.services"}}
+ {{view App.MainDashboardServiceHdfsView controllerBinding="controller"}}
+ {{view App.MainDashboardServiceMapreduceView controllerBinding="controller"}}
+ {{view App.MainDashboardServiceHbaseView controllerBinding="controller"}}
+ {{view App.MainDashboardServiceHiveView controllerBinding="controller"}}
+ {{view App.MainDashboardServiceZookeperView controllerBinding="controller"}}
+ {{view App.MainDashboardServiceOozieView controllerBinding="controller"}}
</dl>
</div>
</div>
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hbase.hbs Sat Oct 20 17:12:55 2012
@@ -34,13 +34,13 @@
<!-- Master Server Heap -->
<tr>
<td>{{t dashboard.services.hbase.masterServerHeap}}</td>
- <td>?</td>
+ <td>{{view.masterServerHeapSummary}}</td>
</tr>
<!-- Average load -->
<tr>
<td>{{t dashboard.services.hbase.averageLoad}}</td>
- <td>?</td>
+ <td>{{view.data.average_load}}</td>
</tr>
<!-- Region Servers -->
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/hdfs.hbs Sat Oct 20 17:12:55 2012
@@ -50,7 +50,7 @@
<!-- Total Files And Directories -->
<tr>
<td>{{t dashboard.services.hdfs.totalFilesAndDirs}}</td>
- <td>?</td>
+ <td>{{view.data.total_files_and_dirs}}</td>
</tr>
<!-- NameNode Uptime -->
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs?rev=1400489&r1=1400488&r2=1400489&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs Sat Oct 20 17:12:55 2012
@@ -45,13 +45,13 @@
<!-- Map Slots -->
<tr>
<td>{{t dashboard.services.mapreduce.mapSlots}}</td>
- <td>?</td>
+ <td>{{view.mapSlotsSummary}}</td>
</tr>
<!-- Reduce Slots -->
<tr>
<td>{{t dashboard.services.mapreduce.reduceSlots}}</td>
- <td>?</td>
+ <td>{{view.reduceSlotsSummary}}</td>
</tr>
<!-- Job Tracker Uptime -->
@@ -63,7 +63,7 @@
<!-- JobTracker Heap -->
<tr>
<td>{{t dashboard.services.mapreduce.jobTrackerHeap}}</td>
- <td>?</td>
+ <td>{{view.trackersHeapSummary}}</td>
</tr>
<!-- Hosts -->