Commit 40ce4f00 authored by Marcin Prusinski's avatar Marcin Prusinski
Browse files

Merge pull request #46 in MEL/melodic-frontend from feature/MEL-963-webssh-upgrade to rc3.0

* commit 'bdd9ac32':
  add password-based ssh connection
parents 5c27de43 bdd9ac32
...@@ -114,7 +114,7 @@ export class VmListComponent implements OnInit { ...@@ -114,7 +114,7 @@ export class VmListComponent implements OnInit {
} }
userHasPermissionToSshConnection(vm: NodeCloudiator): boolean { userHasPermissionToSshConnection(vm: NodeCloudiator): boolean {
return (UserRole.ADMIN === UserRole[this.userService.currentUser.userRole]) && vm.loginCredential.privateKey !== null; return UserRole.ADMIN === UserRole[this.userService.currentUser.userRole];
} }
onSshConnectionClick(vm: NodeCloudiator) { onSshConnectionClick(vm: NodeCloudiator) {
...@@ -130,7 +130,7 @@ export class VmListComponent implements OnInit { ...@@ -130,7 +130,7 @@ export class VmListComponent implements OnInit {
webSshUrl = `${AppConfigService.settings.webSshUrl}/?hostname=${vm.publicIp}&username=${vm.loginCredential.username}` + webSshUrl = `${AppConfigService.settings.webSshUrl}/?hostname=${vm.publicIp}&username=${vm.loginCredential.username}` +
`&password=${btoa(vm.loginCredential.password)}`; `&password=${btoa(vm.loginCredential.password)}`;
console.log(`Password-based SSH connection under address: ${webSshUrl}`); console.log(`Password-based SSH connection under address: ${webSshUrl}`);
// todo add window.open(webSshUrl) after webssh fixed window.open(webSshUrl);
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment