diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 0533b46..716d6a9 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -16,7 +16,8 @@ export class DashboardComponent implements OnInit, OnDestroy { deploymentNotificationSubscription: Subscription; layout: string = config.dashboard.currentLayout; hide_messages: boolean = config.dashboard.hide_messages; - command_handlers = {'layout': this.layoutHandler.bind(this)}; + command_handlers = {'layout': this.layoutHandler.bind(this), + 'reload_frontend': this.reloadFrontendHandlder.bind(this)}; constructor(private deploymentNotificationService: DeploymentNotificationService, private webSocketService: WebSocketService, @@ -44,6 +45,10 @@ export class DashboardComponent implements OnInit, OnDestroy { } } + reloadFrontendHandlder(data: LayoutCommand) { + setTimeout(() => window.location.reload(), 2000); + } + setLayout(layout: string) { this.layout = layout; // We need to trigger a 'resize' event manually, otherwise ace editor stays collapsed