AMBARI-3809. Config group dropdown is empty, and is shown incorrectly. (akovalenko)
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index b9f869d..e4a4b22 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -45,6 +45,8 @@
App.supports = {
addServices: false,
hostOverrides: false,
+ hostOverridesInstaller: false,
+ hostOverridesHost: false,
mirroring: false,
secureCluster: true,
secureClusterProceedPopup: false,
diff --git a/ambari-web/app/templates/common/configs/service_config.hbs b/ambari-web/app/templates/common/configs/service_config.hbs
index fd4414f..45e9fc7 100644
--- a/ambari-web/app/templates/common/configs/service_config.hbs
+++ b/ambari-web/app/templates/common/configs/service_config.hbs
@@ -16,7 +16,7 @@
* limitations under the License.
}}
-{{#if App.supports.hostOverrides}}
+{{#if view.supportsHostOverrides}}
{{#if selectedService.restartRequired}}
<div class="alert">
<div class="clearfix like_pointer collapsable" {{action toggleRestartMessageView target="view"}}>
@@ -45,7 +45,7 @@
</div>
{{/if}}
{{/if}}
-{{#if App.supports.hostOverrides}}
+{{#if view.supportsHostOverrides}}
<div class="alert alert-info">
{{t common.group}}
<span class="btn-group">
@@ -79,7 +79,7 @@
{{view category.customView categoryBinding="category" serviceBinding="selectedService" canEditBinding="view.canEdit" serviceConfigsBinding="selectedService.configs"}}
{{/if}}
{{else}}
- {{#view App.ServiceConfigsByCategoryView categoryBinding="category" canEditBinding="view.canEdit" serviceBinding="selectedService" serviceConfigsBinding="selectedService.configs"}}
+ {{#view App.ServiceConfigsByCategoryView categoryBinding="category" canEditBinding="view.canEdit" serviceBinding="selectedService" serviceConfigsBinding="selectedService.configs" supportsHostOverridesBinding="view.supportsHostOverrides"}}
<div class="accordion-heading" {{action "onToggleBlock" category target="view"}}>
<i {{bindAttr class=":pull-left :accordion-toggle category.isCollapsed:icon-caret-right:icon-caret-down"}}></i>
@@ -100,7 +100,7 @@
<a href="javascript:void(null);"><i class="icon-lock" rel="tooltip" data-toggle="tooltip" title="security knob"></i></a>
{{/if}}
{{/if}}
- {{#if App.supports.hostOverrides}}
+ {{#if view.supportsHostOverrides}}
{{#if isRestartRequired}}
<i class="icon-refresh restart-required-property" rel="tooltip" {{bindAttr title="restartRequiredMessage"}}></i>
{{/if}}
@@ -113,7 +113,7 @@
{{view viewClass serviceConfigBinding="this" categoryConfigsAllBinding="view.categoryConfigsAll" }}
{{#if view.canEdit}}
{{#if isPropertyOverridable}}
- {{#if App.supports.hostOverrides}}
+ {{#if view.supportsHostOverrides}}
<a class="action" {{action "createOverrideProperty" this target="view" }} ><i class="icon-plus-sign"></i>{{t common.override}}</a>
{{/if}}
{{/if}}
diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js
index 3a501cb..4389fde 100644
--- a/ambari-web/app/views/common/configs/services_config.js
+++ b/ambari-web/app/views/common/configs/services_config.js
@@ -35,6 +35,16 @@
filter: '', //from template
columns: [], //from template
canEdit: true, // View is editable or read-only?
+ supportsHostOverrides: function () {
+ switch (this.get('controller.name')) {
+ case 'wizardStep7Controller':
+ return App.supports.hostOverridesInstaller;
+ case 'mainServiceInfoConfigsController':
+ return App.supports.hostOverrides;
+ default:
+ return false;
+ }
+ }.property('controller.name'),
toggleRestartMessageView: function () {
this.$('.service-body').toggle('blind', 200);
this.set('isRestartMessageCollapsed', !this.get('isRestartMessageCollapsed'));
diff --git a/ambari-web/app/views/main/host/menu.js b/ambari-web/app/views/main/host/menu.js
index 74e2569..5490eb1 100644
--- a/ambari-web/app/views/main/host/menu.js
+++ b/ambari-web/app/views/main/host/menu.js
@@ -28,7 +28,7 @@
}
/* { label:'Audit', routing:'audit'} */
];
- if (App.supports.hostOverrides) {
+ if (App.supports.hostOverridesHost) {
array.push({
label: 'Configs',
routing: 'configs'