|
@@ -26,25 +26,31 @@ var globalPropertyToServicesMap = null;
|
|
|
App.config = Em.Object.create({
|
|
|
|
|
|
preDefinedServiceConfigs: function(){
|
|
|
- var configs = this.get('preDefinedConfigProperties');
|
|
|
+ var configs = this.get('preDefinedGlobalProperties');
|
|
|
var services = [];
|
|
|
require('data/service_configs').forEach(function(service){
|
|
|
service.configs = configs.filterProperty('serviceName', service.serviceName);
|
|
|
services.push(service);
|
|
|
});
|
|
|
return services;
|
|
|
- }.property('preDefinedConfigProperties'),
|
|
|
+ }.property('preDefinedGlobalProperties'),
|
|
|
configMapping: function() {
|
|
|
if (App.get('isHadoop2Stack')) {
|
|
|
return require('data/HDP2/config_mapping');
|
|
|
}
|
|
|
return require('data/config_mapping');
|
|
|
}.property('App.isHadoop2Stack'),
|
|
|
- preDefinedConfigProperties: function() {
|
|
|
+ preDefinedGlobalProperties: function() {
|
|
|
if (App.get('isHadoop2Stack')) {
|
|
|
- return require('data/HDP2/config_properties').configProperties;
|
|
|
+ return require('data/HDP2/global_properties').configProperties;
|
|
|
}
|
|
|
- return require('data/config_properties').configProperties;
|
|
|
+ return require('data/global_properties').configProperties;
|
|
|
+ }.property('App.isHadoop2Stack'),
|
|
|
+ preDefinedSiteProperties: function() {
|
|
|
+ if (App.get('isHadoop2Stack')) {
|
|
|
+ return require('data/HDP2/site_properties').configProperties;
|
|
|
+ }
|
|
|
+ return require('data/site_properties').configProperties;
|
|
|
}.property('App.isHadoop2Stack'),
|
|
|
preDefinedCustomConfigs: function () {
|
|
|
if (App.get('isHadoop2Stack')) {
|
|
@@ -162,7 +168,7 @@ App.config = Em.Object.create({
|
|
|
mergePreDefinedWithLoaded: function (configGroups, advancedConfigs, tags, serviceName) {
|
|
|
var configs = [];
|
|
|
var globalConfigs = [];
|
|
|
- var preDefinedConfigs = this.get('preDefinedConfigProperties');
|
|
|
+ var preDefinedConfigs = this.get('preDefinedGlobalProperties').concat(this.get('preDefinedSiteProperties'));
|
|
|
var mappingConfigs = [];
|
|
|
|
|
|
tags.forEach(function (_tag) {
|
|
@@ -206,7 +212,7 @@ App.config = Em.Object.create({
|
|
|
if (configsPropertyDef) {
|
|
|
this.handleSpecialProperties(serviceConfigObj);
|
|
|
} else {
|
|
|
- serviceConfigObj.isVisible = false; // if the global property is not defined on ui metadata config_properties.js then it shouldn't be a part of errorCount
|
|
|
+ serviceConfigObj.isVisible = false; // if the global property is not defined on ui metadata global_properties.js then it shouldn't be a part of errorCount
|
|
|
}
|
|
|
serviceConfigObj.id = 'puppet var';
|
|
|
serviceConfigObj.displayName = configsPropertyDef ? configsPropertyDef.displayName : null;
|
|
@@ -240,14 +246,14 @@ App.config = Em.Object.create({
|
|
|
*/
|
|
|
mergePreDefinedWithStored: function (storedConfigs, advancedConfigs) {
|
|
|
var mergedConfigs = [];
|
|
|
- var preDefinedConfigs = $.extend(true, [], this.get('preDefinedConfigProperties'));
|
|
|
+ var preDefinedConfigs = $.extend(true, [], this.get('preDefinedGlobalProperties').concat(this.get('preDefinedSiteProperties')));
|
|
|
var preDefinedNames = [];
|
|
|
var storedNames = [];
|
|
|
var names = [];
|
|
|
var categoryMetaData = null;
|
|
|
storedConfigs = (storedConfigs) ? storedConfigs : [];
|
|
|
|
|
|
- preDefinedNames = this.get('preDefinedConfigProperties').mapProperty('name');
|
|
|
+ preDefinedNames = preDefinedConfigs.mapProperty('name');
|
|
|
storedNames = storedConfigs.mapProperty('name');
|
|
|
names = preDefinedNames.concat(storedNames).uniq();
|
|
|
names.forEach(function (name) {
|