Merge pull request #2387 from codyrancher/azure-endpoints-fix

Resolving an issue where endpoints werent editable in azure ad auth config
This commit is contained in:
codyrancher 2021-02-23 09:13:57 -07:00 committed by GitHub
commit ce6e220b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -99,7 +99,9 @@ export default {
}, },
tenantId() { tenantId() {
if (this.endpoint !== 'custom') {
this.setEndpoints(this.endpoint); this.setEndpoints(this.endpoint);
}
}, },
model: { model: {
@ -107,7 +109,9 @@ export default {
handler() { handler() {
this.model.accessMode = this.model.accessMode || 'unrestricted'; this.model.accessMode = this.model.accessMode || 'unrestricted';
this.model.rancherUrl = this.model.rancherUrl || this.replyUrl; this.model.rancherUrl = this.model.rancherUrl || this.replyUrl;
if (this.endpoint !== 'custom') {
this.setEndpoints(this.endpoint); this.setEndpoints(this.endpoint);
}
if (this.model.applicationSecret) { if (this.model.applicationSecret) {
this.$set(this, 'applicationSecret', this.model.applicationSecret); this.$set(this, 'applicationSecret', this.model.applicationSecret);
@ -119,7 +123,7 @@ export default {
methods: { methods: {
setEndpoints(endpoint) { setEndpoints(endpoint) {
Object.keys(ENDPOINT_MAPPING[endpoint]).forEach((key) => { Object.keys(ENDPOINT_MAPPING[endpoint]).forEach((key) => {
this.model[key] = ENDPOINT_MAPPING[endpoint][key].replace(TENANT_ID_TOKEN, this.model.tenantId); this.$set(this.model, key, ENDPOINT_MAPPING[endpoint][key].replace(TENANT_ID_TOKEN, this.model.tenantId));
}); });
}, },
}, },