HOTFIX 0.4.20 temporarily disable some sorting
This commit is contained in:
parent
1af28190d8
commit
c56c537f7f
|
@ -234,6 +234,19 @@ class AgentsTableList(APIView):
|
|||
site = Q()
|
||||
mon_type = Q()
|
||||
|
||||
if pagination["sortBy"] == "agentstatus":
|
||||
sort = "last_seen"
|
||||
elif pagination["sortBy"] == "client_name":
|
||||
sort = "site__client__name"
|
||||
elif pagination["sortBy"] == "site_name":
|
||||
sort = "site__name"
|
||||
elif pagination["sortBy"] == "user":
|
||||
sort = "logged_in_username"
|
||||
else:
|
||||
sort = pagination["sortBy"]
|
||||
|
||||
order_by = f"-{sort}" if pagination["descending"] else sort
|
||||
|
||||
if monType == "server":
|
||||
mon_type = Q(monitoring_type="server")
|
||||
elif monType == "workstation":
|
||||
|
@ -270,7 +283,7 @@ class AgentsTableList(APIView):
|
|||
"time_zone",
|
||||
"maintenance_mode",
|
||||
)
|
||||
.order_by(pagination["sortBy"])
|
||||
.order_by(order_by)
|
||||
)
|
||||
paginator = Paginator(queryset, pagination["rowsPerPage"])
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@ EXE_DIR = os.path.join(BASE_DIR, "tacticalrmm/private/exe")
|
|||
AUTH_USER_MODEL = "accounts.User"
|
||||
|
||||
# latest release
|
||||
TRMM_VERSION = "0.4.19"
|
||||
TRMM_VERSION = "0.4.20"
|
||||
|
||||
# bump this version everytime vue code is changed
|
||||
# to alert user they need to manually refresh their browser
|
||||
APP_VER = "0.0.117"
|
||||
APP_VER = "0.0.118"
|
||||
|
||||
# https://github.com/wh1te909/rmmagent
|
||||
LATEST_AGENT_VER = "1.4.8"
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
</q-icon>
|
||||
</q-th>
|
||||
</template>
|
||||
<template v-slot:header-cell-needsreboot="props">
|
||||
<template v-slot:header-cell-needs_reboot="props">
|
||||
<q-th auto-width :props="props">
|
||||
<q-icon name="fas fa-power-off" size="1.2em">
|
||||
<q-tooltip>Reboot</q-tooltip>
|
||||
|
@ -363,8 +363,8 @@
|
|||
<q-tooltip>Reboot required</q-tooltip>
|
||||
</q-icon>
|
||||
</q-td>
|
||||
<q-td key="lastseen" :props="props">{{ formatDjangoDate(props.row.last_seen) }}</q-td>
|
||||
<q-td key="boottime" :props="props">{{ bootTime(props.row.boot_time) }}</q-td>
|
||||
<q-td key="last_seen" :props="props">{{ formatDjangoDate(props.row.last_seen) }}</q-td>
|
||||
<q-td key="boot_time" :props="props">{{ bootTime(props.row.boot_time) }}</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
|
@ -439,6 +439,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
onRequest(props) {
|
||||
if (!!props.filter) return;
|
||||
const { page, rowsPerPage, sortBy, descending } = props.pagination;
|
||||
this.agentTblPagination.page = page;
|
||||
this.agentTblPagination.rowsPerPage = rowsPerPage;
|
||||
|
|
|
@ -205,10 +205,11 @@
|
|||
<q-input
|
||||
v-model="search"
|
||||
style="width: 450px"
|
||||
label="Search"
|
||||
label="Search (temporarily disabled)"
|
||||
dense
|
||||
outlined
|
||||
clearable
|
||||
disable
|
||||
@clear="clearFilter"
|
||||
class="q-pr-md q-pb-xs"
|
||||
>
|
||||
|
@ -216,7 +217,7 @@
|
|||
<q-icon name="search" color="primary" />
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<q-btn round dense flat icon="filter_alt" :color="isFilteringTable ? 'green' : ''">
|
||||
<q-btn disable round dense flat icon="filter_alt" :color="isFilteringTable ? 'green' : ''">
|
||||
<q-menu>
|
||||
<q-list dense>
|
||||
<q-item-label header>Filter Agent Table</q-item-label>
|
||||
|
@ -451,8 +452,8 @@ export default {
|
|||
name: "checks-status",
|
||||
align: "left",
|
||||
field: "checks",
|
||||
sortable: true,
|
||||
sort: (a, b, rowA, rowB) => parseInt(b.failing) - a.failing,
|
||||
sortable: false,
|
||||
//sort: (a, b, rowA, rowB) => parseInt(b.failing) - a.failing,
|
||||
},
|
||||
{
|
||||
name: "client_name",
|
||||
|
@ -497,13 +498,13 @@ export default {
|
|||
name: "patchespending",
|
||||
field: "patches_pending",
|
||||
align: "left",
|
||||
sortable: true,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
name: "pendingactions",
|
||||
field: "pending_actions",
|
||||
align: "left",
|
||||
sortable: true,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
name: "agentstatus",
|
||||
|
@ -512,21 +513,21 @@ export default {
|
|||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: "needsreboot",
|
||||
name: "needs_reboot",
|
||||
field: "needs_reboot",
|
||||
align: "left",
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: "lastseen",
|
||||
name: "last_seen",
|
||||
label: "Last Response",
|
||||
field: "last_seen",
|
||||
sortable: true,
|
||||
align: "left",
|
||||
sort: (a, b) => this.dateStringToUnix(a) - this.dateStringToUnix(b),
|
||||
//sort: (a, b) => this.dateStringToUnix(a) - this.dateStringToUnix(b),
|
||||
},
|
||||
{
|
||||
name: "boottime",
|
||||
name: "boot_time",
|
||||
label: "Boot Time",
|
||||
field: "boot_time",
|
||||
sortable: true,
|
||||
|
@ -546,9 +547,9 @@ export default {
|
|||
"patchespending",
|
||||
"pendingactions",
|
||||
"agentstatus",
|
||||
"needsreboot",
|
||||
"lastseen",
|
||||
"boottime",
|
||||
"needs_reboot",
|
||||
"last_seen",
|
||||
"boot_time",
|
||||
],
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue