fix: 🐛 desktop client should pass controller URL to CLI

This commit is contained in:
Randall Morey committed 2020-12-15 17:23:02 -05:00
1 parent 91ee84d60a
commit f08a27a363
3 files changed
+6 -3

No files matched your search

@@ -8,6 +8,7 @@ export default class ScopesScopeProjectsTargetsRoute extends Route {
@service ipc;
@service session;
@service origin;
@service notify;
@service confirm;
@@ -58,6 +59,7 @@ export default class ScopesScopeProjectsTargetsRoute extends Route {
const connectionDetails = await this.ipc.invoke('connect', {
target_id: model.target.id,
token: this.session.data.authenticated.token,
addr: this.origin.rendererOrigin
});
// Show the user a modal with basic connection info.
+3 -2
View File
@@ -9,14 +9,15 @@ module.exports = {
// Check boundary cli existence
exists: () => Boolean(cliPath()),
// Initiate connection and return output
connect: (target_id, token) => {
connect: (target_id, token, addr) => {
const command = [
'connect',
`-target-id=${target_id}`,
`-token=${token}`,
`-addr=${addr}`,
'-format=json',
'--output-json-errors'
]
return spawnPromise(command);
}
}
}
+1 -1
View File
@@ -33,4 +33,4 @@ handle('cliPath', () => boundaryCli.path());
/**
* Establishes a boundary session and returns session details.
*/
handle('connect', ({ target_id, token }) => boundaryCli.connect(target_id, token));
handle('connect', ({ target_id, token, addr }) => boundaryCli.connect(target_id, token, addr));