Compare commits

..

10 Commits

Author SHA1 Message Date
wh1te909
3969208942 Release 0.9.2 2021-11-09 06:11:51 +00:00
wh1te909
3fa89b58df bump version 2021-11-09 06:11:33 +00:00
wh1te909
a43a9c8543 remove old wording 2021-11-09 05:54:17 +00:00
sadnub
45deda4dea fix saving agents 2021-11-08 22:25:07 -05:00
sadnub
6ec46f02a9 fix deleting automation task #791 2021-11-08 21:17:41 -05:00
sadnub
d643c17ff1 fix remote background height and adjust other items to fit to screen 2021-11-08 21:13:01 -05:00
wh1te909
e5de89c6b4 more loading fixes 2021-11-09 01:23:01 +00:00
wh1te909
c21e7c632d fix debug log loading 2021-11-09 01:06:11 +00:00
wh1te909
6ae771682a fix task loading fixes #790 2021-11-08 22:00:40 +00:00
wh1te909
bf2075b902 pending actions loading fixes #789 2021-11-08 21:56:57 +00:00
13 changed files with 63 additions and 39 deletions

View File

@@ -44,7 +44,7 @@ class AgentSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = Agent model = Agent
exclude = ["last_seen", "id"] exclude = ["last_seen", "id", "patches_last_installed"]
class AgentTableSerializer(serializers.ModelSerializer): class AgentTableSerializer(serializers.ModelSerializer):

View File

@@ -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.9.1" TRMM_VERSION = "0.9.2"
# 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.149" APP_VER = "0.0.150"
# https://github.com/wh1te909/rmmagent # https://github.com/wh1te909/rmmagent
LATEST_AGENT_VER = "1.6.2" LATEST_AGENT_VER = "1.6.2"

View File

