From 0ab6b68ae1ffad7f533a349f637f9806937aeb51 Mon Sep 17 00:00:00 2001 From: Josh Krawczyk Date: Sun, 24 May 2020 23:21:55 -0400 Subject: [PATCH] More Tests, Finished Task and Check policy tables, many fixes and refactors --- .../automation/AutomationManager.vue | 98 ++++-- .../automation/OverviewAutomatedTasksTab.vue | 120 ------- .../automation/OverviewChecksTab.vue | 168 ---------- .../automation/PolicyAutomatedTasksTab.vue | 81 +++-- src/components/automation/PolicyChecksTab.vue | 309 +++++++----------- src/components/automation/PolicyOverview.vue | 83 +++-- .../automation/PolicySubTableTabs.vue | 3 +- .../automation/modals/PolicyCheckStatus.vue | 33 -- .../automation/modals/PolicyForm.vue | 14 +- .../automation/modals/PolicyStatus.vue | 59 ++++ .../modals/tasks/AddAutomatedTask.vue | 26 +- src/mixins/mixins.js | 56 ++-- src/store/automation.js | 17 + src/store/store.js | 12 + .../unit/automation/automationmanager.spec.js | 47 ++- tests/unit/automation/formmodal.spec.js | 32 +- tests/unit/automation/policyoverview.spec.js | 127 +++++++ 17 files changed, 607 insertions(+), 678 deletions(-) delete mode 100644 src/components/automation/OverviewAutomatedTasksTab.vue delete mode 100644 src/components/automation/OverviewChecksTab.vue delete mode 100644 src/components/automation/modals/PolicyCheckStatus.vue create mode 100644 src/components/automation/modals/PolicyStatus.vue create mode 100644 tests/unit/automation/policyoverview.spec.js diff --git a/src/components/automation/AutomationManager.vue b/src/components/automation/AutomationManager.vue index 0760e76..0391efa 100644 --- a/src/components/automation/AutomationManager.vue +++ b/src/components/automation/AutomationManager.vue @@ -2,7 +2,7 @@
- Automation Manager + Automation Manager Close @@ -21,6 +21,30 @@ icon="add" @click="showAddPolicyModal" /> + +
{{ props.row.desc }} {{ props.row.active }} - + > + {{ `See Related (${props.row.clients.length + props.row.sites.length + props.row.agents.length}+)` }} + @@ -123,29 +143,41 @@ - + - + + + + @close="closePolicyFormModal" + /> - - + + + + - - + + + + \ No newline at end of file diff --git a/src/components/automation/OverviewAutomatedTasksTab.vue b/src/components/automation/OverviewAutomatedTasksTab.vue deleted file mode 100644 index ca61756..0000000 --- a/src/components/automation/OverviewAutomatedTasksTab.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - - diff --git a/src/components/automation/OverviewChecksTab.vue b/src/components/automation/OverviewChecksTab.vue deleted file mode 100644 index 62d90d3..0000000 --- a/src/components/automation/OverviewChecksTab.vue +++ /dev/null @@ -1,168 +0,0 @@ - - - - diff --git a/src/components/automation/PolicyAutomatedTasksTab.vue b/src/components/automation/PolicyAutomatedTasksTab.vue index 9374c09..f1ff955 100644 --- a/src/components/automation/PolicyAutomatedTasksTab.vue +++ b/src/components/automation/PolicyAutomatedTasksTab.vue @@ -10,7 +10,7 @@ text-color="black" @click="showAddAutomatedTask = true" /> - + @@ -70,13 +70,12 @@ /> {{ props.row.name }} - + output + @click="showStatus(props.row)" + >See Status - Awaiting output {{ props.row.last_run }} Has not run yet {{ props.row.schedule }} @@ -88,39 +87,48 @@ - + - - + + + diff --git a/src/components/automation/PolicyOverview.vue b/src/components/automation/PolicyOverview.vue index e6fc003..6b556fc 100644 --- a/src/components/automation/PolicyOverview.vue +++ b/src/components/automation/PolicyOverview.vue @@ -11,7 +11,7 @@ @@ -62,16 +56,15 @@ \ No newline at end of file + diff --git a/src/components/automation/PolicySubTableTabs.vue b/src/components/automation/PolicySubTableTabs.vue index 4e13b6c..7a33b11 100644 --- a/src/components/automation/PolicySubTableTabs.vue +++ b/src/components/automation/PolicySubTableTabs.vue @@ -17,7 +17,7 @@ - + @@ -32,7 +32,6 @@ import PolicyAutomatedTasksTab from "@/components/automation/PolicyAutomatedTask export default { name: "PolicySubTableTabs", - props: ["policypk"], components: { PolicyChecksTab, PolicyAutomatedTasksTab diff --git a/src/components/automation/modals/PolicyCheckStatus.vue b/src/components/automation/modals/PolicyCheckStatus.vue deleted file mode 100644 index 406f026..0000000 --- a/src/components/automation/modals/PolicyCheckStatus.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/automation/modals/PolicyForm.vue b/src/components/automation/modals/PolicyForm.vue index 7578185..104c6a1 100644 --- a/src/components/automation/modals/PolicyForm.vue +++ b/src/components/automation/modals/PolicyForm.vue @@ -98,7 +98,7 @@ diff --git a/src/components/modals/tasks/AddAutomatedTask.vue b/src/components/modals/tasks/AddAutomatedTask.vue index ffb6810..56da068 100644 --- a/src/components/modals/tasks/AddAutomatedTask.vue +++ b/src/components/modals/tasks/AddAutomatedTask.vue @@ -108,12 +108,14 @@