mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-22 02:16:37 +00:00
Update console-device-action-component
This commit is contained in:
parent
16bf6ebffa
commit
da7ecf3446
@ -103,10 +103,10 @@ describe('ConsoleDeviceActionComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show message when command is not defined', async () => {
|
it('should set command when it is not defined', async () => {
|
||||||
mockedSettingsService.set('console_command', undefined);
|
mockedSettingsService.set('console_command', undefined);
|
||||||
await component.console();
|
await component.console();
|
||||||
expect(component.openConsole).not.toHaveBeenCalled();
|
expect(component.openConsole).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show message when there is no started nodes', async () => {
|
it('should show message when there is no started nodes', async () => {
|
||||||
|
@ -25,11 +25,10 @@ export class ConsoleDeviceActionComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async console() {
|
async console() {
|
||||||
const consoleCommand = this.settingsService.get<string>('console_command');
|
let consoleCommand = this.settingsService.get<string>('console_command');
|
||||||
|
|
||||||
if(consoleCommand === undefined) {
|
if(consoleCommand === undefined) {
|
||||||
this.toasterService.error('Console command is not defined. Please change it in the Settings.');
|
consoleCommand = `putty.exe -telnet \%h \%p -wt \"\%d\" -gns3 5 -skin 4`;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const startedNodes = this.nodes.filter(node => node.status === 'started');
|
const startedNodes = this.nodes.filter(node => node.status === 'started');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user