You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/07/18 12:01:00 UTC
[2/3] git commit: AMBARI-6536 Exclude hard code from configs (-env.sh
configs). (ababiichuk)
AMBARI-6536 Exclude hard code from configs (-env.sh configs). (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/77815867
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/77815867
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/77815867
Branch: refs/heads/trunk
Commit: 7781586747dd1a2c5004427aee11db748732ac20
Parents: b54285b
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Fri Jul 18 12:53:52 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Fri Jul 18 12:53:52 2014 +0300
----------------------------------------------------------------------
ambari-web/app/data/HDP2/site_properties.js | 212 -----------------------
ambari-web/app/data/site_properties.js | 30 ----
ambari-web/app/models/stack_service.js | 32 ++--
ambari-web/app/utils/config.js | 19 +-
4 files changed, 25 insertions(+), 268 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/77815867/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 8bc044b..cf1f2c3 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1598,20 +1598,6 @@ module.exports =
"filename": "pig-properties.xml",
"category": "Advanced"
},
- {
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "PIG",
- "filename": "pig-env.xml",
- "category": "PigEnv"
- },
//***************************************** GLUSTERFS stack********************************************
@@ -1665,20 +1651,6 @@ module.exports =
},
/**********************************************HDFS***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "HDFS",
- "filename": "hadoop-env.xml",
- "category": "HadoopEnv"
- },
- {
"id": "puppet var",
"name": "namenode_host",
"displayName": "NameNode hosts",
@@ -1846,20 +1818,6 @@ module.exports =
/**********************************************MAPREDUCE2***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "MAPREDUCE2",
- "filename": "mapred-env.xml",
- "category": "MapredEnv"
- },
- {
"id": "puppet var",
"name": "hs_host",
"displayName": "History Server",
@@ -1919,20 +1877,6 @@ module.exports =
},
/**********************************************YARN***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "YARN",
- "filename": "yarn-env.xml",
- "category": "YarnEnv"
- },
- {
"id": "puppet var",
"name": "yarn_heapsize",
"displayName": "YARN Java heap size",
@@ -2067,20 +2011,6 @@ module.exports =
},
/**********************************************HBASE***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "HBASE",
- "filename": "hbase-env.xml",
- "category": "HbaseEnv"
- },
- {
"id": "puppet var",
"name": "hbasemaster_host",
"displayName": "HBase Master hosts",
@@ -2172,20 +2102,6 @@ module.exports =
},
/**********************************************GLUSTERFS***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "GLUSTERFS",
- "filename": "glusterfs-env.xml",
- "category": "GlusterfsEnv"
- },
- {
"id": "puppet var",
"name": "glusterfs_defaultFS_name",
"displayName": "GlusterFS default fs name",
@@ -2311,20 +2227,6 @@ module.exports =
},
/**********************************************HIVE***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "HIVE",
- "filename": "hive-env.xml",
- "category": "HiveEnv"
- },
- {
"id": "puppet var",
"name": "hivemetastore_host",
"displayName": "Hive Metastore host",
@@ -2596,37 +2498,8 @@ module.exports =
"filename": "hive-env.xml",
"category": "Advanced"
},
- /**********************************************SQOOP***************************************/
- {
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "SQOOP",
- "filename": "sqoop-env.xml",
- "category": "SqoopEnv"
- },
/**********************************************WEBHCAT***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "WEBHCAT",
- "filename": "webhcat-env.xml",
- "category": "WebhcatEnv"
- },
- {
"id": "puppet var",
"name": "webhcatserver_host",
"displayName": "WebHCat Server host",
@@ -2671,20 +2544,6 @@ module.exports =
},
/**********************************************OOZIE***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "OOZIE",
- "filename": "oozie-env.xml",
- "category": "OozieEnv"
- },
- {
"id": "puppet var",
"name": "oozieserver_host",
"displayName": "Oozie Server host",
@@ -3005,20 +2864,6 @@ module.exports =
},
/**********************************************ZOOKEEPER***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "ZOOKEEPER",
- "filename": "zookeeper-env.xml",
- "category": "ZookeeperEnv"
- },
- {
"id": "puppet var",
"name": "zookeeperserver_hosts",
"displayName": "ZooKeeper Server hosts",
@@ -3139,20 +2984,6 @@ module.exports =
},
/**********************************************HUE***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "HUE",
- "filename": "hue-env.xml",
- "category": "HueEnv"
- },
- {
"id": "puppet var",
"name": "hueserver_host",
"displayName": "Hue Server host",
@@ -3214,20 +3045,6 @@ module.exports =
},
/**********************************************FALCON***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "FALCON",
- "filename": "falcon-env.xml",
- "category": "FalconEnv"
- },
- {
"id": "puppet var",
"name": "falconserver_host",
"displayName": "Falcon Server",
@@ -3359,20 +3176,6 @@ module.exports =
},
/**********************************************STORM***************************************/
{
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "STORM",
- "filename": "storm-env.xml",
- "category": "StormEnv"
- },
- {
"id": "puppet var",
"name": "storm_log_dir",
"displayName": "storm_log_dir",
@@ -3458,21 +3261,6 @@ module.exports =
"isOverridable": false,
"category": "STORM_REST_API"
},
- /**********************************************TEZ***************************************/
- {
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "TEZ",
- "filename": "tez-env.xml",
- "category": "TezEnv"
- },
/**********************************************MISC***************************************/
{
"id": "puppet var",
http://git-wip-us.apache.org/repos/asf/ambari/blob/77815867/ambari-web/app/data/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/site_properties.js b/ambari-web/app/data/site_properties.js
index 8d1f9ae..303e97e 100644
--- a/ambari-web/app/data/site_properties.js
+++ b/ambari-web/app/data/site_properties.js
@@ -773,21 +773,6 @@ module.exports =
"serviceName": "WEBHCAT",
"category": "Advanced"
},
- /**********************************************pig.properties*****************************************/
- {
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "PIG",
- "filename": "pig-env.xml",
- "category": "PigEnv"
- },
//***************************************** GLUSTERFS stack********************************************
{
"id": "site property",
@@ -1639,21 +1624,6 @@ module.exports =
"filename": "hive-env.xml",
"category": "Advanced"
},
- /**********************************************SQOOP***************************************/
- {
- "id": "site property",
- "name": "content",
- "displayName": "content",
- "value": "",
- "defaultValue": "",
- "description": "-env.sh content",
- "displayType": "content",
- "isRequired": false,
- "showLabel": false,
- "serviceName": "SQOOP",
- "filename": "sqoop-env.xml",
- "category": "SqoopEnv"
- },
/**********************************************WEBHCAT***************************************/
{
"id": "puppet var",
http://git-wip-us.apache.org/repos/asf/ambari/blob/77815867/ambari-web/app/models/stack_service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js
index e914f78..a39bd3c 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -273,7 +273,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'Advanced core-site', displayName: 'Custom core-site.xml', siteFileName: 'core-site.xml', canAddProperty: true}),
App.ServiceConfigCategory.create({ name: 'Advanced hdfs-site', displayName: 'Custom hdfs-site.xml', siteFileName: 'hdfs-site.xml', canAddProperty: true}),
App.ServiceConfigCategory.create({ name: 'Advanced hdfs-log4j', displayName: 'Custom log4j.properties', siteFileName: 'hdfs-log4j.xml', canAddProperty: false}),
- App.ServiceConfigCategory.create({ name: 'HadoopEnv', displayName: 'Custom Hadoop Env', siteFileName: 'hadoop-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced hadoop-env', displayName: 'Custom Hadoop env', siteFileName: 'hadoop-env.xml', canAddProperty: false})
]);
break;
case 'GLUSTERFS':
@@ -291,7 +291,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced mapred-site', displayName: 'Custom mapred-site.xml', siteFileName: 'mapred-site.xml', canAddProperty: true}),
App.ServiceConfigCategory.create({ name: 'Advanced mapreduce-log4j', displayName: 'Custom log4j.properties', siteFileName: 'mapreduce-log4j.xml', canAddProperty: false}),
- App.ServiceConfigCategory.create({ name: 'MapredEnv', displayName: 'Custom Mapreduce Env', siteFileName: 'mapred-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced mapreduce-env', displayName: 'Custom Mapreduce env', siteFileName: 'mapred-env.xml', canAddProperty: false})
]);
break;
case 'YARN':
@@ -304,7 +304,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced yarn-site', displayName: 'Custom yarn-site.xml', siteFileName: 'yarn-site.xml', canAddProperty: true}),
App.ServiceConfigCategory.create({ name: 'Advanced yarn-log4j', displayName: 'Custom log4j.properties', siteFileName: 'yarn-log4j.xml', canAddProperty: false}),
- App.ServiceConfigCategory.create({ name: 'YarnEnv', displayName: 'Custom Yarn Env', siteFileName: 'yarn-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced yarn-env', displayName: 'Custom Yarn env', siteFileName: 'yarn-env.xml', canAddProperty: false})
]);
break;
case 'MAPREDUCE2':
@@ -313,7 +313,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}),
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'AdvancedMapredSite', displayName: 'Custom mapred-site.xml', siteFileName: 'mapred-site.xml', canAddProperty: true}),
- App.ServiceConfigCategory.create({ name: 'MapredEnv', displayName: 'Custom Mapred Env', siteFileName: 'mapred-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced mapreduce-env', displayName: 'Custom Mapred env', siteFileName: 'mapred-env.xml', canAddProperty: false})
]);
break;
case 'HIVE':
@@ -323,7 +323,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'Advanced hive-site', displayName: 'Custom hive-site.xml', siteFileName: 'hive-site.xml', canAddProperty: true}),
App.ServiceConfigCategory.create({ name: 'Advanced hive-log4j', displayName: 'Custom log4j.properties', siteFileName: 'hive-log4j.xml', canAddProperty: false}),
App.ServiceConfigCategory.create({ name: 'Advanced hive-exec-log4j', displayName: 'Custom hive-exec-log4j', siteFileName: 'hive-exec-log4j.xml', canAddProperty: false}),
- App.ServiceConfigCategory.create({ name: 'HiveEnv', displayName: 'Custom Hive Env', siteFileName: 'hive-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced hive-env', displayName: 'Custom Hive env', siteFileName: 'hive-env.xml', canAddProperty: false})
]);
break;
case 'WEBHCAT':
@@ -331,7 +331,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'WEBHCAT_SERVER', displayName: 'WebHCat Server'}),
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced webhcat-site', displayName: 'Custom webhcat-site.xml', siteFileName: 'webhcat-site.xml', canAddProperty: true}),
- App.ServiceConfigCategory.create({ name: 'WebhcatEnv', displayName: 'Custom WebHCat Env', siteFileName: 'webhcat-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced webhcat-env', displayName: 'Custom WebHCat env', siteFileName: 'webhcat-env.xml', canAddProperty: false})
]);
break;
case 'HBASE':
@@ -342,7 +342,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced hbase-site', displayName: 'Custom hbase-site.xml', siteFileName: 'hbase-site.xml', canAddProperty: true}),
App.ServiceConfigCategory.create({ name: 'Advanced hbase-log4j', displayName: 'Custom log4j.properties', siteFileName: 'hbase-log4j.xml', canAddProperty: false}),
- App.ServiceConfigCategory.create({ name: 'HbaseEnv', displayName: 'Custom Hbase Env', siteFileName: 'hbase-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced hbase-env', displayName: 'Custom Hbase env', siteFileName: 'hbase-env.xml', canAddProperty: false})
]);
break;
case 'ZOOKEEPER':
@@ -351,7 +351,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced zookeeper-log4j', displayName: 'Custom log4j.properties', siteFileName: 'zookeeper-log4j.xml', canAddProperty: false}),
App.ServiceConfigCategory.create({ name: 'Advanced zoo.cfg', displayName: 'Custom zoo.cfg', siteFileName: 'zoo.cfg', canAddProperty: true}),
- App.ServiceConfigCategory.create({ name: 'ZookeeperEnv', displayName: 'Custom Zookeeper Env', siteFileName: 'zookeeper-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced zookeeper-env', displayName: 'Custom Zookeeper env', siteFileName: 'zookeeper-env.xml', canAddProperty: false})
]);
break;
case 'OOZIE':
@@ -360,14 +360,14 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced oozie-site', displayName: 'Custom oozie-site.xml', siteFileName: 'oozie-site.xml', canAddProperty: true}),
App.ServiceConfigCategory.create({ name: 'Advanced oozie-log4j', displayName: 'Custom log4j.properties', siteFileName: 'oozie-log4j.xml', canAddProperty: false}),
- App.ServiceConfigCategory.create({ name: 'OozieEnv', displayName: 'Custom Oozie Env', siteFileName: 'oozie-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced oozie-env', displayName: 'Custom Oozie env', siteFileName: 'oozie-env.xml', canAddProperty: false})
]);
break;
case 'PIG':
serviceConfigCategories.pushObjects([
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Custom pig.properties', siteFileName: 'pig-properties.xml', canAddProperty: false}),
App.ServiceConfigCategory.create({ name: 'Advanced pig-log4j', displayName: 'Custom log4j.properties', siteFileName: 'pig-log4j.xml', canAddProperty: false}),
- App.ServiceConfigCategory.create({ name: 'PigEnv', displayName: 'Custom Pig Env', siteFileName: 'pig-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced pig-env', displayName: 'Custom Pig Env', siteFileName: 'pig-env.xml', canAddProperty: false})
]);
break;
case 'FALCON':
@@ -379,7 +379,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced falcon-startup.properties', displayName: 'Custom startup.properties', siteFileName: 'falcon-startup.properties.xml', canAddProperty: true}),
App.ServiceConfigCategory.create({ name: 'Advanced falcon-runtime.properties', displayName: 'Custom runtime.properties', siteFileName: 'falcon-runtime.properties.xml', canAddProperty: true}),
- App.ServiceConfigCategory.create({ name: 'FalconEnv', displayName: 'Custom Falcon Env', siteFileName: 'falcon-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced falcon-env', displayName: 'Custom Falcon env', siteFileName: 'falcon-env.xml', canAddProperty: false})
]);
break;
case 'STORM':
@@ -392,7 +392,7 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}),
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced storm-site', displayName: 'Custom storm.yaml', siteFileName: 'storm-site.xml', canAddProperty: true}),
- App.ServiceConfigCategory.create({ name: 'StormEnv', displayName: 'Custom Storm Env', siteFileName: 'storm-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced storm-env', displayName: 'Custom Storm env', siteFileName: 'storm-env.xml', canAddProperty: false})
]);
break;
case 'TEZ':
@@ -400,18 +400,18 @@ App.StackService.configCategories = function () {
App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}),
App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}),
App.ServiceConfigCategory.create({ name: 'Advanced tez-site', displayName: 'Custom tez-site.xml', siteFileName: 'tez-site.xml', canAddProperty: true}),
- App.ServiceConfigCategory.create({ name: 'TezpEnv', displayName: 'Custom Tez Env', siteFileName: 'tez-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced tez-env', displayName: 'Custom Tez Env', siteFileName: 'tez-env.xml', canAddProperty: false})
]);
break;
case 'FLUME':
serviceConfigCategories.pushObjects([
App.ServiceConfigCategory.create({ name: 'FLUME_HANDLER', displayName: 'flume.conf', siteFileName: 'flume-conf', canAddProperty: false}),
- App.ServiceConfigCategory.create({ name: 'FlumeEnv', displayName: 'Custom Flume Env', siteFileName: 'flume-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced flume-env', displayName: 'Custom Flume env', siteFileName: 'flume-env.xml', canAddProperty: false})
]);
break;
case 'SQOOP':
serviceConfigCategories.pushObjects([
- App.ServiceConfigCategory.create({ name: 'SqoopEnv', displayName: 'Custom Sqoop Env', siteFileName: 'sqoop-env.xml', canAddProperty: false})
+ App.ServiceConfigCategory.create({ name: 'Advanced sqoop-env', displayName: 'Custom Sqoop Env', siteFileName: 'sqoop-env.xml', canAddProperty: false})
]);
break;
case 'HCATALOG':
@@ -424,7 +424,7 @@ App.StackService.configCategories = function () {
var configTypes = Object.keys(this.get('configTypes')).without('core-site').without('global');
configTypes.forEach(function (type) {
var displayName = 'Custom ' + type;
- var canAddProperty = !type.endsWith('-log4j');
+ var canAddProperty = !type.endsWith('-log4j') || !type.endsWith('-env');
var siteFileName = type + '.xml';
serviceConfigCategories.pushObject(App.ServiceConfigCategory.create({ name: 'Advanced ' + type, displayName: displayName, siteFileName: siteFileName,
canAddProperty: canAddProperty}));
http://git-wip-us.apache.org/repos/asf/ambari/blob/77815867/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index b90f3f1..3c532ea 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -130,20 +130,20 @@ App.config = Em.Object.create({
* Create array of service properties for Log4j files
* @returns {Array}
*/
- createLog4jContent: function () {
+ createContentProperties: function () {
var services = App.StackService.find();
var contentProperties = [];
services.forEach(function (service) {
if (service.get('configTypes')) {
Object.keys(service.get('configTypes')).forEach(function (type) {
- if (type.endsWith('-log4j')) {
+ if (type.endsWith('-log4j') || type.endsWith('-env')) {
var property = {
"id": "site property",
"name": "content",
"displayName": "content",
"value": "",
"defaultValue": "",
- "description": "log4j properties",
+ "description": type + " properties",
"displayType": "content",
"isOverridable": true,
"isRequired": false,
@@ -259,7 +259,6 @@ App.config = Em.Object.create({
capacitySchedulerFilter: function () {
var yarnRegex = /^yarn\.scheduler\.capacity\.root\.([a-z]([\_\-a-z0-9]{0,50}))\.(acl_administer_jobs|acl_submit_jobs|state|user-limit-factor|maximum-capacity|capacity)$/i;
- var self = this;
if (App.get('isHadoop2Stack')) {
return function (_config) {
return (yarnRegex.test(_config.name));
@@ -284,8 +283,8 @@ App.config = Em.Object.create({
*/
mergePreDefinedWithLoaded: function (configGroups, advancedConfigs, tags, serviceName) {
var configs = [];
- var log4jContentProperties = this.createLog4jContent();
- var preDefinedConfigs = this.get('preDefinedSiteProperties').concat(log4jContentProperties);
+ var contentProperties = this.createContentProperties();
+ var preDefinedConfigs = this.get('preDefinedSiteProperties').concat(contentProperties);
var mappingConfigs = [];
var filenameExceptions = this.get('filenameExceptions');
var selectedServiceNames = App.Service.find().mapProperty('serviceName');
@@ -412,8 +411,8 @@ App.config = Em.Object.create({
siteStart = [];
var preDefinedSiteProperties = this.get('preDefinedSiteProperties').mapProperty('name');
- var log4jContentProperties = this.createLog4jContent().mapProperty('name');
- var siteProperties = preDefinedSiteProperties.concat(log4jContentProperties);
+ var contentProperties = this.createContentProperties().mapProperty('name');
+ var siteProperties = preDefinedSiteProperties.concat(contentProperties);
siteProperties.forEach(function (name) {
var _site = siteConfigs.filterProperty('name', name);
if (_site.length == 1) {
@@ -442,8 +441,8 @@ App.config = Em.Object.create({
*/
mergePreDefinedWithStored: function (storedConfigs, advancedConfigs, selectedServiceNames) {
var mergedConfigs = [];
- var log4jContentProperties = this.createLog4jContent();
- var preDefinedConfigs = this.get('preDefinedSiteProperties').concat(log4jContentProperties);
+ var contentProperties = this.createContentProperties();
+ var preDefinedConfigs = this.get('preDefinedSiteProperties').concat(contentProperties);
storedConfigs = (storedConfigs) ? storedConfigs : [];