Skip to content

Commit

Permalink
Release 0.4.20
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Mar 2, 2021
2 parents fd7d776 + c56c537 commit 6a55ca2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 19 deletions.
15 changes: 14 additions & 1 deletion api/tacticalrmm/agents/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,19 @@ def patch(self, request):
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":
Expand Down Expand Up @@ -270,7 +283,7 @@ def patch(self, request):
"time_zone",
"maintenance_mode",
)
.order_by(pagination["sortBy"])
.order_by(order_by)
)
paginator = Paginator(queryset, pagination["rowsPerPage"])

Expand Down
4 changes: 2 additions & 2 deletions api/tacticalrmm/tacticalrmm/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
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"
Expand Down
7 changes: 4 additions & 3 deletions web/src/components/AgentTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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;
Expand Down
27 changes: 14 additions & 13 deletions web/src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,19 @@
<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"
>
<template v-slot:prepend>
<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>
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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,
Expand All @@ -546,9 +547,9 @@ export default {
"patchespending",
"pendingactions",
"agentstatus",
"needsreboot",
"lastseen",
"boottime",
"needs_reboot",
"last_seen",
"boot_time",
],
};
},
Expand Down

0 comments on commit 6a55ca2

Please sign in to comment.