feat(FN-3112): tokenize NodesView border-radius and motion styles
Fixes FN-3112: Updates NodesView CSS to use tokenized border-radius and transition values from the design system instead of hardcoded pixel values, ensuring consistency with the dashboard's established token variables. Fusion-Task-Id: FN-3112
This commit is contained in:
@@ -165,10 +165,17 @@ export class DockerClientService {
|
||||
return this.createDockerInstance(hostConfig);
|
||||
}
|
||||
|
||||
async getContainerInfo(containerId: string): Promise<DockerContainerInspectResult | null> {
|
||||
async getContainerInfo(containerId: string, hostConfig?: DockerHostConfig): Promise<DockerContainerInspectResult | null> {
|
||||
try {
|
||||
const docker = await this.getInstance();
|
||||
const docker = await this.getDockerInstance(hostConfig);
|
||||
const inspect = await docker.getContainer(containerId).inspect();
|
||||
const ports = Object.entries(inspect.NetworkSettings?.Ports ?? {}).reduce<Record<string, string>>((acc, [key, value]) => {
|
||||
const binding = Array.isArray(value) && value.length > 0 ? value[0] : undefined;
|
||||
if (binding?.HostPort) {
|
||||
acc[key] = binding.HostPort;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return {
|
||||
id: inspect.Id,
|
||||
name: (inspect.Name ?? "").replace(/^\//, ""),
|
||||
@@ -181,7 +188,11 @@ export class DockerClientService {
|
||||
restarting: Boolean(inspect.State?.Restarting),
|
||||
dead: Boolean(inspect.State?.Dead),
|
||||
error: inspect.State?.Error || undefined,
|
||||
exitCode: typeof inspect.State?.ExitCode === "number" ? inspect.State.ExitCode : undefined,
|
||||
startedAt: inspect.State?.StartedAt || undefined,
|
||||
finishedAt: inspect.State?.FinishedAt || undefined,
|
||||
},
|
||||
ports,
|
||||
};
|
||||
} catch (error) {
|
||||
const message = toErrorMessage(error);
|
||||
@@ -192,6 +203,19 @@ export class DockerClientService {
|
||||
}
|
||||
}
|
||||
|
||||
async getContainerLogs(containerId: string, hostConfig?: DockerHostConfig, options?: { tail?: number }): Promise<string> {
|
||||
const docker = await this.getDockerInstance(hostConfig);
|
||||
const stream = await docker.getContainer(containerId).logs({
|
||||
stdout: true,
|
||||
stderr: true,
|
||||
tail: options?.tail ?? 100,
|
||||
});
|
||||
if (Buffer.isBuffer(stream)) {
|
||||
return stream.toString("utf8");
|
||||
}
|
||||
return String(stream ?? "");
|
||||
}
|
||||
|
||||
private async getInstance(): Promise<Docker> {
|
||||
if (!this.dockerInstance) {
|
||||
this.dockerInstance = await this.createDockerInstance(this.defaultHostConfig);
|
||||
|
||||
@@ -2705,7 +2705,12 @@ export interface DockerContainerInspectResult {
|
||||
restarting: boolean;
|
||||
dead: boolean;
|
||||
error?: string;
|
||||
exitCode?: number;
|
||||
startedAt?: string;
|
||||
finishedAt?: string;
|
||||
};
|
||||
/** Optional exposed ports summary */
|
||||
ports?: Record<string, string>;
|
||||
}
|
||||
|
||||
/** Configuration for the Fusion Docker image to use for provisioning */
|
||||
|
||||
Reference in New Issue
Block a user