mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-01 10:26:23 +00:00
Refactor dashboard API hide_messages to a separate command
This commit is contained in:
@ -23,6 +23,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
selectedTerminalMenuItem = config.dashboard.terminalOrConsole;
|
||||
|
||||
command_handlers = {'layout': this.layoutHandler.bind(this),
|
||||
'hide_messages': this.hideMessagesHandler.bind(this),
|
||||
'reload_frontend': this.reloadFrontendHandlder.bind(this)};
|
||||
|
||||
constructor(private deploymentNotificationService: DeploymentNotificationService,
|
||||
@ -58,9 +59,10 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
} else {
|
||||
console.log('Invalid ide layout "' + data.layout + '" received!');
|
||||
}
|
||||
if (data.hide_messages !== undefined) {
|
||||
this.hide_messages = data.hide_messages;
|
||||
}
|
||||
}
|
||||
|
||||
hideMessagesHandler(data: LayoutCommand) {
|
||||
this.hide_messages = data.hide_messages;
|
||||
}
|
||||
|
||||
reloadFrontendHandlder(data: LayoutCommand) {
|
||||
|
Reference in New Issue
Block a user