web/admin: only show non-backchannel providers in application provider select (#9658)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -18,7 +18,7 @@ export interface SummarizedSyncStatus {
|
||||
}
|
||||
|
||||
@customElement("ak-admin-status-chart-sync")
|
||||
export class LDAPSyncStatusChart extends AKChart<SummarizedSyncStatus[]> {
|
||||
export class SyncStatusChart extends AKChart<SummarizedSyncStatus[]> {
|
||||
getChartType(): string {
|
||||
return "doughnut";
|
||||
}
|
||||
@ -102,6 +102,19 @@ export class LDAPSyncStatusChart extends AKChart<SummarizedSyncStatus[]> {
|
||||
},
|
||||
msg("Google Workspace Provider"),
|
||||
),
|
||||
await this.fetchStatus(
|
||||
() => {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersMicrosoftEntraList();
|
||||
},
|
||||
(element) => {
|
||||
return new ProvidersApi(
|
||||
DEFAULT_CONFIG,
|
||||
).providersMicrosoftEntraSyncStatusRetrieve({
|
||||
id: element.pk,
|
||||
});
|
||||
},
|
||||
msg("Microsoft Entra Provider"),
|
||||
),
|
||||
await this.fetchStatus(
|
||||
() => {
|
||||
return new SourcesApi(DEFAULT_CONFIG).sourcesLdapList();
|
||||
|
@ -21,7 +21,7 @@ export class ProviderSelectModal extends TableModal<Provider> {
|
||||
}
|
||||
|
||||
@property({ type: Boolean })
|
||||
backchannelOnly = false;
|
||||
backchannel?: boolean;
|
||||
|
||||
@property()
|
||||
confirm!: (selectedItems: Provider[]) => Promise<unknown>;
|
||||
@ -34,7 +34,7 @@ export class ProviderSelectModal extends TableModal<Provider> {
|
||||
page: page,
|
||||
pageSize: (await uiConfig()).pagination.perPage,
|
||||
search: this.search || "",
|
||||
backchannelOnly: this.backchannelOnly,
|
||||
backchannel: this.backchannel,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ export class AkBackchannelProvidersInput extends AKElement {
|
||||
return html`
|
||||
<ak-form-element-horizontal label=${this.label} name=${this.name}>
|
||||
<div class="pf-c-input-group">
|
||||
<ak-provider-select-table ?backchannelOnly=${true} .confirm=${this.confirm}>
|
||||
<ak-provider-select-table ?backchannel=${true} .confirm=${this.confirm}>
|
||||
<button slot="trigger" class="pf-c-button pf-m-control" type="button">
|
||||
${this.tooltip ? this.tooltip : nothing}
|
||||
<i class="fas fa-plus" aria-hidden="true"></i>
|
||||
|
@ -15,6 +15,7 @@ const doGroupBy = (items: Provider[]) => groupBy(items, (item) => item.verboseNa
|
||||
async function fetch(query?: string) {
|
||||
const args: ProvidersAllListRequest = {
|
||||
ordering: "name",
|
||||
backchannel: false,
|
||||
};
|
||||
if (query !== undefined) {
|
||||
args.search = query;
|
||||
|
Reference in New Issue
Block a user