Skip to content

Commit

Permalink
Release 0.101.37
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Dec 1, 2023
2 parents 3e63655 + 49da10c commit e1dc805
Show file tree
Hide file tree
Showing 12 changed files with 457 additions and 377 deletions.
336 changes: 168 additions & 168 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web",
"version": "0.101.36",
"version": "0.101.37",
"private": true,
"productName": "Tactical RMM",
"scripts": {
Expand All @@ -10,34 +10,34 @@
"format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore"
},
"dependencies": {
"@quasar/extras": "1.16.7",
"@quasar/extras": "1.16.8",
"apexcharts": "3.44.0",
"axios": "1.6.0",
"axios": "1.6.2",
"dotenv": "16.3.1",
"qrcode.vue": "3.4.1",
"quasar": "2.13.0",
"vue": "3.3.8",
"vue": "3.3.9",
"vue3-apexcharts": "1.4.4",
"vuedraggable": "4.1.0",
"vue-router": "4.2.5",
"@vueuse/core": "10.5.0",
"@vueuse/shared": "10.5.0",
"@vueuse/core": "10.6.1",
"@vueuse/shared": "10.6.1",
"monaco-editor": "0.44.0",
"vuex": "4.1.0",
"yaml": "2.3.4"
},
"devDependencies": {
"@quasar/cli": "2.3.0",
"@intlify/unplugin-vue-i18n": "1.4.0",
"@intlify/unplugin-vue-i18n": "1.5.0",
"@quasar/app-vite": "1.6.2",
"@types/node": "20.8.10",
"@typescript-eslint/eslint-plugin": "6.10.0",
"@typescript-eslint/parser": "6.10.0",
"@types/node": "20.10.0",
"@typescript-eslint/eslint-plugin": "6.13.1",
"@typescript-eslint/parser": "6.13.1",
"autoprefixer": "10.4.16",
"eslint": "8.53.0",
"eslint": "8.54.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-vue": "8.7.1",
"prettier": "3.0.3",
"typescript": "5.2.2"
"prettier": "3.1.0",
"typescript": "5.3.2"
}
}
Binary file added src/assets/trmm_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions src/components/agents/SummaryTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
:color="dash_warning_color"
class="q-mr-sm"
>
<q-tooltip>Agent offline</q-tooltip>
<q-tooltip>{{ store.getters.formatDate(summary.last_seen) }}</q-tooltip>
</q-icon>
<q-icon
v-else
Expand All @@ -43,7 +43,7 @@
:color="dash_positive_color"
class="q-mr-sm"
>
<q-tooltip>Agent online</q-tooltip>
<q-tooltip>{{ store.getters.formatDate(summary.last_seen) }}</q-tooltip>
</q-icon>
<b>{{ summary.hostname }}</b>
<span v-if="summary.maintenance_mode">
Expand Down Expand Up @@ -311,7 +311,7 @@ export default {
const ret = [];
for (const customField of summary.value.custom_fields) {
const definition = customFieldsDefinitions.value.find(
(def) => def.id === customField.field
(def) => def.id === customField.field,
);
if (
definition &&
Expand Down Expand Up @@ -381,6 +381,7 @@ export default {
dash_negative_color,
serial_number,
cpu,
store,
// methods
getSummary,
Expand Down
4 changes: 2 additions & 2 deletions src/components/automation/PolicyAutomatedTasksTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default {
pagination: {
rowsPerPage: 0,
sortBy: "name",
descending: true,
descending: false,
},
};
},
Expand Down Expand Up @@ -321,7 +321,7 @@ export default {
runTask(task) {
if (!task.enabled) {
this.notifyError(
"Task cannot be run when it's disabled. Enable it first."
"Task cannot be run when it's disabled. Enable it first.",
);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/automation/modals/PolicyStatus.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<q-dialog ref="dialog" @hide="onHide">
<q-card class="q-dialog-plugin" style="width: 90vw">
<q-card class="q-dialog-plugin" style="min-width: 70vw">
<q-bar>
{{ title.slice(0, 27) }}
<q-space />
Expand Down
37 changes: 35 additions & 2 deletions src/components/scripts/ScriptFormModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<q-dialog
ref="dialogRef"
maximized
no-esc-dismiss
@hide="onDialogHide"
@show="loadEditor"
@before-hide="unloadEditor"
@keydown.esc.stop="closeEditor"
>
<q-card class="q-dialog-plugin">
<q-bar>
Expand All @@ -20,7 +22,7 @@
@click="generateScriptOpenAI"
/>
<q-space />
<q-btn dense flat icon="close" v-close-popup>
<q-btn dense flat icon="close" @click="closeEditor">
<q-tooltip class="bg-white text-primary">Close</q-tooltip>
</q-btn>
</q-bar>
Expand Down Expand Up @@ -190,7 +192,7 @@
</template>
</tactical-dropdown>
<q-space />
<q-btn dense flat label="Cancel" v-close-popup />
<q-btn dense flat label="Cancel" @click="closeEditor" />
<q-btn
v-if="!readonly"
:loading="loading"
Expand Down Expand Up @@ -363,7 +365,23 @@ function loadEditor() {
downloadScript(script.id, { with_snippets: props.readonly }).then((r) => {
script.script_body = r.code;
editor.setValue(r.code);
// need to add this in the download function otherwise the above will trigger an edit
watch(
() => script.script_body,
() => {
edited.value = true;
},
);
});
else {
watch(
() => script.script_body,
() => {
edited.value = true;
},
);
}
// watch for changes in language
watch(lang, () => {
Expand Down Expand Up @@ -394,6 +412,21 @@ function generateScriptOpenAI() {
});
}
// add are you sure prompt to unsaved script
const edited = ref(false);
function closeEditor() {
if (edited.value)
$q.dialog({
title: "You have unsaved changes. Are you sure you want to close?",
cancel: true,
ok: true,
}).onOk(async () => {
unloadEditor();
});
else unloadEditor();
}
// component life cycle hooks
onMounted(async () => {
agentLoading.value = true;
Expand Down
20 changes: 18 additions & 2 deletions src/components/scripts/ScriptManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@
<q-tooltip> Shell </q-tooltip>
</q-icon>

<!-- is community script icon -->
<img
v-if="props.row.script_type === 'builtin'"
:src="trmmLogo"
style="height: 20px; max-width: 20px"
/>

<span
class="q-pl-xs text-weight-bold"
:style="{ color: props.node.hidden ? 'grey' : '' }"
Expand Down Expand Up @@ -488,6 +495,12 @@
:props="props"
:style="{ color: props.row.hidden ? 'grey' : '' }"
>
<!-- is community script icon -->
<img
v-if="props.row.script_type === 'builtin'"
:src="trmmLogo"
style="height: 20px; max-width: 20px"
/>
{{ truncateText(props.row.name, 50) }}
<q-tooltip
v-if="props.row.name.length >= 50"
Expand Down Expand Up @@ -550,6 +563,8 @@ import ScriptFormModal from "@/components/scripts/ScriptFormModal.vue";
import ScriptSnippets from "@/components/scripts/ScriptSnippets.vue";
import TacticalTable from "@/components/ui/TacticalTable.vue";
import trmmLogo from "@/assets/trmm_256.png";
// static data
const columns = [
{
Expand Down Expand Up @@ -620,7 +635,7 @@ export default {
// setup vuex store
const store = useStore();
const showCommunityScripts = computed(
() => store.state.showCommunityScripts
() => store.state.showCommunityScripts,
);
// setup quasar plugins
Expand Down Expand Up @@ -721,7 +736,7 @@ export default {
return showCommunityScripts.value
? scripts.value.filter((i) => !i.hidden)
: scripts.value.filter(
(i) => i.script_type !== "builtin" && !i.hidden
(i) => i.script_type !== "builtin" && !i.hidden,
);
}
});
Expand Down Expand Up @@ -884,6 +899,7 @@ export default {
loading,
showCommunityScripts,
showHiddenScripts,
trmmLogo,
// computed
visibleScripts,
Expand Down
Loading

0 comments on commit e1dc805

Please sign in to comment.