Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: make run-now and create-schedule mutually exclusive in run task…
… dialog
  • Loading branch information
vahidzhe committed Aug 25, 2026
commit ca0b9333d9ac15facd3cae8f22597b3425cb5bdb
14 changes: 13 additions & 1 deletion app/components/run-task-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ const selectedSource = computed(() =>
sourcesData.value?.sources.find((source) => source.name === sourceName.value)
)

// Filling a schedule field switches the dialog into scheduling
// mode, so exactly one of the two buttons is active at a time.
const hasScheduleSpec = computed(() =>
Boolean(cron.value || time.value || interval.value)
)

const parseArguments = () => {
let args: unknown
let kwargs: unknown
Expand Down Expand Up @@ -299,7 +305,7 @@ const handleCreateSchedule = async () => {
<Button
variant="outline"
class="cursor-pointer"
:disabled="!cron && !time && !interval"
:disabled="!hasScheduleSpec"
:title="
selectedSource && !selectedSource.editable
? 'The selected source is read-only'
Expand All @@ -311,6 +317,12 @@ const handleCreateSchedule = async () => {
</Button>
<Button
class="cursor-pointer"
:disabled="hasScheduleSpec"
:title="
hasScheduleSpec
? 'Clear the schedule fields to run the task now'
: 'Run the task now'
"
@click="handleRunNow"
>
Run Now
Expand Down