feat: keep alive interval in seconds

This commit is contained in:
Fabio Di Stasio 2023-09-04 16:27:50 +02:00
parent fbe271af37
commit 8d605ee287
3 changed files with 22 additions and 14 deletions

View File

@ -52,7 +52,7 @@ export default (connections: {[key: string]: antares.Client}) => {
port: conn.sshPort ? conn.sshPort : 22,
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
passphrase: conn.sshPassphrase,
keepaliveInterval: conn.sshKeepAliveInterval ?? 30*60*1000
keepaliveInterval: conn.sshKeepAliveInterval ?? conn.sshKeepAliveInterval*1000
};
}
@ -132,7 +132,7 @@ export default (connections: {[key: string]: antares.Client}) => {
port: conn.sshPort ? conn.sshPort : 22,
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
passphrase: conn.sshPassphrase,
keepaliveInterval: conn.sshKeepAliveInterval ?? 30*60*1000
keepaliveInterval: conn.sshKeepAliveInterval ?? conn.sshKeepAliveInterval*1000
};
}

View File

@ -361,12 +361,15 @@
<label class="form-label cut-text">{{ t('connection.keepAliveInterval') }}</label>
</div>
<div class="column col-7 col-sm-12">
<input
v-model="connection.sshKeepAliveInterval"
class="form-input"
type="number"
min="1"
>
<div class="input-group">
<input
v-model="connection.sshKeepAliveInterval"
class="form-input"
type="number"
min="1"
>
<span class="input-group-addon">{{ t('general.seconds') }}</span>
</div>
</div>
</div>
</fieldset>
@ -456,8 +459,10 @@ const connection = ref({
sshHost: '',
sshUser: '',
sshPass: '',
sshPassphrase: null,
sshKey: '',
sshPort: 22,
sshKeepAliveInterval: 1800,
pgConnString: ''
}) as Ref<ConnectionParams & { pgConnString: string }>;

View File

@ -363,12 +363,15 @@
<label class="form-label cut-text">{{ t('connection.keepAliveInterval') }}</label>
</div>
<div class="column col-7 col-sm-12">
<input
v-model="localConnection.sshKeepAliveInterval"
class="form-input"
type="number"
min="1"
>
<div class="input-group">
<input
v-model="localConnection.sshKeepAliveInterval"
class="form-input"
type="number"
min="1"
>
<span class="input-group-addon">{{ t('general.seconds') }}</span>
</div>
</div>
</div>
</fieldset>