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