diff --git a/src/app/config.ts b/src/app/config.ts index bf04afc..56dbeb2 100644 --- a/src/app/config.ts +++ b/src/app/config.ts @@ -5,6 +5,7 @@ export const config = { documentTitle: 'Avatao Tutorials', dashboard: { route: 'dashboard', + triggerFirstFSMStep: 'step_1', terminalOrConsole: 'terminal', currentLayout: 'terminal-ide-web', enabledLayouts: [ diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 5e5e440..9fb9d63 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -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);