Add pending actions to agent table and filter
This commit is contained in:
@@ -46,6 +46,13 @@
|
||||
</q-icon>
|
||||
</q-th>
|
||||
</template>
|
||||
<template v-slot:header-cell-pendingactions="props">
|
||||
<q-th auto-width :props="props">
|
||||
<q-icon name="far fa-clock" size="1.5em">
|
||||
<q-tooltip>Pending Actions</q-tooltip>
|
||||
</q-icon>
|
||||
</q-th>
|
||||
</template>
|
||||
<!--
|
||||
<template v-slot:header-cell-antivirus="props">
|
||||
<q-th auto-width :props="props">
|
||||
@@ -274,6 +281,11 @@
|
||||
<q-tooltip>Patches Pending</q-tooltip>
|
||||
</q-icon>
|
||||
</q-td>
|
||||
<q-td :props="props" key="pendingactions">
|
||||
<q-icon @click="showPendingActionsModal(props.row.id)" name="far fa-clock" size="1.4em" color="warning">
|
||||
<q-tooltip>Pending Action Count: {{ props.row.pending_actions }}</q-tooltip>
|
||||
</q-icon>
|
||||
</q-td>
|
||||
<q-td key="agentstatus">
|
||||
<q-icon v-if="props.row.status === 'overdue'" name="fas fa-signal" size="1.2em" color="negative">
|
||||
<q-tooltip>Agent overdue</q-tooltip>
|
||||
@@ -384,6 +396,7 @@ export default {
|
||||
let availability = null;
|
||||
let checks = false;
|
||||
let patches = false;
|
||||
let actions = false;
|
||||
let reboot = false;
|
||||
let search = "";
|
||||
|
||||
@@ -394,6 +407,7 @@ export default {
|
||||
advancedFilter = true;
|
||||
let filter = param.split(":")[1];
|
||||
if (filter === "patchespending") patches = true;
|
||||
if (filter === "actionspending") actions = true;
|
||||
else if (filter === "checksfailing") checks = true;
|
||||
else if (filter === "rebootneeded") reboot = true;
|
||||
else if (filter === "online" || filter === "offline" || filter === "expired") availability = filter;
|
||||
@@ -406,6 +420,7 @@ export default {
|
||||
if (advancedFilter) {
|
||||
if (checks && !row.checks.has_failing_checks) return false;
|
||||
if (patches && !row.patches_pending) return false;
|
||||
if (actions && row.pending_actions > 0) return false;
|
||||
if (reboot && !row.needs_reboot) return false;
|
||||
if (availability === "online" && row.status !== "online") return false;
|
||||
else if (availability === "offline" && row.status !== "overdue") return false;
|
||||
|
||||
Reference in New Issue
Block a user