fix edit schedule

This commit is contained in:
Ruben Fiszel
2022-11-10 16:49:16 +01:00
parent 8656e1c6f1
commit 4aeed1ffc8
3 changed files with 12 additions and 11 deletions
+3 -3
View File
@@ -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())
}
+1
View File
@@ -66,6 +66,7 @@
workspace: $workspaceStore!,
path: initialPath
})
enabled = s.enabled
schedule = s.schedule
script_path = s.script_path ?? ''
args = s.args ?? {}
+8 -8
View File
@@ -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}