From dfbd641df8ff4cf851cf4eabb780e3f3189f01fa Mon Sep 17 00:00:00 2001 From: sadnub Date: Fri, 22 Oct 2021 17:21:16 -0400 Subject: [PATCH] fix some prop errors in addautomatedtask and fix display of assigned checks and tasks in policy check/task tabs --- src/components/agents/ChecksTab.vue | 2 +- src/components/automation/PolicyAutomatedTasksTab.vue | 7 +++---- src/components/automation/PolicyChecksTab.vue | 8 ++++---- src/components/tasks/AddAutomatedTask.vue | 3 ++- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/agents/ChecksTab.vue b/src/components/agents/ChecksTab.vue index 4325aa0..d6175c6 100644 --- a/src/components/agents/ChecksTab.vue +++ b/src/components/agents/ChecksTab.vue @@ -271,7 +271,7 @@ }} {{ props.row.last_run || "Never" }} - {{ props.row.assigned_task.length }} Tasks {{ props.row.assigned_task.name }} diff --git a/src/components/automation/PolicyAutomatedTasksTab.vue b/src/components/automation/PolicyAutomatedTasksTab.vue index 332b0ba..03ab28f 100644 --- a/src/components/automation/PolicyAutomatedTasksTab.vue +++ b/src/components/automation/PolicyAutomatedTasksTab.vue @@ -154,8 +154,7 @@ >See Status - {{ props.row.assigned_check.readable_desc }} - + {{ props.row.check_name }} @@ -200,9 +199,9 @@ export default { sortable: true, }, { - name: "assignedcheck", + name: "check_name", label: "Assigned Check", - field: "assigned_check", + field: "check_name", align: "left", sortable: true, }, diff --git a/src/components/automation/PolicyChecksTab.vue b/src/components/automation/PolicyChecksTab.vue index 774384d..3c4115d 100644 --- a/src/components/automation/PolicyChecksTab.vue +++ b/src/components/automation/PolicyChecksTab.vue @@ -161,10 +161,10 @@ >See Status - {{ - props.row.assignedtask[0].name - }} - {{ props.row.assignedtask.length }} Tasks + {{ props.row.assigned_task.length }} Tasks + {{ props.row.assigned_task.name }} diff --git a/src/components/tasks/AddAutomatedTask.vue b/src/components/tasks/AddAutomatedTask.vue index c3d39e4..c59fabb 100644 --- a/src/components/tasks/AddAutomatedTask.vue +++ b/src/components/tasks/AddAutomatedTask.vue @@ -252,6 +252,7 @@ export default { const loading = ref(false); async function submit() { + console.log(task.value); if (!step1Done.value || !step2Done.value) { notifyError("Some steps are incomplete"); return; @@ -289,7 +290,7 @@ export default { const step1Done = computed(() => { return ( (!!script.value && !!task.value.name && !!defaultTimeout.value && !collector.value) || - (!!script.value && !!task.value.name && !!defaultTimeout.value && collector.value && task.value.custom_field) + (!!script.value && !!task.value.name && !!defaultTimeout.value && collector.value && !!task.value.custom_field) ); });