From 03fc68bb6dd21a6be412cb7e1920d67d74b4f3f5 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 26 Nov 2019 15:11:26 +0100 Subject: [PATCH] fixed #1785 --- terminus-ssh/src/api.ts | 2 +- terminus-ssh/src/components/sshModal.component.ts | 3 ++- terminus-ssh/src/components/sshSettingsTab.component.ts | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/terminus-ssh/src/api.ts b/terminus-ssh/src/api.ts index 959b1483..7357a357 100644 --- a/terminus-ssh/src/api.ts +++ b/terminus-ssh/src/api.ts @@ -21,7 +21,7 @@ export interface SSHConnection { user: string password?: string privateKey?: string - group?: string + group: string | null scripts?: LoginScript[] keepaliveInterval?: number keepaliveCountMax?: number diff --git a/terminus-ssh/src/components/sshModal.component.ts b/terminus-ssh/src/components/sshModal.component.ts index a9d315c6..b7ac42ba 100644 --- a/terminus-ssh/src/components/sshModal.component.ts +++ b/terminus-ssh/src/components/sshModal.component.ts @@ -49,6 +49,7 @@ export class SSHModalComponent { const connection: SSHConnection = { name: this.quickTarget, + group: null, host, user, port, @@ -91,7 +92,7 @@ export class SSHModalComponent { } for (const connection of connections) { - connection.group = connection.group || undefined + connection.group = connection.group || null let group = this.childGroups.find(x => x.name === connection.group) if (!group) { group = { diff --git a/terminus-ssh/src/components/sshSettingsTab.component.ts b/terminus-ssh/src/components/sshSettingsTab.component.ts index 19ca22e4..3e8a6177 100644 --- a/terminus-ssh/src/components/sshSettingsTab.component.ts +++ b/terminus-ssh/src/components/sshSettingsTab.component.ts @@ -27,6 +27,7 @@ export class SSHSettingsTabComponent { createConnection () { const connection: SSHConnection = { name: '', + group: null, host: '', port: 22, user: 'root', @@ -97,7 +98,7 @@ export class SSHSettingsTabComponent { } )).response === 1) { for (const connection of this.connections.filter(x => x.group === group.name)) { - connection.group = undefined + connection.group = null } this.config.save() this.refresh() @@ -109,7 +110,7 @@ export class SSHSettingsTabComponent { this.childGroups = [] for (const connection of this.connections) { - connection.group = connection.group || undefined + connection.group = connection.group || null let group = this.childGroups.find(x => x.name === connection.group) if (!group) { group = {