init studio admin frontend
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
import type { ApiApp, ApiAppComponent } from './runtime';
|
||||
|
||||
export type ComponentType = 'ELECTRON' | 'CONTAINER' | 'STATIC_WEB' | 'DATABASE' | 'MIGRATION';
|
||||
export type JobStatus = 'PENDING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELED';
|
||||
|
||||
export type AppWithComponents = ApiApp & {
|
||||
description?: string | null;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
components?: ApiAppComponent[];
|
||||
};
|
||||
|
||||
export type SourceComponent = ApiAppComponent & {
|
||||
app: ApiApp;
|
||||
buildJobs?: BuildJob[];
|
||||
};
|
||||
|
||||
export type BuildJob = {
|
||||
id: string;
|
||||
componentId: string;
|
||||
branch: string;
|
||||
commitSha?: string | null;
|
||||
artifact?: string | null;
|
||||
image?: string | null;
|
||||
status: JobStatus;
|
||||
logs?: string | null;
|
||||
startedAt?: string | null;
|
||||
finishedAt?: string | null;
|
||||
createdAt: string;
|
||||
component: ApiAppComponent & { app: ApiApp };
|
||||
};
|
||||
|
||||
export type AppRelease = {
|
||||
id: string;
|
||||
appId: string;
|
||||
version: string;
|
||||
branch: string;
|
||||
commitSha?: string | null;
|
||||
artifact?: string | null;
|
||||
imageTags?: unknown;
|
||||
status: JobStatus;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
app: ApiApp;
|
||||
};
|
||||
|
||||
export type DeploymentJob = {
|
||||
id: string;
|
||||
appId: string;
|
||||
releaseId?: string | null;
|
||||
environment: string;
|
||||
namespace: string;
|
||||
status: JobStatus;
|
||||
requestedBy?: string | null;
|
||||
logs?: string | null;
|
||||
startedAt?: string | null;
|
||||
finishedAt?: string | null;
|
||||
createdAt: string;
|
||||
app: ApiApp;
|
||||
release?: AppRelease | null;
|
||||
};
|
||||
|
||||
export type RuntimeControlJob = {
|
||||
id: string;
|
||||
namespace: string;
|
||||
kind: string;
|
||||
name: string;
|
||||
action: string;
|
||||
status: JobStatus;
|
||||
requestedBy?: string | null;
|
||||
request?: Record<string, unknown> | null;
|
||||
result?: Record<string, unknown> | null;
|
||||
logs?: string | null;
|
||||
startedAt?: string | null;
|
||||
finishedAt?: string | null;
|
||||
createdAt: string;
|
||||
};
|
||||
|
||||
export type GiteaRepo = {
|
||||
id?: number;
|
||||
name: string;
|
||||
full_name: string;
|
||||
html_url?: string;
|
||||
clone_url?: string;
|
||||
ssh_url?: string;
|
||||
private?: boolean;
|
||||
owner?: { login: string };
|
||||
};
|
||||
@@ -0,0 +1,139 @@
|
||||
export type ApiAppComponent = {
|
||||
id: string;
|
||||
appId: string;
|
||||
name: string;
|
||||
type: string;
|
||||
imageSource?: string | null;
|
||||
externalImage?: string | null;
|
||||
workloadType?: string | null;
|
||||
replicas?: number | null;
|
||||
serviceType?: string | null;
|
||||
storageEnabled?: boolean;
|
||||
storageSize?: string | null;
|
||||
storageMountPath?: string | null;
|
||||
storageRetain?: boolean;
|
||||
buildTarget?: string | null;
|
||||
repository?: string | null;
|
||||
branch?: string | null;
|
||||
port?: number | null;
|
||||
targetPort?: number | null;
|
||||
ports?: Array<{
|
||||
name?: string;
|
||||
port?: number;
|
||||
targetPort?: number;
|
||||
protocol?: string;
|
||||
}> | null;
|
||||
buildJobs?: Array<{
|
||||
id: string;
|
||||
image?: string | null;
|
||||
artifact?: string | null;
|
||||
status?: string;
|
||||
createdAt?: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type ApiApp = {
|
||||
id: string;
|
||||
key: string;
|
||||
name: string;
|
||||
description?: string | null;
|
||||
namespace?: string | null;
|
||||
status: string;
|
||||
components?: ApiAppComponent[];
|
||||
};
|
||||
|
||||
export type RuntimeResource = {
|
||||
kind: string;
|
||||
name: string;
|
||||
status: string;
|
||||
ready: string;
|
||||
restarts: number | null;
|
||||
age: string;
|
||||
detail: string;
|
||||
};
|
||||
|
||||
export type RuntimePodMetric = {
|
||||
namespace: string;
|
||||
pod: string;
|
||||
cpu: string;
|
||||
memory: string;
|
||||
};
|
||||
|
||||
export type RuntimePersistentVolumeClaim = {
|
||||
name: string;
|
||||
status?: string;
|
||||
capacity?: string;
|
||||
accessModes?: string[];
|
||||
storageClass?: string;
|
||||
volumeName?: string;
|
||||
createdAt?: string;
|
||||
};
|
||||
|
||||
export type RuntimeResourceResponse = {
|
||||
namespace: string;
|
||||
exists: boolean;
|
||||
summary: {
|
||||
pods: number;
|
||||
deployments: number;
|
||||
statefulSets: number;
|
||||
services: number;
|
||||
persistentVolumeClaims: number;
|
||||
};
|
||||
resources: RuntimeResource[];
|
||||
};
|
||||
|
||||
export type RuntimeEvent = {
|
||||
namespace?: string;
|
||||
type?: string;
|
||||
reason?: string;
|
||||
message?: string;
|
||||
involvedObject?: string;
|
||||
firstTimestamp?: string;
|
||||
lastTimestamp?: string;
|
||||
count?: number;
|
||||
};
|
||||
|
||||
export type RuntimeWorkloadLogResponse = {
|
||||
namespace: string;
|
||||
target: string;
|
||||
logs: string;
|
||||
};
|
||||
|
||||
export type RuntimeEnvVariable = {
|
||||
id: string;
|
||||
profileId: string;
|
||||
componentId?: string | null;
|
||||
key: string;
|
||||
value: string;
|
||||
isSecret: boolean;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
component?: ApiAppComponent | null;
|
||||
};
|
||||
|
||||
export type RuntimeIngressRule = {
|
||||
id: string;
|
||||
profileId: string;
|
||||
componentId: string;
|
||||
host: string;
|
||||
path: string;
|
||||
servicePort: number;
|
||||
tlsEnabled: boolean;
|
||||
tlsSecretName?: string | null;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
component?: ApiAppComponent | null;
|
||||
};
|
||||
|
||||
export type RuntimeEnvProfile = {
|
||||
id: string;
|
||||
appId: string;
|
||||
name: string;
|
||||
environment: string;
|
||||
namespace: string;
|
||||
isActive: boolean;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
variables?: RuntimeEnvVariable[];
|
||||
ingressRules?: RuntimeIngressRule[];
|
||||
};
|
||||
Reference in New Issue
Block a user