Author: yusaku
Date: Fri Jan 11 01:06:33 2013
New Revision: 1431775
URL: http://svn.apache.org/viewvc?rev=1431775&view=rev
Log:
AMBARI-1145. Cluster Management refactoring. (yusaku)
Added:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/alert_notification_popup.hbs
Removed:
incubator/ambari/trunk/ambari-web/app/templates/main/service/alert_notification_popup.hbs
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/host/add_controller.js
incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
incubator/ambari/trunk/ambari-web/app/data/service_configs.js
incubator/ambari/trunk/ambari-web/app/initialize.js
incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js
incubator/ambari/trunk/ambari-web/app/messages.js
incubator/ambari/trunk/ambari-web/app/router.js
incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js
incubator/ambari/trunk/ambari-web/app/styles/application.less
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hive.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/oozie.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs
incubator/ambari/trunk/ambari-web/app/templates/main/service/menu_item.hbs
incubator/ambari/trunk/ambari-web/app/templates/wizard/step2.hbs
incubator/ambari/trunk/ambari-web/app/utils/db.js
incubator/ambari/trunk/ambari-web/app/utils/string_utils.js
incubator/ambari/trunk/ambari-web/app/views/main/dashboard.js
incubator/ambari/trunk/ambari-web/app/views/main/service.js
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/host/add_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/host/add_controller.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/main/host/add_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/main/host/add_controller.js
Fri Jan 11 01:06:33 2013
@@ -23,7 +23,7 @@ App.AddHostController = App.WizardContro
name: 'addHostController',
- totalSteps: 7,
+ totalSteps: 6,
/**
* Used for hiding back button in wizard
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js Fri
Jan 11 01:06:33 2013
@@ -93,7 +93,7 @@ App.MainServiceItemController = Em.Contr
self.content.set('workStatus', App.Service.Health.live);
}, 10000);
} else {
- App.router.get('clusterController').loadUpdatedStatus();
+ App.router.get('clusterController').loadUpdatedStatusDelayed(500);
App.router.get('backgroundOperationsController.eventsArray').push({
"when": function (controller) {
var result =
(controller.getOperationsForRequestId(requestId).length == 0);
@@ -146,7 +146,7 @@ App.MainServiceItemController = Em.Contr
self.content.set('workStatus', App.Service.Health.dead);
}, 10000);
} else {
- App.router.get('clusterController').loadUpdatedStatus();
+ App.router.get('clusterController').loadUpdatedStatusDelayed(500);
App.router.get('backgroundOperationsController.eventsArray').push({
"when": function (controller) {
var result =
(controller.getOperationsForRequestId(requestId).length == 0);
Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard.js Fri Jan 11
01:06:33 2013
@@ -191,6 +191,7 @@ App.WizardController = Em.Controller.ext
* Temporary function for wizardStep9, before back-end integration
*/
setInfoForStep9: function () {
+
var hostInfo = App.db.getHosts();
for (var index in hostInfo) {
hostInfo[index].status = "pending";
@@ -230,7 +231,7 @@ App.WizardController = Em.Controller.ext
saveClusterStatus: function (clusterStatus) {
var oldStatus = this.toObject(this.get('content.cluster'));
clusterStatus = jQuery.extend(oldStatus, clusterStatus);
- if(clusterStatus.requestId &&
+ if (clusterStatus.requestId &&
clusterStatus.oldRequestsId.indexOf(clusterStatus.requestId) === -1){
clusterStatus.oldRequestsId.push(clusterStatus.requestId);
}
@@ -247,6 +248,8 @@ App.WizardController = Em.Controller.ext
return;
}
+ this.set('content.cluster.requestId', null);
+
var self = this;
var clusterName = this.get('content.cluster.name');
var url;
@@ -376,6 +379,12 @@ App.WizardController = Em.Controller.ext
console.log(this.get('name') + ": saved " + name, value);
},
+ clear: function () {
+ this.set('content', Ember.Object.create({'controllerName':
this.get('content.controllerName')}));
+ this.set('currentStep', 0);
+ this.clearStorageData();
+ },
+
clusterStatusTemplate : {
name: "",
status: "PENDING",
@@ -400,12 +409,12 @@ App.WizardController = Em.Controller.ext
App.db.setAllHostNamesPattern(undefined);
},
- installOptionsTemplate : {
+ installOptionsTemplate: {
hostNames: "", //string
manualInstall: false, //true, false
useSsh: true, //bool
isJavaHome : false, //bool
- javaHome: '', //string
+ javaHome: App.defaultJavaHome, //string
localRepo: false, //true, false
sshKey: "", //string
bootRequestId: null //string
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
Fri Jan 11 01:06:33 2013
@@ -66,7 +66,16 @@ App.WizardStep2Controller = Em.Controlle
return result;
},
+ checkHosts: function() {
+ if (this.get('hostNames').trim() !== '') {
+ App.db.setStep2WizardFirstRun(false);
+ }
+ }.observes('hostNames'),
+
hostsError: function () {
+ if (App.db.getStep2WizardFirstRun()) {
+ return null;
+ }
if (this.get('hasSubmitted') && this.get('hostNames').trim() === '') {
return Em.I18n.t('installer.step2.hostName.error.required');
} else if (this.isAllHostNamesValid() === false) {
@@ -217,7 +226,7 @@ App.WizardStep2Controller = Em.Controlle
},
isSubmitDisabled: function () {
- return (this.get('hostsError') || this.get('sshKeyError'));
+ return (this.get('hostsError') || this.get('sshKeyError') ||
(this.get('hostNames').trim() === '' && App.db.getStep2WizardFirstRun()));
}.property('hostsError', 'sshKeyError'),
saveHosts: function(){
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
Fri Jan 11 01:06:33 2013
@@ -1099,6 +1099,9 @@ App.WizardStep8Controller = Em.Controlle
console.log("STEP8: name of the global property is: " +
_globalSiteObj.name);
console.log("STEP8: value of the global property is: " +
_globalSiteObj.value);
}
+ if (_globalSiteObj.name == 'java64_home') {
+ globalSiteProperties['java64_home'] =
this.get('content.installOptions.javaHome');
+ }
}, this);
return {"type": "global", "tag": "version1", "properties":
globalSiteProperties};
},
Modified: incubator/ambari/trunk/ambari-web/app/data/service_configs.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/service_configs.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/service_configs.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/service_configs.js Fri Jan 11
01:06:33 2013
@@ -117,7 +117,7 @@ module.exports = [
serviceName: 'MISC',
displayName: 'Misc',
configCategories: [
- App.ServiceConfigCategory.create({ name: 'General'}),
+ /*App.ServiceConfigCategory.create({ name: 'General'}),*/
App.ServiceConfigCategory.create({ name: 'Users and Groups'})
],
configs: configProperties.filterProperty('serviceName', 'MISC')
Modified: incubator/ambari/trunk/ambari-web/app/initialize.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/initialize.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/initialize.js (original)
+++ incubator/ambari/trunk/ambari-web/app/initialize.js Fri Jan 11 01:06:33 2013
@@ -25,6 +25,7 @@ App.alwaysGoToInstaller = false;
App.apiPrefix = '/api/v1';
App.defaultStackVersion = 'HDP-1.2.0';
App.defaultLocalStackVersion = 'HDPLocal-1.2.0';
+App.defaultJavaHome = '/usr/jdk/jdk1.6.0_31';
App.addServicesEnabled = false;
// default AJAX timeout
App.timeout = 20000;
Modified: incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js (original)
+++ incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js Fri Jan 11
01:06:33 2013
@@ -14,6 +14,7 @@
* License for the specific language governing permissions and limitations
under
* the License.
*/
+var stringUtils = require('utils/string_utils');
App.servicesMapper = App.QuickDataMapper.create({
servicesSortOrder: [
@@ -149,6 +150,17 @@ App.servicesMapper = App.QuickDataMapper
var finalConfig = jQuery.extend({}, this.config);
var finalJson = [];
item.host_components = [];
+// var json = this.parseIt(item, this.config);
+// if(App.Service.find().someProperty('id', json.id)){
+// var fieldsToUpdate = [
+// 'work_status',
+// 'components',
+// 'host_components'
+// ]
+// this.updateRecord(App.Service.find().findProperty('id', json.id),
json, fieldsToUpdate);
+// return;
+// }
+
if
(this.get('model').find(item.ServiceInfo.service_name).get('isLoaded')) {
this.update(item);
return;
@@ -464,24 +476,21 @@ App.servicesMapper = App.QuickDataMapper
finalJson.quick_links = [13, 14, 15, 16, 17, 18];
return finalJson;
},
- _update: function(model, json){
- var content = model.find();
- var addArray = [];
- for(var i in json){
- var item = json[i];
- var oldItem = content.findProperty('id', item.id);
- if(oldItem){
-
- for(var field in item){ ///<--
- if(field !== 'id'){
- oldItem.set(field, item[field]); //<--
- }
+ updateRecord: function (record, json, fieldsToUpdate) {
+ for (var field in fieldsToUpdate) {
+ if (json[field] !== undefined) {
+ if(json[field] instanceof Array){
+ this.updateHasMany(record, stringUtils.underScoreToCamelCase(field),
json[field]);
+ } else {
+ record.set(stringUtils.underScoreToCamelCase(field), json[field]);
}
-
- } else {
- addArray.push(item);
}
}
- App.store.loadMany(model, addArray);
+ },
+ updateHasMany: function(record, field, items ){
+ record.get(field).clear();
+ items.forEach(function (item) {
+
record.get(field).pushObject(record.get(field).type.find().findProperty('id',
item));
+ });
}
});
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Fri Jan 11 01:06:33 2013
@@ -98,17 +98,18 @@ Em.I18n.translations = {
'hosts in your cluster. In these situations, you must set up a version of
the repository that your machines can ' +
'access locally and this is called a <b>Local Software Repository</b>',
'installer.step2.javaHome.label' : 'Path to 64-bit JDK',
+ 'installer.step2.javaHome.label2' : 'on all hosts',
'installer.step2.javaHome.tooltip.title' : 'JAVA_HOME',
'installer.step2.javaHome.tooltip.content' : 'Path to 64-bit JAVA_HOME.
/usr/jdk/jdk1.6.0_31 is the default used by Ambari. You can override this to a
specific path that contains the JDK. <br/> Note: the path must be valid on
<b>ALL</b> hosts in your cluster.',
'installer.step2.useSsh.provide' : 'Provide your',
- 'installer.step2.useSsh.provide_id_rsa' : '(id_rsa for root) and use SSH to
automatically',
+ 'installer.step2.useSsh.provide_id_rsa' : '(id_rsa for root) and use SSH to
automatically register hosts',
'installer.step2.useSsh.tooltip.title':'SSH Private Key',
'installer.step2.useSsh.tooltip.content':'The <b>SSH Private Key File</b> is
used for the root access to the target hosts in your cluster.',
'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.body':'You must install Ambari Agents
on each host you want to manage before you proceed.',
'installer.step3.header':'Confirm Hosts',
'installer.step3.body':'Registering your hosts.<br>' +
Modified: incubator/ambari/trunk/ambari-web/app/router.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/router.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/router.js (original)
+++ incubator/ambari/trunk/ambari-web/app/router.js Fri Jan 11 01:06:33 2013
@@ -35,9 +35,13 @@ App.Router = Em.Router.extend({
clearAllSteps: function() {
- this.set('installerController.content', []);
- this.set('installerController.currentStep', 0);
- this.set('wizardStep2Controller.hasSubmitted', false);
+ this.get('installerController').clear();
+ this.get('addHostController').clear();
+ this.get('addServiceController').clear();
+ for (i = 1; i<11; i++) {
+ this.set('wizardStep' + i + 'Controller.hasSubmitted', false);
+ this.set('wizardStep' + i + 'Controller.isDisabled', true);
+ }
},
/**
Modified: incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/add_host_routes.js Fri Jan 11
01:06:33 2013
@@ -24,6 +24,7 @@ module.exports = Em.Route.extend({
Ember.run.next(function () {
var addHostController = router.get('addHostController');
+ App.db.setStep2WizardFirstRun(true);
App.router.get('updateController').set('isWorking', false);
App.ModalPopup.show({
classNames: ['full-width-modal'],
@@ -149,6 +150,10 @@ module.exports = Em.Route.extend({
addHostController.get('content').set('serviceConfigProperties', null);
App.db.setServiceConfigProperties(null);
addHostController.loadAdvancedConfigs();
+ var wizardStep7Controller = router.get('wizardStep7Controller');
+ wizardStep7Controller.set('content', addHostController.get('content'));
+ wizardStep7Controller.loadStep();
+ addHostController.saveServiceConfigProperties(wizardStep7Controller);
router.transitionTo('step4');
}
}
@@ -156,20 +161,21 @@ module.exports = Em.Route.extend({
step4: Em.Route.extend({
route: '/step4',
- connectOutlets: function (router) {
+ connectOutlets: function (router, context) {
console.log('in addHost.step4:connectOutlets');
var controller = router.get('addHostController');
controller.setCurrentStep('4');
controller.dataLoading().done(function () {
controller.loadAllPriorSteps();
- controller.connectOutlet('wizardStep7', controller.get('content'));
+ controller.connectOutlet('wizardStep8', controller.get('content'));
})
},
back: Em.Router.transitionTo('step3'),
next: function (router) {
var addHostController = router.get('addHostController');
- var wizardStep7Controller = router.get('wizardStep7Controller');
- addHostController.saveServiceConfigProperties(wizardStep7Controller);
+ var wizardStep8Controller = router.get('wizardStep8Controller');
+ addHostController.installServices();
+ addHostController.setInfoForStep9();
router.transitionTo('step5');
}
}),
@@ -182,41 +188,20 @@ module.exports = Em.Route.extend({
controller.setCurrentStep('5');
controller.dataLoading().done(function () {
controller.loadAllPriorSteps();
- controller.connectOutlet('wizardStep8', controller.get('content'));
- })
- },
- back: Em.Router.transitionTo('step4'),
- next: function (router) {
- var addHostController = router.get('addHostController');
- var wizardStep8Controller = router.get('wizardStep8Controller');
- addHostController.installServices();
- addHostController.setInfoForStep9();
- router.transitionTo('step6');
- }
- }),
-
- step6: Em.Route.extend({
- route: '/step6',
- connectOutlets: function (router, context) {
- console.log('in addHost.step6:connectOutlets');
- var controller = router.get('addHostController');
- controller.setCurrentStep('6');
- controller.dataLoading().done(function () {
- controller.loadAllPriorSteps();
if (!App.testMode) { //if test mode is ON don't disable
prior steps link.
- controller.setLowerStepsDisable(6);
+ controller.setLowerStepsDisable(5);
}
controller.connectOutlet('wizardStep9', controller.get('content'));
})
},
- back: Em.Router.transitionTo('step5'),
+ back: Em.Router.transitionTo('step4'),
retry: function(router,context) {
var addHostController = router.get('addHostController');
var wizardStep9Controller = router.get('wizardStep9Controller');
if (!wizardStep9Controller.get('isSubmitDisabled')) {
if (wizardStep9Controller.get('content.cluster.status') !== 'START
FAILED') {
- addHostController.installServices(true);
- addHostController.setInfoForStep9();
+ addHostController.installServices(true);
+ addHostController.setInfoForStep9();
} else {
wizardStep9Controller.set('content.cluster.isCompleted', false);
}
@@ -230,22 +215,22 @@ module.exports = Em.Route.extend({
var addHostController = router.get('addHostController');
var wizardStep9Controller = router.get('wizardStep9Controller');
addHostController.saveInstalledHosts(wizardStep9Controller);
- router.transitionTo('step7');
+ router.transitionTo('step6');
}
}),
- step7: Em.Route.extend({
- route: '/step7',
+ step6: Em.Route.extend({
+ route: '/step6',
connectOutlets: function (router, context) {
- console.log('in addHost.step7:connectOutlets');
+ console.log('in addHost.step6:connectOutlets');
var controller = router.get('addHostController');
- controller.setCurrentStep('7');
+ controller.setCurrentStep('6');
controller.dataLoading().done(function () {
controller.loadAllPriorSteps();
controller.connectOutlet('wizardStep10', controller.get('content'));
})
},
- back: Em.Router.transitionTo('step6'),
+ back: Em.Router.transitionTo('step5'),
complete: function (router, context) {
if (true) { // this function will be moved to installerController
where it will validate
var addHostController = router.get('addHostController');
Modified: incubator/ambari/trunk/ambari-web/app/styles/application.less
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/styles/application.less?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/trunk/ambari-web/app/styles/application.less Fri Jan 11
01:06:33 2013
@@ -279,6 +279,9 @@ h1 {
color: #ccc;
}
}
+ .java-home {
+ margin-bottom: 10px
+ }
}
#confirm-hosts {
#host-filter {
@@ -534,8 +537,9 @@ a:focus {
.sixty-percent-width-modal {
.modal {
width: 60%;
- margin: -45% 0 0 -30%;
+ margin: 0 0 0 -30%;
max-height: 526px;
+ top:5%;
}
.modal-body{
Added:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/alert_notification_popup.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/alert_notification_popup.hbs?rev=1431775&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/alert_notification_popup.hbs
(added)
+++
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/alert_notification_popup.hbs
Fri Jan 11 01:06:33 2013
@@ -0,0 +1,30 @@
+{{!
+* 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.
+}}
+
+<p>You have {{view.warnAlertsCount}} critical alert notification(s).</p>
+{{#if view.warnAlertsCount}}
+ <ul id='summary-alerts-list' class="alerts">
+ {{#each view.warnAlerts}}
+ {{view App.AlertItemView contentBinding="this"}}
+ {{/each}}
+ </ul>
+{{/if}}
+<p class="alertsPopupLinks">
+ <a href="#" {{action selectService}}>{{t services.alerts.goToService}}</a>
+ <a {{bindAttr href="view.nagiosUrl"}} target="_blank" {{action
"closePopup" on="mouseUp"}}>{{t services.alerts.goToNagios}}</a>
+</p>
\ No newline at end of file
Modified:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs
(original)
+++
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs
Fri Jan 11 01:06:33 2013
@@ -27,7 +27,9 @@
{{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
<a {{action selectService view.service
href=true}}>{{view.service.displayName}}</a>
{{#if view.criticalAlertsCount}}
- <a {{action selectService view.service href=true}} class="label
label-important">{{view.criticalAlertsCount}}</a>
+ <a href="#" class="label label-important" {{action "showAlertsPopup"
view.service target="view.parentView"}}>
+ {{view.criticalAlertsCount}}
+ </a>
{{/if}}
</div>
<div class="summary span">
Modified:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hdfs.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
(original)
+++
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
Fri Jan 11 01:06:33 2013
@@ -27,7 +27,9 @@
{{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
<a {{action selectService view.service
href=true}}>{{view.service.displayName}}</a>
{{#if view.criticalAlertsCount}}
- <a {{action selectService view.service href=true}} class="label
label-important">{{view.criticalAlertsCount}}</a>
+ <a href="#" class="label label-important" {{action "showAlertsPopup"
view.service target="view.parentView"}}>
+ {{view.criticalAlertsCount}}
+ </a>
{{/if}}
</div>
<div class="summary span">
Modified:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hive.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hive.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hive.hbs
(original)
+++
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hive.hbs
Fri Jan 11 01:06:33 2013
@@ -22,7 +22,9 @@
{{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
<a {{action selectService view.service
href=true}}>{{view.service.displayName}}</a>
{{#if view.criticalAlertsCount}}
- <a {{action selectService view.service href=true}} class="label
label-important">{{view.criticalAlertsCount}}</a>
+ <a href="#" class="label label-important" {{action "showAlertsPopup"
view.service target="view.parentView"}}>
+ {{view.criticalAlertsCount}}
+ </a>
{{/if}}
</div>
<div class="summary span">
Modified:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
(original)
+++
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
Fri Jan 11 01:06:33 2013
@@ -27,7 +27,9 @@
{{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
<a {{action selectService view.service
href=true}}>{{view.service.displayName}}</a>
{{#if view.criticalAlertsCount}}
- <a {{action selectService view.service href=true}} class="label
label-important">{{view.criticalAlertsCount}}</a>
+ <a href="#" class="label label-important" {{action "showAlertsPopup"
view.service target="view.parentView"}}>
+ {{view.criticalAlertsCount}}
+ </a>
{{/if}}
</div>
<div class="summary span">
Modified:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/oozie.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/oozie.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/oozie.hbs
(original)
+++
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/oozie.hbs
Fri Jan 11 01:06:33 2013
@@ -22,7 +22,9 @@
{{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
<a {{action selectService view.service
href=true}}>{{view.service.displayName}}</a>
{{#if view.criticalAlertsCount}}
- <a {{action selectService view.service href=true}} class="label
label-important">{{view.criticalAlertsCount}}</a>
+ <a href="#" class="label label-important" {{action "showAlertsPopup"
view.service target="view.parentView"}}>
+ {{view.criticalAlertsCount}}
+ </a>
{{/if}}
</div>
<div class="summary span">
Modified:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs
(original)
+++
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/zookeeper.hbs
Fri Jan 11 01:06:33 2013
@@ -22,7 +22,9 @@
{{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
<a {{action selectService view.service
href=true}}>{{view.service.displayName}}</a>
{{#if view.criticalAlertsCount}}
- <a {{action selectService view.service href=true}} class="label
label-important">{{view.criticalAlertsCount}}</a>
+ <a href="#" class="label label-important" {{action "showAlertsPopup"
view.service target="view.parentView"}}>
+ {{view.criticalAlertsCount}}
+ </a>
{{/if}}
</div>
<div class="summary span">
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host/add.hbs Fri Jan
11 01:06:33 2013
@@ -31,10 +31,9 @@
<li {{bindAttr class="isStep1:active
view.isStep1Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep1 target="controller"}}>{{t installer.step2.header}}</a></li>
<li {{bindAttr class="isStep2:active
view.isStep2Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep2 target="controller"}}>{{t installer.step3.header}}</a></li>
<li {{bindAttr class="isStep3:active
view.isStep3Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep3 target="controller"}}>{{t installer.step6.header}}</a></li>
- <li {{bindAttr class="isStep4:active
view.isStep4Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep4 target="controller"}}>{{t installer.step7.header}}</a></li>
- <li {{bindAttr class="isStep5:active
view.isStep5Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep5 target="controller"}}>{{t installer.step8.header}}</a></li>
- <li {{bindAttr class="isStep6:active
view.isStep6Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep6 target="controller"}}>{{t installer.step9.header}}</a></li>
- <li {{bindAttr class="isStep7:active
view.isStep7Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep7 target="controller"}}>{{t installer.step10.header}}</a></li>
+ <li {{bindAttr class="isStep4:active
view.isStep4Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep4 target="controller"}}>{{t installer.step8.header}}</a></li>
+ <li {{bindAttr class="isStep5:active
view.isStep5Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep5 target="controller"}}>{{t installer.step9.header}}</a></li>
+ <li {{bindAttr class="isStep6:active
view.isStep6Disabled:disabled"}}><a href="javascript:void(null);" {{action
gotoStep6 target="controller"}}>{{t installer.step10.header}}</a></li>
</ul>
</div>
</div>
Modified:
incubator/ambari/trunk/ambari-web/app/templates/main/service/menu_item.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/service/menu_item.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/service/menu_item.hbs
(original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/service/menu_item.hbs
Fri Jan 11 01:06:33 2013
@@ -20,7 +20,7 @@
{{view App.MainDashboardServiceHealthView class="service-health"
serviceBinding="view.content"}}
<span>{{unbound view.content.displayName}}</span>
{{#if view.alertsCount}}
- <span class="label operations-count" {{action "showAlertsPopup"
view.content on="click" target="view.parentView.parentView"}}>
+ <span class="label operations-count">
{{view.alertsCount}}
</span>
{{/if}}
Modified: incubator/ambari/trunk/ambari-web/app/templates/wizard/step2.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/wizard/step2.hbs?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/wizard/step2.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/wizard/step2.hbs Fri Jan 11
01:06:33 2013
@@ -89,7 +89,7 @@
<div class="advancedOptions">
<h5>{{t installer.step2.advancedOptions.header}}</h5>
- <label {{bindAttr class=":checkbox
content.installOptions.localRepo::disabled"}}>
+ <label {{bindAttr class=":checkbox"}}>
{{view Ember.Checkbox checkedBinding="content.installOptions.localRepo"}}
{{t installer.step2.localRepo.label_use}}
@@ -101,18 +101,21 @@
{{t installer.step2.localRepo.label_instead}}
</label>
- <label {{bindAttr class=":checkbox
content.installOptions.isJavaHome::disabled"}}>
+ <label {{bindAttr class=":checkbox"}}>
+ <div class="java-home">
{{view Ember.Checkbox
checkedBinding="content.installOptions.isJavaHome"}}
{{t installer.step2.javaHome.label}}
<a href="javascript:void(null)"
rel="popover"
{{translateAttr title="installer.step2.javaHome.tooltip.title"
data-content="installer.step2.javaHome.tooltip.content"}}>
{{t installer.step2.javaHome.tooltip.title}}</a>
- {{view App.WizardTextField
valueBinding="content.installOptions.javaHome"
placeholder="/usr/jdk/jdk1.6.0_31"}}
+ {{t installer.step2.javaHome.label2}}
+ </div>
+ {{view App.WizardTextField
valueBinding="content.installOptions.javaHome"
placeholder="/usr/jdk/jdk1.6.0_31"}}
</label>
</div>
<div class="btn-area">
- {{#unless view.parentView.controller.hideBackButton }}
+ {{#unless view.parentView.controller.hideBackButton}}
<a class="btn pull-left" {{action back}}>← Back</a>
{{/unless}}
<a class="btn btn-success pull-right" {{bindAttr
disabled="isSubmitDisabled"}} {{action evaluateStep target="controller"}}>
Modified: incubator/ambari/trunk/ambari-web/app/utils/db.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/db.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/db.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/db.js Fri Jan 11 01:06:33 2013
@@ -212,6 +212,14 @@ App.db.setCluster = function (status) {
localStorage.setObject('ambari', App.db.data);
};
+
+App.db.setStep2WizardFirstRun = function(status) {
+ App.db.data = localStorage.getObject('ambari');
+ App.db.data.Installer.step2WizardFirstRun = status;
+ console.log('db.setStep2WizardFirstRun called: ' + status);
+ localStorage.setObject('ambari', App.db.data);
+};
+
/**
* Set current step value for specified Wizard Type
* @param wizardType
@@ -356,4 +364,10 @@ App.db.getCluster = function () {
return App.db.data.Installer.clusterStatus;
};
+App.db.getStep2WizardFirstRun = function() {
+ App.db.data = localStorage.getObject('ambari');
+ console.log('TRACE: Entering db:setStep2WizardFirstRun function');
+ return App.db.data.Installer.step2WizardFirstRun;
+};
+
module.exports = App.db;
Modified: incubator/ambari/trunk/ambari-web/app/utils/string_utils.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/string_utils.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/string_utils.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/string_utils.js Fri Jan 11
01:06:33 2013
@@ -51,5 +51,15 @@ module.exports = {
}
return str;
+ },
+ underScoreToCamelCase: function(string){
+ var result = string.split('');
+ for(var i = 0; i < result.length; i++){
+ if(result[i] === '_'){
+ result[i] = result[i+1].toUpperCase();
+ result.splice(i+1,1);
+ }
+ }
+ return result.join('');
}
}
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard.js Fri Jan 11
01:06:33 2013
@@ -85,5 +85,50 @@ App.MainDashboardView = Em.View.extend({
gangliaUrl: function () {
return App.router.get('clusterController.gangliaUrl') +
"/?r=hour&cs=&ce=&m=&s=by+name&c=HDPSlaves&tab=m&vn=";
- }.property('App.router.clusterController.gangliaUrl')
+ }.property('App.router.clusterController.gangliaUrl'),
+
+ showAlertsPopup: function (event) {
+ App.ModalPopup.show({
+ header: this.t('services.alerts.headingOfList'),
+ bodyClass: Ember.View.extend({
+ service: event.context,
+ warnAlerts: function () {
+ var allAlerts = App.router.get('clusterController.alerts');
+ var serviceId = this.get('service.serviceName');
+ if (serviceId) {
+ return allAlerts.filterProperty('serviceType',
serviceId).filterProperty('isOk', false);
+ }
+ return 0;
+ }.property('App.router.clusterController.alerts'),
+
+ warnAlertsCount: function () {
+ return this.get('warnAlerts').length;
+ }.property('warnAlerts'),
+
+ nagiosUrl: function () {
+ return App.router.get('clusterController.nagiosUrl');
+ }.property('App.router.clusterController.nagiosUrl'),
+
+ closePopup: function () {
+ this.get('parentView').hide();
+ },
+
+ selectService: function () {
+ App.router.transitionTo('services.service.summary', event.context)
+ this.closePopup();
+ },
+ templateName:
require('templates/main/dashboard/alert_notification_popup')
+ }),
+ primary: 'Close',
+ onPrimary: function() {
+ this.hide();
+ },
+ secondary : null,
+ didInsertElement: function () {
+ this.$().find('.modal-footer').addClass('align-center');
+ this.$().children('.modal').css({'margin-top': '-350px'});
+ }
+ });
+ event.stopPropagation();
+ }
});
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service.js?rev=1431775&r1=1431774&r2=1431775&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service.js Fri Jan 11
01:06:33 2013
@@ -19,48 +19,5 @@
var App = require('app');
App.MainServiceView = Em.View.extend({
- templateName:require('templates/main/service'),
-
- showAlertsPopup: function (event) {
- App.ModalPopup.show({
- header: this.t('services.alerts.headingOfList'),
- bodyClass: Ember.View.extend({
- service: event.context,
- warnAlerts: function () {
- var allAlerts = App.router.get('clusterController.alerts');
- var serviceId = this.get('service.serviceName');
- if (serviceId) {
- return allAlerts.filterProperty('serviceType',
serviceId).filterProperty('isOk', false);
- }
- return 0;
- }.property('App.router.clusterController.alerts'),
-
- warnAlertsCount: function () {
- return this.get('warnAlerts').length;
- }.property('warnAlerts'),
-
- nagiosUrl: function () {
- return App.router.get('clusterController.nagiosUrl');
- }.property('App.router.clusterController.nagiosUrl'),
-
- closePopup: function () {
- this.get('parentView').hide();
- },
-
- selectService: function () {
- App.router.transitionTo('services.service.summary', event.context)
- this.closePopup();
- },
- templateName:
require('templates/main/service/alert_notification_popup')
- }),
- primary: 'Close',
- onPrimary: function() {
- this.hide();
- },
- secondary : null,
- didInsertElement: function () {
- this.$().find('.modal-footer').addClass('align-center');
- }
- });
- }
+ templateName:require('templates/main/service')
});
\ No newline at end of file