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