admin: add API to show embedded outpost status, add notice when its not configured properly
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -16,6 +16,14 @@ export class SystemStatusCard extends AdminStatusCard<System> {
|
||||
}
|
||||
|
||||
getStatus(value: System): Promise<AdminStatus> {
|
||||
if (value.embeddedOutpostHost === "") {
|
||||
this.header = t`Warning`;
|
||||
return Promise.resolve<AdminStatus>({
|
||||
icon: "fa fa-exclamation-triangle pf-m-warning",
|
||||
message: html`${t`Embedded outpost is not configured correctly.`}
|
||||
<a href="#/outpost/outposts">${t`Check outposts.`}</a>`,
|
||||
});
|
||||
}
|
||||
if (!value.httpIsSecure && document.location.protocol === "https:") {
|
||||
this.header = t`Warning`;
|
||||
return Promise.resolve<AdminStatus>({
|
||||
|
||||
@ -65,7 +65,16 @@ export class OutpostListPage extends TablePage<Outpost> {
|
||||
|
||||
row(item: Outpost): TemplateResult[] {
|
||||
return [
|
||||
html`${item.name}`,
|
||||
html`<div>
|
||||
<div>${item.name}</div>
|
||||
${item.config.authentik_host === ""
|
||||
? html`<i class="pf-icon pf-icon-warning-triangle"></i>
|
||||
<small
|
||||
>${t`Warning: authentik Domain is not configured, authentication will not work.`}</small
|
||||
>`
|
||||
: html`<i class="pf-icon pf-icon-ok"></i>
|
||||
<small> ${t`Logging in via ${item.config.authentik_host}.`} </small>`}
|
||||
</div>`,
|
||||
html`<ul>
|
||||
${item.providersObj?.map((p) => {
|
||||
return html`<li>
|
||||
|
||||
Reference in New Issue
Block a user