@wakastellar/ui 2.1.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/apm-overview/index.d.ts +58 -0
- package/dist/blocks/cicd-builder/index.d.ts +47 -0
- package/dist/blocks/cloud-cost-dashboard/index.d.ts +49 -0
- package/dist/blocks/container-orchestrator/index.d.ts +63 -0
- package/dist/blocks/database-admin/index.d.ts +84 -0
- package/dist/blocks/gitops-sync-status/index.d.ts +45 -0
- package/dist/blocks/incident-manager/index.d.ts +44 -0
- package/dist/blocks/index.d.ts +10 -0
- package/dist/blocks/infrastructure-map/index.d.ts +32 -0
- package/dist/blocks/on-call-schedule/index.d.ts +43 -0
- package/dist/blocks/release-notes/index.d.ts +49 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/waka-alert-panel/index.d.ts +45 -0
- package/dist/components/waka-artifact-list/index.d.ts +32 -0
- package/dist/components/waka-build-matrix/index.d.ts +36 -0
- package/dist/components/waka-config-comparator/index.d.ts +37 -0
- package/dist/components/waka-container-list/index.d.ts +51 -0
- package/dist/components/waka-database-card/index.d.ts +46 -0
- package/dist/components/waka-dependency-tree/index.d.ts +38 -0
- package/dist/components/waka-env-var-editor/index.d.ts +30 -0
- package/dist/components/waka-feature-flag-row/index.d.ts +45 -0
- package/dist/components/waka-kubernetes-overview/index.d.ts +98 -0
- package/dist/components/waka-log-viewer/index.d.ts +38 -0
- package/dist/components/waka-migration-list/index.d.ts +36 -0
- package/dist/components/waka-pod-card/index.d.ts +73 -0
- package/dist/components/waka-query-explain/index.d.ts +48 -0
- package/dist/components/waka-secret-card/index.d.ts +43 -0
- package/dist/components/waka-security-scan-result/index.d.ts +45 -0
- package/dist/components/waka-service-graph/index.d.ts +44 -0
- package/dist/components/waka-test-report/index.d.ts +60 -0
- package/dist/components/waka-trace-viewer/index.d.ts +36 -0
- package/dist/index.cjs.js +239 -194
- package/dist/index.es.js +45560 -35791
- package/package.json +1 -1
- package/src/blocks/apm-overview/index.tsx +672 -0
- package/src/blocks/cicd-builder/index.tsx +738 -0
- package/src/blocks/cloud-cost-dashboard/index.tsx +597 -0
- package/src/blocks/container-orchestrator/index.tsx +729 -0
- package/src/blocks/database-admin/index.tsx +679 -0
- package/src/blocks/gitops-sync-status/index.tsx +557 -0
- package/src/blocks/incident-manager/index.tsx +586 -0
- package/src/blocks/index.ts +119 -0
- package/src/blocks/infrastructure-map/index.tsx +638 -0
- package/src/blocks/on-call-schedule/index.tsx +615 -0
- package/src/blocks/release-notes/index.tsx +643 -0
- package/src/components/index.ts +189 -0
- package/src/components/waka-alert-panel/index.tsx +493 -0
- package/src/components/waka-artifact-list/index.tsx +416 -0
- package/src/components/waka-build-matrix/index.tsx +396 -0
- package/src/components/waka-config-comparator/index.tsx +416 -0
- package/src/components/waka-container-list/index.tsx +475 -0
- package/src/components/waka-database-card/index.tsx +473 -0
- package/src/components/waka-dependency-tree/index.tsx +542 -0
- package/src/components/waka-env-var-editor/index.tsx +417 -0
- package/src/components/waka-feature-flag-row/index.tsx +386 -0
- package/src/components/waka-kubernetes-overview/index.tsx +536 -0
- package/src/components/waka-log-viewer/index.tsx +386 -0
- package/src/components/waka-migration-list/index.tsx +487 -0
- package/src/components/waka-pod-card/index.tsx +528 -0
- package/src/components/waka-query-explain/index.tsx +657 -0
- package/src/components/waka-secret-card/index.tsx +371 -0
- package/src/components/waka-security-scan-result/index.tsx +473 -0
- package/src/components/waka-service-graph/index.tsx +445 -0
- package/src/components/waka-test-report/index.tsx +469 -0
- package/src/components/waka-trace-viewer/index.tsx +490 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type BuildStatus = "success" | "failed" | "running" | "pending" | "skipped" | "cancelled";
|
|
2
|
+
export interface BuildCell {
|
|
3
|
+
id: string;
|
|
4
|
+
status: BuildStatus;
|
|
5
|
+
duration?: number;
|
|
6
|
+
startedAt?: Date;
|
|
7
|
+
finishedAt?: Date;
|
|
8
|
+
url?: string;
|
|
9
|
+
logs?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BuildMatrixRow {
|
|
12
|
+
label: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
cells: BuildCell[];
|
|
15
|
+
}
|
|
16
|
+
export interface WakaBuildMatrixProps {
|
|
17
|
+
/** Column headers (e.g., OS names or versions) */
|
|
18
|
+
columns: string[];
|
|
19
|
+
/** Row data with cells */
|
|
20
|
+
rows: BuildMatrixRow[];
|
|
21
|
+
/** Callback when clicking on a cell */
|
|
22
|
+
onCellClick?: (rowIndex: number, colIndex: number, cell: BuildCell) => void;
|
|
23
|
+
/** Callback when retrying a build */
|
|
24
|
+
onRetry?: (rowIndex: number, colIndex: number) => void;
|
|
25
|
+
/** Callback when viewing logs */
|
|
26
|
+
onViewLogs?: (cell: BuildCell) => void;
|
|
27
|
+
/** Title of the matrix */
|
|
28
|
+
title?: string;
|
|
29
|
+
/** Show duration in cells */
|
|
30
|
+
showDuration?: boolean;
|
|
31
|
+
/** Custom class name */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function WakaBuildMatrix({ columns, rows, onCellClick, onRetry, onViewLogs, title, showDuration, className, }: WakaBuildMatrixProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const defaultBuildMatrixColumns: string[];
|
|
36
|
+
export declare const defaultBuildMatrixRows: BuildMatrixRow[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface ConfigValue {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string | number | boolean | null;
|
|
4
|
+
type?: "string" | "number" | "boolean" | "null";
|
|
5
|
+
}
|
|
6
|
+
export interface ConfigEnvironment {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
values: ConfigValue[];
|
|
10
|
+
}
|
|
11
|
+
export type DiffType = "added" | "removed" | "modified" | "unchanged";
|
|
12
|
+
export interface ConfigDiff {
|
|
13
|
+
key: string;
|
|
14
|
+
leftValue?: string | number | boolean | null;
|
|
15
|
+
rightValue?: string | number | boolean | null;
|
|
16
|
+
diffType: DiffType;
|
|
17
|
+
}
|
|
18
|
+
export interface WakaConfigComparatorProps {
|
|
19
|
+
/** List of environments to compare */
|
|
20
|
+
environments: ConfigEnvironment[];
|
|
21
|
+
/** Left environment ID */
|
|
22
|
+
leftEnvId?: string;
|
|
23
|
+
/** Right environment ID */
|
|
24
|
+
rightEnvId?: string;
|
|
25
|
+
/** Callback when environment selection changes */
|
|
26
|
+
onEnvironmentChange?: (left: string, right: string) => void;
|
|
27
|
+
/** Callback when copying value */
|
|
28
|
+
onCopyValue?: (key: string, value: unknown, fromEnv: string, toEnv: string) => void;
|
|
29
|
+
/** Show only differences */
|
|
30
|
+
showDiffsOnly?: boolean;
|
|
31
|
+
/** Title */
|
|
32
|
+
title?: string;
|
|
33
|
+
/** Custom class name */
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function WakaConfigComparator({ environments, leftEnvId: initialLeftId, rightEnvId: initialRightId, onEnvironmentChange, onCopyValue, showDiffsOnly: initialShowDiffsOnly, title, className, }: WakaConfigComparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const defaultConfigEnvironments: ConfigEnvironment[];
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type ContainerStatus = "running" | "stopped" | "paused" | "restarting" | "exited" | "created";
|
|
2
|
+
export interface ContainerResource {
|
|
3
|
+
cpu: number;
|
|
4
|
+
memory: number;
|
|
5
|
+
memoryLimit: number;
|
|
6
|
+
networkRx: number;
|
|
7
|
+
networkTx: number;
|
|
8
|
+
}
|
|
9
|
+
export interface Container {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
image: string;
|
|
13
|
+
status: ContainerStatus;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
startedAt?: Date;
|
|
16
|
+
ports?: Array<{
|
|
17
|
+
host: number;
|
|
18
|
+
container: number;
|
|
19
|
+
protocol: string;
|
|
20
|
+
}>;
|
|
21
|
+
resources?: ContainerResource;
|
|
22
|
+
labels?: Record<string, string>;
|
|
23
|
+
command?: string;
|
|
24
|
+
exitCode?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface WakaContainerListProps {
|
|
27
|
+
/** List of containers */
|
|
28
|
+
containers: Container[];
|
|
29
|
+
/** Callback when starting a container */
|
|
30
|
+
onStart?: (containerId: string) => void;
|
|
31
|
+
/** Callback when stopping a container */
|
|
32
|
+
onStop?: (containerId: string) => void;
|
|
33
|
+
/** Callback when restarting a container */
|
|
34
|
+
onRestart?: (containerId: string) => void;
|
|
35
|
+
/** Callback when removing a container */
|
|
36
|
+
onRemove?: (containerId: string) => void;
|
|
37
|
+
/** Callback when viewing logs */
|
|
38
|
+
onViewLogs?: (containerId: string) => void;
|
|
39
|
+
/** Callback when opening terminal */
|
|
40
|
+
onExec?: (containerId: string) => void;
|
|
41
|
+
/** Callback when refreshing */
|
|
42
|
+
onRefresh?: () => void;
|
|
43
|
+
/** Whether data is loading */
|
|
44
|
+
isLoading?: boolean;
|
|
45
|
+
/** Custom class name */
|
|
46
|
+
className?: string;
|
|
47
|
+
/** Title */
|
|
48
|
+
title?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function WakaContainerList({ containers, onStart, onStop, onRestart, onRemove, onViewLogs, onExec, onRefresh, isLoading, className, title, }: WakaContainerListProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare const defaultContainers: Container[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type DatabaseType = "postgresql" | "mysql" | "mongodb" | "redis" | "elasticsearch" | "other";
|
|
2
|
+
export type DatabaseStatus = "healthy" | "warning" | "critical" | "offline" | "syncing";
|
|
3
|
+
export type ReplicationRole = "primary" | "replica" | "standalone";
|
|
4
|
+
export interface DatabaseMetrics {
|
|
5
|
+
connectionsActive: number;
|
|
6
|
+
connectionsMax: number;
|
|
7
|
+
queriesPerSecond: number;
|
|
8
|
+
slowQueries: number;
|
|
9
|
+
avgQueryTime: number;
|
|
10
|
+
cacheHitRate?: number;
|
|
11
|
+
storageUsed: number;
|
|
12
|
+
storageTotal: number;
|
|
13
|
+
replicationLag?: number;
|
|
14
|
+
uptime?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface DatabaseInfo {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
type: DatabaseType;
|
|
20
|
+
version?: string;
|
|
21
|
+
host: string;
|
|
22
|
+
port: number;
|
|
23
|
+
status: DatabaseStatus;
|
|
24
|
+
role: ReplicationRole;
|
|
25
|
+
metrics: DatabaseMetrics;
|
|
26
|
+
replicas?: number;
|
|
27
|
+
lastBackup?: Date;
|
|
28
|
+
tags?: string[];
|
|
29
|
+
}
|
|
30
|
+
export interface WakaDatabaseCardProps {
|
|
31
|
+
/** Database info */
|
|
32
|
+
database: DatabaseInfo;
|
|
33
|
+
/** Callback when clicking refresh */
|
|
34
|
+
onRefresh?: () => void;
|
|
35
|
+
/** Callback when clicking on the database */
|
|
36
|
+
onClick?: () => void;
|
|
37
|
+
/** Show detailed metrics */
|
|
38
|
+
detailed?: boolean;
|
|
39
|
+
/** Compact mode */
|
|
40
|
+
compact?: boolean;
|
|
41
|
+
/** Custom class name */
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function WakaDatabaseCard({ database, onRefresh, onClick, detailed, compact, className, }: WakaDatabaseCardProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const defaultDatabase: DatabaseInfo;
|
|
46
|
+
export declare const defaultDatabases: DatabaseInfo[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type DependencyType = "direct" | "transitive" | "dev" | "peer" | "optional";
|
|
2
|
+
export type VulnSeverity = "critical" | "high" | "medium" | "low" | "none";
|
|
3
|
+
export interface Dependency {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
latestVersion?: string;
|
|
8
|
+
type: DependencyType;
|
|
9
|
+
license?: string;
|
|
10
|
+
vulnerabilities?: {
|
|
11
|
+
critical: number;
|
|
12
|
+
high: number;
|
|
13
|
+
medium: number;
|
|
14
|
+
low: number;
|
|
15
|
+
};
|
|
16
|
+
outdated?: boolean;
|
|
17
|
+
children?: Dependency[];
|
|
18
|
+
size?: number;
|
|
19
|
+
repository?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface WakaDependencyTreeProps {
|
|
22
|
+
/** Root dependencies */
|
|
23
|
+
dependencies: Dependency[];
|
|
24
|
+
/** Callback when clicking on a dependency */
|
|
25
|
+
onDependencyClick?: (dep: Dependency) => void;
|
|
26
|
+
/** Callback when upgrading a dependency */
|
|
27
|
+
onUpgrade?: (dep: Dependency) => void;
|
|
28
|
+
/** Title */
|
|
29
|
+
title?: string;
|
|
30
|
+
/** Show dev dependencies */
|
|
31
|
+
showDevDeps?: boolean;
|
|
32
|
+
/** Show only vulnerable */
|
|
33
|
+
showVulnerableOnly?: boolean;
|
|
34
|
+
/** Custom class name */
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function WakaDependencyTree({ dependencies, onDependencyClick, onUpgrade, title, showDevDeps, showVulnerableOnly, className, }: WakaDependencyTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const defaultDependencies: Dependency[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface EnvVariable {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string;
|
|
4
|
+
isSecret?: boolean;
|
|
5
|
+
isRequired?: boolean;
|
|
6
|
+
description?: string;
|
|
7
|
+
source?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface WakaEnvVarEditorProps {
|
|
10
|
+
/** List of environment variables */
|
|
11
|
+
variables: EnvVariable[];
|
|
12
|
+
/** Callback when variables change */
|
|
13
|
+
onChange?: (variables: EnvVariable[]) => void;
|
|
14
|
+
/** Callback when saving */
|
|
15
|
+
onSave?: (variables: EnvVariable[]) => void;
|
|
16
|
+
/** Callback when importing */
|
|
17
|
+
onImport?: (content: string) => void;
|
|
18
|
+
/** Callback when exporting */
|
|
19
|
+
onExport?: () => void;
|
|
20
|
+
/** Read-only mode */
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
/** Show source column */
|
|
23
|
+
showSource?: boolean;
|
|
24
|
+
/** Title */
|
|
25
|
+
title?: string;
|
|
26
|
+
/** Custom class name */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function WakaEnvVarEditor({ variables: initialVariables, onChange, onSave, onImport, onExport, readOnly, showSource, title, className, }: WakaEnvVarEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare const defaultEnvVariables: EnvVariable[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type FeatureFlagStatus = "enabled" | "disabled" | "percentage" | "segment";
|
|
2
|
+
export interface FeatureFlagSegment {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FeatureFlag {
|
|
8
|
+
id: string;
|
|
9
|
+
key: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
status: FeatureFlagStatus;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
percentage?: number;
|
|
15
|
+
segments?: FeatureFlagSegment[];
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
createdBy?: string;
|
|
19
|
+
environment?: string;
|
|
20
|
+
tags?: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface WakaFeatureFlagRowProps {
|
|
23
|
+
/** Feature flag data */
|
|
24
|
+
flag: FeatureFlag;
|
|
25
|
+
/** Callback when toggling the flag */
|
|
26
|
+
onToggle?: (enabled: boolean) => void;
|
|
27
|
+
/** Callback when changing percentage */
|
|
28
|
+
onPercentageChange?: (percentage: number) => void;
|
|
29
|
+
/** Callback when editing the flag */
|
|
30
|
+
onEdit?: () => void;
|
|
31
|
+
/** Callback when deleting the flag */
|
|
32
|
+
onDelete?: () => void;
|
|
33
|
+
/** Callback when viewing history */
|
|
34
|
+
onViewHistory?: () => void;
|
|
35
|
+
/** Callback when duplicating the flag */
|
|
36
|
+
onDuplicate?: () => void;
|
|
37
|
+
/** Read-only mode */
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/** Compact mode */
|
|
40
|
+
compact?: boolean;
|
|
41
|
+
/** Custom class name */
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function WakaFeatureFlagRow({ flag, onToggle, onPercentageChange, onEdit, onDelete, onViewHistory, onDuplicate, readOnly, compact, className, }: WakaFeatureFlagRowProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const defaultFeatureFlags: FeatureFlag[];
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export type NodeStatus = "Ready" | "NotReady" | "Unknown";
|
|
2
|
+
export type PodPhase = "Running" | "Pending" | "Succeeded" | "Failed" | "Unknown";
|
|
3
|
+
export type DeploymentStatus = "Available" | "Progressing" | "Degraded";
|
|
4
|
+
export interface K8sNode {
|
|
5
|
+
name: string;
|
|
6
|
+
status: NodeStatus;
|
|
7
|
+
roles: string[];
|
|
8
|
+
version: string;
|
|
9
|
+
cpu: {
|
|
10
|
+
used: number;
|
|
11
|
+
total: number;
|
|
12
|
+
};
|
|
13
|
+
memory: {
|
|
14
|
+
used: number;
|
|
15
|
+
total: number;
|
|
16
|
+
};
|
|
17
|
+
pods: {
|
|
18
|
+
running: number;
|
|
19
|
+
total: number;
|
|
20
|
+
};
|
|
21
|
+
conditions?: Array<{
|
|
22
|
+
type: string;
|
|
23
|
+
status: boolean;
|
|
24
|
+
message?: string;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export interface K8sPod {
|
|
28
|
+
name: string;
|
|
29
|
+
namespace: string;
|
|
30
|
+
phase: PodPhase;
|
|
31
|
+
ready: string;
|
|
32
|
+
restarts: number;
|
|
33
|
+
age: string;
|
|
34
|
+
node?: string;
|
|
35
|
+
labels?: Record<string, string>;
|
|
36
|
+
}
|
|
37
|
+
export interface K8sDeployment {
|
|
38
|
+
name: string;
|
|
39
|
+
namespace: string;
|
|
40
|
+
replicas: {
|
|
41
|
+
ready: number;
|
|
42
|
+
desired: number;
|
|
43
|
+
};
|
|
44
|
+
status: DeploymentStatus;
|
|
45
|
+
age: string;
|
|
46
|
+
image?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface K8sService {
|
|
49
|
+
name: string;
|
|
50
|
+
namespace: string;
|
|
51
|
+
type: "ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName";
|
|
52
|
+
clusterIP: string;
|
|
53
|
+
externalIP?: string;
|
|
54
|
+
ports: Array<{
|
|
55
|
+
port: number;
|
|
56
|
+
targetPort: number;
|
|
57
|
+
protocol: string;
|
|
58
|
+
}>;
|
|
59
|
+
age: string;
|
|
60
|
+
}
|
|
61
|
+
export interface K8sNamespace {
|
|
62
|
+
name: string;
|
|
63
|
+
status: "Active" | "Terminating";
|
|
64
|
+
age: string;
|
|
65
|
+
labels?: Record<string, string>;
|
|
66
|
+
}
|
|
67
|
+
export interface WakaKubernetesOverviewProps {
|
|
68
|
+
/** Cluster name */
|
|
69
|
+
clusterName?: string;
|
|
70
|
+
/** List of nodes */
|
|
71
|
+
nodes: K8sNode[];
|
|
72
|
+
/** List of pods */
|
|
73
|
+
pods: K8sPod[];
|
|
74
|
+
/** List of deployments */
|
|
75
|
+
deployments: K8sDeployment[];
|
|
76
|
+
/** List of services */
|
|
77
|
+
services: K8sService[];
|
|
78
|
+
/** List of namespaces */
|
|
79
|
+
namespaces: K8sNamespace[];
|
|
80
|
+
/** Selected namespace filter */
|
|
81
|
+
selectedNamespace?: string;
|
|
82
|
+
/** Callback when changing namespace */
|
|
83
|
+
onNamespaceChange?: (namespace: string) => void;
|
|
84
|
+
/** Callback when clicking on a resource */
|
|
85
|
+
onResourceClick?: (type: string, name: string, namespace?: string) => void;
|
|
86
|
+
/** Callback when refreshing */
|
|
87
|
+
onRefresh?: () => void;
|
|
88
|
+
/** Whether data is loading */
|
|
89
|
+
isLoading?: boolean;
|
|
90
|
+
/** Custom class name */
|
|
91
|
+
className?: string;
|
|
92
|
+
}
|
|
93
|
+
export declare function WakaKubernetesOverview({ clusterName, nodes, pods, deployments, services, namespaces, selectedNamespace, onNamespaceChange, onResourceClick, onRefresh, isLoading, className, }: WakaKubernetesOverviewProps): import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
export declare const defaultK8sNodes: K8sNode[];
|
|
95
|
+
export declare const defaultK8sPods: K8sPod[];
|
|
96
|
+
export declare const defaultK8sDeployments: K8sDeployment[];
|
|
97
|
+
export declare const defaultK8sServices: K8sService[];
|
|
98
|
+
export declare const defaultK8sNamespaces: K8sNamespace[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
2
|
+
export interface LogEntry {
|
|
3
|
+
id: string;
|
|
4
|
+
timestamp: Date;
|
|
5
|
+
level: LogLevel;
|
|
6
|
+
message: string;
|
|
7
|
+
source?: string;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
stackTrace?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface WakaLogViewerProps {
|
|
12
|
+
/** Log entries to display */
|
|
13
|
+
logs: LogEntry[];
|
|
14
|
+
/** Callback when requesting more logs */
|
|
15
|
+
onLoadMore?: () => void;
|
|
16
|
+
/** Callback when clearing logs */
|
|
17
|
+
onClear?: () => void;
|
|
18
|
+
/** Callback when exporting logs */
|
|
19
|
+
onExport?: (logs: LogEntry[]) => void;
|
|
20
|
+
/** Whether streaming is active */
|
|
21
|
+
isStreaming?: boolean;
|
|
22
|
+
/** Callback to toggle streaming */
|
|
23
|
+
onToggleStreaming?: () => void;
|
|
24
|
+
/** Maximum number of logs to display */
|
|
25
|
+
maxLogs?: number;
|
|
26
|
+
/** Show timestamp */
|
|
27
|
+
showTimestamp?: boolean;
|
|
28
|
+
/** Show source */
|
|
29
|
+
showSource?: boolean;
|
|
30
|
+
/** Enable auto-scroll to bottom */
|
|
31
|
+
autoScroll?: boolean;
|
|
32
|
+
/** Custom class name */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Title */
|
|
35
|
+
title?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function WakaLogViewer({ logs, onLoadMore, onClear, onExport, isStreaming, onToggleStreaming, maxLogs, showTimestamp, showSource, autoScroll, className, title, }: WakaLogViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const defaultLogs: LogEntry[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type MigrationStatus = "pending" | "applied" | "failed" | "rolled_back" | "running";
|
|
2
|
+
export interface Migration {
|
|
3
|
+
id: string;
|
|
4
|
+
version: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
status: MigrationStatus;
|
|
8
|
+
appliedAt?: Date;
|
|
9
|
+
rolledBackAt?: Date;
|
|
10
|
+
duration?: number;
|
|
11
|
+
author?: string;
|
|
12
|
+
checksum?: string;
|
|
13
|
+
upScript?: string;
|
|
14
|
+
downScript?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface WakaMigrationListProps {
|
|
18
|
+
/** List of migrations */
|
|
19
|
+
migrations: Migration[];
|
|
20
|
+
/** Callback when applying a migration */
|
|
21
|
+
onApply?: (migration: Migration) => void;
|
|
22
|
+
/** Callback when rolling back a migration */
|
|
23
|
+
onRollback?: (migration: Migration) => void;
|
|
24
|
+
/** Callback when viewing migration details */
|
|
25
|
+
onViewDetails?: (migration: Migration) => void;
|
|
26
|
+
/** Current database version */
|
|
27
|
+
currentVersion?: string;
|
|
28
|
+
/** Show scripts */
|
|
29
|
+
showScripts?: boolean;
|
|
30
|
+
/** Title */
|
|
31
|
+
title?: string;
|
|
32
|
+
/** Custom class name */
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function WakaMigrationList({ migrations, onApply, onRollback, onViewDetails, currentVersion, showScripts, title, className, }: WakaMigrationListProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const defaultMigrations: Migration[];
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type PodPhase = "Running" | "Pending" | "Succeeded" | "Failed" | "Unknown";
|
|
2
|
+
export type ContainerState = "running" | "waiting" | "terminated";
|
|
3
|
+
export interface PodContainer {
|
|
4
|
+
name: string;
|
|
5
|
+
image: string;
|
|
6
|
+
state: ContainerState;
|
|
7
|
+
ready: boolean;
|
|
8
|
+
restartCount: number;
|
|
9
|
+
startedAt?: Date;
|
|
10
|
+
reason?: string;
|
|
11
|
+
message?: string;
|
|
12
|
+
resources?: {
|
|
13
|
+
cpu: {
|
|
14
|
+
used: number;
|
|
15
|
+
limit: number;
|
|
16
|
+
};
|
|
17
|
+
memory: {
|
|
18
|
+
used: number;
|
|
19
|
+
limit: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
ports?: Array<{
|
|
23
|
+
containerPort: number;
|
|
24
|
+
protocol: string;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export interface PodEvent {
|
|
28
|
+
type: "Normal" | "Warning";
|
|
29
|
+
reason: string;
|
|
30
|
+
message: string;
|
|
31
|
+
timestamp: Date;
|
|
32
|
+
count?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface PodDetails {
|
|
35
|
+
name: string;
|
|
36
|
+
namespace: string;
|
|
37
|
+
phase: PodPhase;
|
|
38
|
+
nodeName?: string;
|
|
39
|
+
podIP?: string;
|
|
40
|
+
hostIP?: string;
|
|
41
|
+
startTime?: Date;
|
|
42
|
+
containers: PodContainer[];
|
|
43
|
+
events?: PodEvent[];
|
|
44
|
+
labels?: Record<string, string>;
|
|
45
|
+
annotations?: Record<string, string>;
|
|
46
|
+
conditions?: Array<{
|
|
47
|
+
type: string;
|
|
48
|
+
status: boolean;
|
|
49
|
+
reason?: string;
|
|
50
|
+
message?: string;
|
|
51
|
+
lastTransitionTime?: Date;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
export interface WakaPodCardProps {
|
|
55
|
+
/** Pod details */
|
|
56
|
+
pod: PodDetails;
|
|
57
|
+
/** Callback when viewing logs */
|
|
58
|
+
onViewLogs?: (containerName: string) => void;
|
|
59
|
+
/** Callback when opening terminal */
|
|
60
|
+
onExec?: (containerName: string) => void;
|
|
61
|
+
/** Callback when deleting pod */
|
|
62
|
+
onDelete?: () => void;
|
|
63
|
+
/** Callback when restarting (deleting for recreation) */
|
|
64
|
+
onRestart?: () => void;
|
|
65
|
+
/** Show events section */
|
|
66
|
+
showEvents?: boolean;
|
|
67
|
+
/** Compact mode */
|
|
68
|
+
compact?: boolean;
|
|
69
|
+
/** Custom class name */
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
export declare function WakaPodCard({ pod, onViewLogs, onExec, onDelete, onRestart, showEvents, compact, className, }: WakaPodCardProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare const defaultPodDetails: PodDetails;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type NodeType = "Seq Scan" | "Index Scan" | "Index Only Scan" | "Bitmap Heap Scan" | "Bitmap Index Scan" | "Nested Loop" | "Hash Join" | "Merge Join" | "Sort" | "Aggregate" | "Group" | "Limit" | "Hash" | "Materialize" | "Subquery Scan" | "CTE Scan" | "Result" | "Append" | "Unique" | "WindowAgg" | "Gather" | "Gather Merge";
|
|
2
|
+
export interface ExplainNode {
|
|
3
|
+
id: string;
|
|
4
|
+
type: NodeType;
|
|
5
|
+
relation?: string;
|
|
6
|
+
alias?: string;
|
|
7
|
+
indexName?: string;
|
|
8
|
+
filter?: string;
|
|
9
|
+
joinType?: string;
|
|
10
|
+
sortKey?: string[];
|
|
11
|
+
startupCost: number;
|
|
12
|
+
totalCost: number;
|
|
13
|
+
rows: number;
|
|
14
|
+
actualRows?: number;
|
|
15
|
+
actualTime?: number;
|
|
16
|
+
loops?: number;
|
|
17
|
+
width?: number;
|
|
18
|
+
children?: ExplainNode[];
|
|
19
|
+
warnings?: string[];
|
|
20
|
+
buffers?: {
|
|
21
|
+
sharedHit?: number;
|
|
22
|
+
sharedRead?: number;
|
|
23
|
+
sharedWritten?: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface QueryPlan {
|
|
27
|
+
query: string;
|
|
28
|
+
planningTime?: number;
|
|
29
|
+
executionTime?: number;
|
|
30
|
+
totalCost: number;
|
|
31
|
+
rootNode: ExplainNode;
|
|
32
|
+
}
|
|
33
|
+
export interface WakaQueryExplainProps {
|
|
34
|
+
/** Query plan to display */
|
|
35
|
+
plan: QueryPlan;
|
|
36
|
+
/** Show actual vs estimated */
|
|
37
|
+
showActual?: boolean;
|
|
38
|
+
/** Show buffers info */
|
|
39
|
+
showBuffers?: boolean;
|
|
40
|
+
/** Callback when node is clicked */
|
|
41
|
+
onNodeClick?: (node: ExplainNode) => void;
|
|
42
|
+
/** Title */
|
|
43
|
+
title?: string;
|
|
44
|
+
/** Custom class name */
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
export declare function WakaQueryExplain({ plan, showActual, showBuffers, onNodeClick, title, className, }: WakaQueryExplainProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare const defaultQueryPlan: QueryPlan;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface SecretAccess {
|
|
2
|
+
user: string;
|
|
3
|
+
action: "read" | "write" | "rotate";
|
|
4
|
+
timestamp: Date;
|
|
5
|
+
}
|
|
6
|
+
export interface Secret {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
type: "api-key" | "password" | "certificate" | "token" | "other";
|
|
11
|
+
value?: string;
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
updatedAt: Date;
|
|
14
|
+
expiresAt?: Date;
|
|
15
|
+
rotatedAt?: Date;
|
|
16
|
+
rotationPeriod?: number;
|
|
17
|
+
lastAccessedAt?: Date;
|
|
18
|
+
lastAccessedBy?: string;
|
|
19
|
+
accessHistory?: SecretAccess[];
|
|
20
|
+
tags?: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface WakaSecretCardProps {
|
|
23
|
+
/** Secret data */
|
|
24
|
+
secret: Secret;
|
|
25
|
+
/** Callback when rotating secret */
|
|
26
|
+
onRotate?: () => void;
|
|
27
|
+
/** Callback when deleting secret */
|
|
28
|
+
onDelete?: () => void;
|
|
29
|
+
/** Callback when copying secret */
|
|
30
|
+
onCopy?: () => void;
|
|
31
|
+
/** Callback when viewing secret value */
|
|
32
|
+
onView?: () => void;
|
|
33
|
+
/** Whether the secret value is visible */
|
|
34
|
+
isValueVisible?: boolean;
|
|
35
|
+
/** Show access history */
|
|
36
|
+
showHistory?: boolean;
|
|
37
|
+
/** Compact mode */
|
|
38
|
+
compact?: boolean;
|
|
39
|
+
/** Custom class name */
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function WakaSecretCard({ secret, onRotate, onDelete, onCopy, onView, isValueVisible, showHistory, compact, className, }: WakaSecretCardProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare const defaultSecret: Secret;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type VulnerabilitySeverity = "critical" | "high" | "medium" | "low" | "info";
|
|
2
|
+
export type ScanType = "sast" | "dast" | "sca" | "secret" | "container";
|
|
3
|
+
export interface Vulnerability {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
severity: VulnerabilitySeverity;
|
|
8
|
+
type: ScanType;
|
|
9
|
+
cveId?: string;
|
|
10
|
+
cweId?: string;
|
|
11
|
+
cvssScore?: number;
|
|
12
|
+
package?: string;
|
|
13
|
+
version?: string;
|
|
14
|
+
fixedVersion?: string;
|
|
15
|
+
file?: string;
|
|
16
|
+
line?: number;
|
|
17
|
+
url?: string;
|
|
18
|
+
remediation?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ScanSummary {
|
|
21
|
+
critical: number;
|
|
22
|
+
high: number;
|
|
23
|
+
medium: number;
|
|
24
|
+
low: number;
|
|
25
|
+
info: number;
|
|
26
|
+
total: number;
|
|
27
|
+
}
|
|
28
|
+
export interface WakaSecurityScanResultProps {
|
|
29
|
+
/** List of vulnerabilities */
|
|
30
|
+
vulnerabilities: Vulnerability[];
|
|
31
|
+
/** Scan type */
|
|
32
|
+
scanType?: ScanType | "all";
|
|
33
|
+
/** Scan timestamp */
|
|
34
|
+
scannedAt?: Date;
|
|
35
|
+
/** Callback when clicking on a vulnerability */
|
|
36
|
+
onVulnerabilityClick?: (vuln: Vulnerability) => void;
|
|
37
|
+
/** Callback when viewing CVE details */
|
|
38
|
+
onViewCVE?: (cveId: string) => void;
|
|
39
|
+
/** Title */
|
|
40
|
+
title?: string;
|
|
41
|
+
/** Custom class name */
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function WakaSecurityScanResult({ vulnerabilities, scanType, scannedAt, onVulnerabilityClick, onViewCVE, title, className, }: WakaSecurityScanResultProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const defaultVulnerabilities: Vulnerability[];
|