Use fix sidebar to instrument and control layout changes

This commit is contained in:
Gabor PEK
2018-04-20 09:21:20 +02:00
committed by Kristóf Tóth
parent b460c429e6
commit 959a0df3d6
16 changed files with 487 additions and 111 deletions

View File

@ -13,8 +13,7 @@ import { config } from '../config';
export class DashboardComponent implements OnInit, OnDestroy {
deploying = false;
deploymentNotificationSubscription: Subscription;
layout: string = config.dashboard.defaultLayout;
layout = 'vraw-closed';
layout: string = config.dashboard.defaultLayout ;
command_handlers = {'layout': this.layoutHandler.bind(this)};
constructor(private deploymentNotificationService: DeploymentNotificationService,
@ -33,11 +32,11 @@ export class DashboardComponent implements OnInit, OnDestroy {
}
layoutHandler(data: LayoutCommand) {
if (data.layout.match('vraw-open|vraw-closed|hraw|default-open|default-closed')) {
if (data.layout.match('terminal-ide-vertical|terminal-only|hraw|default-open|default-closed')) {
this.layout = data.layout;
}
else {
console.log('Invalid webide layout "' + data.layout + '" received!');
console.log('Invalid ide layout "' + data.layout + '" received!');
}
}