50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import { DeesElement, type TemplateResult } from '@design.estate/dees-element';
|
|
declare global {
|
|
interface HTMLElementTagNameMap {
|
|
'sz-platform-service-detail-view': SzPlatformServiceDetailView;
|
|
}
|
|
}
|
|
export interface IPlatformServiceDetail {
|
|
id: string;
|
|
name: string;
|
|
type: 'mongodb' | 'minio' | 'clickhouse' | 'redis';
|
|
status: 'running' | 'stopped' | 'error';
|
|
version: string;
|
|
host: string;
|
|
port: number;
|
|
credentials?: {
|
|
username?: string;
|
|
password?: string;
|
|
accessKey?: string;
|
|
secretKey?: string;
|
|
};
|
|
config: Record<string, any>;
|
|
metrics?: {
|
|
cpu: number;
|
|
memory: number;
|
|
storage: number;
|
|
connections?: number;
|
|
};
|
|
}
|
|
export interface IPlatformLogEntry {
|
|
timestamp: string;
|
|
level: 'info' | 'warn' | 'error' | 'debug';
|
|
message: string;
|
|
}
|
|
export declare class SzPlatformServiceDetailView extends DeesElement {
|
|
static demo: () => TemplateResult<1>;
|
|
accessor service: IPlatformServiceDetail | null;
|
|
accessor logs: IPlatformLogEntry[];
|
|
accessor actionLoading: boolean;
|
|
static styles: import("@design.estate/dees-element").CSSResult[];
|
|
render(): TemplateResult;
|
|
private renderServiceIcon;
|
|
private getProgressClass;
|
|
private formatConfigKey;
|
|
private formatConfigValue;
|
|
private copyToClipboard;
|
|
private handleStart;
|
|
private handleStop;
|
|
private handleRestart;
|
|
}
|