Discover server as remote server

This commit is contained in:
ziajka 2019-02-11 11:10:31 +01:00
parent 7410455bdf
commit 494b292238
2 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,7 @@ describe('ServerDiscoveryComponent', () => {
expect(component.discoveredServer).toBeNull();
expect(mockedServerService.servers[0].ip).toEqual('199.111.111.1');
expect(mockedServerService.servers[0].name).toEqual('199.111.111.1');
expect(mockedServerService.servers[0].location).toEqual('remote');
}));
});

View File

@ -86,6 +86,8 @@ export class ServerDiscoveryComponent implements OnInit {
server.name = server.ip;
}
server.location = 'remote';
this.serverService.create(server).then((created: Server) => {
this.serverDatabase.addServer(created);
this.discoveredServer = null;