From 5e785431e9f258552dd452662d4515236577ae33 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Fri, 10 Nov 2023 03:19:00 +0000 Subject: [PATCH] Update manage-plugins-modal.component.ts --- .../manage-plugins-modal.component.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts index 044839def..f9739eccc 100644 --- a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts +++ b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts @@ -172,7 +172,6 @@ export class ManagePluginsModalComponent implements OnInit, OnDestroy { this.$toastr.success(`${this.pastTenseVerb} ${this.pluginName}`, this.toastSuccess); this.getChangeLog(); this.getChildBridges(); - this.$notification.configUpdated.next(undefined); }, (err) => { this.actionFailed = true; @@ -250,18 +249,22 @@ export class ManagePluginsModalComponent implements OnInit, OnDestroy { } public async onRestartChildBridgeClick() { - const io = this.$ws.connectToNamespace('child-bridges'); try { for (const bridge of this.childBridges) { - await io.request('restart-child-bridge', bridge.username).toPromise(); + await this.$api.put(`/server/restart/${bridge.username}`, {}).toPromise(); } + + // toast success + this.$toastr.success( + 'SUCCESS!!!', + this.$translate.instant('toast.title_success'), + ); } catch (err) { this.$toastr.error( - 'Failed to restart child bridge: ' + err.error?.message, + 'Error restarting child bridge, please restart Homebridge instead.', this.$translate.instant('toast.title_error'), ); } finally { - io.end(); this.activeModal.close(); } }