mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 11:52:54 +00:00 
			
		
		
		
	Remove unused FSM update service
This commit is contained in:
		@@ -4,7 +4,6 @@ import { BrowserModule } from '@angular/platform-browser';
 | 
			
		||||
import { NgModule } from '@angular/core';
 | 
			
		||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import { AppComponent } from './app.component';
 | 
			
		||||
import { DashboardComponent } from './dashboard/dashboard.component';
 | 
			
		||||
import { HeaderComponent } from './header/header.component';
 | 
			
		||||
@@ -16,7 +15,6 @@ import { IdeComponent } from './ide/ide.component';
 | 
			
		||||
import { MessagesComponent } from './messages/messages.component';
 | 
			
		||||
import { WebSocketService } from './services/websocket.service';
 | 
			
		||||
import { TerminalComponent } from './terminal/terminal.component';
 | 
			
		||||
import { FSMUpdateService } from './services/fsmupdate.service';
 | 
			
		||||
import { ProcessManagerService } from './services/processmanager.service';
 | 
			
		||||
import { AppRoutingModule } from './app-routing.module';
 | 
			
		||||
import { TestmessengerComponent } from './testmessenger/testmessenger.component';
 | 
			
		||||
@@ -52,7 +50,6 @@ import { MonacoEditorModule } from 'ngx-monaco-editor';
 | 
			
		||||
    MarkdownService,
 | 
			
		||||
    WebSocketService,
 | 
			
		||||
    TerminadoService,
 | 
			
		||||
    FSMUpdateService,
 | 
			
		||||
    ProcessManagerService,
 | 
			
		||||
    DeploymentNotificationService,
 | 
			
		||||
  ],
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
import { WebSocketMessage } from './websocket-message';
 | 
			
		||||
 | 
			
		||||
export interface FSMUpdateMessage extends WebSocketMessage {
 | 
			
		||||
  current_state: string;
 | 
			
		||||
  valid_transitions: object;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
import { Injectable } from '@angular/core';
 | 
			
		||||
import { WebSocketService } from './websocket.service';
 | 
			
		||||
 | 
			
		||||
import { FSMUpdateMessage } from '../message-types/fsm-update-message';
 | 
			
		||||
 | 
			
		||||
@Injectable()
 | 
			
		||||
export class FSMUpdateService {
 | 
			
		||||
  public current_state: string;
 | 
			
		||||
  public valid_transitions: object;
 | 
			
		||||
 | 
			
		||||
  constructor(private websocketService: WebSocketService) {}
 | 
			
		||||
 | 
			
		||||
  public init(): void {
 | 
			
		||||
    this.websocketService.observeKey<FSMUpdateMessage>('fsm.update').subscribe(message => {
 | 
			
		||||
      this.current_state = message.current_state;
 | 
			
		||||
      this.valid_transitions = message.valid_transitions;
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user