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