From 35cbad21774dc15e686bbbccb812c40ac9728dff Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Wed, 2 Aug 2023 17:05:16 +0000 Subject: [PATCH] rename post_image to process_args --- bin/periphery/src/helpers/docker/container.rs | 12 ++++++------ client/ts/src/types.ts | 4 ++-- lib/types/src/entities/deployment.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/periphery/src/helpers/docker/container.rs b/bin/periphery/src/helpers/docker/container.rs index 1bb90ba11..e2890c232 100644 --- a/bin/periphery/src/helpers/docker/container.rs +++ b/bin/periphery/src/helpers/docker/container.rs @@ -202,7 +202,7 @@ pub fn docker_run_command( ports, network, container_user, - post_image, + process_args, restart, environment, extra_args, @@ -220,9 +220,9 @@ pub fn docker_run_command( let network = parse_network(network); let restart = parse_restart(restart); let environment = parse_environment(environment); - let post_image = parse_post_image(post_image); + let process_args = parse_process_args(process_args); let extra_args = parse_extra_args(extra_args); - format!("docker run -d --name {name}{container_user}{ports}{volumes}{network}{restart}{environment}{extra_args} {image}{post_image}") + format!("docker run -d --name {name}{container_user}{ports}{volumes}{network}{restart}{environment}{extra_args} {image}{process_args}") } fn parse_container_user(container_user: &String) -> String { @@ -261,10 +261,10 @@ fn parse_restart(restart: &RestartMode) -> String { format!(" --restart {restart}") } -fn parse_post_image(post_image: &String) -> String { - if post_image.is_empty() { +fn parse_process_args(process_args: &String) -> String { + if process_args.is_empty() { String::new() } else { - format!(" {post_image}") + format!(" {process_args}") } } diff --git a/client/ts/src/types.ts b/client/ts/src/types.ts index fc5965ae3..3aed49539 100644 --- a/client/ts/src/types.ts +++ b/client/ts/src/types.ts @@ -191,7 +191,7 @@ export interface DeploymentConfig { environment?: EnvironmentVar[]; network: string; restart?: RestartMode; - post_image?: string; + process_args?: string; container_user?: string; extra_args?: string[]; docker_account?: string; @@ -377,7 +377,7 @@ export interface ServerActionState { export interface SystemStatsRecord { ts: I64; - server_id: string; + sid: string; system_load: number; cpu_perc: number; cpu_freq_mhz: number; diff --git a/lib/types/src/entities/deployment.rs b/lib/types/src/entities/deployment.rs index bb0cde3f5..b2480b61e 100644 --- a/lib/types/src/entities/deployment.rs +++ b/lib/types/src/entities/deployment.rs @@ -109,7 +109,7 @@ pub struct DeploymentConfig { #[serde(default)] #[builder(default)] - pub post_image: String, // empty is no post image + pub process_args: String, // empty is no post image #[serde(default)] #[builder(default)]