diff --git a/src/components/modals/logs/PendingActions.vue b/src/components/modals/logs/PendingActions.vue index 54888c7..7ff2460 100644 --- a/src/components/modals/logs/PendingActions.vue +++ b/src/components/modals/logs/PendingActions.vue @@ -26,7 +26,7 @@ {{ props.row.due }} {{ props.row.description }} - + { - this.actions = Object.freeze(r.data); - if (!!this.agentpk) this.hostname = r.data[0].hostname; + this.completedCount = r.data.completed_count; + this.actions = Object.freeze(r.data.actions); + if (!!this.agentpk) this.hostname = r.data.actions[0].hostname; this.$q.loading.hide(); }) .catch(e => { @@ -170,7 +178,7 @@ export default { this.$q.loading.show(); const data = { pk: this.selectedRow }; this.$axios - .delete("/logs/cancelpendingaction/", { data: data }) + .delete("/logs/pendingactions/", { data: data }) .then(r => { this.$q.loading.hide(); this.getPendingActions(); @@ -202,12 +210,6 @@ export default { }, }, computed: { - url() { - return !!this.agentpk ? `/logs/${this.agentpk}/pendingactions/` : "/logs/allpendingactions/"; - }, - filter() { - return this.showCompleted ? this.actions : this.actions.filter(k => k.status === "pending"); - }, columns() { return !!this.agentpk ? this.agent_columns : this.all_columns; }, @@ -217,9 +219,6 @@ export default { title() { return !!this.agentpk ? `Pending Actions for ${this.hostname}` : "All Pending Actions"; }, - completedCount() { - return this.actions.filter(k => k.status === "completed").length; - }, }, created() { this.getPendingActions();