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:
Jens Langhammer
2021-08-10 19:16:11 +02:00
parent 0c9c3153b5
commit de9d483b9f
6 changed files with 66 additions and 1 deletions

View File

@ -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>({