mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 08:02:26 +00:00
fix edit schedule
This commit is contained in:
@@ -189,9 +189,8 @@ async fn check_flow_conflict<'c>(
|
||||
.unwrap_or(false);
|
||||
if exists_flow {
|
||||
return Err(error::Error::BadConfig(format!(
|
||||
"If a schedule has the same path as or a flow, it must be its primary schedule \
|
||||
and hence can only trigger it.
|
||||
However the provided path is: {script_path} and is_flow is: {is_flow}",
|
||||
"The path is the same as a flow, it can only trigger that flow.
|
||||
However the provided path is: {script_path} and is_flow is {is_flow}"
|
||||
)));
|
||||
};
|
||||
}
|
||||
@@ -267,6 +266,7 @@ pub async fn edit_schedule(
|
||||
),
|
||||
)
|
||||
.await?;
|
||||
tx.commit().await?;
|
||||
|
||||
Ok(path.to_string())
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
workspace: $workspaceStore!,
|
||||
path: initialPath
|
||||
})
|
||||
enabled = s.enabled
|
||||
schedule = s.schedule
|
||||
script_path = s.script_path ?? ''
|
||||
args = s.args ?? {}
|
||||
|
||||
@@ -93,14 +93,14 @@
|
||||
>
|
||||
<SharedBadge {canWrite} extraPerms={extra_perms} />
|
||||
</td>
|
||||
<td class="break-words"
|
||||
><a class="text-sm" href="{is_flow ? '/flows/get' : '/scripts/get'}/{script_path}"
|
||||
>{script_path}</a
|
||||
><span class="text-2xs text-gray-500 bg-gray-100 font-mono ml-2"
|
||||
>{is_flow ? 'flow' : 'script'}</span
|
||||
></td
|
||||
>
|
||||
<td><Badge color="blue">{schedule}</Badge></td>
|
||||
<td
|
||||
><div class="inline-flex flex-row gap-x-2 align-middle"
|
||||
><Badge class="text-2xs font-mono ml-2">{is_flow ? 'flow' : 'script'}</Badge><a
|
||||
class="text-sm break-words"
|
||||
href="{is_flow ? '/flows/get' : '/scripts/get'}/{script_path}">{script_path}</a
|
||||
></div
|
||||
>
|
||||
</td><td><Badge color="blue">{schedule}</Badge></td>
|
||||
<td>
|
||||
<Toggle
|
||||
checked={enabled}
|
||||
|
||||
Reference in New Issue
Block a user