From 42315de8df831745c3a8ae4de6ed4619293697d0 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 23 Mar 2018 20:15:51 -0600 Subject: [PATCH] List the enabled bots on the go-neb page --- web/app/admin/neb/neb.component.html | 4 ++++ web/app/admin/neb/neb.component.ts | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/web/app/admin/neb/neb.component.html b/web/app/admin/neb/neb.component.html index a80a802..6c0bdfe 100644 --- a/web/app/admin/neb/neb.component.html +++ b/web/app/admin/neb/neb.component.html @@ -13,6 +13,7 @@ Name + Enabled Bots Actions @@ -25,6 +26,9 @@ {{ neb.upstreamId ? "matrix.org's go-neb" : "Self-hosted go-neb" }} ({{ neb.adminUrl }}) + + {{ getEnabledBotsString(neb) }} + diff --git a/web/app/admin/neb/neb.component.ts b/web/app/admin/neb/neb.component.ts index f81e2a0..a52e5e1 100644 --- a/web/app/admin/neb/neb.component.ts +++ b/web/app/admin/neb/neb.component.ts @@ -24,7 +24,7 @@ export class AdminNebComponent { private appserviceApi: AdminAppserviceApiService, private toaster: ToasterService, private router: Router, - private activatedRoute:ActivatedRoute) { + private activatedRoute: ActivatedRoute) { this.reload().then(() => this.isLoading = false).catch(error => { console.error(error); @@ -71,6 +71,12 @@ export class AdminNebComponent { console.log(neb); } + public getEnabledBotsString(neb: FE_NebConfiguration): string { + const result = neb.integrations.filter(i => i.isEnabled).map(i => i.displayName).join(", "); + if (!result) return "None"; + return result; + } + public addSelfHostedNeb() { this.router.navigate(["new", "selfhosted"], {relativeTo: this.activatedRoute}); }