Add support for SSH tunneled connections. Fixes #1447

This commit is contained in:
Akshay Joshi
2018-05-04 11:27:27 +01:00
committed by Dave Page
parent 455c45ea85
commit b7fb01ab04
26 changed files with 697 additions and 129 deletions

View File

@@ -43,6 +43,15 @@ export class ModelValidation {
this.checkForEmpty('username', gettext('Username must be specified.'));
this.checkForEmpty('port', gettext('Port must be specified.'));
if (this.model.get('use_ssh_tunnel')) {
this.checkForEmpty('tunnel_host', gettext('SSH Tunnel host must be specified.'));
this.checkForEmpty('tunnel_port', gettext('SSH Tunnel port must be specified.'));
this.checkForEmpty('tunnel_username', gettext('SSH Tunnel username must be specified.'));
if (this.model.get('tunnel_authentication')) {
this.checkForEmpty('tunnel_identity_file', gettext('SSH Tunnel identity file must be specified.'));
}
}
this.model.errorModel.set(this.err);
if (_.size(this.err)) {