Unify fronted API naming conventions in dashboard

This commit is contained in:
Kristóf Tóth 2018-05-31 14:18:13 +02:00
parent 00efe0002c
commit 6a507debec
3 changed files with 13 additions and 12 deletions

View File

@ -19,7 +19,7 @@ export const config = {
'web-only'
],
iframeUrl: '/webservice',
hide_messages: false
hideMessages: false
},
ide: {
route: 'ide',

View File

@ -4,7 +4,7 @@
<div [attr.class]="layout">
<div class="tfw-grid-main-components">
<div class="tfw-header"><app-header></app-header></div>
<div [ngClass]="{'hide-attribute': hide_messages}" class="tfw-messages">
<div [ngClass]="{'hide-attribute': hideMessages}" class="tfw-messages">
<app-messages></app-messages>
</div>
<div class="tfw-web tao-grid-top-left"

View File

@ -19,16 +19,17 @@ import { CommandMessage } from '../message.types/command.message';
export class DashboardComponent implements OnInit, OnDestroy {
deploying = false;
deploymentNotificationSubscription: Subscription;
layout: string = config.dashboard.currentLayout;
hide_messages: boolean = config.dashboard.hide_messages;
iframeUrl: string = config.dashboard.iframeUrl;
@ViewChild('webiframe') webiframe: ElementRef;
selectedTerminalMenuItem = config.dashboard.terminalOrConsole;
command_handlers = {'layout': this.layoutHandler.bind(this),
'hide_messages': this.hideMessagesHandler.bind(this),
'terminal_menu_item': this.terminalMenuSelectHandler.bind(this),
'reload_frontend': this.reloadFrontendHandlder.bind(this)};
layout: string = config.dashboard.currentLayout;
hideMessages: boolean = config.dashboard.hideMessages;
iframeUrl: string = config.dashboard.iframeUrl;
selectedTerminalMenuItem: string = config.dashboard.terminalOrConsole;
command_handlers = {'layout': this.layoutHandler.bind(this),
'hideMessages': this.hideMessagesHandler.bind(this),
'terminalMenuItem': this.terminalMenuItemHandler.bind(this),
'reloadFrontend': this.reloadFrontendHandlder.bind(this)};
constructor(private deploymentNotificationService: DeploymentNotificationService,
private webSocketService: WebSocketService,
@ -79,10 +80,10 @@ export class DashboardComponent implements OnInit, OnDestroy {
}
hideMessagesHandler(data: HideMessagesCommand) {
this.hide_messages = data.value;
this.hideMessages = data.value;
}
terminalMenuSelectHandler(data: TerminalMenuItemCommand) {
terminalMenuItemHandler(data: TerminalMenuItemCommand) {
this.selectTerminalMenuItem(data.value);
}