mirror of https://github.com/rancher/ui.git
azure ad add edit
This commit is contained in:
parent
4391288465
commit
e47a96f993
|
|
@ -23,7 +23,7 @@ export default Controller.extend({
|
|||
//new
|
||||
azureADConfig: alias('model.azureADConfig'),
|
||||
isEnabled: alias('azureADConfig.enabled'),
|
||||
// isEnabled: true,
|
||||
editing: false,
|
||||
mode: 'global',
|
||||
modeClass: 'span-4',
|
||||
|
||||
|
|
@ -36,6 +36,11 @@ export default Controller.extend({
|
|||
}),
|
||||
|
||||
actions: {
|
||||
|
||||
edit() {
|
||||
set(this, 'editing', true);
|
||||
},
|
||||
|
||||
toggleMode() {
|
||||
|
||||
if (get(this, 'mode') === 'global') {
|
||||
|
|
@ -59,6 +64,7 @@ export default Controller.extend({
|
|||
this.send('clearError');
|
||||
|
||||
const model = get(this, 'azureADConfig');
|
||||
const enabled = get(this, 'azureADConfig.enabled');
|
||||
|
||||
model.setProperties({
|
||||
accessMode: 'unrestricted',
|
||||
|
|
@ -70,13 +76,13 @@ export default Controller.extend({
|
|||
|
||||
set(this, 'errors', errors);
|
||||
set(this, 'testing', false);
|
||||
model.set('enabled', false);
|
||||
model.set('enabled', enabled);
|
||||
|
||||
} else {
|
||||
|
||||
set(this, 'testing', true);
|
||||
|
||||
delete model.enabled;
|
||||
// delete model.enabled;
|
||||
|
||||
model.doAction('testAndApply', {
|
||||
azureAdConfig: model,
|
||||
|
|
@ -89,7 +95,7 @@ export default Controller.extend({
|
|||
|
||||
}).catch((err) => {
|
||||
|
||||
set(model, 'enabled', false);
|
||||
set(model, 'enabled', enabled);
|
||||
|
||||
this.send('gotError', err);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,10 @@
|
|||
|
||||
<section class="">
|
||||
<div class="clearfix">
|
||||
<div class="pull-right">
|
||||
<div class="pull-right mt-10">
|
||||
<button class="btn btn-sm bg-primary" {{action "edit"}}>
|
||||
{{t 'generic.edit'}}
|
||||
</button>
|
||||
<button class="btn btn-sm right-divider-btn bg-error" {{action "disable"}}>
|
||||
{{t 'authPage.azuread.enabled.promptDisable'}}
|
||||
</button>
|
||||
|
|
@ -69,7 +72,7 @@
|
|||
{{/if}}
|
||||
|
||||
|
||||
{{#unless isEnabled}}
|
||||
{{#if (or (not isEnabled) editing)}}
|
||||
<section class="box mt-30">
|
||||
|
||||
<div class="row">
|
||||
|
|
@ -164,5 +167,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
{{/accordion-list}}
|
||||
|
|
@ -10,7 +10,7 @@ export default Controller.extend({
|
|||
drivers: computed(function() {
|
||||
return [
|
||||
{route: 'security.authentication.activedirectory', label: 'Active Directory', css: 'activedirectory', available: this.hasRecord('activedirectoryconfig') },
|
||||
// {route: 'security.authentication.azuread', label: 'Azure AD', css: 'azuread', available: this.hasRecord('azureadconfig') },
|
||||
{route: 'security.authentication.azuread', label: 'Azure AD', css: 'azuread', available: this.hasRecord('azureadconfig') },
|
||||
{route: 'security.authentication.github', label: 'GitHub', css: 'github', available: this.hasRecord('githubconfig') },
|
||||
// {route: 'security.authentication.openldap', label: 'OpenLDAP', css: 'openldap', available: this.hasRecord('openldapconfig') },
|
||||
// {route: 'security.authentication.shibboleth', label: 'Shibboleth', css: 'shibboleth', available: this.hasRecord('shibbolethconfig') },
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ authPage:
|
|||
header: 'Danger Zone™'
|
||||
warning: '<b class="text-danger">Caution:</b> Disabling access control will give complete control over {appName} to anyone that can reach this page or the API.'
|
||||
reallyDisable: 'Are you sure? Click again to really disable access control'
|
||||
promptDisable: Disable access control
|
||||
promptDisable: Disable Azure AD
|
||||
configure:
|
||||
header: '1. Configure Azure AD Account'
|
||||
adminAccountUsername:
|
||||
|
|
|
|||
Loading…
Reference in New Issue