Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8403ac0e93 | ||
|
|
c2f21b70dd | ||
|
|
520145e0e3 | ||
|
|
6a132187a2 | ||
|
|
a63a9ccd76 | ||
|
|
ff1eb791db | ||
|
|
13bd88b979 | ||
|
|
5b0c244920 | ||
|
|
0318a17cac | ||
|
|
b7a91563b0 | ||
|
|
75296ed8ee | ||
|
|
09bee45b2f | ||
|
|
3573c48872 | ||
|
|
784841c221 | ||
|
|
ed788a1861 |
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@@ -5,7 +5,7 @@
|
|||||||
"esbenp.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
"vue.volar",
|
"vue.volar",
|
||||||
"wayou.vscode-todo-highlight",
|
"wayou.vscode-todo-highlight"
|
||||||
],
|
],
|
||||||
"unwantedRecommendations": [
|
"unwantedRecommendations": [
|
||||||
"octref.vetur",
|
"octref.vetur",
|
||||||
|
|||||||
17
.vscode/settings.json
vendored
17
.vscode/settings.json
vendored
@@ -4,16 +4,9 @@
|
|||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"[vue][javascript][typescript][javascriptreact]": {
|
"[vue][javascript][typescript][javascriptreact]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"editor.codeActionsOnSave": [
|
"editor.codeActionsOnSave": ["source.fixAll.eslint"]
|
||||||
"source.fixAll.eslint"
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"eslint.validate": [
|
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
|
||||||
"javascript",
|
|
||||||
"javascriptreact",
|
|
||||||
"typescript",
|
|
||||||
"vue"
|
|
||||||
],
|
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"files.watcherExclude": {
|
"files.watcherExclude": {
|
||||||
"files.watcherExclude": {
|
"files.watcherExclude": {
|
||||||
@@ -22,7 +15,7 @@
|
|||||||
"**/node_modules/": true,
|
"**/node_modules/": true,
|
||||||
"/node_modules/**": true,
|
"/node_modules/**": true,
|
||||||
"**/env/": true,
|
"**/env/": true,
|
||||||
"/env/**": true,
|
"/env/**": true
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
36
index.html
36
index.html
@@ -1,24 +1,22 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><%= productName %></title>
|
||||||
|
|
||||||
<head>
|
<meta charset="utf-8" />
|
||||||
<title>
|
<meta name="robots" content="noindex" />
|
||||||
<%= productName %>
|
<meta name="description" content="<%= productDescription %>" />
|
||||||
</title>
|
<meta name="format-detection" content="telephone=no" />
|
||||||
|
<meta name="msapplication-tap-highlight" content="no" />
|
||||||
<meta charset="utf-8" />
|
<meta
|
||||||
<meta name="robots" content="noindex" />
|
name="viewport"
|
||||||
<meta name="description" content="<%= productDescription %>" />
|
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
|
||||||
<meta name="format-detection" content="telephone=no" />
|
/>
|
||||||
<meta name="msapplication-tap-highlight" content="no" />
|
<link rel="icon" type="image/ico" href="favicon.ico" />
|
||||||
<meta name="viewport"
|
<script src="/env-config.js"></script>
|
||||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>" />
|
</head>
|
||||||
<link rel="icon" type="image/ico" href="favicon.ico" />
|
|
||||||
<script src="/env-config.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- quasar:entry-point -->
|
|
||||||
</body>
|
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!-- quasar:entry-point -->
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
6027
package-lock.json
generated
6027
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
36
package.json
36
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"version": "0.101.11",
|
"version": "0.101.16",
|
||||||
"private": true,
|
"private": true,
|
||||||
"productName": "Tactical RMM",
|
"productName": "Tactical RMM",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -10,13 +10,13 @@
|
|||||||
"format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore"
|
"format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/extras": "1.15.8",
|
"@quasar/extras": "1.15.11",
|
||||||
"apexcharts": "3.36.3",
|
"apexcharts": "3.37.1",
|
||||||
"axios": "0.27.2",
|
"axios": "1.3.4",
|
||||||
"dotenv": "16.0.3",
|
"dotenv": "16.0.3",
|
||||||
"qrcode.vue": "3.3.3",
|
"qrcode.vue": "3.3.4",
|
||||||
"quasar": "2.11.1",
|
"quasar": "2.11.8",
|
||||||
"vue": "3.2.45",
|
"vue": "3.2.47",
|
||||||
"vue3-ace-editor": "2.2.2",
|
"vue3-ace-editor": "2.2.2",
|
||||||
"vue3-apexcharts": "1.4.1",
|
"vue3-apexcharts": "1.4.1",
|
||||||
"vuedraggable": "4.1.0",
|
"vuedraggable": "4.1.0",
|
||||||
@@ -24,17 +24,17 @@
|
|||||||
"vuex": "4.1.0"
|
"vuex": "4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@quasar/cli": "^1.3.2",
|
"@quasar/cli": "^2.0.0",
|
||||||
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
|
"@intlify/unplugin-vue-i18n": "^0.9.2",
|
||||||
"@quasar/app-vite": "^1.1.3",
|
"@quasar/app-vite": "^1.2.1",
|
||||||
"@types/node": "^18.11.17",
|
"@types/node": "^18.15.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.47.0",
|
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
||||||
"@typescript-eslint/parser": "^5.47.0",
|
"@typescript-eslint/parser": "^5.55.0",
|
||||||
"autoprefixer": "10.4.13",
|
"autoprefixer": "10.4.14",
|
||||||
"eslint": "8.30.0",
|
"eslint": "8.36.0",
|
||||||
"eslint-config-prettier": "8.5.0",
|
"eslint-config-prettier": "8.7.0",
|
||||||
"eslint-plugin-vue": "8.7.1",
|
"eslint-plugin-vue": "8.7.1",
|
||||||
"prettier": "2.8.1",
|
"prettier": "2.8.4",
|
||||||
"typescript": "4.9.4"
|
"typescript": "4.9.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,18 +4,18 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: [
|
plugins: [
|
||||||
// https://github.com/postcss/autoprefixer
|
// https://github.com/postcss/autoprefixer
|
||||||
require('autoprefixer')({
|
require("autoprefixer")({
|
||||||
overrideBrowserslist: [
|
overrideBrowserslist: [
|
||||||
'last 4 Chrome versions',
|
"last 4 Chrome versions",
|
||||||
'last 4 Firefox versions',
|
"last 4 Firefox versions",
|
||||||
'last 4 Edge versions',
|
"last 4 Edge versions",
|
||||||
'last 4 Safari versions',
|
"last 4 Safari versions",
|
||||||
'last 4 Android versions',
|
"last 4 Android versions",
|
||||||
'last 4 ChromeAndroid versions',
|
"last 4 ChromeAndroid versions",
|
||||||
'last 4 FirefoxAndroid versions',
|
"last 4 FirefoxAndroid versions",
|
||||||
'last 4 iOS versions'
|
"last 4 iOS versions",
|
||||||
]
|
],
|
||||||
})
|
}),
|
||||||
|
|
||||||
// https://github.com/elchininet/postcss-rtlcss
|
// https://github.com/elchininet/postcss-rtlcss
|
||||||
// If you want to support RTL css, then
|
// If you want to support RTL css, then
|
||||||
@@ -23,5 +23,5 @@ module.exports = {
|
|||||||
// 2. optionally set quasar.config.js > framework > lang to an RTL language
|
// 2. optionally set quasar.config.js > framework > lang to an RTL language
|
||||||
// 3. uncomment the following line:
|
// 3. uncomment the following line:
|
||||||
// require('postcss-rtlcss')
|
// require('postcss-rtlcss')
|
||||||
]
|
],
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -374,16 +374,10 @@ export default {
|
|||||||
"make_model",
|
"make_model",
|
||||||
"physical_disks",
|
"physical_disks",
|
||||||
];
|
];
|
||||||
|
|
||||||
// quasar filter only does visible columns so this is a hack to add hidden columns we want to filter
|
// quasar filter only does visible columns so this is a hack to add hidden columns we want to filter
|
||||||
for (const elem of hiddenFields) {
|
// originally I was modifying cols directly but this led to phantom colum so doing it this way now
|
||||||
if (!cols.find((o) => o.name === elem)) {
|
// https://github.com/amidaware/tacticalrmm/issues/1264
|
||||||
cols.push({
|
const allColumns = [...cols, ...hiddenFields.map((field) => ({ field }))];
|
||||||
name: elem,
|
|
||||||
field: elem,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const lowerTerms = terms ? terms.toLowerCase() : "";
|
const lowerTerms = terms ? terms.toLowerCase() : "";
|
||||||
let advancedFilter = false;
|
let advancedFilter = false;
|
||||||
@@ -437,7 +431,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Normal text filter
|
// Normal text filter
|
||||||
return cols.some((col) => {
|
return allColumns.some((col) => {
|
||||||
const val = cellValue(col, row) + "";
|
const val = cellValue(col, row) + "";
|
||||||
const haystack =
|
const haystack =
|
||||||
val === "undefined" || val === "null" ? "" : val.toLowerCase();
|
val === "undefined" || val === "null" ? "" : val.toLowerCase();
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ export default {
|
|||||||
type: "textarea",
|
type: "textarea",
|
||||||
isValid: (val) => !!val,
|
isValid: (val) => !!val,
|
||||||
},
|
},
|
||||||
style: "width: 30vw; max-width: 50vw;",
|
style: "width: 90vw; max-width: 90vw",
|
||||||
ok: { label: "Add" },
|
ok: { label: "Add" },
|
||||||
cancel: true,
|
cancel: true,
|
||||||
}).onOk(async () => {
|
}).onOk(async () => {
|
||||||
@@ -193,7 +193,7 @@ export default {
|
|||||||
type: "textarea",
|
type: "textarea",
|
||||||
isValid: (val) => !!val,
|
isValid: (val) => !!val,
|
||||||
},
|
},
|
||||||
style: "width: 30vw; max-width: 50vw;",
|
style: "width: 90vw; max-width: 90vw",
|
||||||
ok: { label: "Save" },
|
ok: { label: "Save" },
|
||||||
cancel: true,
|
cancel: true,
|
||||||
}).onOk(async (data) => {
|
}).onOk(async (data) => {
|
||||||
|
|||||||
@@ -8,16 +8,16 @@
|
|||||||
v
|
v
|
||||||
}}</q-badge>
|
}}</q-badge>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!!v"
|
v-if="!!v"
|
||||||
size="sm"
|
size="sm"
|
||||||
class="q-ml-xs"
|
class="q-ml-xs"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="content_copy"
|
icon="content_copy"
|
||||||
@click="copyValueToClip(v)"
|
@click="copyValueToClip(v)"
|
||||||
>
|
>
|
||||||
<q-tooltip>Copy to Clipboard</q-tooltip>
|
<q-tooltip>Copy to Clipboard</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator v-if="info.length > 1" />
|
<q-separator v-if="info.length > 1" />
|
||||||
@@ -42,10 +42,9 @@ export default {
|
|||||||
const tabHeight = computed(() => store.state.tabHeight);
|
const tabHeight = computed(() => store.state.tabHeight);
|
||||||
|
|
||||||
function copyValueToClip(val) {
|
function copyValueToClip(val) {
|
||||||
copyToClipboard(val)
|
copyToClipboard(val).then(() => {
|
||||||
.then(() => {
|
notifySuccess("Copied to clipboard");
|
||||||
notifySuccess("Copied to clipboard");
|
});
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ import { useDialogPluginComponent } from "quasar";
|
|||||||
import { useCheckModal } from "@/composables/checks";
|
import { useCheckModal } from "@/composables/checks";
|
||||||
import { useScriptDropdown } from "@/composables/scripts";
|
import { useScriptDropdown } from "@/composables/scripts";
|
||||||
import { validateRetcode } from "@/utils/validation";
|
import { validateRetcode } from "@/utils/validation";
|
||||||
import { envVarsLabel } from "@/constants/constants"
|
import { envVarsLabel } from "@/constants/constants";
|
||||||
|
|
||||||
// ui imports
|
// ui imports
|
||||||
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
||||||
@@ -146,10 +146,15 @@ export default {
|
|||||||
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup script dropdown
|
// setup script dropdown
|
||||||
const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars } =
|
const {
|
||||||
useScriptDropdown(props.check ? props.check.script : undefined, {
|
script,
|
||||||
onMount: true,
|
scriptOptions,
|
||||||
});
|
defaultTimeout,
|
||||||
|
defaultArgs,
|
||||||
|
defaultEnvVars,
|
||||||
|
} = useScriptDropdown(props.check ? props.check.script : undefined, {
|
||||||
|
onMount: true,
|
||||||
|
});
|
||||||
|
|
||||||
// check logic
|
// check logic
|
||||||
const { state, loading, submit, failOptions, severityOptions } =
|
const { state, loading, submit, failOptions, severityOptions } =
|
||||||
|
|||||||
@@ -89,7 +89,8 @@
|
|||||||
<p class="text-italic">
|
<p class="text-italic">
|
||||||
Note: the auth token above will be valid for {{ info.expires }} hours.
|
Note: the auth token above will be valid for {{ info.expires }} hours.
|
||||||
</p>
|
</p>
|
||||||
<q-btn v-if="info.plat === 'windows'"
|
<q-btn
|
||||||
|
v-if="info.plat === 'windows'"
|
||||||
type="a"
|
type="a"
|
||||||
:href="info.data.url"
|
:href="info.data.url"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
@@ -221,11 +221,18 @@ export default {
|
|||||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup dropdowns
|
// setup dropdowns
|
||||||
const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars, syntax, link } =
|
const {
|
||||||
useScriptDropdown(props.script, {
|
script,
|
||||||
onMount: true,
|
scriptOptions,
|
||||||
filterByPlatform: props.agent.plat,
|
defaultTimeout,
|
||||||
});
|
defaultArgs,
|
||||||
|
defaultEnvVars,
|
||||||
|
syntax,
|
||||||
|
link,
|
||||||
|
} = useScriptDropdown(props.script, {
|
||||||
|
onMount: true,
|
||||||
|
filterByPlatform: props.agent.plat,
|
||||||
|
});
|
||||||
const { customFieldOptions } = useCustomFieldDropdown({ onMount: true });
|
const { customFieldOptions } = useCustomFieldDropdown({ onMount: true });
|
||||||
|
|
||||||
// main run script functionaity
|
// main run script functionaity
|
||||||
|
|||||||
@@ -836,10 +836,15 @@ export default {
|
|||||||
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup dropdowns
|
// setup dropdowns
|
||||||
const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars } =
|
const {
|
||||||
useScriptDropdown(undefined, {
|
script,
|
||||||
onMount: true,
|
scriptOptions,
|
||||||
});
|
defaultTimeout,
|
||||||
|
defaultArgs,
|
||||||
|
defaultEnvVars,
|
||||||
|
} = useScriptDropdown(undefined, {
|
||||||
|
onMount: true,
|
||||||
|
});
|
||||||
|
|
||||||
// set defaultTimeout to 30
|
// set defaultTimeout to 30
|
||||||
defaultTimeout.value = 30;
|
defaultTimeout.value = 30;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export function useScriptDropdown(setScript = null, { onMount = false } = {}) {
|
|||||||
);
|
);
|
||||||
defaultTimeout.value = tmpScript.timeout;
|
defaultTimeout.value = tmpScript.timeout;
|
||||||
defaultArgs.value = tmpScript.args;
|
defaultArgs.value = tmpScript.args;
|
||||||
defaultEnvVars.value = tmpScript.env_vars,
|
defaultEnvVars.value = tmpScript.env_vars;
|
||||||
syntax.value = tmpScript.syntax;
|
syntax.value = tmpScript.syntax;
|
||||||
link.value =
|
link.value =
|
||||||
tmpScript.script_type === "builtin"
|
tmpScript.script_type === "builtin"
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ export const GOARCH_ARM32 = "arm";
|
|||||||
export const runAsUserToolTip =
|
export const runAsUserToolTip =
|
||||||
"Run in the context of the logged in user. If no user is logged in, the script will not run and an error will be returned.";
|
"Run in the context of the logged in user. If no user is logged in, the script will not run and an error will be returned.";
|
||||||
|
|
||||||
export const envVarsLabel =
|
export const envVarsLabel =
|
||||||
"Environment vars (press Enter after typing each key=value pair)"
|
"Environment vars (press Enter after typing each key=value pair)";
|
||||||
|
|||||||
@@ -173,6 +173,18 @@
|
|||||||
</q-menu>
|
</q-menu>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
|
<!-- Bulk Run Checks -->
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="runChecks(props.node)"
|
||||||
|
>
|
||||||
|
<q-item-section side>
|
||||||
|
<q-icon name="fas fa-check-double" />
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>Run Checks</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
<q-separator></q-separator>
|
<q-separator></q-separator>
|
||||||
|
|
||||||
<q-item clickable v-close-popup>
|
<q-item clickable v-close-popup>
|
||||||
@@ -690,6 +702,17 @@ export default {
|
|||||||
})
|
})
|
||||||
.onOk(() => this.$store.dispatch("refreshDashboard"));
|
.onOk(() => this.$store.dispatch("refreshDashboard"));
|
||||||
},
|
},
|
||||||
|
runChecks(node) {
|
||||||
|
const target = node.children ? "client" : "site";
|
||||||
|
this.$axios
|
||||||
|
.post(`/checks/${target}/${node.id}/csbulkrun/`)
|
||||||
|
.then((r) => {
|
||||||
|
this.notifySuccess(r.data);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.error(e);
|
||||||
|
});
|
||||||
|
},
|
||||||
showToggleMaintenance(node) {
|
showToggleMaintenance(node) {
|
||||||
let data = {
|
let data = {
|
||||||
id: node.id,
|
id: node.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user