mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:11:32 +00:00
Implement triggering first FSM step defined in config
This commit is contained in:
parent
3b94ed0db6
commit
b8161194d7
@ -5,6 +5,7 @@ export const config = {
|
||||
documentTitle: 'Avatao Tutorials',
|
||||
dashboard: {
|
||||
route: 'dashboard',
|
||||
triggerFirstFSMStep: 'step_1',
|
||||
terminalOrConsole: 'terminal',
|
||||
currentLayout: 'terminal-ide-web',
|
||||
enabledLayouts: [
|
||||
|
@ -38,6 +38,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
this.webSocketService.connect();
|
||||
this.initCommandHandling();
|
||||
this.initDeploymentNotifications();
|
||||
this.triggerFirstFSMStepIfNeeded();
|
||||
}
|
||||
|
||||
initCommandHandling() {
|
||||
@ -57,6 +58,17 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
triggerFirstFSMStepIfNeeded() {
|
||||
if (config.dashboard.triggerFirstFSMStep) {
|
||||
setTimeout(() => {
|
||||
this.webSocketService.sendJSON({
|
||||
'key': '',
|
||||
'trigger': config.dashboard.triggerFirstFSMStep
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
layoutHandler(data: LayoutCommand) {
|
||||
if (config.dashboard.enabledLayouts.includes(data.layout)) {
|
||||
this.setLayout(data.layout);
|
||||
|
Loading…
Reference in New Issue
Block a user