fix: 🐛 desktop client should pass controller URL to CLI
This commit is contained in:
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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
Reference in new issue
Block a user