Disable Savanna & Murano for RHOS in wizard

Change-Id: Id595541efcc4bd763f549d86622345fe4584c4a7
This commit is contained in:
Vitaly Kramskikh 2013-10-17 16:00:40 +04:00
parent 62cf71f3f4
commit 951a982347
2 changed files with 42 additions and 29 deletions

View File

@ -452,6 +452,7 @@ function(require, utils, models, simpleMessageTemplate, createClusterWizardTempl
clusterWizardPanes.ClusterAdditionalServicesPane = views.WizardPane.extend({
title: 'Additional Services',
releaseDependent: true,
template: _.template(clusterAdditionalServicesPaneTemplate),
beforeSettingsSaving: function(settings) {
try {
@ -465,6 +466,15 @@ function(require, utils, models, simpleMessageTemplate, createClusterWizardTempl
return (new $.Deferred()).reject();
}
return (new $.Deferred()).resolve();
},
render: function() {
var release = this.wizard.findPane(clusterWizardPanes.ClusterNameAndReleasePane).release;
var disabled = !release || release.get('operating_system') == 'RHEL'; // no Savanna & Murano for RHOS for now
this.$el.html(this.template({disabled: disabled, release: release}));
if (disabled) {
this.$('input[type=checkbox]').prop('disabled', true);
}
return this;
}
});

View File

@ -1,3 +1,6 @@
<% if (disabled && release) { %>
<div class="alert" style="margin-bottom: 10px">Additional services are not available in <%- release.get('name') %></div>
<% } %>
<form class="form-horizontal" style="margin:0" onsubmit="return false">
<fieldset>
<div class="control-group">