@@ -317,8 +317,12 @@ export default {
async function getTasks() { async function getTasks() {
loading.value = true; loading.value = true;
const result = await fetchAgentTasks(selectedAgent.value); try {
tasks.value = result.filter(task => task.sync_status !== "pendingdeletion"); const result = await fetchAgentTasks(selectedAgent.value);
tasks.value = result.filter(task => task.sync_status !== "pendingdeletion");
} catch (e) {
console.error(e);
}
loading.value = false; loading.value = false;
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="row"> <div class="row q-pt-sm q-pl-sm">
<div class="col-2"> <div class="col-2">
<q-select dense options-dense outlined v-model="days" :options="lastDaysOptions" :label="showDays" /> <q-select dense options-dense outlined v-model="days" :options="lastDaysOptions" :label="showDays" />
</div> </div>
@@ -15,7 +15,7 @@
class="remote-bg-tbl-sticky" class="remote-bg-tbl-sticky"
:rows="events" :rows="events"
:columns="columns" :columns="columns"
style="max-height: 85vh" :style="{ 'max-height': `${$q.screen.height - 85}px` }"
:pagination="{ rowsPerPage: 0, sortBy: 'record', descending: true }" :pagination="{ rowsPerPage: 0, sortBy: 'record', descending: true }"
:filter="filter" :filter="filter"
row-key="uid" row-key="uid"
@@ -37,7 +37,7 @@
<q-radio v-model="logType" color="cyan" val="System" label="System" /> <q-radio v-model="logType" color="cyan" val="System" label="System" />
<q-radio v-model="logType" color="cyan" val="Security" label="Security" /> <q-radio v-model="logType" color="cyan" val="Security" label="Security" />
<q-space /> <q-space />
<q-input v-model="filter" outlined label="Search" dense clearable> <q-input v-model="filter" style="width: 300px" outlined label="Search" dense clearable>
<template v-slot:prepend> <template v-slot:prepend>
<q-icon name="search" /> <q-icon name="search" />
</template> </template>

View File

@@ -3,7 +3,7 @@
dense dense
:table-class="{ 'table-bgcolor': !$q.dark.isActive, 'table-bgcolor-dark': $q.dark.isActive }" :table-class="{ 'table-bgcolor': !$q.dark.isActive, 'table-bgcolor-dark': $q.dark.isActive }"
class="remote-bg-tbl-sticky" class="remote-bg-tbl-sticky"
style="max-height: 85vh" :style="{ 'max-height': `${$q.screen.height - 36}px` }"
:rows="processes" :rows="processes"
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 0, sortBy: 'cpu_percent', descending: true }" :pagination="{ rowsPerPage: 0, sortBy: 'cpu_percent', descending: true }"

View File

@@ -3,7 +3,7 @@
dense dense
:table-class="{ 'table-bgcolor': !$q.dark.isActive, 'table-bgcolor-dark': $q.dark.isActive }" :table-class="{ 'table-bgcolor': !$q.dark.isActive, 'table-bgcolor-dark': $q.dark.isActive }"
class="remote-bg-tbl-sticky" class="remote-bg-tbl-sticky"
style="max-height: 85vh" :style="{ 'max-height': `${$q.screen.height - 36}px` }"
:rows="services" :rows="services"
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 0, sortBy: 'display_name', descending: false }" :pagination="{ rowsPerPage: 0, sortBy: 'display_name', descending: false }"

View File

@@ -300,7 +300,7 @@ export default {
.onOk(() => { .onOk(() => {
this.$q.loading.show(); this.$q.loading.show();
this.$axios this.$axios
.delete(`/tasks/${task.pk}/`) .delete(`/tasks/${task.id}/`)
.then(r => { .then(r => {
this.getTasks(); this.getTasks();
this.$q.loading.hide(); this.$q.loading.hide();

View File

@@ -115,9 +115,13 @@ export default {
onMounted(async () => { onMounted(async () => {
$q.loading.show(); $q.loading.show();
const fields = await fetchCustomFields({ model: "site" }); try {
customFields.value = fields.filter(field => !field.hide_in_ui); const fields = await fetchCustomFields({ model: "site" });
if (props.site) getSiteCustomFieldValues(); customFields.value = fields.filter(field => !field.hide_in_ui);
if (props.site) getSiteCustomFieldValues();
} catch (e) {
console.error(e);
}
$q.loading.hide(); $q.loading.hide();
}); });

View File

@@ -60,7 +60,7 @@
</template> </template>
<template v-slot:top-row> <template v-slot:top-row>
<q-tr v-if="debugLog.length === 1000"> <q-tr v-if="Array.isArray(debugLog) && debugLog.length === 1000">
<q-td colspan="100%"> <q-td colspan="100%">
<q-icon name="warning" color="warning" /> <q-icon name="warning" color="warning" />
Results are limited to 1000 rows. Results are limited to 1000 rows.
@@ -141,13 +141,17 @@ export default {
async function getDebugLog() { async function getDebugLog() {
loading.value = true; loading.value = true;
const data = { try {
logLevelFilter: logLevelFilter.value, const data = {
}; logLevelFilter: logLevelFilter.value,
if (agentFilter.value) data["agentFilter"] = agentFilter.value; };
if (logTypeFilter.value) data["logTypeFilter"] = logTypeFilter.value; if (agentFilter.value) data["agentFilter"] = agentFilter.value;
if (logTypeFilter.value) data["logTypeFilter"] = logTypeFilter.value;
debugLog.value = await fetchDebugLog(data); debugLog.value = await fetchDebugLog(data);
} catch (e) {
console.error(e);
}
loading.value = false; loading.value = false;
} }

View File

@@ -128,7 +128,12 @@ export default {
const showCompleted = ref(false); const showCompleted = ref(false);
const loading = ref(false); const loading = ref(false);
const completedCount = computed(() => { const completedCount = computed(() => {
return actions.value.filter(action => action.status === "completed").length; try {
return actions.value.filter(action => action.status === "completed").length;
} catch (e) {
console.error(e);
return 0;
}
}); });
const visibleColumns = computed(() => { const visibleColumns = computed(() => {
@@ -152,7 +157,13 @@ export default {
async function getPendingActions() { async function getPendingActions() {
loading.value = true; loading.value = true;
actions.value = props.agent ? await fetchAgentPendingActions(props.agent.agent_id) : await fetchPendingActions(); try {
actions.value = props.agent
? await fetchAgentPendingActions(props.agent.agent_id)
: await fetchPendingActions();
} catch (e) {
console.error(e);
}
loading.value = false; loading.value = false;
} }

View File

@@ -142,7 +142,7 @@
<div class="q-gutter-sm"> <div class="q-gutter-sm">
<q-checkbox <q-checkbox
v-model="state.run_asap_after_missed" v-model="state.run_asap_after_missed"
label="Run task ASAP after a scheduled start is missed (requires agent v1.4.7)" label="Run task ASAP after a scheduled start is missed"
/> />
</div> </div>
</div> </div>

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="q-pa-md"> <div>
<q-tabs <q-tabs
v-model="tab" v-model="tab"
dense dense
@@ -18,26 +18,23 @@
</q-tabs> </q-tabs>
<q-separator /> <q-separator />
<q-tab-panels v-model="tab"> <q-tab-panels v-model="tab">
<q-tab-panel name="terminal"> <q-tab-panel name="terminal" class="q-pa-none">
<iframe <iframe
style="overflow: hidden; height: 715px"
:src="terminal" :src="terminal"
width="100%" :style="{ height: `${$q.screen.height - 30}px`, width: `${$q.screen.width}px` }"
height="100%"
scrolling="no"
></iframe> ></iframe>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="processes"> <q-tab-panel name="processes" class="q-pa-none">
<ProcessManager :agent_id="agent_id" /> <ProcessManager :agent_id="agent_id" />
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="services"> <q-tab-panel name="services" class="q-pa-none">
<ServicesManager :agent_id="agent_id" /> <ServicesManager :agent_id="agent_id" />
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="eventlog"> <q-tab-panel name="eventlog" class="q-pa-none">
<EventLogManager :agent_id="agent_id" /> <EventLogManager :agent_id="agent_id" />
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="filebrowser"> <q-tab-panel name="filebrowser" class="q-pa-none">
<iframe style="overflow: hidden; height: 715px" :src="file" width="100%" height="100%" scrolling="no"></iframe> <iframe :src="file" :style="{ height: `${$q.screen.height - 30}px`, width: `${$q.screen.width}px` }"></iframe>
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
</div> </div>

View File

@@ -66,10 +66,14 @@ export default {
async function getMeshURLs() { async function getMeshURLs() {
$q.loading.show(); $q.loading.show();
const data = await fetchAgentMeshCentralURLs(params.agent_id); try {
control.value = data.control; const data = await fetchAgentMeshCentralURLs(params.agent_id);
status.value = data.status; control.value = data.control;
useMeta({ title: `${data.hostname} - ${data.client} - ${data.site} | Remote Background` }); status.value = data.status;
useMeta({ title: `${data.hostname} - ${data.client} - ${data.site} | Remote Background` });
} catch (e) {
console.error(e);
}
$q.loading.hide(); $q.loading.hide();
} }