This commit is contained in:
HugoCasa
2025-11-28 17:56:22 +01:00
parent b7d4c63456
commit 04eea007fa
2 changed files with 14 additions and 9 deletions

View File

@@ -2636,7 +2636,7 @@ pub async fn handle_queued_job(
match job.kind {
JobKind::Unassigned => {
return Err(Error::ExecutionError("Suspended job was not handled by the user within 30 days, job will not be executed.".to_string()));
return Err(Error::ExecutionErr("Suspended job was not handled by the user within 30 days, job will not be executed.".to_string()));
}
_ => {}
}

View File

@@ -48,6 +48,7 @@
import { getHttpRoute } from '$lib/components/triggers/http/utils'
import RoutesGenerator from '$lib/components/triggers/http/RoutesGenerator.svelte'
import OpenApiSpecGenerator from '$lib/components/triggers/http/OpenAPISpecGenerator.svelte'
import Badge from '$lib/components/common/badge/Badge.svelte'
type TriggerW = HttpTrigger & { canWrite: boolean }
@@ -314,7 +315,7 @@
<div class="text-center text-sm font-semibold text-emphasis mt-2"> No routes </div>
{:else if items?.length}
<div class="border rounded-md divide-y">
{#each items.slice(0, nbDisplayed) as { workspace_id, workspaced_route, enabled, path, edited_by, edited_at, script_path, route_path, is_flow, extra_perms, canWrite, marked, http_method, static_asset_config } (path)}
{#each items.slice(0, nbDisplayed) as { workspace_id, workspaced_route, enabled, path, edited_by, edited_at, script_path, route_path, is_flow, extra_perms, canWrite, marked, http_method, static_asset_config, suspended_mode } (path)}
{@const href = `${is_flow ? '/flows/get' : '/scripts/get'}/${script_path}`}
<div
@@ -359,13 +360,17 @@
<SharedBadge {canWrite} extraPerms={extra_perms} />
</div>
<Toggle
checked={enabled}
disabled={!canWrite}
on:change={(e) => {
setTriggerEnabled(path, e.detail)
}}
/>
{#if suspended_mode}
<Badge color="gray">Suspended</Badge>
{:else}
<Toggle
checked={enabled}
disabled={!canWrite}
on:change={(e) => {
setTriggerEnabled(path, e.detail)
}}
/>
{/if}
<div class="flex gap-2 items-center justify-end">
<Button