mirror of https://github.com/rancher/ui.git
Fix azure required fields, rke templates option location
This commit is contained in:
parent
11e68be1aa
commit
01b07bdd9a
|
|
@ -83,7 +83,7 @@ export default Component.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return all(promises);
|
return all(promises).catch(() => resolve());
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return resolve();
|
return resolve();
|
||||||
|
|
|
||||||
|
|
@ -295,15 +295,6 @@ const rootNav = [
|
||||||
route: 'global-admin.clusters',
|
route: 'global-admin.clusters',
|
||||||
resource: ['cluster'],
|
resource: ['cluster'],
|
||||||
resourceScope: 'global',
|
resourceScope: 'global',
|
||||||
submenu: [
|
|
||||||
{
|
|
||||||
id: 'rke-template',
|
|
||||||
localizedLabel: 'nav.admin.clusters.rkeTemplate',
|
|
||||||
route: 'global-admin.cluster-templates',
|
|
||||||
resource: ['clustertemplate'],
|
|
||||||
resourceScope: 'global',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scope: 'global',
|
scope: 'global',
|
||||||
|
|
@ -402,6 +393,13 @@ const rootNav = [
|
||||||
// resource: ['globaldns'],
|
// resource: ['globaldns'],
|
||||||
// resourceScope: 'global',
|
// resourceScope: 'global',
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
id: 'rke-template',
|
||||||
|
localizedLabel: 'nav.admin.clusters.rkeTemplate',
|
||||||
|
route: 'global-admin.cluster-templates',
|
||||||
|
resource: ['clustertemplate'],
|
||||||
|
resourceScope: 'global',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|
|
||||||
|
|
@ -979,7 +979,7 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
||||||
const azureProvider = get(revision, 'clusterConfig.rancherKubernetesEngineConfig.cloudProvider.azureCloudProvider') || {};
|
const azureProvider = get(revision, 'clusterConfig.rancherKubernetesEngineConfig.cloudProvider.azureCloudProvider') || {};
|
||||||
|
|
||||||
if ( cloudProvider === 'azure' ) {
|
if ( cloudProvider === 'azure' ) {
|
||||||
const azureQuestions = (get(revision, 'nuestions') || []).map((x) => x.variable.replace(/^rancherKubernetesEngineConfig\.cloudProvider\.azureCloudProvider\./, ''));
|
const azureQuestions = (get(revision, 'questions') || []).map((x) => x.variable.replace(/^rancherKubernetesEngineConfig\.cloudProvider\.azureCloudProvider\./, ''));
|
||||||
const requiredFields = Object.keys(AzureInfo).filter((k) => AzureInfo[k].required);
|
const requiredFields = Object.keys(AzureInfo).filter((k) => AzureInfo[k].required);
|
||||||
|
|
||||||
requiredFields.forEach((key) => {
|
requiredFields.forEach((key) => {
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,10 @@ export default Component.extend({
|
||||||
} else {
|
} else {
|
||||||
if (this.configName) {
|
if (this.configName) {
|
||||||
next(() => {
|
next(() => {
|
||||||
|
if ( this.destroyed || this.destroying) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
set(this, 'selectedCloudProvider', this.configName);
|
set(this, 'selectedCloudProvider', this.configName);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -136,6 +140,10 @@ export default Component.extend({
|
||||||
} else {
|
} else {
|
||||||
if (!this.configName) {
|
if (!this.configName) {
|
||||||
next(() => {
|
next(() => {
|
||||||
|
if ( this.destroyed || this.destroying) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
set(this, 'selectedCloudProvider', this.selectedCloudProvider === 'generic' ? 'generic' : 'none');
|
set(this, 'selectedCloudProvider', this.selectedCloudProvider === 'generic' ? 'generic' : 'none');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
<div class="banner bg-info">
|
|
||||||
<div class="banner-icon"><i class="icon icon-info"></i></div>
|
|
||||||
<div class="banner-message">
|
|
||||||
{{t 'cruClusterTemplate.infoBanner'}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<FormNameDescription
|
<FormNameDescription
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ export default Component.extend({
|
||||||
(get(this, 'nodePools') || []).forEach((pool) => {
|
(get(this, 'nodePools') || []).forEach((pool) => {
|
||||||
const templateId = get(pool, 'nodeTemplateId');
|
const templateId = get(pool, 'nodeTemplateId');
|
||||||
|
|
||||||
if ( !templates.findBy('id', templateId) ) {
|
if ( templateId && !templates.findBy('id', templateId) ) {
|
||||||
templates.push(get(this, 'globalStore').createRecord({
|
templates.push(get(this, 'globalStore').createRecord({
|
||||||
type: 'nodetemplate',
|
type: 'nodetemplate',
|
||||||
id: templateId,
|
id: templateId,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue