mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 14:12:55 +00:00 
			
		
		
		
	Implement triggering first FSM step defined in config
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user