mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
feat: move the terminal fully into the ssh-terminal plugin (B9)
This commit is contained in:
1 parent
535126fd1b
commit
79d77678c9
309 files changed
+41789
-14958
No files matched your search
@@ -60,30 +60,6 @@ export async function getSessionTimeout(): Promise<{ timeoutHours: number }> {
|
||||
}
|
||||
}
|
||||
|
||||
// How long a detached terminal session is kept alive server-side.
|
||||
export async function getTerminalSessionSettings(): Promise<{
|
||||
timeoutMinutes: number;
|
||||
enabled: boolean;
|
||||
}> {
|
||||
try {
|
||||
const response = await authApi.get("/terminal/session_settings");
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
handleApiError(error, "fetch terminal session settings");
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateTerminalSessionSettings(input: {
|
||||
timeoutMinutes?: number;
|
||||
enabled?: boolean;
|
||||
}): Promise<void> {
|
||||
try {
|
||||
await authApi.patch("/terminal/session_settings", input);
|
||||
} catch (error) {
|
||||
handleApiError(error, "update terminal session settings");
|
||||
}
|
||||
}
|
||||
|
||||
export interface StepCaSettings {
|
||||
configured: boolean;
|
||||
caUrl: string;
|
||||
@@ -190,79 +166,6 @@ export async function updateAnalyticsEnabled(
|
||||
// TERMINAL IMAGE STORAGE SETTINGS
|
||||
// ============================================================================
|
||||
|
||||
export type TerminalImageStorageMode = "auto" | "local" | "remote-sftp";
|
||||
|
||||
/** Public settings shape: the backend-internal localDir is never returned. */
|
||||
export interface TerminalImageStorageSettings {
|
||||
mode: TerminalImageStorageMode;
|
||||
hostPath: string;
|
||||
ttlMs: number;
|
||||
maxCount: number;
|
||||
maxBytes: number;
|
||||
localMappingConfigured: boolean;
|
||||
}
|
||||
|
||||
export interface TerminalImageStorageSettingsUpdate {
|
||||
mode?: TerminalImageStorageMode;
|
||||
localDir?: string;
|
||||
hostPath?: string;
|
||||
ttlMs?: number;
|
||||
maxCount?: number;
|
||||
maxBytes?: number;
|
||||
}
|
||||
|
||||
export interface TerminalImageStorageTestResult {
|
||||
mode: TerminalImageStorageMode;
|
||||
connected: boolean;
|
||||
remoteSftpAvailable: boolean;
|
||||
localHostVisible: boolean | null;
|
||||
selectedMode: "local" | "remote-sftp" | "unavailable";
|
||||
localMappingConfigured: boolean;
|
||||
}
|
||||
|
||||
export async function getTerminalImageStorageSettings(): Promise<TerminalImageStorageSettings> {
|
||||
try {
|
||||
const response = await authApi.get(
|
||||
"/users/terminal-image-storage-settings",
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
handleApiError(error, "fetch terminal image storage settings");
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateTerminalImageStorageSettings(
|
||||
settings: TerminalImageStorageSettingsUpdate,
|
||||
): Promise<TerminalImageStorageSettings> {
|
||||
try {
|
||||
const response = await authApi.patch(
|
||||
"/users/terminal-image-storage-settings",
|
||||
settings,
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
handleApiError(error, "update terminal image storage settings");
|
||||
}
|
||||
}
|
||||
|
||||
export async function testTerminalImageStorage(
|
||||
instanceId: string,
|
||||
): Promise<TerminalImageStorageTestResult> {
|
||||
try {
|
||||
const response = await authApi.post(
|
||||
"/users/terminal-image-storage-settings/test",
|
||||
{ instanceId },
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
handleApiError(error, "test terminal image storage");
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// WHITE LABEL BRANDING
|
||||
// ============================================================================
|
||||
|
||||
export interface BrandingSettings {
|
||||
appName: string;
|
||||
tagline: string;
|
||||
|
||||
Reference in new issue
Block a user