feat: web console page with protocol + key selection
Includes web/lib/api.ts changes (console_protocols field, connectConsole method) required for the console page to type-check and build; the task brief's commit file list omitted this file.
This commit is contained in:
@@ -19,6 +19,21 @@ export interface Server {
|
||||
created_at: string;
|
||||
available_updates?: PackageUpdate[];
|
||||
updates_checked_at?: string;
|
||||
console_protocols?: string[];
|
||||
}
|
||||
|
||||
export interface ConsoleConnectRequest {
|
||||
server_id: string;
|
||||
protocol: string;
|
||||
key_id?: string;
|
||||
rdp_username?: string;
|
||||
rdp_password?: string;
|
||||
}
|
||||
|
||||
export interface ConsoleConnectResponse {
|
||||
session_id: string;
|
||||
token: string;
|
||||
ws_path: string;
|
||||
}
|
||||
|
||||
export interface Key {
|
||||
@@ -290,4 +305,12 @@ export const api = {
|
||||
method: "DELETE",
|
||||
});
|
||||
},
|
||||
|
||||
// Console
|
||||
connectConsole(body: ConsoleConnectRequest): Promise<ConsoleConnectResponse> {
|
||||
return request<ConsoleConnectResponse>("/console/connect", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user