web/admin: also set embedded outpost host when it doesn't include scheme

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-01-21 13:51:34 +01:00
parent 3bfb8b2cb2
commit 885efb526e
1 changed files with 3 additions and 1 deletions

View File

@ -17,8 +17,10 @@ export class SystemStatusCard extends AdminStatusCard<System> {
async getPrimaryValue(): Promise<System> {
this.now = new Date();
let status = await new AdminApi(DEFAULT_CONFIG).adminSystemRetrieve();
if (status.embeddedOutpostHost === "") {
if (status.embeddedOutpostHost === "" || !status.embeddedOutpostHost.includes("http")) {
// First install, ensure the embedded outpost host is set
// also run when outpost host does not contain http
// (yes it's called host and requires a URL, i know)
await this.setOutpostHost();
status = await new AdminApi(DEFAULT_CONFIG).adminSystemRetrieve();
}