From 673f10095dc0ac306d3416fdf8a1a3b6971361ec Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 18 Jul 2025 09:05:43 +0000 Subject: [PATCH] whitelabelling nits --- backend/windmill-worker/src/worker.rs | 8 ++++++-- frontend/src/lib/toast.ts | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index ab81a628aa..caebcd1bef 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -2069,6 +2069,10 @@ async fn do_nativets( .await?) } +lazy_static::lazy_static! { + static ref LOG_TAG_NAME: String = std::env::var("LOG_TAG_NAME").unwrap_or("tag".to_string()); +} + #[derive(Deserialize, Serialize, Default)] pub struct PreviousResult<'a> { #[serde(borrow)] @@ -2264,8 +2268,8 @@ pub async fn handle_queued_job( // println!("handle queue {:?}", SystemTime::now()); logs.push_str(&format!( - "job={} tag={} worker={} hostname={}\n", - &job.id, &job.tag, &worker_name, &hostname + "job={} {}={} worker={} hostname={}\n", + &job.id, *LOG_TAG_NAME, &job.tag, &worker_name, &hostname )); if *NO_LOGS_AT_ALL { diff --git a/frontend/src/lib/toast.ts b/frontend/src/lib/toast.ts index 173af98dd4..2c61546093 100644 --- a/frontend/src/lib/toast.ts +++ b/frontend/src/lib/toast.ts @@ -13,6 +13,16 @@ export function sendUserToast( errorMessage: string | undefined = undefined, duration: number = 5000 ): void { + if (globalThis.windmillToast) { + globalThis.windmillToast({ + message, + error, + actions, + errorMessage, + duration + }) + return + } toast.push({ component: { // https://github.com/zerodevx/svelte-toast/issues/115