web/admin: add outpost type to list

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-20 19:30:52 +01:00
parent a5c30fd9c7
commit 7f5fed2aea
4 changed files with 31 additions and 1 deletions

View file

@ -2520,6 +2520,10 @@ msgstr "Keypair which is used to sign outgoing requests. Leave empty to disable
msgid "Kubeconfig"
msgstr "Kubeconfig"
#: src/pages/outposts/OutpostListPage.ts
msgid "LDAP"
msgstr "LDAP"
#: src/pages/outposts/OutpostForm.ts
msgid "LDAP (Technical preview)"
msgstr "LDAP (Technical preview)"
@ -3646,6 +3650,7 @@ msgid "Providers"
msgstr "Providers"
#: src/pages/outposts/OutpostForm.ts
#: src/pages/outposts/OutpostListPage.ts
#: src/pages/providers/proxy/ProxyProviderForm.ts
#: src/pages/providers/proxy/ProxyProviderViewPage.ts
msgid "Proxy"
@ -5205,6 +5210,7 @@ msgstr "Twilio Auth Token"
#: src/pages/flows/BoundStagesList.ts
#: src/pages/outposts/OutpostForm.ts
#: src/pages/outposts/OutpostListPage.ts
#: src/pages/outposts/ServiceConnectionListPage.ts
#: src/pages/policies/PolicyListPage.ts
#: src/pages/property-mappings/PropertyMappingListPage.ts

View file

@ -2500,6 +2500,10 @@ msgstr "Paire de clés utilisée pour signer le requêtes sortantes. Laisser vid
msgid "Kubeconfig"
msgstr "Kubeconfig"
#: src/pages/outposts/OutpostListPage.ts
msgid "LDAP"
msgstr ""
#: src/pages/outposts/OutpostForm.ts
msgid "LDAP (Technical preview)"
msgstr "LDAP (aperçu technique)"
@ -3614,6 +3618,7 @@ msgid "Providers"
msgstr "Fournisseurs"
#: src/pages/outposts/OutpostForm.ts
#: src/pages/outposts/OutpostListPage.ts
#: src/pages/providers/proxy/ProxyProviderForm.ts
#: src/pages/providers/proxy/ProxyProviderViewPage.ts
msgid "Proxy"
@ -5146,6 +5151,7 @@ msgstr ""
#: src/pages/flows/BoundStagesList.ts
#: src/pages/outposts/OutpostForm.ts
#: src/pages/outposts/OutpostListPage.ts
#: src/pages/outposts/ServiceConnectionListPage.ts
#: src/pages/policies/PolicyListPage.ts
#: src/pages/property-mappings/PropertyMappingListPage.ts

View file

@ -2510,6 +2510,10 @@ msgstr ""
msgid "Kubeconfig"
msgstr ""
#: src/pages/outposts/OutpostListPage.ts
msgid "LDAP"
msgstr ""
#: src/pages/outposts/OutpostForm.ts
msgid "LDAP (Technical preview)"
msgstr ""
@ -3636,6 +3640,7 @@ msgid "Providers"
msgstr ""
#: src/pages/outposts/OutpostForm.ts
#: src/pages/outposts/OutpostListPage.ts
#: src/pages/providers/proxy/ProxyProviderForm.ts
#: src/pages/providers/proxy/ProxyProviderViewPage.ts
msgid "Proxy"
@ -5185,6 +5190,7 @@ msgstr ""
#: src/pages/flows/BoundStagesList.ts
#: src/pages/outposts/OutpostForm.ts
#: src/pages/outposts/OutpostListPage.ts
#: src/pages/outposts/ServiceConnectionListPage.ts
#: src/pages/policies/PolicyListPage.ts
#: src/pages/property-mappings/PropertyMappingListPage.ts

View file

@ -8,7 +8,7 @@ import { until } from "lit/directives/until.js";
import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";
import { Outpost, OutpostsApi } from "@goauthentik/api";
import { Outpost, OutpostTypeEnum, OutpostsApi } from "@goauthentik/api";
import { AKResponse } from "../../api/Client";
import { DEFAULT_CONFIG } from "../../api/Config";
@ -24,6 +24,16 @@ import "./OutpostForm";
import "./OutpostHealth";
import "./OutpostHealthSimple";
export function TypeToLabel(type?: OutpostTypeEnum): string {
if (!type) return "";
switch (type) {
case OutpostTypeEnum.Proxy:
return t`Proxy`;
case OutpostTypeEnum.Ldap:
return t`LDAP`;
}
}
@customElement("ak-outpost-list")
export class OutpostListPage extends TablePage<Outpost> {
expandable = true;
@ -51,6 +61,7 @@ export class OutpostListPage extends TablePage<Outpost> {
columns(): TableColumn[] {
return [
new TableColumn(t`Name`, "name"),
new TableColumn(t`Type`, "type"),
new TableColumn(t`Providers`),
new TableColumn(t`Integration`, "service_connection__name"),
new TableColumn(t`Health and Version`),
@ -79,6 +90,7 @@ export class OutpostListPage extends TablePage<Outpost> {
: html`<i class="pf-icon pf-icon-ok"></i>
<small> ${t`Logging in via ${item.config.authentik_host}.`} </small>`}
</div>`,
html`${TypeToLabel(item.type)}`,
html`<ul>
${item.providersObj?.map((p) => {
return html`<li>