Add gateway URL configuration to Hub Console
Allow changing the gateway connection URL at runtime via a new PUT /hub/gateway endpoint and a corresponding input form in the console UI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f7d03aa427
commit
6deac2f76a
3 changed files with 61 additions and 9 deletions
|
|
@ -2,6 +2,7 @@ import {
|
|||
Controller,
|
||||
Get,
|
||||
Post,
|
||||
Put,
|
||||
Delete,
|
||||
Param,
|
||||
Body,
|
||||
|
|
@ -23,6 +24,15 @@ export class AppController {
|
|||
};
|
||||
}
|
||||
|
||||
@Put("hub/gateway")
|
||||
updateGateway(@Body() body: { url: string }) {
|
||||
this.hub.reconnect(body.url);
|
||||
return {
|
||||
url: this.hub.url,
|
||||
connectionState: this.hub.connectionState,
|
||||
};
|
||||
}
|
||||
|
||||
@Get("agents")
|
||||
listAgents() {
|
||||
return this.hub.listAgents().map((id) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue