mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-06-28 17:45:11 +00:00
Rework dashboard API and refactory typing
This commit is contained in:
@ -5,7 +5,7 @@ import { Component, OnDestroy, OnInit, ChangeDetectorRef, ElementRef, ViewChild
|
||||
import { DeploymentNotificationService } from '../services/deployment-notification.service';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { WebSocketService } from '../services/websocket.service';
|
||||
import { LayoutCommand } from '../message.types/layout.command';
|
||||
import { HideMessagesCommand, LayoutCommand, TerminalMenuItemCommand } from '../message.types/dashboard.commands';
|
||||
import { config } from '../config';
|
||||
import { ProcessLogService } from '../services/processlog.service';
|
||||
import { LogMessage } from '../message.types/log.message';
|
||||
@ -71,19 +71,19 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
layoutHandler(data: LayoutCommand) {
|
||||
if (config.dashboard.enabledLayouts.includes(data.layout)) {
|
||||
this.setLayout(data.layout);
|
||||
if (config.dashboard.enabledLayouts.includes(data.value)) {
|
||||
this.setLayout(data.value);
|
||||
} else {
|
||||
console.log('Invalid ide layout "' + data.layout + '" received!');
|
||||
console.log('Invalid ide layout "' + data.value + '" received!');
|
||||
}
|
||||
}
|
||||
|
||||
hideMessagesHandler(data: LayoutCommand) {
|
||||
this.hide_messages = data.hide_messages;
|
||||
hideMessagesHandler(data: HideMessagesCommand) {
|
||||
this.hide_messages = data.value;
|
||||
}
|
||||
|
||||
terminalMenuSelectHandler(data: LayoutCommand) {
|
||||
this.selectTerminalMenuItem(data.terminal_menu_item);
|
||||
terminalMenuSelectHandler(data: TerminalMenuItemCommand) {
|
||||
this.selectTerminalMenuItem(data.value);
|
||||
}
|
||||
|
||||
reloadFrontendHandlder(data: CommandMessage) {
|
||||
|
Reference in New Issue
Block a user