Compare commits
2 Commits
v0.101.14-
...
v0.100.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24a63f477e | ||
|
|
ddeb6293a1 |
@@ -1,7 +0,0 @@
|
|||||||
COMPOSE_PROJECT_NAME=trmm
|
|
||||||
IMAGE_REPO=tacticalrmm/
|
|
||||||
VERSION=latest
|
|
||||||
|
|
||||||
# DEV SETTINGS
|
|
||||||
APP_PORT=443
|
|
||||||
DOCKER_NETWORK=172.21.0.0/24
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
version: '3.4'
|
|
||||||
|
|
||||||
services:
|
|
||||||
app-dev:
|
|
||||||
container_name: trmm-app-dev
|
|
||||||
image: node:16-alpine
|
|
||||||
restart: always
|
|
||||||
command: /bin/sh -c "npm install --cache ~/.npm && npm run serve"
|
|
||||||
user: 1000:1000
|
|
||||||
working_dir: /workspace/web
|
|
||||||
volumes:
|
|
||||||
- ..:/workspace:cached
|
|
||||||
ports:
|
|
||||||
- "8080:443"
|
|
||||||
networks:
|
|
||||||
dev:
|
|
||||||
aliases:
|
|
||||||
- tactical-frontend
|
|
||||||
|
|
||||||
networks:
|
|
||||||
dev:
|
|
||||||
driver: bridge
|
|
||||||
ipam:
|
|
||||||
driver: default
|
|
||||||
config:
|
|
||||||
- subnet: ${DOCKER_NETWORK}
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -33,4 +33,3 @@ yarn-error.log*
|
|||||||
*.sln
|
*.sln
|
||||||
|
|
||||||
.env
|
.env
|
||||||
/public/env-config.js
|
|
||||||
|
|||||||
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",
|
||||||
|
|||||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -4,7 +4,7 @@
|
|||||||
"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": ["source.fixAll.eslint"]
|
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
|
||||||
},
|
},
|
||||||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
|
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"**/node_modules/": true,
|
"**/node_modules/": true,
|
||||||
"/node_modules/**": true,
|
"/node_modules/**": true,
|
||||||
"**/env/": true,
|
"**/env/": true,
|
||||||
"/env/**": true
|
"/env/**": true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
20
index.html
20
index.html
@@ -1,22 +1,24 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<title><%= productName %></title>
|
<head>
|
||||||
|
<title>
|
||||||
|
<%= productName %>
|
||||||
|
</title>
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<meta name="description" content="<%= productDescription %>" />
|
<meta name="description" content="<%= productDescription %>" />
|
||||||
<meta name="format-detection" content="telephone=no" />
|
<meta name="format-detection" content="telephone=no" />
|
||||||
<meta name="msapplication-tap-highlight" content="no" />
|
<meta name="msapplication-tap-highlight" content="no" />
|
||||||
<meta
|
<meta name="viewport"
|
||||||
name="viewport"
|
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<% } %>" />
|
||||||
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<% } %>"
|
|
||||||
/>
|
|
||||||
<link rel="icon" type="image/ico" href="favicon.ico" />
|
<link rel="icon" type="image/ico" href="favicon.ico" />
|
||||||
<script src="/env-config.js"></script>
|
<script src="/env-config.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- quasar:entry-point -->
|
<!-- quasar:entry-point -->
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
6772
package-lock.json
generated
6772
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
44
package.json
44
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"version": "0.101.14-dev",
|
"version": "0.100.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"productName": "Tactical RMM",
|
"productName": "Tactical RMM",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -10,31 +10,31 @@
|
|||||||
"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.11",
|
"@quasar/extras": "1.14.2",
|
||||||
"apexcharts": "3.37.1",
|
"apexcharts": "3.35.3",
|
||||||
"axios": "1.3.4",
|
"axios": "0.27.2",
|
||||||
"dotenv": "16.0.3",
|
"dotenv": "16.0.1",
|
||||||
"qrcode.vue": "3.3.4",
|
"qrcode.vue": "3.3.3",
|
||||||
"quasar": "2.11.8",
|
"quasar": "2.7.5",
|
||||||
"vue": "3.2.47",
|
"vue": "3.2.37",
|
||||||
"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",
|
||||||
"vue-router": "4.1.6",
|
"vue-router": "4.1.1",
|
||||||
"vuex": "4.1.0"
|
"vuex": "4.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@quasar/cli": "^2.0.0",
|
"@quasar/cli": "^1.3.2",
|
||||||
"@intlify/unplugin-vue-i18n": "^0.9.2",
|
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
|
||||||
"@quasar/app-vite": "^1.2.1",
|
"@quasar/app-vite": "^1.0.5",
|
||||||
"@types/node": "^18.15.3",
|
"@types/node": "^18.0.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
||||||
"@typescript-eslint/parser": "^5.55.0",
|
"@typescript-eslint/parser": "^5.30.5",
|
||||||
"autoprefixer": "10.4.14",
|
"autoprefixer": "^10.4.7",
|
||||||
"eslint": "8.36.0",
|
"eslint": "^8.18.0",
|
||||||
"eslint-config-prettier": "8.7.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-vue": "8.7.1",
|
"eslint-plugin-vue": "^8.5.0",
|
||||||
"prettier": "2.8.4",
|
"prettier": "^2.7.1",
|
||||||
"typescript": "4.9.5"
|
"typescript": "^4.7.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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')
|
||||||
],
|
]
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -12,25 +12,6 @@ export async function fetchUsers(params = {}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function resetPass(pass) {
|
|
||||||
const payload = { password: pass };
|
|
||||||
try {
|
|
||||||
const { data } = await axios.put(`${baseUrl}/resetpw/`, payload);
|
|
||||||
return data;
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function resetTwoFactor() {
|
|
||||||
try {
|
|
||||||
const { data } = await axios.put(`${baseUrl}/reset2fa/`);
|
|
||||||
return data;
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// role api function
|
// role api function
|
||||||
export async function fetchRoles(params = {}) {
|
export async function fetchRoles(params = {}) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -196,14 +196,6 @@
|
|||||||
>
|
>
|
||||||
<q-tooltip>Linux</q-tooltip>
|
<q-tooltip>Linux</q-tooltip>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
<q-icon
|
|
||||||
v-else-if="props.row.plat === 'darwin'"
|
|
||||||
name="mdi-apple"
|
|
||||||
size="sm"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip>macOS</q-tooltip>
|
|
||||||
</q-icon>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
||||||
<q-td key="checks-status" :props="props">
|
<q-td key="checks-status" :props="props">
|
||||||
@@ -364,27 +356,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
filterTable(rows, terms, cols, cellValue) {
|
filterTable(rows, terms, cols, cellValue) {
|
||||||
const hiddenFields = [
|
|
||||||
"version",
|
|
||||||
"operating_system",
|
|
||||||
"public_ip",
|
|
||||||
"cpu_model",
|
|
||||||
"graphics",
|
|
||||||
"local_ips",
|
|
||||||
"make_model",
|
|
||||||
"physical_disks",
|
|
||||||
];
|
|
||||||
|
|
||||||
// quasar filter only does visible columns so this is a hack to add hidden columns we want to filter
|
|
||||||
for (const elem of hiddenFields) {
|
|
||||||
if (!cols.find((o) => o.name === elem)) {
|
|
||||||
cols.push({
|
|
||||||
name: elem,
|
|
||||||
field: elem,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const lowerTerms = terms ? terms.toLowerCase() : "";
|
const lowerTerms = terms ? terms.toLowerCase() : "";
|
||||||
let advancedFilter = false;
|
let advancedFilter = false;
|
||||||
let availability = null;
|
let availability = null;
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
<template>
|
|
||||||
<q-dialog ref="dialogRef" @hide="onDialogHide">
|
|
||||||
<q-card class="q-dialog-plugin" style="width: 60vw">
|
|
||||||
<q-card-section class="row">
|
|
||||||
<div class="col-3">New password:</div>
|
|
||||||
<div class="col-9">
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
v-model="pass"
|
|
||||||
:type="isPwd ? 'password' : 'text'"
|
|
||||||
:rules="[(val) => !!val || '*Required']"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon
|
|
||||||
:name="isPwd ? 'visibility_off' : 'visibility'"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="isPwd = !isPwd"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
<div class="col-3">Confirm password:</div>
|
|
||||||
<div class="col-9">
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
v-model="pass2"
|
|
||||||
:type="isPwd ? 'password' : 'text'"
|
|
||||||
:rules="[(val) => val === pass || 'Passwords do not match']"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon
|
|
||||||
:name="isPwd ? 'visibility_off' : 'visibility'"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="isPwd = !isPwd"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right">
|
|
||||||
<q-btn
|
|
||||||
color="primary"
|
|
||||||
label="Reset"
|
|
||||||
@click="onOKClick"
|
|
||||||
:disable="!pass || pass !== pass2"
|
|
||||||
/>
|
|
||||||
<q-btn color="negative" label="Cancel" @click="onDialogCancel" />
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref } from "vue";
|
|
||||||
import { useDialogPluginComponent } from "quasar";
|
|
||||||
import { resetPass } from "@/api/accounts";
|
|
||||||
import { notifySuccess } from "@/utils/notify";
|
|
||||||
|
|
||||||
const pass = ref("");
|
|
||||||
const pass2 = ref("");
|
|
||||||
const isPwd = ref(true);
|
|
||||||
|
|
||||||
defineEmits([...useDialogPluginComponent.emits]);
|
|
||||||
|
|
||||||
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } =
|
|
||||||
useDialogPluginComponent();
|
|
||||||
|
|
||||||
async function onOKClick() {
|
|
||||||
const ret = await resetPass(pass.value);
|
|
||||||
notifySuccess(ret);
|
|
||||||
onDialogOK();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -166,7 +166,7 @@ export default {
|
|||||||
type: "textarea",
|
type: "textarea",
|
||||||
isValid: (val) => !!val,
|
isValid: (val) => !!val,
|
||||||
},
|
},
|
||||||
style: "width: 90vw; max-width: 90vw",
|
style: "width: 30vw; max-width: 50vw;",
|
||||||
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: 90vw; max-width: 90vw",
|
style: "width: 30vw; max-width: 50vw;",
|
||||||
ok: { label: "Save" },
|
ok: { label: "Save" },
|
||||||
cancel: true,
|
cancel: true,
|
||||||
}).onOk(async (data) => {
|
}).onOk(async (data) => {
|
||||||
|
|||||||
@@ -310,10 +310,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showUpdateDetails(update) {
|
function showUpdateDetails(update) {
|
||||||
const color = $q.dark.isActive ? "white" : "";
|
|
||||||
let support_urls = "";
|
let support_urls = "";
|
||||||
update.more_info_urls.forEach((u) => {
|
update.more_info_urls.forEach((u) => {
|
||||||
support_urls += `<a style='color: ${color}' href='${u}' target='_blank'>${u}</a><br/>`;
|
support_urls += `<a href='${u}' target='_blank'>${u}</a><br/>`;
|
||||||
});
|
});
|
||||||
let cats = update.categories.join(", ");
|
let cats = update.categories.join(", ");
|
||||||
$q.dialog({
|
$q.dialog({
|
||||||
|
|||||||
@@ -7,17 +7,6 @@
|
|||||||
<q-badge color="primary" class="q-ml-sm text-caption">{{
|
<q-badge color="primary" class="q-ml-sm text-caption">{{
|
||||||
v
|
v
|
||||||
}}</q-badge>
|
}}</q-badge>
|
||||||
<q-btn
|
|
||||||
v-if="!!v"
|
|
||||||
size="sm"
|
|
||||||
class="q-ml-xs"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
icon="content_copy"
|
|
||||||
@click="copyValueToClip(v)"
|
|
||||||
>
|
|
||||||
<q-tooltip>Copy to Clipboard</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator v-if="info.length > 1" />
|
<q-separator v-if="info.length > 1" />
|
||||||
@@ -26,8 +15,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { copyToClipboard } from "quasar";
|
|
||||||
import { notifySuccess } from "@/utils/notify";
|
|
||||||
// composition imports
|
// composition imports
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
@@ -41,16 +28,9 @@ export default {
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const tabHeight = computed(() => store.state.tabHeight);
|
const tabHeight = computed(() => store.state.tabHeight);
|
||||||
|
|
||||||
function copyValueToClip(val) {
|
|
||||||
copyToClipboard(val).then(() => {
|
|
||||||
notifySuccess("Copied to clipboard");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tabHeight,
|
tabHeight,
|
||||||
uid,
|
uid,
|
||||||
copyValueToClip,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,19 +39,6 @@
|
|||||||
new-value-mode="add"
|
new-value-mode="add"
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section>
|
|
||||||
<q-select
|
|
||||||
dense
|
|
||||||
:label="envVarsLabel"
|
|
||||||
filled
|
|
||||||
v-model="state.env_vars"
|
|
||||||
use-input
|
|
||||||
use-chips
|
|
||||||
multiple
|
|
||||||
hide-dropdown-icon
|
|
||||||
new-value-mode="add"
|
|
||||||
/>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<tactical-dropdown
|
<tactical-dropdown
|
||||||
label="Informational return codes (press Enter after typing each code)"
|
label="Informational return codes (press Enter after typing each code)"
|
||||||
@@ -128,7 +115,6 @@ 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";
|
|
||||||
|
|
||||||
// ui imports
|
// ui imports
|
||||||
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
||||||
@@ -146,13 +132,8 @@ export default {
|
|||||||
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup script dropdown
|
// setup script dropdown
|
||||||
const {
|
const { script, scriptOptions, defaultTimeout, defaultArgs } =
|
||||||
script,
|
useScriptDropdown(props.check ? props.check.script : undefined, {
|
||||||
scriptOptions,
|
|
||||||
defaultTimeout,
|
|
||||||
defaultArgs,
|
|
||||||
defaultEnvVars,
|
|
||||||
} = useScriptDropdown(props.check ? props.check.script : undefined, {
|
|
||||||
onMount: true,
|
onMount: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -164,7 +145,6 @@ export default {
|
|||||||
...props.parent,
|
...props.parent,
|
||||||
script,
|
script,
|
||||||
script_args: defaultArgs,
|
script_args: defaultArgs,
|
||||||
env_vars: defaultEnvVars,
|
|
||||||
timeout: defaultTimeout,
|
timeout: defaultTimeout,
|
||||||
check_type: "script",
|
check_type: "script",
|
||||||
fails_b4_alert: 1,
|
fails_b4_alert: 1,
|
||||||
@@ -183,7 +163,6 @@ export default {
|
|||||||
failOptions,
|
failOptions,
|
||||||
scriptOptions,
|
scriptOptions,
|
||||||
severityOptions,
|
severityOptions,
|
||||||
envVarsLabel,
|
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
submit,
|
submit,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export default {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const result = props.APIKey
|
const result = props.APIKey
|
||||||
? await editAPIKey(data.id, data)
|
? await editAPIKey(data)
|
||||||
: await saveAPIKey(data);
|
: await saveAPIKey(data);
|
||||||
onDialogOK();
|
onDialogOK();
|
||||||
notifySuccess(result);
|
notifySuccess(result);
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// component lifecycle hooks
|
// component lifecycle hooks
|
||||||
onMounted(getAPIKeys);
|
onMounted(getAPIKeys());
|
||||||
return {
|
return {
|
||||||
// reactive data
|
// reactive data
|
||||||
keys,
|
keys,
|
||||||
|
|||||||
@@ -10,13 +10,10 @@
|
|||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<p v-if="info.plat === 'windows'" class="text-subtitle1">
|
<p class="text-subtitle1">
|
||||||
Download the agent then run the following command from an elevated
|
Download the agent then run the following command from an elevated
|
||||||
command prompt on the device you want to add.
|
command prompt on the device you want to add.
|
||||||
</p>
|
</p>
|
||||||
<p v-else-if="info.plat === 'darwin'" class="text-subtitle1">
|
|
||||||
Run the following command from a terminal
|
|
||||||
</p>
|
|
||||||
<p>
|
<p>
|
||||||
<q-field outlined :color="$q.dark.isActive ? 'white' : 'black'">
|
<q-field outlined :color="$q.dark.isActive ? 'white' : 'black'">
|
||||||
<code>{{ info.data.cmd }}</code>
|
<code>{{ info.data.cmd }}</code>
|
||||||
@@ -40,7 +37,7 @@
|
|||||||
</q-badge>
|
</q-badge>
|
||||||
<span>Do not popup any message boxes during install</span>
|
<span>Do not popup any message boxes during install</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="info.plat === 'windows'" class="q-pa-xs q-gutter-xs">
|
<div class="q-pa-xs q-gutter-xs">
|
||||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||||
<code
|
<code
|
||||||
>-local-mesh "C:\\<some folder or
|
>-local-mesh "C:\\<some folder or
|
||||||
@@ -49,7 +46,7 @@
|
|||||||
</q-badge>
|
</q-badge>
|
||||||
<span> To skip downloading the Mesh Agent during the install.</span>
|
<span> To skip downloading the Mesh Agent during the install.</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="info.plat === 'windows'" class="q-pa-xs q-gutter-xs">
|
<div class="q-pa-xs q-gutter-xs">
|
||||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||||
<code
|
<code
|
||||||
>-meshdir "C:\Program Files\Your Company Name\Mesh Agent"</code
|
>-meshdir "C:\Program Files\Your Company Name\Mesh Agent"</code
|
||||||
@@ -66,7 +63,7 @@
|
|||||||
</q-badge>
|
</q-badge>
|
||||||
<span>Don't install the mesh agent</span>
|
<span>Don't install the mesh agent</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="info.plat === 'windows'" class="q-pa-xs q-gutter-xs">
|
<div class="q-pa-xs q-gutter-xs">
|
||||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||||
<code>-cert "C:\\<some folder or path>\\ca.pem"</code>
|
<code>-cert "C:\\<some folder or path>\\ca.pem"</code>
|
||||||
</q-badge>
|
</q-badge>
|
||||||
@@ -90,12 +87,11 @@
|
|||||||
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
|
<q-btn
|
||||||
v-if="info.plat === 'windows'"
|
|
||||||
type="a"
|
type="a"
|
||||||
:href="info.data.url"
|
:href="info.data.url"
|
||||||
color="primary"
|
color="primary"
|
||||||
label="Download Agent"
|
label="Download Agent"
|
||||||
></q-btn>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -102,18 +102,6 @@
|
|||||||
new-value-mode="add"
|
new-value-mode="add"
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section v-if="mode === 'script'" class="q-pt-none">
|
|
||||||
<tactical-dropdown
|
|
||||||
v-model="state.env_vars"
|
|
||||||
:label="envVarsLabel"
|
|
||||||
filled
|
|
||||||
use-input
|
|
||||||
multiple
|
|
||||||
hide-dropdown-icon
|
|
||||||
input-debounce="0"
|
|
||||||
new-value-mode="add"
|
|
||||||
/>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-card-section v-if="mode === 'command'">
|
<q-card-section v-if="mode === 'command'">
|
||||||
<p>Shell</p>
|
<p>Shell</p>
|
||||||
@@ -147,11 +135,6 @@
|
|||||||
:rules="[(val) => !!val || '*Required']"
|
:rules="[(val) => !!val || '*Required']"
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section v-if="supportsRunAsUser()" class="q-pt-none">
|
|
||||||
<q-checkbox v-model="state.run_as_user" label="Run As User">
|
|
||||||
<q-tooltip>{{ runAsUserToolTip }}</q-tooltip>
|
|
||||||
</q-checkbox>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-card-section v-if="mode === 'script' || mode === 'command'">
|
<q-card-section v-if="mode === 'script' || mode === 'command'">
|
||||||
<q-input
|
<q-input
|
||||||
@@ -220,7 +203,6 @@ import { runBulkAction } from "@/api/agents";
|
|||||||
import { notifySuccess } from "@/utils/notify";
|
import { notifySuccess } from "@/utils/notify";
|
||||||
import { cmdPlaceholder } from "@/composables/agents";
|
import { cmdPlaceholder } from "@/composables/agents";
|
||||||
import { removeExtraOptionCategories } from "@/utils/format";
|
import { removeExtraOptionCategories } from "@/utils/format";
|
||||||
import { envVarsLabel, runAsUserToolTip } from "@/constants/constants";
|
|
||||||
|
|
||||||
// ui imports
|
// ui imports
|
||||||
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
||||||
@@ -235,7 +217,6 @@ const monTypeOptions = [
|
|||||||
const osTypeOptions = [
|
const osTypeOptions = [
|
||||||
{ label: "Windows", value: "windows" },
|
{ label: "Windows", value: "windows" },
|
||||||
{ label: "Linux", value: "linux" },
|
{ label: "Linux", value: "linux" },
|
||||||
{ label: "macOS", value: "darwin" },
|
|
||||||
{ label: "All", value: "all" },
|
{ label: "All", value: "all" },
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -296,7 +277,6 @@ export default {
|
|||||||
scriptOptions,
|
scriptOptions,
|
||||||
defaultTimeout,
|
defaultTimeout,
|
||||||
defaultArgs,
|
defaultArgs,
|
||||||
defaultEnvVars,
|
|
||||||
getScriptOptions,
|
getScriptOptions,
|
||||||
} = useScriptDropdown();
|
} = useScriptDropdown();
|
||||||
const { agents, agentOptions, getAgentOptions } = useAgentDropdown();
|
const { agents, agentOptions, getAgentOptions } = useAgentDropdown();
|
||||||
@@ -320,8 +300,6 @@ export default {
|
|||||||
script,
|
script,
|
||||||
timeout: defaultTimeout,
|
timeout: defaultTimeout,
|
||||||
args: defaultArgs,
|
args: defaultArgs,
|
||||||
env_vars: defaultEnvVars,
|
|
||||||
run_as_user: false,
|
|
||||||
});
|
});
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
@@ -338,7 +316,6 @@ export default {
|
|||||||
() => state.value.osType,
|
() => state.value.osType,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
state.value.custom_shell = null;
|
state.value.custom_shell = null;
|
||||||
state.value.run_as_user = false;
|
|
||||||
|
|
||||||
if (newValue === "windows") {
|
if (newValue === "windows") {
|
||||||
state.value.shell = "cmd";
|
state.value.shell = "cmd";
|
||||||
@@ -360,13 +337,6 @@ export default {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const supportsRunAsUser = () => {
|
|
||||||
const modes = ["script", "command"];
|
|
||||||
return (
|
|
||||||
state.value.osType === "windows" && modes.includes(state.value.mode)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
// set modal title and caption
|
// set modal title and caption
|
||||||
const modalTitle = computed(() => {
|
const modalTitle = computed(() => {
|
||||||
return props.mode === "command"
|
return props.mode === "command"
|
||||||
@@ -417,8 +387,6 @@ export default {
|
|||||||
osTypeOptions,
|
osTypeOptions,
|
||||||
targetOptions,
|
targetOptions,
|
||||||
patchModeOptions,
|
patchModeOptions,
|
||||||
runAsUserToolTip,
|
|
||||||
envVarsLabel,
|
|
||||||
|
|
||||||
//computed
|
//computed
|
||||||
modalTitle,
|
modalTitle,
|
||||||
@@ -426,7 +394,6 @@ export default {
|
|||||||
//methods
|
//methods
|
||||||
submit,
|
submit,
|
||||||
cmdPlaceholder,
|
cmdPlaceholder,
|
||||||
supportsRunAsUser,
|
|
||||||
|
|
||||||
// quasar dialog plugin
|
// quasar dialog plugin
|
||||||
dialogRef,
|
dialogRef,
|
||||||
|
|||||||
@@ -465,51 +465,8 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
editAgent() {
|
editAgent() {
|
||||||
// TODO we need to fix the serializer to not send this stuff
|
delete this.agent.all_timezones;
|
||||||
const toRemove = [
|
delete this.agent.timezone;
|
||||||
"created_by",
|
|
||||||
"created_time",
|
|
||||||
"modified_by",
|
|
||||||
"modified_time",
|
|
||||||
"all_timezones",
|
|
||||||
"timezone",
|
|
||||||
"wmi_detail",
|
|
||||||
"services",
|
|
||||||
"status",
|
|
||||||
"cpu_model",
|
|
||||||
"local_ips",
|
|
||||||
"make_model",
|
|
||||||
"physical_disks",
|
|
||||||
"graphics",
|
|
||||||
"checks",
|
|
||||||
"patches_last_installed",
|
|
||||||
"last_seen",
|
|
||||||
"applied_policies",
|
|
||||||
"effective_patch_policy",
|
|
||||||
"version",
|
|
||||||
"operating_system",
|
|
||||||
"plat",
|
|
||||||
"goarch",
|
|
||||||
"hostname",
|
|
||||||
"public_ip",
|
|
||||||
"total_ram",
|
|
||||||
"disks",
|
|
||||||
"boot_time",
|
|
||||||
"logged_in_username",
|
|
||||||
"last_logged_in_user",
|
|
||||||
"needs_reboot",
|
|
||||||
"choco_installed",
|
|
||||||
"policy",
|
|
||||||
"mesh_node_id",
|
|
||||||
"block_policy_inheritance",
|
|
||||||
"maintenance_mode",
|
|
||||||
"alert_template",
|
|
||||||
"client",
|
|
||||||
"site_name",
|
|
||||||
];
|
|
||||||
for (const elem of toRemove) {
|
|
||||||
delete this.agent[elem];
|
|
||||||
}
|
|
||||||
|
|
||||||
// only send the timezone data if it has changed
|
// only send the timezone data if it has changed
|
||||||
// this way django will keep the db column as null and inherit from the global setting
|
// this way django will keep the db column as null and inherit from the global setting
|
||||||
@@ -546,7 +503,7 @@ export default {
|
|||||||
else if (day === 0) result += "Sun, ";
|
else if (day === 0) result += "Sun, ";
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.trimEnd(",");
|
return result.trimRight(",");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -52,15 +52,6 @@
|
|||||||
goarch = GOARCH_AMD64;
|
goarch = GOARCH_AMD64;
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
|
||||||
v-model="agentOS"
|
|
||||||
val="darwin"
|
|
||||||
label="macOS"
|
|
||||||
@update:model-value="
|
|
||||||
installMethod = 'mac';
|
|
||||||
goarch = GOARCH_AMD64;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
@@ -114,37 +105,37 @@
|
|||||||
v-model="goarch"
|
v-model="goarch"
|
||||||
:val="GOARCH_AMD64"
|
:val="GOARCH_AMD64"
|
||||||
label="64 bit"
|
label="64 bit"
|
||||||
v-show="agentOS === 'windows' || agentOS === 'linux'"
|
v-show="agentOS === 'windows'"
|
||||||
/>
|
|
||||||
<q-radio
|
|
||||||
v-model="goarch"
|
|
||||||
:val="GOARCH_AMD64"
|
|
||||||
label="Intel 64 bit"
|
|
||||||
v-show="agentOS === 'darwin'"
|
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
v-model="goarch"
|
v-model="goarch"
|
||||||
:val="GOARCH_i386"
|
:val="GOARCH_i386"
|
||||||
label="32 bit"
|
label="32 bit"
|
||||||
v-show="agentOS !== 'darwin'"
|
v-show="agentOS === 'windows'"
|
||||||
|
/>
|
||||||
|
<q-radio
|
||||||
|
v-model="goarch"
|
||||||
|
:val="GOARCH_AMD64"
|
||||||
|
label="64 bit"
|
||||||
|
v-show="agentOS !== 'windows'"
|
||||||
|
/>
|
||||||
|
<q-radio
|
||||||
|
v-model="goarch"
|
||||||
|
:val="GOARCH_i386"
|
||||||
|
label="32 bit"
|
||||||
|
v-show="agentOS !== 'windows'"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
v-model="goarch"
|
v-model="goarch"
|
||||||
:val="GOARCH_ARM64"
|
:val="GOARCH_ARM64"
|
||||||
label="ARM 64 bit"
|
label="ARM 64 bit"
|
||||||
v-show="agentOS === 'linux'"
|
v-show="agentOS !== 'windows'"
|
||||||
/>
|
|
||||||
<q-radio
|
|
||||||
v-model="goarch"
|
|
||||||
:val="GOARCH_ARM64"
|
|
||||||
label="Apple Silicon (M1, M2)"
|
|
||||||
v-show="agentOS === 'darwin'"
|
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
v-model="goarch"
|
v-model="goarch"
|
||||||
:val="GOARCH_ARM32"
|
:val="GOARCH_ARM32"
|
||||||
label="ARM 32 bit (Rasp Pi)"
|
label="ARM 32 bit (Rasp Pi)"
|
||||||
v-show="agentOS === 'linux'"
|
v-show="agentOS !== 'windows'"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
@@ -275,13 +266,12 @@ export default {
|
|||||||
plat: this.agentOS,
|
plat: this.agentOS,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.installMethod === "manual" || this.installMethod === "mac") {
|
if (this.installMethod === "manual") {
|
||||||
this.$axios.post("/agents/installer/", data).then((r) => {
|
this.$axios.post("/agents/installer/", data).then((r) => {
|
||||||
this.info = {
|
this.info = {
|
||||||
expires: this.expires,
|
expires: this.expires,
|
||||||
data: r.data,
|
data: r.data,
|
||||||
goarch: this.goarch,
|
goarch: this.goarch,
|
||||||
plat: this.agentOS,
|
|
||||||
};
|
};
|
||||||
this.showAgentDownload = true;
|
this.showAgentDownload = true;
|
||||||
});
|
});
|
||||||
@@ -353,9 +343,6 @@ export default {
|
|||||||
case "bash":
|
case "bash":
|
||||||
text = "Download linux install script";
|
text = "Download linux install script";
|
||||||
break;
|
break;
|
||||||
case "mac":
|
|
||||||
text = "Show installation instructions";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
|
|||||||
@@ -129,37 +129,37 @@
|
|||||||
<div class="q-gutter-sm">
|
<div class="q-gutter-sm">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="winupdatepolicy.run_time_days"
|
v-model="winupdatepolicy.run_time_days"
|
||||||
:val="0"
|
:val="1"
|
||||||
label="Monday"
|
label="Monday"
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="winupdatepolicy.run_time_days"
|
v-model="winupdatepolicy.run_time_days"
|
||||||
:val="1"
|
:val="2"
|
||||||
label="Tuesday"
|
label="Tuesday"
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="winupdatepolicy.run_time_days"
|
v-model="winupdatepolicy.run_time_days"
|
||||||
:val="2"
|
:val="3"
|
||||||
label="Wednesday"
|
label="Wednesday"
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="winupdatepolicy.run_time_days"
|
v-model="winupdatepolicy.run_time_days"
|
||||||
:val="3"
|
:val="4"
|
||||||
label="Thursday"
|
label="Thursday"
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="winupdatepolicy.run_time_days"
|
v-model="winupdatepolicy.run_time_days"
|
||||||
:val="4"
|
:val="5"
|
||||||
label="Friday"
|
label="Friday"
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="winupdatepolicy.run_time_days"
|
v-model="winupdatepolicy.run_time_days"
|
||||||
:val="5"
|
:val="6"
|
||||||
label="Saturday"
|
label="Saturday"
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="winupdatepolicy.run_time_days"
|
v-model="winupdatepolicy.run_time_days"
|
||||||
:val="6"
|
:val="0"
|
||||||
label="Sunday"
|
label="Sunday"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -63,14 +63,11 @@ export default {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const ret = await scheduleAgentReboot(
|
await scheduleAgentReboot(props.agent.agent_id, state.value);
|
||||||
props.agent.agent_id,
|
|
||||||
state.value
|
|
||||||
);
|
|
||||||
$q.dialog({
|
$q.dialog({
|
||||||
title: "Reboot pending",
|
title: "Reboot pending",
|
||||||
style: "width: 40vw",
|
style: "width: 40vw",
|
||||||
message: `A reboot has been scheduled for <strong>${ret.time}</strong> on ${props.agent.hostname}.
|
message: `A reboot has been scheduled for <strong>${state.value.datetime}</strong> on ${props.agent.hostname}.
|
||||||
<br />It can be cancelled from the Pending Actions menu until the scheduled time.`,
|
<br />It can be cancelled from the Pending Actions menu until the scheduled time.`,
|
||||||
html: true,
|
html: true,
|
||||||
}).onDismiss(onDialogOK);
|
}).onDismiss(onDialogOK);
|
||||||
|
|||||||
@@ -77,18 +77,6 @@
|
|||||||
new-value-mode="add"
|
new-value-mode="add"
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section>
|
|
||||||
<tactical-dropdown
|
|
||||||
v-model="state.env_vars"
|
|
||||||
:label="envVarsLabel"
|
|
||||||
filled
|
|
||||||
use-input
|
|
||||||
multiple
|
|
||||||
hide-dropdown-icon
|
|
||||||
input-debounce="0"
|
|
||||||
new-value-mode="add"
|
|
||||||
/>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<q-option-group
|
<q-option-group
|
||||||
v-model="state.output"
|
v-model="state.output"
|
||||||
@@ -140,11 +128,6 @@
|
|||||||
/>
|
/>
|
||||||
<q-checkbox v-model="state.save_all_output" label="Save all output" />
|
<q-checkbox v-model="state.save_all_output" label="Save all output" />
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section v-if="agent.plat === 'windows'">
|
|
||||||
<q-checkbox v-model="state.run_as_user" label="Run As User">
|
|
||||||
<q-tooltip>{{ runAsUserToolTip }}</q-tooltip>
|
|
||||||
</q-checkbox>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<q-input
|
<q-input
|
||||||
v-model.number="state.timeout"
|
v-model.number="state.timeout"
|
||||||
@@ -190,7 +173,6 @@ import { useScriptDropdown } from "@/composables/scripts";
|
|||||||
import { useCustomFieldDropdown } from "@/composables/core";
|
import { useCustomFieldDropdown } from "@/composables/core";
|
||||||
import { runScript } from "@/api/agents";
|
import { runScript } from "@/api/agents";
|
||||||
import { notifySuccess } from "@/utils/notify";
|
import { notifySuccess } from "@/utils/notify";
|
||||||
import { envVarsLabel, runAsUserToolTip } from "@/constants/constants";
|
|
||||||
import {
|
import {
|
||||||
formatScriptSyntax,
|
formatScriptSyntax,
|
||||||
removeExtraOptionCategories,
|
removeExtraOptionCategories,
|
||||||
@@ -221,15 +203,8 @@ export default {
|
|||||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup dropdowns
|
// setup dropdowns
|
||||||
const {
|
const { script, scriptOptions, defaultTimeout, defaultArgs, syntax, link } =
|
||||||
script,
|
useScriptDropdown(props.script, {
|
||||||
scriptOptions,
|
|
||||||
defaultTimeout,
|
|
||||||
defaultArgs,
|
|
||||||
defaultEnvVars,
|
|
||||||
syntax,
|
|
||||||
link,
|
|
||||||
} = useScriptDropdown(props.script, {
|
|
||||||
onMount: true,
|
onMount: true,
|
||||||
filterByPlatform: props.agent.plat,
|
filterByPlatform: props.agent.plat,
|
||||||
});
|
});
|
||||||
@@ -244,9 +219,7 @@ export default {
|
|||||||
save_all_output: false,
|
save_all_output: false,
|
||||||
script,
|
script,
|
||||||
args: defaultArgs,
|
args: defaultArgs,
|
||||||
env_vars: defaultEnvVars,
|
|
||||||
timeout: defaultTimeout,
|
timeout: defaultTimeout,
|
||||||
run_as_user: false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const ret = ref(null);
|
const ret = ref(null);
|
||||||
@@ -300,8 +273,6 @@ export default {
|
|||||||
|
|
||||||
// non-reactive data
|
// non-reactive data
|
||||||
outputOptions,
|
outputOptions,
|
||||||
runAsUserToolTip,
|
|
||||||
envVarsLabel,
|
|
||||||
|
|
||||||
//methods
|
//methods
|
||||||
formatScriptSyntax,
|
formatScriptSyntax,
|
||||||
|
|||||||
@@ -51,11 +51,6 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section v-if="agent.plat === 'windows'">
|
|
||||||
<q-checkbox v-model="state.run_as_user" label="Run As User">
|
|
||||||
<q-tooltip>{{ runAsUserToolTip }}</q-tooltip>
|
|
||||||
</q-checkbox>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section v-if="state.shell === 'custom'">
|
<q-card-section v-if="state.shell === 'custom'">
|
||||||
<q-input
|
<q-input
|
||||||
v-model="state.custom_shell"
|
v-model="state.custom_shell"
|
||||||
@@ -122,7 +117,6 @@ import { ref } from "vue";
|
|||||||
import { useDialogPluginComponent } from "quasar";
|
import { useDialogPluginComponent } from "quasar";
|
||||||
import { sendAgentCommand } from "@/api/agents";
|
import { sendAgentCommand } from "@/api/agents";
|
||||||
import { cmdPlaceholder } from "@/composables/agents";
|
import { cmdPlaceholder } from "@/composables/agents";
|
||||||
import { runAsUserToolTip } from "@/constants/constants";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SendCommand",
|
name: "SendCommand",
|
||||||
@@ -140,7 +134,6 @@ export default {
|
|||||||
cmd: null,
|
cmd: null,
|
||||||
timeout: 30,
|
timeout: 30,
|
||||||
custom_shell: null,
|
custom_shell: null,
|
||||||
run_as_user: false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -163,9 +156,6 @@ export default {
|
|||||||
loading,
|
loading,
|
||||||
ret,
|
ret,
|
||||||
|
|
||||||
// non reactivete data
|
|
||||||
runAsUserToolTip,
|
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
submit,
|
submit,
|
||||||
cmdPlaceholder,
|
cmdPlaceholder,
|
||||||
|
|||||||
@@ -204,20 +204,6 @@
|
|||||||
new-value-mode="add"
|
new-value-mode="add"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-select
|
|
||||||
class="q-mb-sm"
|
|
||||||
dense
|
|
||||||
label="Failure action environment vars (press Enter after typing each key=value pair)"
|
|
||||||
filled
|
|
||||||
v-model="template.action_env_vars"
|
|
||||||
use-input
|
|
||||||
use-chips
|
|
||||||
multiple
|
|
||||||
hide-dropdown-icon
|
|
||||||
input-debounce="0"
|
|
||||||
new-value-mode="add"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="q-mb-sm"
|
class="q-mb-sm"
|
||||||
label="Failure action timeout (seconds)"
|
label="Failure action timeout (seconds)"
|
||||||
@@ -291,20 +277,6 @@
|
|||||||
new-value-mode="add"
|
new-value-mode="add"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-select
|
|
||||||
class="q-mb-sm"
|
|
||||||
dense
|
|
||||||
label="Resolved action environment vars (press Enter after typing each key=value pair)"
|
|
||||||
filled
|
|
||||||
v-model="template.resolved_action_env_vars"
|
|
||||||
use-input
|
|
||||||
use-chips
|
|
||||||
multiple
|
|
||||||
hide-dropdown-icon
|
|
||||||
input-debounce="0"
|
|
||||||
new-value-mode="add"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="q-mb-sm"
|
class="q-mb-sm"
|
||||||
label="Resolved action timeout (seconds)"
|
label="Resolved action timeout (seconds)"
|
||||||
@@ -724,11 +696,9 @@ export default {
|
|||||||
is_active: true,
|
is_active: true,
|
||||||
action: null,
|
action: null,
|
||||||
action_args: [],
|
action_args: [],
|
||||||
action_env_vars: [],
|
|
||||||
action_timeout: 15,
|
action_timeout: 15,
|
||||||
resolved_action: null,
|
resolved_action: null,
|
||||||
resolved_action_args: [],
|
resolved_action_args: [],
|
||||||
resolved_action_env_vars: [],
|
|
||||||
resolved_action_timeout: 15,
|
resolved_action_timeout: 15,
|
||||||
email_recipients: [],
|
email_recipients: [],
|
||||||
email_from: "",
|
email_from: "",
|
||||||
@@ -792,13 +762,11 @@ export default {
|
|||||||
(i) => i.value === this.template.action
|
(i) => i.value === this.template.action
|
||||||
);
|
);
|
||||||
this.template.action_args = script.args;
|
this.template.action_args = script.args;
|
||||||
this.template.action_env_vars = script.env_vars;
|
|
||||||
} else if (type === "resolved") {
|
} else if (type === "resolved") {
|
||||||
const script = this.scriptOptions.find(
|
const script = this.scriptOptions.find(
|
||||||
(i) => i.value === this.template.resolved_action
|
(i) => i.value === this.template.resolved_action
|
||||||
);
|
);
|
||||||
this.template.resolved_action_args = script.args;
|
this.template.resolved_action_args = script.args;
|
||||||
this.template.resolved_action_env_vars = script.env_vars;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleAddEmail() {
|
toggleAddEmail() {
|
||||||
|
|||||||
@@ -118,17 +118,6 @@
|
|||||||
new-value-mode="add"
|
new-value-mode="add"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
/>
|
/>
|
||||||
<tactical-dropdown
|
|
||||||
v-model="formScript.env_vars"
|
|
||||||
:label="envVarsLabel"
|
|
||||||
filled
|
|
||||||
use-input
|
|
||||||
multiple
|
|
||||||
hide-dropdown-icon
|
|
||||||
input-debounce="0"
|
|
||||||
new-value-mode="add"
|
|
||||||
:readonly="readonly"
|
|
||||||
/>
|
|
||||||
<q-input
|
<q-input
|
||||||
type="number"
|
type="number"
|
||||||
filled
|
filled
|
||||||
@@ -139,18 +128,6 @@
|
|||||||
:rules="[(val) => val >= 5 || 'Minimum is 5']"
|
:rules="[(val) => val >= 5 || 'Minimum is 5']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
<q-checkbox
|
|
||||||
v-model="formScript.run_as_user"
|
|
||||||
label="Run As User (Windows only)"
|
|
||||||
>
|
|
||||||
<q-tooltip
|
|
||||||
>Setting this value on the script model will always override any
|
|
||||||
'Run As User' checkboxes in the UI and force this script to
|
|
||||||
always be 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.
|
|
||||||
</q-tooltip>
|
|
||||||
</q-checkbox>
|
|
||||||
<q-input
|
<q-input
|
||||||
label="Syntax"
|
label="Syntax"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@@ -240,7 +217,6 @@ import "ace-builds/src-noconflict/theme-tomorrow";
|
|||||||
|
|
||||||
// static data
|
// static data
|
||||||
import { shellOptions } from "@/composables/scripts";
|
import { shellOptions } from "@/composables/scripts";
|
||||||
import { envVarsLabel } from "@/constants/constants";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ScriptFormModal",
|
name: "ScriptFormModal",
|
||||||
@@ -277,8 +253,6 @@ export default {
|
|||||||
default_timeout: 90,
|
default_timeout: 90,
|
||||||
args: [],
|
args: [],
|
||||||
script_body: "",
|
script_body: "",
|
||||||
run_as_user: false,
|
|
||||||
env_vars: [],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (props.clone) script.value.name = `(Copy) ${script.value.name}`;
|
if (props.clone) script.value.name = `(Copy) ${script.value.name}`;
|
||||||
@@ -376,7 +350,6 @@ export default {
|
|||||||
// non-reactive data
|
// non-reactive data
|
||||||
shellOptions,
|
shellOptions,
|
||||||
agentPlatformOptions,
|
agentPlatformOptions,
|
||||||
envVarsLabel,
|
|
||||||
|
|
||||||
//computed
|
//computed
|
||||||
title,
|
title,
|
||||||
|
|||||||
@@ -867,7 +867,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// component life cycle hooks
|
// component life cycle hooks
|
||||||
onMounted(getScripts);
|
onMounted(getScripts());
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// reactive data
|
// reactive data
|
||||||
|
|||||||
@@ -93,20 +93,6 @@
|
|||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-section>
|
|
||||||
<tactical-dropdown
|
|
||||||
v-model="script.env_vars"
|
|
||||||
label="Environment Variables"
|
|
||||||
placeholder="(press Enter after typing each key=value pair)"
|
|
||||||
filled
|
|
||||||
use-input
|
|
||||||
multiple
|
|
||||||
hide-dropdown-icon
|
|
||||||
input-debounce="0"
|
|
||||||
new-value-mode="add"
|
|
||||||
/>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<q-input
|
<q-input
|
||||||
label="Default Timeout"
|
label="Default Timeout"
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ export default {
|
|||||||
timeout: props.script.default_timeout,
|
timeout: props.script.default_timeout,
|
||||||
args: props.script.args,
|
args: props.script.args,
|
||||||
shell: props.script.shell,
|
shell: props.script.shell,
|
||||||
run_as_user: props.script.run_as_user,
|
|
||||||
env_vars: props.script.env_vars,
|
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
ret.value = await testScript(props.agent, data);
|
ret.value = await testScript(props.agent, data);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
<tactical-dropdown
|
<tactical-dropdown
|
||||||
v-if="actionType === 'script'"
|
v-if="actionType === 'script'"
|
||||||
class="col-3"
|
class="col-4"
|
||||||
label="Select script"
|
label="Select script"
|
||||||
v-model="script"
|
v-model="script"
|
||||||
:options="scriptOptions"
|
:options="scriptOptions"
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
v-if="actionType === 'script'"
|
v-if="actionType === 'script'"
|
||||||
class="col-3"
|
class="col-5"
|
||||||
dense
|
dense
|
||||||
label="Script Arguments (press Enter after typing each argument)"
|
label="Script Arguments (press Enter after typing each argument)"
|
||||||
filled
|
filled
|
||||||
@@ -126,21 +126,6 @@
|
|||||||
new-value-mode="add"
|
new-value-mode="add"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-select
|
|
||||||
v-if="actionType === 'script'"
|
|
||||||
class="col-3"
|
|
||||||
dense
|
|
||||||
:label="envVarsLabel"
|
|
||||||
filled
|
|
||||||
v-model="defaultEnvVars"
|
|
||||||
use-input
|
|
||||||
use-chips
|
|
||||||
multiple
|
|
||||||
hide-dropdown-icon
|
|
||||||
input-debounce="0"
|
|
||||||
new-value-mode="add"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
v-if="actionType === 'script'"
|
v-if="actionType === 'script'"
|
||||||
class="col-2"
|
class="col-2"
|
||||||
@@ -225,9 +210,6 @@
|
|||||||
<q-item-label caption>
|
<q-item-label caption>
|
||||||
Arguments: {{ element.script_args }}
|
Arguments: {{ element.script_args }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption>
|
|
||||||
Env Vars: {{ element.env_vars }}
|
|
||||||
</q-item-label>
|
|
||||||
<q-item-label caption>
|
<q-item-label caption>
|
||||||
Timeout: {{ element.timeout }}
|
Timeout: {{ element.timeout }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
@@ -745,7 +727,6 @@ import { useCheckDropdown } from "@/composables/checks";
|
|||||||
import { useCustomFieldDropdown } from "@/composables/core";
|
import { useCustomFieldDropdown } from "@/composables/core";
|
||||||
import { notifySuccess, notifyError } from "@/utils/notify";
|
import { notifySuccess, notifyError } from "@/utils/notify";
|
||||||
import { validateTimePeriod } from "@/utils/validation";
|
import { validateTimePeriod } from "@/utils/validation";
|
||||||
import { envVarsLabel } from "@/constants/constants";
|
|
||||||
import {
|
import {
|
||||||
convertPeriodToSeconds,
|
convertPeriodToSeconds,
|
||||||
convertToBitArray,
|
convertToBitArray,
|
||||||
@@ -836,13 +817,8 @@ export default {
|
|||||||
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup dropdowns
|
// setup dropdowns
|
||||||
const {
|
const { script, scriptOptions, defaultTimeout, defaultArgs } =
|
||||||
script,
|
useScriptDropdown(undefined, {
|
||||||
scriptOptions,
|
|
||||||
defaultTimeout,
|
|
||||||
defaultArgs,
|
|
||||||
defaultEnvVars,
|
|
||||||
} = useScriptDropdown(undefined, {
|
|
||||||
onMount: true,
|
onMount: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -938,7 +914,6 @@ export default {
|
|||||||
script: script.value,
|
script: script.value,
|
||||||
timeout: defaultTimeout.value,
|
timeout: defaultTimeout.value,
|
||||||
script_args: defaultArgs.value,
|
script_args: defaultArgs.value,
|
||||||
env_vars: defaultEnvVars.value,
|
|
||||||
});
|
});
|
||||||
} else if (actionType.value === "cmd") {
|
} else if (actionType.value === "cmd") {
|
||||||
task.value.actions.push({
|
task.value.actions.push({
|
||||||
@@ -952,7 +927,6 @@ export default {
|
|||||||
// clear fields after add
|
// clear fields after add
|
||||||
script.value = null;
|
script.value = null;
|
||||||
defaultArgs.value = [];
|
defaultArgs.value = [];
|
||||||
defaultEnvVars.value = [];
|
|
||||||
defaultTimeout.value = 30;
|
defaultTimeout.value = 30;
|
||||||
command.value = "";
|
command.value = "";
|
||||||
}
|
}
|
||||||
@@ -1017,16 +991,10 @@ export default {
|
|||||||
: [];
|
: [];
|
||||||
|
|
||||||
// remove milliseconds and Z to work with native date input
|
// remove milliseconds and Z to work with native date input
|
||||||
task.value.run_time_date = formatDateInputField(
|
task.value.run_time_date = formatDateInputField(task.value.run_time_date);
|
||||||
task.value.run_time_date,
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
if (task.value.expire_date)
|
if (task.value.expire_date)
|
||||||
task.value.expire_date = formatDateInputField(
|
task.value.expire_date = formatDateInputField(task.value.expire_date);
|
||||||
task.value.expire_date,
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
// set task type if monthlydow is being used
|
// set task type if monthlydow is being used
|
||||||
if (task.value.task_type === "monthlydow") {
|
if (task.value.task_type === "monthlydow") {
|
||||||
@@ -1115,7 +1083,6 @@ export default {
|
|||||||
script,
|
script,
|
||||||
defaultTimeout,
|
defaultTimeout,
|
||||||
defaultArgs,
|
defaultArgs,
|
||||||
defaultEnvVars,
|
|
||||||
actionType,
|
actionType,
|
||||||
command,
|
command,
|
||||||
shell,
|
shell,
|
||||||
@@ -1143,7 +1110,6 @@ export default {
|
|||||||
monthOptions,
|
monthOptions,
|
||||||
taskTypeOptions,
|
taskTypeOptions,
|
||||||
taskInstancePolicyOptions,
|
taskInstancePolicyOptions,
|
||||||
envVarsLabel,
|
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
submit,
|
submit,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export function useUserDropdown(onMount = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (onMount) {
|
if (onMount) {
|
||||||
onMounted(getUserOptions);
|
onMounted(getUserOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -37,5 +37,4 @@ export function cmdPlaceholder(shell) {
|
|||||||
export const agentPlatformOptions = [
|
export const agentPlatformOptions = [
|
||||||
{ value: "windows", label: "Windows" },
|
{ value: "windows", label: "Windows" },
|
||||||
{ value: "linux", label: "Linux" },
|
{ value: "linux", label: "Linux" },
|
||||||
{ value: "darwin", label: "macOS" },
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ export function useScriptDropdown(setScript = null, { onMount = false } = {}) {
|
|||||||
const scriptOptions = ref([]);
|
const scriptOptions = ref([]);
|
||||||
const defaultTimeout = ref(30);
|
const defaultTimeout = ref(30);
|
||||||
const defaultArgs = ref([]);
|
const defaultArgs = ref([]);
|
||||||
const defaultEnvVars = ref([]);
|
|
||||||
const script = ref(setScript);
|
const script = ref(setScript);
|
||||||
const syntax = ref("");
|
const syntax = ref("");
|
||||||
const link = ref("");
|
const link = ref("");
|
||||||
@@ -30,7 +29,6 @@ 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;
|
|
||||||
syntax.value = tmpScript.syntax;
|
syntax.value = tmpScript.syntax;
|
||||||
link.value =
|
link.value =
|
||||||
tmpScript.script_type === "builtin"
|
tmpScript.script_type === "builtin"
|
||||||
@@ -51,7 +49,6 @@ export function useScriptDropdown(setScript = null, { onMount = false } = {}) {
|
|||||||
scriptOptions,
|
scriptOptions,
|
||||||
defaultTimeout,
|
defaultTimeout,
|
||||||
defaultArgs,
|
defaultArgs,
|
||||||
defaultEnvVars,
|
|
||||||
syntax,
|
syntax,
|
||||||
link,
|
link,
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
export const GOARCH_AMD64 = "amd64";
|
const GOARCH_AMD64 = "amd64";
|
||||||
export const GOARCH_i386 = "386";
|
const GOARCH_i386 = "386";
|
||||||
export const GOARCH_ARM64 = "arm64";
|
const GOARCH_ARM64 = "arm64";
|
||||||
export const GOARCH_ARM32 = "arm";
|
const GOARCH_ARM32 = "arm";
|
||||||
|
|
||||||
export const runAsUserToolTip =
|
export { GOARCH_AMD64, GOARCH_i386, GOARCH_ARM64, GOARCH_ARM32 };
|
||||||
"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 =
|
|
||||||
"Environment vars (press Enter after typing each key=value pair)";
|
|
||||||
|
|||||||
@@ -14,27 +14,6 @@
|
|||||||
@click="$store.dispatch('reload')"
|
@click="$store.dispatch('reload')"
|
||||||
/>
|
/>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
<q-banner
|
|
||||||
v-if="!hosted && tokenExpired"
|
|
||||||
inline-actions
|
|
||||||
class="bg-yellow text-black text-center"
|
|
||||||
>
|
|
||||||
<q-icon size="xl" name="warning" />
|
|
||||||
<span
|
|
||||||
><br />Your code signing token is no longer valid.<br /><br />
|
|
||||||
If you have downgraded or cancelled your sponsorship, please delete
|
|
||||||
your token from the Code Signing modal and refresh to get rid of this
|
|
||||||
banner.<br /><br />
|
|
||||||
For any issues or to renew your sponsorship please email
|
|
||||||
support@amidaware.com<br /><br
|
|
||||||
/></span>
|
|
||||||
<q-btn
|
|
||||||
color="dark"
|
|
||||||
icon="refresh"
|
|
||||||
label="Refresh"
|
|
||||||
@click="$store.dispatch('reload')"
|
|
||||||
/>
|
|
||||||
</q-banner>
|
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
@@ -56,7 +35,12 @@
|
|||||||
Tactical RMM<span class="text-overline q-ml-sm"
|
Tactical RMM<span class="text-overline q-ml-sm"
|
||||||
>v{{ currentTRMMVersion }}</span
|
>v{{ currentTRMMVersion }}</span
|
||||||
>
|
>
|
||||||
<span class="text-overline q-ml-md" v-if="updateAvailable()"
|
<span
|
||||||
|
class="text-overline q-ml-md"
|
||||||
|
v-if="
|
||||||
|
latestTRMMVersion !== 'error' &&
|
||||||
|
currentTRMMVersion !== latestTRMMVersion
|
||||||
|
"
|
||||||
><q-badge color="warning"
|
><q-badge color="warning"
|
||||||
><a :href="latestReleaseURL" target="_blank"
|
><a :href="latestReleaseURL" target="_blank"
|
||||||
>v{{ latestTRMMVersion }} available</a
|
>v{{ latestTRMMVersion }} available</a
|
||||||
@@ -140,32 +124,6 @@
|
|||||||
<q-item-label>Preferences</q-item-label>
|
<q-item-label>Preferences</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable>
|
|
||||||
<q-item-section>Account</q-item-section>
|
|
||||||
<q-item-section side>
|
|
||||||
<q-icon name="keyboard_arrow_right" />
|
|
||||||
</q-item-section>
|
|
||||||
|
|
||||||
<q-menu anchor="top end" self="top start">
|
|
||||||
<q-list>
|
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-ripple
|
|
||||||
@click="resetPassword"
|
|
||||||
v-close-popup
|
|
||||||
>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>Reset Password</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item clickable v-ripple @click="reset2FA" v-close-popup>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>Reset 2FA</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-menu>
|
|
||||||
</q-item>
|
|
||||||
<q-item to="/expired" exact>
|
<q-item to="/expired" exact>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>Logout</q-item-label>
|
<q-item-label>Logout</q-item-label>
|
||||||
@@ -187,13 +145,10 @@ import { useQuasar } from "quasar";
|
|||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { getWSUrl } from "@/websocket/channels";
|
import { getWSUrl } from "@/websocket/channels";
|
||||||
import { resetTwoFactor } from "@/api/accounts";
|
|
||||||
import { notifySuccess } from "@/utils/notify";
|
|
||||||
|
|
||||||
// ui imports
|
// ui imports
|
||||||
import AlertsIcon from "@/components/AlertsIcon.vue";
|
import AlertsIcon from "@/components/AlertsIcon.vue";
|
||||||
import UserPreferences from "@/components/modals/coresettings/UserPreferences.vue";
|
import UserPreferences from "@/components/modals/coresettings/UserPreferences.vue";
|
||||||
import ResetPass from "@/components/accounts/ResetPass.vue";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MainLayout",
|
name: "MainLayout",
|
||||||
@@ -216,8 +171,6 @@ export default {
|
|||||||
const latestTRMMVersion = computed(() => store.state.latestTRMMVersion);
|
const latestTRMMVersion = computed(() => store.state.latestTRMMVersion);
|
||||||
const needRefresh = computed(() => store.state.needrefresh);
|
const needRefresh = computed(() => store.state.needrefresh);
|
||||||
const user = computed(() => store.state.username);
|
const user = computed(() => store.state.username);
|
||||||
const hosted = computed(() => store.state.hosted);
|
|
||||||
const tokenExpired = computed(() => store.state.tokenExpired);
|
|
||||||
|
|
||||||
const latestReleaseURL = computed(() => {
|
const latestReleaseURL = computed(() => {
|
||||||
return latestTRMMVersion.value
|
return latestTRMMVersion.value
|
||||||
@@ -231,26 +184,6 @@ export default {
|
|||||||
}).onOk(() => store.dispatch("getDashInfo"));
|
}).onOk(() => store.dispatch("getDashInfo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetPassword() {
|
|
||||||
$q.dialog({
|
|
||||||
component: ResetPass,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function reset2FA() {
|
|
||||||
$q.dialog({
|
|
||||||
title: "Reset 2FA",
|
|
||||||
message: "Are you sure you would like to reset your 2FA token?",
|
|
||||||
cancel: true,
|
|
||||||
persistent: true,
|
|
||||||
}).onOk(async () => {
|
|
||||||
try {
|
|
||||||
const ret = await resetTwoFactor();
|
|
||||||
notifySuccess(ret, 3000);
|
|
||||||
} catch {}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const serverCount = ref(0);
|
const serverCount = ref(0);
|
||||||
const serverOfflineCount = ref(0);
|
const serverOfflineCount = ref(0);
|
||||||
const workstationCount = ref(0);
|
const workstationCount = ref(0);
|
||||||
@@ -300,11 +233,6 @@ export default {
|
|||||||
}, 60 * 5 * 1000);
|
}, 60 * 5 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateAvailable() {
|
|
||||||
if (latestTRMMVersion.value === "error" || hosted.value) return false;
|
|
||||||
return currentTRMMVersion.value !== latestTRMMVersion.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
setupWS();
|
setupWS();
|
||||||
store.dispatch("getDashInfo");
|
store.dispatch("getDashInfo");
|
||||||
@@ -330,14 +258,9 @@ export default {
|
|||||||
user,
|
user,
|
||||||
needRefresh,
|
needRefresh,
|
||||||
darkMode,
|
darkMode,
|
||||||
hosted,
|
|
||||||
tokenExpired,
|
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
showUserPreferences,
|
showUserPreferences,
|
||||||
resetPassword,
|
|
||||||
reset2FA,
|
|
||||||
updateAvailable,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -193,7 +193,6 @@ export default {
|
|||||||
value: script.id,
|
value: script.id,
|
||||||
timeout: script.default_timeout,
|
timeout: script.default_timeout,
|
||||||
args: script.args,
|
args: script.args,
|
||||||
env_vars: script.env_vars,
|
|
||||||
});
|
});
|
||||||
} else if (cat === "Unassigned" && !script.category) {
|
} else if (cat === "Unassigned" && !script.category) {
|
||||||
tmp.push({
|
tmp.push({
|
||||||
@@ -201,7 +200,6 @@ export default {
|
|||||||
value: script.id,
|
value: script.id,
|
||||||
timeout: script.default_timeout,
|
timeout: script.default_timeout,
|
||||||
args: script.args,
|
args: script.args,
|
||||||
env_vars: script.env_vars,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ export default function () {
|
|||||||
agentPlatform: "windows",
|
agentPlatform: "windows",
|
||||||
agentTableLoading: false,
|
agentTableLoading: false,
|
||||||
needrefresh: false,
|
needrefresh: false,
|
||||||
tokenExpired: false,
|
|
||||||
refreshSummaryTab: false,
|
refreshSummaryTab: false,
|
||||||
tableHeight: "300px",
|
tableHeight: "300px",
|
||||||
tabHeight: "300px",
|
tabHeight: "300px",
|
||||||
@@ -84,9 +83,6 @@ export default function () {
|
|||||||
SET_REFRESH_NEEDED(state, action) {
|
SET_REFRESH_NEEDED(state, action) {
|
||||||
state.needrefresh = action;
|
state.needrefresh = action;
|
||||||
},
|
},
|
||||||
SET_TOKEN_EXPIRED(state, action) {
|
|
||||||
state.tokenExpired = action;
|
|
||||||
},
|
|
||||||
SET_SPLITTER(state, val) {
|
SET_SPLITTER(state, val) {
|
||||||
// top toolbar is 50px. Filebar is 40px and agent filter tabs are 44px
|
// top toolbar is 50px. Filebar is 40px and agent filter tabs are 44px
|
||||||
state.tableHeight = `${Screen.height - 50 - 40 - 78 - val}px`;
|
state.tableHeight = `${Screen.height - 50 - 40 - 78 - val}px`;
|
||||||
@@ -216,7 +212,6 @@ export default function () {
|
|||||||
context.commit("SET_URL_ACTION", data.url_action);
|
context.commit("SET_URL_ACTION", data.url_action);
|
||||||
context.commit("setShowCommunityScripts", data.show_community_scripts);
|
context.commit("setShowCommunityScripts", data.show_community_scripts);
|
||||||
context.commit("SET_HOSTED", data.hosted);
|
context.commit("SET_HOSTED", data.hosted);
|
||||||
context.commit("SET_TOKEN_EXPIRED", data.token_is_expired);
|
|
||||||
|
|
||||||
if (data.date_format && data.date_format !== "")
|
if (data.date_format && data.date_format !== "")
|
||||||
context.commit("setDateFormat", data.date_format);
|
context.commit("setDateFormat", data.date_format);
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ export function formatScriptOptions(data) {
|
|||||||
value: script.id,
|
value: script.id,
|
||||||
timeout: script.default_timeout,
|
timeout: script.default_timeout,
|
||||||
args: script.args,
|
args: script.args,
|
||||||
env_vars: script.env_vars,
|
|
||||||
filename: script.filename,
|
filename: script.filename,
|
||||||
syntax: script.syntax,
|
syntax: script.syntax,
|
||||||
script_type: script.script_type,
|
script_type: script.script_type,
|
||||||
@@ -81,7 +80,6 @@ export function formatScriptOptions(data) {
|
|||||||
value: script.id,
|
value: script.id,
|
||||||
timeout: script.default_timeout,
|
timeout: script.default_timeout,
|
||||||
args: script.args,
|
args: script.args,
|
||||||
env_vars: script.env_vars,
|
|
||||||
filename: script.filename,
|
filename: script.filename,
|
||||||
syntax: script.syntax,
|
syntax: script.syntax,
|
||||||
script_type: script.script_type,
|
script_type: script.script_type,
|
||||||
@@ -287,7 +285,7 @@ export function formatDateInputField(isoDateString, noTimezone = false) {
|
|||||||
if (noTimezone) {
|
if (noTimezone) {
|
||||||
isoDateString = isoDateString.replace("Z", "");
|
isoDateString = isoDateString.replace("Z", "");
|
||||||
}
|
}
|
||||||
return date.formatDate(isoDateString, "YYYY-MM-DDTHH:mm");
|
return date.formatDate(isoDateString, "YYYY-MM-DDTHH:mm:ss");
|
||||||
}
|
}
|
||||||
|
|
||||||
// converts a local date string "YYYY-MM-DDTHH:mm:ss" to an iso date string with the local timezone
|
// converts a local date string "YYYY-MM-DDTHH:mm:ss" to an iso date string with the local timezone
|
||||||
|
|||||||
@@ -173,18 +173,6 @@
|
|||||||
</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>
|
||||||
@@ -702,17 +690,6 @@ 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