Merge pull request #2750 from westlywright/2.2-bugs

GDNS Provider - remove secret key param
This commit is contained in:
Westly Wright 2019-03-12 12:32:50 -07:00 committed by GitHub
commit 2b4cac7505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 2 deletions

View File

@ -57,6 +57,19 @@ export default Controller.extend(ViewNewEdit, {
} }
}), }),
validate() {
const providerConfig = get(this, `config.${ this.activeProvider }ProviderConfig`);
const { mode } = this;
if (mode === 'edit' && providerConfig && providerConfig.hasOwnProperty('secretKey')) {
if (providerConfig.secretKey === '' || providerConfig.secretKey === null) {
delete providerConfig.secretKey;
}
}
return this._super(...arguments);
},
doneSaving() { doneSaving() {
this.send('cancel'); this.send('cancel');
}, },

View File

@ -45,7 +45,20 @@
class="acc-label" class="acc-label"
for="alidns-api-key" for="alidns-api-key"
> >
{{t "globalDnsPage.providersPage.config.secretKey.label"}}{{field-required}} {{t "globalDnsPage.providersPage.config.secretKey.label"}}
{{#if (eq mode "edit")}}
{{#tooltip-element
type="tooltip-basic"
model=(t "globalDnsPage.providersPage.config.secretKey.info")
tooltipTemplate="tooltip-static"
aria-describedby="tooltip-base"
tooltipFor="tooltipSecretKey"
}}
<i class="icon icon-info"></i>
{{/tooltip-element}}
{{else}}
{{field-required}}
{{/if}}
</label> </label>
{{input {{input
classNames="form-control" classNames="form-control"

View File

@ -45,7 +45,20 @@
class="acc-label" class="acc-label"
for="route53-secret-key" for="route53-secret-key"
> >
{{t "globalDnsPage.providersPage.config.secretKey.label"}}{{field-required}} {{t "globalDnsPage.providersPage.config.secretKey.label"}}
{{#if (eq mode "edit")}}
{{#tooltip-element
type="tooltip-basic"
model=(t "globalDnsPage.providersPage.config.secretKey.info")
tooltipTemplate="tooltip-static"
aria-describedby="tooltip-base"
tooltipFor="tooltipSecretKey"
}}
<i class="icon icon-info"></i>
{{/tooltip-element}}
{{else}}
{{field-required}}
{{/if}}
</label> </label>
{{input {{input
classNames="form-control" classNames="form-control"

View File

@ -1176,6 +1176,7 @@ globalDnsPage:
secretKey: secretKey:
label: Secret Key label: Secret Key
placeholder: Your secret key placeholder: Your secret key
info: Secret key already provided. It is only required when updating the keys themselves.
apiEmail: apiEmail:
label: API Email label: API Email
placeholder: Your API Email placeholder: Your API Email