web/admin: Show inbuilt authentik db as source in sources list

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-08 22:25:57 +02:00
parent c5abecf578
commit 3c47555276
2 changed files with 21 additions and 0 deletions

View File

@ -230,6 +230,10 @@ export abstract class Table<T> extends LitElement {
return html``; return html``;
} }
renderRowsAbove(): TemplateResult {
return html``;
}
firstUpdated(): void { firstUpdated(): void {
this.fetch(); this.fetch();
} }
@ -265,6 +269,7 @@ export abstract class Table<T> extends LitElement {
${this.columns().map((col) => col.render(this))} ${this.columns().map((col) => col.render(this))}
</tr> </tr>
</thead> </thead>
${this.renderRowsAbove()}
${(this.isLoading || !this.data) ? this.renderLoading() : this.renderRows()} ${(this.isLoading || !this.data) ? this.renderLoading() : this.renderRows()}
</table> </table>
<div class="pf-c-pagination pf-m-bottom"> <div class="pf-c-pagination pf-m-bottom">

View File

@ -53,6 +53,22 @@ export class SourceListPage extends TablePage<Source> {
]; ];
} }
renderRowsAbove(): TemplateResult {
return html`<tbody role="rowgroup">
<tr role="row">
<td role="cell">
<span>
<div>${t`authentik Built-in`}</div>
<small>${t`Built-in`}</small>
</span>
</td>
<td role="cell">-</td>
<td role="cell">
</td>
</tr>
</tbody>`;
}
row(item: Source): TemplateResult[] { row(item: Source): TemplateResult[] {
return [ return [
html`<a href="#/core/sources/${item.slug}"> html`<a href="#/core/sources/${item.slug}">