@@ -12,6 +12,7 @@ import {WindowDelegate} from '../../window/window-delegate';
1212import { File } from '../../../api/files/file' ;
1313import { Shell } from 'src/app/shell/shell' ;
1414import { ShellApi } from 'src/app/shell/shellapi' ;
15+ import { DeviceService } from 'src/app/api/devices/device.service' ;
1516
1617
1718function escapeHtml ( html : string ) : string {
@@ -331,8 +332,8 @@ export class DefaultTerminalState extends CommandTerminalState {
331332 working_dir : string = Path . ROOT ; // UUID of the working directory
332333
333334 constructor ( protected websocket : WebsocketService , private settings : SettingsService , private fileService : FileService ,
334- private domSanitizer : DomSanitizer , protected windowDelegate : WindowDelegate , protected activeDevice : Device ,
335- protected terminal : TerminalAPI , public promptColor : string = null ) {
335+ private deviceService : DeviceService , private domSanitizer : DomSanitizer , protected windowDelegate : WindowDelegate ,
336+ protected activeDevice : Device , protected terminal : TerminalAPI , public promptColor : string = null ) {
336337 super ( ) ;
337338 }
338339
@@ -1454,8 +1455,8 @@ export class DefaultTerminalState extends CommandTerminalState {
14541455 this . websocket . ms ( 'device' , [ 'device' , 'info' ] , { device_uuid : args [ 0 ] } ) . subscribe ( infoData => {
14551456 this . websocket . ms ( 'service' , [ 'part_owner' ] , { device_uuid : args [ 0 ] } ) . subscribe ( partOwnerData => {
14561457 if ( infoData [ 'owner' ] === this . websocket . account . uuid || partOwnerData [ 'ok' ] === true ) {
1457- this . terminal . pushState ( new DefaultTerminalState ( this . websocket , this . settings , this . fileService , this . domSanitizer ,
1458- this . windowDelegate , infoData , this . terminal , '#DD2C00' ) ) ;
1458+ this . terminal . pushState ( new DefaultTerminalState ( this . websocket , this . settings , this . fileService , this . deviceService ,
1459+ this . domSanitizer , this . windowDelegate , infoData , this . terminal , '#DD2C00' ) ) ;
14591460 this . setExitCode ( 0 ) ;
14601461 } else {
14611462 iohandler . stderr ( 'Access denied' ) ;
@@ -1957,7 +1958,7 @@ export class DefaultTerminalState extends CommandTerminalState {
19571958 msh ( _ : IOHandler ) {
19581959 this . terminal . pushState (
19591960 new ShellTerminal (
1960- this . websocket , this . settings , this . fileService ,
1961+ this . websocket , this . settings , this . fileService , this . deviceService ,
19611962 this . domSanitizer , this . windowDelegate , this . activeDevice ,
19621963 this . terminal , this . promptColor
19631964 )
@@ -2165,11 +2166,11 @@ class ShellTerminal implements TerminalState {
21652166 private shell : Shell ;
21662167
21672168 constructor ( private websocket : WebsocketService , private settings : SettingsService , private fileService : FileService ,
2168- private domSanitizer : DomSanitizer , windowDelegate : WindowDelegate , private activeDevice : Device ,
2169- private terminal : TerminalAPI , private promptColor : string = null
2169+ private deviceService : DeviceService , private domSanitizer : DomSanitizer , windowDelegate : WindowDelegate ,
2170+ private activeDevice : Device , private terminal : TerminalAPI , private promptColor : string = null
21702171 ) {
21712172 const shellApi = new ShellApi (
2172- this . websocket , this . settings , this . fileService ,
2173+ this . websocket , this . settings , this . fileService , this . deviceService ,
21732174 this . domSanitizer , windowDelegate , this . activeDevice ,
21742175 terminal , this . promptColor , this . refreshPrompt . bind ( this ) ,
21752176 Path . ROOT
0 commit comments