diff --git a/src/api/tasks.js b/src/api/tasks.js
index 5d72999..28480a1 100644
--- a/src/api/tasks.js
+++ b/src/api/tasks.js
@@ -26,7 +26,7 @@ export async function removeTask(id) {
return data
}
-export async function runTask(id) {
- const { data } = await axios.post(`${baseUrl}/${id}/run/`)
+export async function runTask(id, payload) {
+ const { data } = await axios.post(`${baseUrl}/${id}/run/`, payload)
return data
-}
\ No newline at end of file
+}
diff --git a/src/components/agents/AutomatedTasksTab.vue b/src/components/agents/AutomatedTasksTab.vue
index 95f9a8b..a178799 100644
--- a/src/components/agents/AutomatedTasksTab.vue
+++ b/src/components/agents/AutomatedTasksTab.vue
@@ -188,7 +188,7 @@
-
+
Passing
@@ -230,7 +230,7 @@
>
Awaiting output
- {{ formatDate(props.row.task_result.last_run) }}
+ {{ formatDate(props.row.task_result.last_run) }}
Has not run yet
{{ props.row.schedule }}
@@ -378,7 +378,7 @@ export default {
loading.value = true;
try {
- const result = await runTask(task.id);
+ const result = await runTask(task.id, task.policy ? { agent_id: selectedAgent.value } : {});
notifySuccess(result);
} catch (e) {
console.error(e);