mirror of https://github.com/rancher/ui.git
commit
392339bc5e
|
|
@ -37,7 +37,10 @@ const cloudCredential = Resource.extend({
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
edit() {
|
edit() {
|
||||||
this.modal.toggleModal('modal-add-cloud-credential', { cloudCredential: this });
|
this.modal.toggleModal('modal-add-cloud-credential', {
|
||||||
|
cloudCredential: this,
|
||||||
|
mode: 'edit',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
import Component from '@ember/component';
|
import Component from '@ember/component';
|
||||||
import NewOrEdit from 'shared/mixins/new-or-edit';
|
import ViewNewEdit from 'shared/mixins/view-new-edit';
|
||||||
import layout from './template';
|
import layout from './template';
|
||||||
import { get, set, computed, setProperties } from '@ember/object';
|
import { get, set, computed, setProperties } from '@ember/object';
|
||||||
import { next } from '@ember/runloop';
|
import { next } from '@ember/runloop';
|
||||||
|
|
@ -34,13 +34,13 @@ const CRED_CONFIG_CHOICES = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export default Component.extend(NewOrEdit, {
|
export default Component.extend(ViewNewEdit, {
|
||||||
globalStore: service(),
|
globalStore: service(),
|
||||||
digitalOcean: service(),
|
digitalOcean: service(),
|
||||||
intl: service(),
|
intl: service(),
|
||||||
layout,
|
layout,
|
||||||
nodeConfigTemplateType: null,
|
nodeConfigTemplateType: null,
|
||||||
cloudCredentialType: null,
|
cloudCredentialType: null,
|
||||||
model: null,
|
model: null,
|
||||||
cancelAdd: null,
|
cancelAdd: null,
|
||||||
doneSavingCloudCredential: null,
|
doneSavingCloudCredential: null,
|
||||||
|
|
@ -48,8 +48,9 @@ export default Component.extend(NewOrEdit, {
|
||||||
validatingKeys: false,
|
validatingKeys: false,
|
||||||
errors: null,
|
errors: null,
|
||||||
region: null,
|
region: null,
|
||||||
regionChoices: REGIONS,
|
|
||||||
sinlgeCloudKeyChoice: null,
|
sinlgeCloudKeyChoice: null,
|
||||||
|
regionChoices: REGIONS,
|
||||||
|
mode: 'new',
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
@ -137,6 +138,24 @@ export default Component.extend(NewOrEdit, {
|
||||||
return 'saveCancel.saving';
|
return 'saveCancel.saving';
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
validate() {
|
||||||
|
var ok = this._super(...arguments);
|
||||||
|
let errors = get(this, 'errors') || [];
|
||||||
|
const { cloudCredentialType } = this;
|
||||||
|
|
||||||
|
if (cloudCredentialType === 'amazon') {
|
||||||
|
if (!get(this, 'region')) {
|
||||||
|
ok = false;
|
||||||
|
|
||||||
|
errors.pushObject(this.intl.t('modalAddCloudKey.errors.region'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set(this, 'errors', errors);
|
||||||
|
|
||||||
|
return ok;
|
||||||
|
},
|
||||||
|
|
||||||
willSave() {
|
willSave() {
|
||||||
set(this, 'errors', null);
|
set(this, 'errors', null);
|
||||||
|
|
||||||
|
|
@ -202,7 +221,7 @@ export default Component.extend(NewOrEdit, {
|
||||||
setError(message = '') {
|
setError(message = '') {
|
||||||
setProperties(this, {
|
setProperties(this, {
|
||||||
validatingKeys: false,
|
validatingKeys: false,
|
||||||
errors: [this.intl.t('modalAddCloudKey.error', { status: message })],
|
errors: [this.intl.t('modalAddCloudKey.errors.validation', { status: message })],
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
<section class="horizontal-form container-fluid">
|
<section class="horizontal-form container-fluid">
|
||||||
{{#unless disableHeader}}
|
{{#unless disableHeader}}
|
||||||
<h2>
|
<h2>
|
||||||
{{t "modalAddCloudKey.header"}}
|
{{#if isNew}}
|
||||||
|
{{t "modalAddCloudKey.header.new"}}
|
||||||
|
{{else if isEdit}}
|
||||||
|
{{t "modalAddCloudKey.header.edit"}}
|
||||||
|
{{/if}}
|
||||||
</h2>
|
</h2>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
@ -49,7 +53,9 @@
|
||||||
{{#if (eq cloudCredentialType "amazon")}}
|
{{#if (eq cloudCredentialType "amazon")}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<label class="acc-label">{{t "nodeDriver.amazonec2.region.label"}}</label>
|
<label class="acc-label">
|
||||||
|
{{t "nodeDriver.amazonec2.region.label"}}{{field-required}}
|
||||||
|
</label>
|
||||||
<select class="form-control" onchange={{action (mut region) value="target.value"}}>
|
<select class="form-control" onchange={{action (mut region) value="target.value"}}>
|
||||||
<option value="" selected={{eq region choice}}>Select a region</option>
|
<option value="" selected={{eq region choice}}>Select a region</option>
|
||||||
{{#each regionChoices as |choice|}}
|
{{#each regionChoices as |choice|}}
|
||||||
|
|
@ -204,7 +210,7 @@
|
||||||
{{top-errors errors=errors}}
|
{{top-errors errors=errors}}
|
||||||
{{save-cancel
|
{{save-cancel
|
||||||
cancel=cancelAdd
|
cancel=cancelAdd
|
||||||
editing=originalModel
|
editing=isEdit
|
||||||
save="save"
|
save="save"
|
||||||
savingLabel=savingLabel
|
savingLabel=savingLabel
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
import Component from '@ember/component';
|
import Component from '@ember/component';
|
||||||
import ModalBase from 'shared/mixins/modal-base';
|
import ModalBase from 'shared/mixins/modal-base';
|
||||||
import layout from './template';
|
import layout from './template';
|
||||||
|
import { alias } from '@ember/object/computed';
|
||||||
|
|
||||||
export default Component.extend(ModalBase, {
|
export default Component.extend(ModalBase, {
|
||||||
layout,
|
layout,
|
||||||
classNames: ['large-modal', 'alert'],
|
classNames: ['large-modal', 'alert'],
|
||||||
|
mode: alias('modalOpts.mode'),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{{cru-cloud-credential
|
{{cru-cloud-credential
|
||||||
originalModel=modalOpts.cloudCredential
|
|
||||||
doneSavingCloudCredential=(action "close")
|
|
||||||
cancelAdd=(action "cancel")
|
cancelAdd=(action "cancel")
|
||||||
|
doneSavingCloudCredential=(action "close")
|
||||||
|
mode=mode
|
||||||
|
originalModel=modalOpts.cloudCredential
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ export default Controller.extend(ViewNewEdit, {
|
||||||
projectsToRemoveOnUpgrade: null,
|
projectsToRemoveOnUpgrade: null,
|
||||||
errors: null,
|
errors: null,
|
||||||
originalModel: null,
|
originalModel: null,
|
||||||
|
mode: 'new',
|
||||||
recordType: 'multi',
|
recordType: 'multi',
|
||||||
|
|
||||||
headers: HEADERS,
|
headers: HEADERS,
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,18 @@
|
||||||
<section class="header">
|
<section class="header">
|
||||||
<h1>
|
<h1>
|
||||||
{{t "globalDnsPage.entriesPage.add"}}
|
{{#if isNew}}
|
||||||
|
{{t "globalDnsPage.entriesPage.header.new"}}
|
||||||
|
{{else if isEdit}}
|
||||||
|
{{t "globalDnsPage.entriesPage.header.edit"}}
|
||||||
|
{{/if}}
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<form class="horizontal-form container-fluid text-left" autocomplete="off">
|
<form class="horizontal-form container-fluid text-left" autocomplete="off">
|
||||||
{{#accordion-list as |al expandFn|}}
|
{{#accordion-list as |al expandFn|}}
|
||||||
{{#accordion-list-item
|
{{#accordion-list-item
|
||||||
title=(t "globalDnsPage.providersPage.options.title")
|
title=(t "globalDnsPage.entriesPage.options.title")
|
||||||
detail=(t "globalDnsPage.providersPage.options.detail")
|
detail=(t "globalDnsPage.entriesPage.options.detail")
|
||||||
expandAll=al.expandAll
|
expandAll=al.expandAll
|
||||||
expand=(action expandFn)
|
expand=(action expandFn)
|
||||||
expandOnInit=true
|
expandOnInit=true
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import Controller from '@ember/controller';
|
import Controller from '@ember/controller';
|
||||||
import { get, set, computed } from '@ember/object';
|
import { get, set, computed } from '@ember/object';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
import NewOrEdit from 'ui/mixins/new-or-edit';
|
import ViewNewEdit from 'shared/mixins/view-new-edit';
|
||||||
import { alias } from '@ember/object/computed';
|
import { alias } from '@ember/object/computed';
|
||||||
|
|
||||||
const DNS_PROVIDERS = ['route53', 'cloudflare', 'alidns'];
|
const DNS_PROVIDERS = ['route53', 'cloudflare', 'alidns'];
|
||||||
|
|
||||||
export default Controller.extend(NewOrEdit, {
|
export default Controller.extend(ViewNewEdit, {
|
||||||
router: service(),
|
router: service(),
|
||||||
globalStore: service(),
|
globalStore: service(),
|
||||||
|
|
||||||
|
|
@ -14,6 +14,7 @@ export default Controller.extend(NewOrEdit, {
|
||||||
id: null,
|
id: null,
|
||||||
|
|
||||||
activeProvider: 'route53',
|
activeProvider: 'route53',
|
||||||
|
mode: 'new',
|
||||||
saveDisabled: false,
|
saveDisabled: false,
|
||||||
config: alias('model'),
|
config: alias('model'),
|
||||||
primaryResource: alias('config'),
|
primaryResource: alias('config'),
|
||||||
|
|
@ -46,8 +47,8 @@ export default Controller.extend(NewOrEdit, {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
availableProviders: computed('editing', function() {
|
availableProviders: computed('isEdit', function() {
|
||||||
if ( get(this, 'editing') ) {
|
if ( get(this, 'isEdit') ) {
|
||||||
return [{ name: get(this, 'activeProvider') }];
|
return [{ name: get(this, 'activeProvider') }];
|
||||||
} else {
|
} else {
|
||||||
return DNS_PROVIDERS.map( (p) => {
|
return DNS_PROVIDERS.map( (p) => {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import Route from '@ember/routing/route';
|
import Route from '@ember/routing/route';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
import { get, set, setProperties } from '@ember/object';
|
import { get, setProperties } from '@ember/object';
|
||||||
import { all } from 'rsvp';
|
import { all } from 'rsvp';
|
||||||
|
|
||||||
export default Route.extend({
|
export default Route.extend({
|
||||||
|
|
@ -26,10 +26,14 @@ export default Route.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
setupController(controller, model) {
|
setupController(controller, model) {
|
||||||
set(controller, 'editing', model && get(model, 'id'));
|
if (model && get(model, 'id')) {
|
||||||
if ( get(model, 'provider') ) {
|
controller.set('mode', 'edit');
|
||||||
set(controller, 'activeProvider', get(model, 'provider'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( get(model, 'provider') ) {
|
||||||
|
controller.set('activeProvider', get(model, 'provider'));
|
||||||
|
}
|
||||||
|
|
||||||
this._super(controller, model);
|
this._super(controller, model);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -37,7 +41,8 @@ export default Route.extend({
|
||||||
if (isExiting) {
|
if (isExiting) {
|
||||||
setProperties(controller, {
|
setProperties(controller, {
|
||||||
id: null,
|
id: null,
|
||||||
activeProvider: 'route53'
|
activeProvider: 'route53',
|
||||||
|
mode: 'new',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
<section class="header">
|
<section class="header">
|
||||||
<h1>
|
<h1>
|
||||||
{{t "globalDnsPage.providersPage.add"}}
|
{{#if isNew}}
|
||||||
|
{{t "globalDnsPage.providersPage.header.new"}}
|
||||||
|
{{else if isEdit}}
|
||||||
|
{{t "globalDnsPage.providersPage.header.edit"}}
|
||||||
|
{{/if}}
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
@ -59,6 +63,7 @@
|
||||||
cancel="cancel"
|
cancel="cancel"
|
||||||
classNames="text-center mt-20"
|
classNames="text-center mt-20"
|
||||||
save="save"
|
save="save"
|
||||||
|
editing=isEdit
|
||||||
saveDisabled=saveDisabled
|
saveDisabled=saveDisabled
|
||||||
}}
|
}}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
addCloudKey() {
|
addCloudKey() {
|
||||||
this.modal.toggleModal('modal-add-cloud-credential');
|
this.modal.toggleModal('modal-add-cloud-credential', { mode: 'new' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<section>
|
<section>
|
||||||
{{form-name-description
|
{{form-name-description
|
||||||
model=config
|
model=config
|
||||||
nameDisabled=editing
|
nameDisabled=isEdit
|
||||||
}}
|
}}
|
||||||
</section>
|
</section>
|
||||||
<form class="horizontal-form container-fluid text-left" autocomplete="off">
|
<form class="horizontal-form container-fluid text-left" autocomplete="off">
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<section>
|
<section>
|
||||||
{{form-name-description
|
{{form-name-description
|
||||||
model=config
|
model=config
|
||||||
nameDisabled=editing
|
nameDisabled=isEdit
|
||||||
}}
|
}}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<section>
|
<section>
|
||||||
{{form-name-description
|
{{form-name-description
|
||||||
model=config
|
model=config
|
||||||
nameDisabled=editing
|
nameDisabled=isEdit
|
||||||
}}
|
}}
|
||||||
</section>
|
</section>
|
||||||
<form class="horizontal-form container-fluid text-left" autocomplete="off">
|
<form class="horizontal-form container-fluid text-left" autocomplete="off">
|
||||||
|
|
|
||||||
|
|
@ -3,40 +3,40 @@
|
||||||
|
|
||||||
{{#if (eq step 1) }}
|
{{#if (eq step 1) }}
|
||||||
{{#accordion-list-item
|
{{#accordion-list-item
|
||||||
title=(t "clusterNew.azureaks.access.title")
|
title=(t "clusterNew.azureaks.access.title")
|
||||||
detail=(t "clusterNew.azureaks.access.detail")
|
detail=(t "clusterNew.azureaks.access.detail")
|
||||||
showExpand=false
|
showExpand=false
|
||||||
expandOnInit=true
|
expandOnInit=true
|
||||||
expandAll=al.expandAll
|
expandAll=al.expandAll
|
||||||
expand=(action expandFn)
|
expand=(action expandFn)
|
||||||
}}
|
}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col span-6 mb-0">
|
<div class="col span-6 mb-0">
|
||||||
<label class="acc-label" for="azureaks-subscription-id" >{{t "clusterNew.azureaks.subscriptionId.label"}}{{field-required}}</label>
|
<label class="acc-label" for="azureaks-subscription-id" >{{t "clusterNew.azureaks.subscriptionId.label"}}{{field-required}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isEditable
|
editable=isEditable
|
||||||
value=config.subscriptionId
|
value=config.subscriptionId
|
||||||
}}
|
}}
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-subscription-id"
|
id="azureaks-subscription-id"
|
||||||
placeholder=(t "clusterNew.azureaks.subscriptionId.placeholder")
|
placeholder=(t "clusterNew.azureaks.subscriptionId.placeholder")
|
||||||
type="text"
|
type="text"
|
||||||
value=config.subscriptionId
|
value=config.subscriptionId
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col span-6 mb-0">
|
<div class="col span-6 mb-0">
|
||||||
<label class="acc-label" for="azureaks-tenant-id">{{t "clusterNew.azureaks.tenant.label"}}{{field-required}}</label>
|
<label class="acc-label" for="azureaks-tenant-id">{{t "clusterNew.azureaks.tenant.label"}}{{field-required}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isEditable
|
editable=isEditable
|
||||||
value=config.tenantId
|
value=config.tenantId
|
||||||
}}
|
}}
|
||||||
{{input type="text"
|
{{input type="text"
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-tenant-id"
|
id="azureaks-tenant-id"
|
||||||
placeholder=(t "clusterNew.azureaks.tenant.placeholder")
|
placeholder=(t "clusterNew.azureaks.tenant.placeholder")
|
||||||
value=config.tenantId
|
value=config.tenantId
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -46,46 +46,46 @@
|
||||||
<div class="col span-6 mb-0">
|
<div class="col span-6 mb-0">
|
||||||
<label class="acc-label" for="azureaks-client-id">{{t "clusterNew.azureaks.clientId.label"}}{{field-required}}</label>
|
<label class="acc-label" for="azureaks-client-id">{{t "clusterNew.azureaks.clientId.label"}}{{field-required}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isEditable
|
editable=isEditable
|
||||||
value=config.clientId
|
value=config.clientId
|
||||||
}}
|
}}
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-client-id"
|
id="azureaks-client-id"
|
||||||
placeholder=(t "clusterNew.azureaks.clientId.placeholder")
|
placeholder=(t "clusterNew.azureaks.clientId.placeholder")
|
||||||
type="text"
|
type="text"
|
||||||
value=config.clientId
|
value=config.clientId
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col span-6 mb-0">
|
<div class="col span-6 mb-0">
|
||||||
<label class="acc-label" for="azureaks-client-secret">{{t "clusterNew.azureaks.clientSecret.label"}}{{field-required}}</label>
|
<label class="acc-label" for="azureaks-client-secret">{{t "clusterNew.azureaks.clientSecret.label"}}{{field-required}}</label>
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-client-secret"
|
id="azureaks-client-secret"
|
||||||
placeholder=(t "clusterNew.azureaks.clientSecret.placeholder")
|
placeholder=(t "clusterNew.azureaks.clientSecret.placeholder")
|
||||||
type="password"
|
type="password"
|
||||||
value=config.clientSecret
|
value=config.clientSecret
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<label class="acc-label" for="azureaks-location">{{t "clusterNew.azureaks.location.label"}}{{field-required}}</label>
|
<label class="acc-label" for="azureaks-location">{{t "clusterNew.azureaks.location.label"}}{{field-required}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isEditable
|
editable=isEditable
|
||||||
value=config.location
|
value=config.location
|
||||||
}}
|
}}
|
||||||
{{new-select
|
{{new-select
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
content=zones
|
content=zones
|
||||||
id="azureaks-location"
|
id="azureaks-location"
|
||||||
localizedPrompt=true
|
localizedPrompt=true
|
||||||
optionLabelPath="displayName"
|
optionLabelPath="displayName"
|
||||||
optionValuePath="name"
|
optionValuePath="name"
|
||||||
prompt="clusterNew.azureaks.location.prompt"
|
prompt="clusterNew.azureaks.location.prompt"
|
||||||
value=config.location
|
value=config.location
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -99,47 +99,47 @@
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/accordion-list-item}}
|
{{/accordion-list-item}}
|
||||||
{{save-cancel
|
{{save-cancel
|
||||||
editing=isEditing
|
editing=isEditing
|
||||||
save="authenticate"
|
save="authenticate"
|
||||||
saveDisabled=saveDisabled
|
saveDisabled=saveDisabled
|
||||||
createLabel="clusterNew.azureaks.authenticate.next"
|
createLabel="clusterNew.azureaks.authenticate.next"
|
||||||
cancel=close
|
cancel=close
|
||||||
}}
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if (gte step 2) }}
|
{{#if (gte step 2) }}
|
||||||
|
|
||||||
{{#accordion-list-item
|
{{#accordion-list-item
|
||||||
title=(t "clusterNew.customize.title")
|
title=(t "clusterNew.customize.title")
|
||||||
detail=(t "clusterNew.customize.detail")
|
detail=(t "clusterNew.customize.detail")
|
||||||
expandAll=al.expandAll
|
expandAll=al.expandAll
|
||||||
expandOnInit=true
|
expandOnInit=true
|
||||||
expand=(action expandFn)
|
expand=(action expandFn)
|
||||||
}}
|
}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<label class="acc-label" for="azureaks-kube-version">{{t "clusterNew.azureaks.kubernetesVersion.label"}}</label>
|
<label class="acc-label" for="azureaks-kube-version">{{t "clusterNew.azureaks.kubernetesVersion.label"}}</label>
|
||||||
|
|
||||||
{{form-versions
|
{{form-versions
|
||||||
cluster=cluster
|
cluster=cluster
|
||||||
editing=(eq mode "edit")
|
editing=(eq mode "edit")
|
||||||
initialVersion=config.kubernetesVersion
|
initialVersion=config.kubernetesVersion
|
||||||
value=config.kubernetesVersion
|
value=config.kubernetesVersion
|
||||||
versions=versions
|
versions=versions
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<label class="acc-label" for="azureaks-master-dns-prefix">{{t "clusterNew.azureaks.dns.label"}}</label>
|
<label class="acc-label" for="azureaks-master-dns-prefix">{{t "clusterNew.azureaks.dns.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.masterDnsPrefix
|
value=config.masterDnsPrefix
|
||||||
}}
|
}}
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-master-dns-prefix"
|
id="azureaks-master-dns-prefix"
|
||||||
placeholder=(t "clusterNew.azureaks.dns.placeholder")
|
placeholder=(t "clusterNew.azureaks.dns.placeholder")
|
||||||
type="text"
|
type="text"
|
||||||
value=config.masterDnsPrefix
|
value=config.masterDnsPrefix
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -151,15 +151,15 @@
|
||||||
<div class="form-control-static">
|
<div class="form-control-static">
|
||||||
<label class="hand mr-20">
|
<label class="hand mr-20">
|
||||||
{{radio-button
|
{{radio-button
|
||||||
selection=config.enableHttpApplicationRouting
|
selection=config.enableHttpApplicationRouting
|
||||||
value=true
|
value=true
|
||||||
}}
|
}}
|
||||||
{{t "generic.enabled"}}
|
{{t "generic.enabled"}}
|
||||||
</label>
|
</label>
|
||||||
<label class="hand">
|
<label class="hand">
|
||||||
{{radio-button
|
{{radio-button
|
||||||
selection=config.enableHttpApplicationRouting
|
selection=config.enableHttpApplicationRouting
|
||||||
value=false
|
value=false
|
||||||
}}
|
}}
|
||||||
{{t "generic.disabled"}}
|
{{t "generic.disabled"}}
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -170,15 +170,15 @@
|
||||||
<div class="form-control-static">
|
<div class="form-control-static">
|
||||||
<label class="hand mr-20">
|
<label class="hand mr-20">
|
||||||
{{radio-button
|
{{radio-button
|
||||||
selection=config.enableMonitoring
|
selection=config.enableMonitoring
|
||||||
value=true
|
value=true
|
||||||
}}
|
}}
|
||||||
{{t "generic.enabled"}}
|
{{t "generic.enabled"}}
|
||||||
</label>
|
</label>
|
||||||
<label class="hand">
|
<label class="hand">
|
||||||
{{radio-button
|
{{radio-button
|
||||||
selection=config.enableMonitoring
|
selection=config.enableMonitoring
|
||||||
value=false
|
value=false
|
||||||
}}
|
}}
|
||||||
{{t "generic.disabled"}}
|
{{t "generic.disabled"}}
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
<label class="acc-label">{{t "clusterNew.azureaks.tags.label"}}</label>
|
<label class="acc-label">{{t "clusterNew.azureaks.tags.label"}}</label>
|
||||||
{{form-key-value
|
{{form-key-value
|
||||||
initialMap=tags
|
initialMap=tags
|
||||||
changed=(action 'setTags')
|
changed=(action "setTags")
|
||||||
addActionLabel="clusterNew.azureaks.tags.addActionLabel"
|
addActionLabel="clusterNew.azureaks.tags.addActionLabel"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -200,27 +200,27 @@
|
||||||
{{/accordion-list-item}}
|
{{/accordion-list-item}}
|
||||||
|
|
||||||
{{#accordion-list-item
|
{{#accordion-list-item
|
||||||
title=(t "clusterNew.nodes.title")
|
title=(t "clusterNew.nodes.title")
|
||||||
detail=(t "clusterNew.nodes.detail")
|
detail=(t "clusterNew.nodes.detail")
|
||||||
showExpand=false
|
showExpand=false
|
||||||
expandOnInit=true
|
expandOnInit=true
|
||||||
expandAll=al.expandAll
|
expandAll=al.expandAll
|
||||||
expand=(action expandFn)
|
expand=(action expandFn)
|
||||||
}}
|
}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<label class="acc-label" for="azureaks-admin-username-prefix">{{t "clusterNew.azureaks.admin.label"}}</label>
|
<label class="acc-label" for="azureaks-admin-username-prefix">{{t "clusterNew.azureaks.admin.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.adminUsername
|
value=config.adminUsername
|
||||||
}}
|
}}
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-admin-username-prefix"
|
id="azureaks-admin-username-prefix"
|
||||||
placeholder=(t "clusterNew.azureaks.admin.placeholder")
|
placeholder=(t "clusterNew.azureaks.admin.placeholder")
|
||||||
type="text"
|
type="text"
|
||||||
value=config.adminUsername
|
value=config.adminUsername
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -228,26 +228,26 @@
|
||||||
<label class="acc-label" for="azureaks-resource-group">
|
<label class="acc-label" for="azureaks-resource-group">
|
||||||
{{t "clusterNew.azureaks.resourceGroup.label"}}{{field-required}}
|
{{t "clusterNew.azureaks.resourceGroup.label"}}{{field-required}}
|
||||||
{{#tooltip-element
|
{{#tooltip-element
|
||||||
type="tooltip-basic"
|
type="tooltip-basic"
|
||||||
model=(t "clusterNew.azureaks.resourceGroup.helpText")
|
model=(t "clusterNew.azureaks.resourceGroup.helpText")
|
||||||
tooltipTemplate="tooltip-static"
|
tooltipTemplate="tooltip-static"
|
||||||
aria-describedby="tooltip-base"
|
aria-describedby="tooltip-base"
|
||||||
tooltipFor="tooltipResourceGroup"
|
tooltipFor="tooltipResourceGroup"
|
||||||
placement="top"
|
placement="top"
|
||||||
}}
|
}}
|
||||||
<i class="icon icon-info"></i>
|
<i class="icon icon-info"></i>
|
||||||
{{/tooltip-element}}
|
{{/tooltip-element}}
|
||||||
</label>
|
</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.resourceGroup
|
value=config.resourceGroup
|
||||||
}}
|
}}
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-resource-group"
|
id="azureaks-resource-group"
|
||||||
placeholder=(t "clusterNew.azureaks.resourceGroup.placeholder")
|
placeholder=(t "clusterNew.azureaks.resourceGroup.placeholder")
|
||||||
type="text"
|
type="text"
|
||||||
value=config.resourceGroup
|
value=config.resourceGroup
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -257,24 +257,24 @@
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<label class="acc-label" for="azureaks-config-count">{{t "clusterNew.azureaks.count.label"}}</label>
|
<label class="acc-label" for="azureaks-config-count">{{t "clusterNew.azureaks.count.label"}}</label>
|
||||||
{{input-number
|
{{input-number
|
||||||
id="azureaks-config-count"
|
id="azureaks-config-count"
|
||||||
min=1
|
min=1
|
||||||
value=config.count
|
value=config.count
|
||||||
placeholder=(t "clusterNew.azureaks.count.placeholder")
|
placeholder=(t "clusterNew.azureaks.count.placeholder")
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<label class="acc-label" for="azureaks-os-disk-size">{{t "clusterNew.azureaks.diskSizeGb.label"}}</label>
|
<label class="acc-label" for="azureaks-os-disk-size">{{t "clusterNew.azureaks.diskSizeGb.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.agentOsdiskSize
|
value=config.agentOsdiskSize
|
||||||
}}
|
}}
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
{{input-number
|
{{input-number
|
||||||
id="azureaks-os-disk-size"
|
id="azureaks-os-disk-size"
|
||||||
min=0
|
min=0
|
||||||
value=config.agentOsdiskSize
|
value=config.agentOsdiskSize
|
||||||
placeholder=(t "clusterNew.azureaks.diskSizeGb.placeholder")
|
placeholder=(t "clusterNew.azureaks.diskSizeGb.placeholder")
|
||||||
}}
|
}}
|
||||||
<span class="input-group-addon bg-default">{{t "generic.gigabyte"}}</span>
|
<span class="input-group-addon bg-default">{{t "generic.gigabyte"}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -285,18 +285,18 @@
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<label class="acc-label" for="azureaks-vm-disk-size">{{t "clusterNew.azureaks.machineType.label"}}</label>
|
<label class="acc-label" for="azureaks-vm-disk-size">{{t "clusterNew.azureaks.machineType.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.agentVmSize
|
value=config.agentVmSize
|
||||||
}}
|
}}
|
||||||
{{new-select
|
{{new-select
|
||||||
id="azureaks-vm-disk-size"
|
id="azureaks-vm-disk-size"
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
optionValuePath="value"
|
optionValuePath="value"
|
||||||
optionLabelPath="value"
|
optionLabelPath="value"
|
||||||
content=machineSizes
|
content=machineSizes
|
||||||
value=config.agentVmSize
|
value=config.agentVmSize
|
||||||
prompt="clusterNew.azureaks.machineType.prompt"
|
prompt="clusterNew.azureaks.machineType.prompt"
|
||||||
localizedPrompt=true
|
localizedPrompt=true
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -307,17 +307,17 @@
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label class={{concat (if editing "text-muted") " acc-label mr-20"}}>
|
<label class={{concat (if editing "text-muted") " acc-label mr-20"}}>
|
||||||
{{radio-button
|
{{radio-button
|
||||||
selection=netMode
|
selection=netMode
|
||||||
value="default"
|
value="default"
|
||||||
disabled=editing
|
disabled=editing
|
||||||
}}
|
}}
|
||||||
{{t "clusterNew.azureaks.networking.default"}}
|
{{t "clusterNew.azureaks.networking.default"}}
|
||||||
</label>
|
</label>
|
||||||
<label class={{concat (if editing "text-muted") " acc-label"}}>
|
<label class={{concat (if editing "text-muted") " acc-label"}}>
|
||||||
{{radio-button
|
{{radio-button
|
||||||
selection=netMode
|
selection=netMode
|
||||||
value="advanced"
|
value="advanced"
|
||||||
disabled=editing
|
disabled=editing
|
||||||
}}
|
}}
|
||||||
{{t "clusterNew.azureaks.networking.advanced"}}
|
{{t "clusterNew.azureaks.networking.advanced"}}
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -328,19 +328,19 @@
|
||||||
<div class="col span-6 mt-0">
|
<div class="col span-6 mt-0">
|
||||||
<label class="acc-label" for="azureaks-advanced-virtual-network">{{t "clusterNew.azureaks.networking.vnet.label"}}</label>
|
<label class="acc-label" for="azureaks-advanced-virtual-network">{{t "clusterNew.azureaks.networking.vnet.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=networkChoice
|
value=networkChoice
|
||||||
}}
|
}}
|
||||||
{{new-select
|
{{new-select
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
content=filteredVirtualNetworks
|
content=filteredVirtualNetworks
|
||||||
id="azureaks-advanced-virtual-network"
|
id="azureaks-advanced-virtual-network"
|
||||||
localizedPrompt=false
|
localizedPrompt=false
|
||||||
optionLabelPath="name"
|
optionLabelPath="name"
|
||||||
optionValuePath="value"
|
optionValuePath="value"
|
||||||
optionGroupPath="group"
|
optionGroupPath="group"
|
||||||
prompt=(t "clusterNew.azureaks.networking.vnet.prompt")
|
prompt=(t "clusterNew.azureaks.networking.vnet.prompt")
|
||||||
value=networkChoice
|
value=networkChoice
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -349,15 +349,15 @@
|
||||||
<div class="col span-6 mt-0">
|
<div class="col span-6 mt-0">
|
||||||
<label class="acc-label" for="azureaks-service-cidr-id">{{t "clusterNew.azureaks.networking.serviceCidr.label"}}</label>
|
<label class="acc-label" for="azureaks-service-cidr-id">{{t "clusterNew.azureaks.networking.serviceCidr.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.serviceCidr
|
value=config.serviceCidr
|
||||||
}}
|
}}
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-service-cidr-id"
|
id="azureaks-service-cidr-id"
|
||||||
placeholder=(t "clusterNew.azureaks.networking.serviceCidr.prompt")
|
placeholder=(t "clusterNew.azureaks.networking.serviceCidr.prompt")
|
||||||
type="text"
|
type="text"
|
||||||
value=config.serviceCidr
|
value=config.serviceCidr
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
|
|
@ -367,15 +367,15 @@
|
||||||
<div class="col span-6 mt-0">
|
<div class="col span-6 mt-0">
|
||||||
<label class="acc-label" for="azureaks-dns-service-ip">{{t "clusterNew.azureaks.networking.dnsServiceIp.label"}}</label>
|
<label class="acc-label" for="azureaks-dns-service-ip">{{t "clusterNew.azureaks.networking.dnsServiceIp.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.dnsServiceIp
|
value=config.dnsServiceIp
|
||||||
}}
|
}}
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-dns-service-ip"
|
id="azureaks-dns-service-ip"
|
||||||
type="text"
|
type="text"
|
||||||
value=config.dnsServiceIp
|
value=config.dnsServiceIp
|
||||||
placeholder=(t "clusterNew.azureaks.networking.dnsServiceIp.placeholder")
|
placeholder=(t "clusterNew.azureaks.networking.dnsServiceIp.placeholder")
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
|
|
@ -387,15 +387,15 @@
|
||||||
<div class="col span-6 mt-0">
|
<div class="col span-6 mt-0">
|
||||||
<label class="acc-label" for="azureaks-docker-service-ip">{{t "clusterNew.azureaks.networking.dockerBridgeCidr.label"}}</label>
|
<label class="acc-label" for="azureaks-docker-service-ip">{{t "clusterNew.azureaks.networking.dockerBridgeCidr.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.dockerBridgeCidr
|
value=config.dockerBridgeCidr
|
||||||
}}
|
}}
|
||||||
{{input
|
{{input
|
||||||
classNames="form-control"
|
classNames="form-control"
|
||||||
id="azureaks-docker-service-ip"
|
id="azureaks-docker-service-ip"
|
||||||
type="text"
|
type="text"
|
||||||
value=config.dockerBridgeCidr
|
value=config.dockerBridgeCidr
|
||||||
placeholder=(t "clusterNew.azureaks.networking.dockerBridgeCidr.placeholder")
|
placeholder=(t "clusterNew.azureaks.networking.dockerBridgeCidr.placeholder")
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
|
|
@ -405,14 +405,14 @@
|
||||||
<div class="col span-6 mt-0">
|
<div class="col span-6 mt-0">
|
||||||
<label class="acc-label">{{t "clusterNew.azureaks.networkPolicy.label"}}</label>
|
<label class="acc-label">{{t "clusterNew.azureaks.networkPolicy.label"}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isNew
|
editable=isNew
|
||||||
value=config.networkPolicy
|
value=config.networkPolicy
|
||||||
}}
|
}}
|
||||||
{{searchable-select
|
{{searchable-select
|
||||||
class="form-control"
|
class="form-control"
|
||||||
content=networkPolicyContent
|
content=networkPolicyContent
|
||||||
value=config.networkPolicy
|
value=config.networkPolicy
|
||||||
placeholder=(t "clusterNew.azureaks.networkPolicy.placeholder")
|
placeholder=(t "clusterNew.azureaks.networkPolicy.placeholder")
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -424,26 +424,30 @@
|
||||||
<div class="col span-12">
|
<div class="col span-12">
|
||||||
<label class="acc-label" for="azureaks-advanced-ssh-pub-key">{{t "clusterNew.azureaks.ssh.label"}}{{field-required}}</label>
|
<label class="acc-label" for="azureaks-advanced-ssh-pub-key">{{t "clusterNew.azureaks.ssh.label"}}{{field-required}}</label>
|
||||||
{{#input-or-display
|
{{#input-or-display
|
||||||
editable=isEditable
|
editable=isEditable
|
||||||
value=config.sshPublicKeyContents
|
value=config.sshPublicKeyContents
|
||||||
}}
|
}}
|
||||||
{{input-text-file
|
{{input-text-file
|
||||||
id="azureaks-advanced-ssh-pub-key"
|
id="azureaks-advanced-ssh-pub-key"
|
||||||
classNames="box"
|
classNames="box"
|
||||||
value=config.sshPublicKeyContents
|
value=config.sshPublicKeyContents
|
||||||
multiple=true
|
multiple=true
|
||||||
canChangeName=false
|
canChangeName=false
|
||||||
accept="application/x-x509-ca-cert,text/plain,.pem,.crt,.pub"
|
accept="application/x-x509-ca-cert,text/plain,.pem,.crt,.pub"
|
||||||
minHeight=60
|
minHeight=60
|
||||||
placeholder="newCertificate.cert.placeholder"
|
placeholder="newCertificate.cert.placeholder"
|
||||||
shouldChangeName=false
|
shouldChangeName=false
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/accordion-list-item}}
|
{{/accordion-list-item}}
|
||||||
|
|
||||||
{{save-cancel editing=isEditing save="driverSave" cancel=close}}
|
{{save-cancel
|
||||||
|
editing=(eq mode "edit")
|
||||||
|
save="driverSave"
|
||||||
|
cancel=close
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,5 +158,9 @@
|
||||||
|
|
||||||
{{#if (and isEdit (not provider))}}
|
{{#if (and isEdit (not provider))}}
|
||||||
{{top-errors errors=errors}}
|
{{top-errors errors=errors}}
|
||||||
{{save-cancel editing=true save="save" cancel="close"}}
|
{{save-cancel
|
||||||
|
editing=isEdit
|
||||||
|
save="save"
|
||||||
|
cancel="close"
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ export default Component.extend({
|
||||||
|
|
||||||
createLabel: 'saveCancel.create',
|
createLabel: 'saveCancel.create',
|
||||||
savingLabel: 'generic.loading',
|
savingLabel: 'generic.loading',
|
||||||
|
mode: 'new',
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
@ -43,18 +44,17 @@ export default Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
initSingleOrAddCredential() {
|
initSingleOrAddCredential() {
|
||||||
if ( isEmpty(get(this, 'primaryResource.cloudCredentialId')) && (get(this, 'cloudCredentials.length') || []) >= 1) {
|
let { cloudCredentials = [] } = this;
|
||||||
let singleCloudCredentialId = get(this, 'cloudCredentials.firstObject.id');
|
let singleCloudCredentialId = get((cloudCredentials || []), 'firstObject.id') || null;
|
||||||
|
|
||||||
|
if (isEmpty(get(this, 'cloudCredentials'))) {
|
||||||
next(() => {
|
next(() => {
|
||||||
set(this, 'primaryResource.cloudCredentialId', singleCloudCredentialId);
|
set(this, 'showAddCloudCredential', true);
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
if (isEmpty(get(this, 'cloudCredentials'))) {
|
|
||||||
next(() => {
|
|
||||||
set(this, 'showAddCloudCredential', true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
next(() => {
|
||||||
|
set(this, 'primaryResource.cloudCredentialId', singleCloudCredentialId);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
{{#if showAddCloudCredential}}
|
{{#if showAddCloudCredential}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{cru-cloud-credential
|
{{cru-cloud-credential
|
||||||
|
mode=mode
|
||||||
driverName=driverName
|
driverName=driverName
|
||||||
region=region
|
region=region
|
||||||
errors=errors
|
errors=errors
|
||||||
|
|
|
||||||
|
|
@ -1114,11 +1114,16 @@ globalDnsPage:
|
||||||
noApps: No Accessible Multi Cluster Apps
|
noApps: No Accessible Multi Cluster Apps
|
||||||
noProviders: No Accessible Providers
|
noProviders: No Accessible Providers
|
||||||
entriesPage:
|
entriesPage:
|
||||||
|
header:
|
||||||
|
new: Add Global DNS Entry
|
||||||
|
edit: Edit Global DNS Entry
|
||||||
|
options:
|
||||||
|
title: Entry Options
|
||||||
|
detail: Customize options for the DNS entry
|
||||||
access:
|
access:
|
||||||
noAccessMulti: You do not have access to the target app
|
noAccessMulti: You do not have access to the target app
|
||||||
noAccessProvider: You do not have access to the provider
|
noAccessProvider: You do not have access to the provider
|
||||||
noAccessProject: You do not have access to the target project
|
noAccessProject: You do not have access to the target project
|
||||||
add: Add Global DNS Entry
|
|
||||||
projectHelp: "To finalize Global DNS for projects you must add the following annotation label ( <code>rancher.io/globalDNS.hostname</code> ) on the ingress in the project, where <code>hostname</code> is the host name used in the routing rules."
|
projectHelp: "To finalize Global DNS for projects you must add the following annotation label ( <code>rancher.io/globalDNS.hostname</code> ) on the ingress in the project, where <code>hostname</code> is the host name used in the routing rules."
|
||||||
table:
|
table:
|
||||||
name: Name
|
name: Name
|
||||||
|
|
@ -1148,7 +1153,9 @@ globalDnsPage:
|
||||||
label: DNS TTL
|
label: DNS TTL
|
||||||
providersPage:
|
providersPage:
|
||||||
title: Global DNS Providers
|
title: Global DNS Providers
|
||||||
add: Add Global DNS Provider
|
header:
|
||||||
|
new: Add Global DNS Provider
|
||||||
|
edit: Edit Global DNS Provider
|
||||||
options:
|
options:
|
||||||
title: Provider Options
|
title: Provider Options
|
||||||
detail: Customize options for the DNS provider
|
detail: Customize options for the DNS provider
|
||||||
|
|
@ -5390,11 +5397,15 @@ modalAddPayment:
|
||||||
dollar: "US Dollar ($)"
|
dollar: "US Dollar ($)"
|
||||||
|
|
||||||
modalAddCloudKey:
|
modalAddCloudKey:
|
||||||
header: Add Cloud Credential
|
header:
|
||||||
|
new: Add Cloud Credential
|
||||||
|
edit: Edit Cloud Credential
|
||||||
type: Cloud Credential Type
|
type: Cloud Credential Type
|
||||||
saving:
|
saving:
|
||||||
validating: Validating Keys
|
validating: Validating Keys
|
||||||
error: '{ status }: There was a problem validating your keys. Enter valid credentials and try agian.'
|
errors:
|
||||||
|
validation: '{ status }: There was a problem validating your keys. Enter valid credentials and try agian.'
|
||||||
|
region: You must select a region in order to validate your keys
|
||||||
typeSelect:
|
typeSelect:
|
||||||
prompt: Choose a cloud credential provider type
|
prompt: Choose a cloud credential provider type
|
||||||
amazonec2:
|
amazonec2:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue