|
@@ -278,6 +278,7 @@ App.config = Em.Object.create({
|
|
recommendedValue: null,
|
|
recommendedValue: null,
|
|
recommendedIsFinal: null,
|
|
recommendedIsFinal: null,
|
|
supportsFinal: this.shouldSupportFinal(serviceName, fileName),
|
|
supportsFinal: this.shouldSupportFinal(serviceName, fileName),
|
|
|
|
+ supportsAddingForbidden: this.shouldSupportAddingForbidden(serviceName, fileName),
|
|
serviceName: serviceName,
|
|
serviceName: serviceName,
|
|
displayName: name,
|
|
displayName: name,
|
|
displayType: this.getDefaultDisplayType(coreObject ? coreObject.value : ''),
|
|
displayType: this.getDefaultDisplayType(coreObject ? coreObject.value : ''),
|
|
@@ -580,7 +581,8 @@ App.config = Em.Object.create({
|
|
var configTypes = service.get('configTypes');
|
|
var configTypes = service.get('configTypes');
|
|
var configTypesInfo = {
|
|
var configTypesInfo = {
|
|
items: [],
|
|
items: [],
|
|
- supportsFinal: []
|
|
|
|
|
|
+ supportsFinal: [],
|
|
|
|
+ supportsAddingForbidden: []
|
|
};
|
|
};
|
|
if (configTypes) {
|
|
if (configTypes) {
|
|
for (var key in configTypes) {
|
|
for (var key in configTypes) {
|
|
@@ -589,6 +591,9 @@ App.config = Em.Object.create({
|
|
if (configTypes[key].supports && configTypes[key].supports.final === "true") {
|
|
if (configTypes[key].supports && configTypes[key].supports.final === "true") {
|
|
configTypesInfo.supportsFinal.push(key);
|
|
configTypesInfo.supportsFinal.push(key);
|
|
}
|
|
}
|
|
|
|
+ if (configTypes[key].supports && configTypes[key].supports.adding_forbidden === "true"){
|
|
|
|
+ configTypesInfo.supportsAddingForbidden.push(key);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -917,6 +922,22 @@ App.config = Em.Object.create({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ shouldSupportAddingForbidden: function(serviceName, filename) {
|
|
|
|
+ var unsupportedServiceNames = ['MISC', 'Cluster'];
|
|
|
|
+ if (!serviceName || unsupportedServiceNames.contains(serviceName) || !filename) {
|
|
|
|
+ return false;
|
|
|
|
+ } else {
|
|
|
|
+ var stackServiceName = App.StackService.find().findProperty('serviceName', serviceName);
|
|
|
|
+ if (!stackServiceName) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var stackService = App.StackService.find(serviceName);
|
|
|
|
+ return !!this.getConfigTypesInfoFromService(stackService).supportsAddingForbidden.find(function (configType) {
|
|
|
|
+ return filename.startsWith(configType);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Remove all ranger-related configs, that should be available only if Ranger is installed
|
|
* Remove all ranger-related configs, that should be available only if Ranger is installed
|
|
* @param configs - stepConfigs object
|
|
* @param configs - stepConfigs object
|