Author: yusaku
Date: Fri Jan 11 02:35:21 2013
New Revision: 1431828
URL: http://svn.apache.org/viewvc?rev=1431828&view=rev
Log:
AMBARI-1145. Cluster Management refactoring. (yusaku)
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
incubator/ambari/trunk/ambari-web/app/styles/application.less
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js?rev=1431828&r1=1431827&r2=1431828&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
Fri Jan 11 02:35:21 2013
@@ -227,6 +227,7 @@ App.MainServiceInfoConfigsController = E
/**
* Render a custom conf-site box for entering properties that will be
written in *-site.xml files of the services
*/
+
loadCustomConfig: function (serviceConfigs) {
if (this.get('customConfigs').findProperty('serviceName',
this.get('content.serviceName'))) {
var customConfigs =
this.get('customConfigs').filterProperty('serviceName',
this.get('content.serviceName'));
@@ -276,7 +277,7 @@ App.MainServiceInfoConfigsController = E
serviceConfigObj.isRequired = configProperty.isRequired ?
configProperty.isRequired : true;
serviceConfigObj.isReconfigurable = (configProperty.isReconfigurable
!== undefined) ? configProperty.isReconfigurable : true;
serviceConfigObj.isVisible = (configProperty.isVisible !==
undefined) ? configProperty.isVisible : true;
- serviceConfigObj.unit = (configProperty.isVisible !== undefined) ?
configProperty.unit : undefined;
+ serviceConfigObj.unit = (configProperty.unit !== undefined) ?
configProperty.unit : undefined;
}
serviceConfigObj.displayType =
this.get('configs').someProperty('name', index) ?
this.get('configs').findProperty('name', index).displayType : null;
@@ -793,9 +794,14 @@ App.MainServiceInfoConfigsController = E
var coreSiteObj = this.get('uiConfigs').filterProperty('filename',
'core-site.xml');
var coreSiteProperties = {};
// hadoop.proxyuser.oozie.hosts needs to be skipped if oozie is not
selected
- var isOozieSelected = (this.get('content.serviceName') === 'OOZIE');
+ var isOozieSelected = App.Service.find().someProperty('serviceName',
'OOZIE');
+ var oozieUser = this.get('globalConfigs').someProperty('name',
'oozie_user') ? this.get('globalConfigs').findProperty('name',
'oozie_user').value : null;
+ var isHiveSelected = App.Service.find().someProperty('serviceName',
'HIVE');
+ var hiveUser = this.get('globalConfigs').someProperty('name', 'hive_user')
? this.get('globalConfigs').findProperty('name', 'hive_user').value : null;
+ var isHcatSelected = App.Service.find().someProperty('serviceName',
'WEBHCAT');
+ var hcatUser = this.get('globalConfigs').someProperty('name', 'hcat_user')
? this.get('globalConfigs').findProperty('name', 'hcat_user').value : null;
coreSiteObj.forEach(function (_coreSiteObj) {
- if (_coreSiteObj.name != 'hadoop.proxyuser.oozie.hosts') {
+ if ((isOozieSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' +
oozieUser + '.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + oozieUser +
'.groups')) && (isHiveSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' +
hiveUser + '.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + hiveUser +
'.groups')) && (isHcatSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' +
hcatUser + '.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + hcatUser +
'.groups'))) {
coreSiteProperties[_coreSiteObj.name] = _coreSiteObj.value;
}
//console.log("TRACE: name of the property is: " + _coreSiteObj.name);
@@ -851,10 +857,14 @@ App.MainServiceInfoConfigsController = E
var data = {config: {}};
this.get('serviceConfigTags').forEach(function (_serviceTag) {
if (config === 'new') {
- if (this.get('content.serviceName') === 'HDFS') {
- data.config[_serviceTag.siteName] = _serviceTag.newTagName;
+ if (_serviceTag.siteName === 'core-site') {
+ if (this.get('content.serviceName') === 'HDFS') {
+ data.config[_serviceTag.siteName] = _serviceTag.newTagName;
+ } else {
+ data.config[_serviceTag.siteName] = _serviceTag.tagName;
+ }
} else {
- data.config[_serviceTag.siteName] = _serviceTag.tagName;
+ data.config[_serviceTag.siteName] = _serviceTag.newTagName;
}
}
else if (config = 'previous') {
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=1431828&r1=1431827&r2=1431828&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 02:35:21 2013
@@ -1197,8 +1197,13 @@ App.WizardStep8Controller = Em.Controlle
var coreSiteProperties = {};
// hadoop.proxyuser.oozie.hosts needs to be skipped if oozie is not
selected
var isOozieSelected =
this.get('selectedServices').someProperty('serviceName', 'OOZIE');
+ var oozieUser = this.get('globals').someProperty('name','oozie_user') ?
this.get('globals').findProperty('name','oozie_user').value : null;
+ var isHiveSelected =
this.get('selectedServices').someProperty('serviceName', 'HIVE');
+ var hiveUser = this.get('globals').someProperty('name','hive_user') ?
this.get('globals').findProperty('name','hive_user').value : null;
+ var isHcatSelected =
this.get('selectedServices').someProperty('serviceName', 'WEBHCAT');
+ var hcatUser = this.get('globals').someProperty('name','hcat_user') ?
this.get('globals').findProperty('name','hcat_user').value : null;
coreSiteObj.forEach(function (_coreSiteObj) {
- if (isOozieSelected || _coreSiteObj.name !=
'hadoop.proxyuser.oozie.hosts') {
+ if ((isOozieSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' +
oozieUser +'.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + oozieUser
+'.groups')) && (isHiveSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' +
hiveUser +'.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + hiveUser +
'.groups')) && (isHcatSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' +
hcatUser +'.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + hcatUser +
'.groups'))) {
coreSiteProperties[_coreSiteObj.name] = _coreSiteObj.value;
}
console.log("STEP*: name of the property is: " + _coreSiteObj.name);
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=1431828&r1=1431827&r2=1431828&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/trunk/ambari-web/app/styles/application.less Fri Jan 11
02:35:21 2013
@@ -550,12 +550,10 @@ a:focus {
margin: 0 0 0 -30%;
max-height: 526px;
top:5%;
- overflow: hidden;
+ }
+
+ .modal-body{
- .modal-body{
- max-height: 461px;
- overflow-y: auto;
- }
}
.clear {