Skip to content

Commit

Permalink
try restart child bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Nov 10, 2023
1 parent c17102b commit 9207332
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,20 @@ export class ManagePluginsModalComponent implements OnInit, OnDestroy {
}

public async onRestartChildBridgeClick() {
// bridge.restartInProgress = true;
// try {
// await this.io.request('restart-child-bridge', bridge.username).toPromise();
// } catch (err) {
// this.$toastr.error(
// 'Failed to restart bridge: ' + err.error?.message,
// this.$translate.instant('toast.title_error'),
// );
// bridge.restartInProgress = false;
// } finally {
// this.activeModal.close();
// }
const io = this.$ws.connectToNamespace('child-bridges');
try {
for (const bridge of this.childBridges) {
await io.request('restart-child-bridge', bridge.username).toPromise();
}
} catch (err) {
this.$toastr.error(
'Failed to restart child bridge: ' + err.error?.message,
this.$translate.instant('toast.title_error'),
);
} finally {
io.end();
this.activeModal.close();
}
}

ngOnDestroy() {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/modules/plugins/plugins.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class PluginsComponent implements OnInit, OnDestroy {
});

this.navigationSubscription = this.$router.events.subscribe((e: any) => {
// If it is a NavigationEnd event re-initalise the component
// If it is a NavigationEnd event re-initialise the component
if (e instanceof NavigationEnd) {
this.loadInstalledPlugins();
}
Expand Down

0 comments on commit 9207332

Please sign in to comment.