mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-20 05:27:56 +00:00
Fixes after review
This commit is contained in:
parent
3f823fac4c
commit
7a166cc69d
@ -49,6 +49,9 @@ export class ServersComponent implements OnInit, OnDestroy {
|
||||
if(!server) {
|
||||
return;
|
||||
}
|
||||
if(serverStatus.status === 'starting') {
|
||||
server.status = 'starting';
|
||||
}
|
||||
if(serverStatus.status === 'stopped') {
|
||||
server.status = 'stopped';
|
||||
}
|
||||
@ -98,7 +101,6 @@ export class ServersComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async startServer(server: Server) {
|
||||
server.status = "starting";
|
||||
await this.serverManagement.start(server);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { Subject } from 'rxjs';
|
||||
|
||||
export interface ServerStateEvent {
|
||||
serverName: string;
|
||||
status: "started" | "errored" | "stopped" | "stderr";
|
||||
status: "starting" | "started" | "errored" | "stopped" | "stderr";
|
||||
message: string;
|
||||
}
|
||||
|
||||
@ -29,6 +29,12 @@ export class ServerManagementService implements OnDestroy {
|
||||
}
|
||||
|
||||
async start(server: Server) {
|
||||
var startingEvent : ServerStateEvent = {
|
||||
serverName: server.name,
|
||||
status: "starting",
|
||||
message: ''
|
||||
};
|
||||
this.serverStatusChanged.next(startingEvent);
|
||||
return await this.electronService.remote.require('./local-server.js').startLocalServer(server);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user