Skip to content

Commit

Permalink
Release 0.101.9
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Dec 4, 2022
2 parents 99490bf + d87861c commit f24c6a7
Show file tree
Hide file tree
Showing 14 changed files with 431 additions and 300 deletions.
532 changes: 266 additions & 266 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.7",
"version": "0.101.9",
"private": true,
"productName": "Tactical RMM",
"scripts": {
Expand All @@ -10,13 +10,13 @@
"format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore"
},
"dependencies": {
"@quasar/extras": "1.15.5",
"@quasar/extras": "1.15.6",
"apexcharts": "3.35.5",
"axios": "0.27.2",
"dotenv": "16.0.3",
"qrcode.vue": "3.3.3",
"quasar": "2.10.1",
"vue": "3.2.41",
"quasar": "2.10.2",
"vue": "3.2.45",
"vue3-ace-editor": "2.2.2",
"vue3-apexcharts": "1.4.1",
"vuedraggable": "4.1.0",
Expand All @@ -27,14 +27,14 @@
"@quasar/cli": "^1.3.2",
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
"@quasar/app-vite": "^1.1.3",
"@types/node": "^18.11.9",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"autoprefixer": "^10.4.12",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-vue": "^8.5.0",
"prettier": "^2.7.1",
"typescript": "^4.8.4"
"@types/node": "^18.11.10",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"autoprefixer": "10.4.13",
"eslint": "8.28.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-vue": "8.7.1",
"prettier": "2.8.0",
"typescript": "4.9.3"
}
}
18 changes: 17 additions & 1 deletion src/components/checks/ScriptCheck.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@
new-value-mode="add"
/>
</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>
<tactical-dropdown
label="Informational return codes (press Enter after typing each code)"
Expand Down Expand Up @@ -115,6 +128,7 @@ import { useDialogPluginComponent } from "quasar";
import { useCheckModal } from "@/composables/checks";
import { useScriptDropdown } from "@/composables/scripts";
import { validateRetcode } from "@/utils/validation";
import { envVarsLabel } from "@/constants/constants"
// ui imports
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
Expand All @@ -132,7 +146,7 @@ export default {
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
// setup script dropdown
const { script, scriptOptions, defaultTimeout, defaultArgs } =
const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars } =
useScriptDropdown(props.check ? props.check.script : undefined, {
onMount: true,
});
Expand All @@ -145,6 +159,7 @@ export default {
...props.parent,
script,
script_args: defaultArgs,
env_vars: defaultEnvVars,
timeout: defaultTimeout,
check_type: "script",
fails_b4_alert: 1,
Expand All @@ -163,6 +178,7 @@ export default {
failOptions,
scriptOptions,
severityOptions,
envVarsLabel,
// methods
submit,
Expand Down
17 changes: 16 additions & 1 deletion src/components/modals/agents/BulkAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@
new-value-mode="add"
/>
</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'">
<p>Shell</p>
Expand Down Expand Up @@ -208,7 +220,7 @@ import { runBulkAction } from "@/api/agents";
import { notifySuccess } from "@/utils/notify";
import { cmdPlaceholder } from "@/composables/agents";
import { removeExtraOptionCategories } from "@/utils/format";
import { runAsUserToolTip } from "@/constants/constants";
import { envVarsLabel, runAsUserToolTip } from "@/constants/constants";
// ui imports
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
Expand Down Expand Up @@ -284,6 +296,7 @@ export default {
scriptOptions,
defaultTimeout,
defaultArgs,
defaultEnvVars,
getScriptOptions,
} = useScriptDropdown();
const { agents, agentOptions, getAgentOptions } = useAgentDropdown();
Expand All @@ -307,6 +320,7 @@ export default {
script,
timeout: defaultTimeout,
args: defaultArgs,
env_vars: defaultEnvVars,
run_as_user: false,
});
const loading = ref(false);
Expand Down Expand Up @@ -404,6 +418,7 @@ export default {
targetOptions,
patchModeOptions,
runAsUserToolTip,
envVarsLabel,
//computed
modalTitle,
Expand Down
18 changes: 16 additions & 2 deletions src/components/modals/agents/RunScript.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@
new-value-mode="add"
/>
</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-option-group
v-model="state.output"
Expand Down Expand Up @@ -178,7 +190,7 @@ import { useScriptDropdown } from "@/composables/scripts";
import { useCustomFieldDropdown } from "@/composables/core";
import { runScript } from "@/api/agents";
import { notifySuccess } from "@/utils/notify";
import { runAsUserToolTip } from "@/constants/constants";
import { envVarsLabel, runAsUserToolTip } from "@/constants/constants";
import {
formatScriptSyntax,
removeExtraOptionCategories,
Expand Down Expand Up @@ -209,7 +221,7 @@ export default {
const { dialogRef, onDialogHide } = useDialogPluginComponent();
// setup dropdowns
const { script, scriptOptions, defaultTimeout, defaultArgs, syntax, link } =
const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars, syntax, link } =
useScriptDropdown(props.script, {
onMount: true,
filterByPlatform: props.agent.plat,
Expand All @@ -225,6 +237,7 @@ export default {
save_all_output: false,
script,
args: defaultArgs,
env_vars: defaultEnvVars,
timeout: defaultTimeout,
run_as_user: false,
});
Expand Down Expand Up @@ -281,6 +294,7 @@ export default {
// non-reactive data
outputOptions,
runAsUserToolTip,
envVarsLabel,
//methods
formatScriptSyntax,
Expand Down
32 changes: 32 additions & 0 deletions src/components/modals/alerts/AlertTemplateForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,20 @@
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
class="q-mb-sm"
label="Failure action timeout (seconds)"
Expand Down Expand Up @@ -277,6 +291,20 @@
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
class="q-mb-sm"
label="Resolved action timeout (seconds)"
Expand Down Expand Up @@ -696,9 +724,11 @@ export default {
is_active: true,
action: null,
action_args: [],
action_env_vars: [],
action_timeout: 15,
resolved_action: null,
resolved_action_args: [],
resolved_action_env_vars: [],
resolved_action_timeout: 15,
email_recipients: [],
email_from: "",
Expand Down Expand Up @@ -762,11 +792,13 @@ export default {
(i) => i.value === this.template.action
);
this.template.action_args = script.args;
this.template.action_env_vars = script.env_vars;
} else if (type === "resolved") {
const script = this.scriptOptions.find(
(i) => i.value === this.template.resolved_action
);
this.template.resolved_action_args = script.args;
this.template.resolved_action_env_vars = script.env_vars;
}
},
toggleAddEmail() {
Expand Down
16 changes: 15 additions & 1 deletion src/components/scripts/ScriptFormModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@
new-value-mode="add"
: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
type="number"
filled
Expand All @@ -137,7 +148,7 @@
'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. Not supported on Windows Server.
returned.
</q-tooltip>
</q-checkbox>
<q-input
Expand Down Expand Up @@ -229,6 +240,7 @@ import "ace-builds/src-noconflict/theme-tomorrow";
// static data
import { shellOptions } from "@/composables/scripts";
import { envVarsLabel } from "@/constants/constants";
export default {
name: "ScriptFormModal",
Expand Down Expand Up @@ -266,6 +278,7 @@ export default {
args: [],
script_body: "",
run_as_user: false,
env_vars: [],
});
if (props.clone) script.value.name = `(Copy) ${script.value.name}`;
Expand Down Expand Up @@ -363,6 +376,7 @@ export default {
// non-reactive data
shellOptions,
agentPlatformOptions,
envVarsLabel,
//computed
title,
Expand Down
14 changes: 14 additions & 0 deletions src/components/scripts/ScriptUploadModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@
/>
</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-input
label="Default Timeout"
Expand Down
1 change: 1 addition & 0 deletions src/components/scripts/TestScriptModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default {
args: props.script.args,
shell: props.script.shell,
run_as_user: props.script.run_as_user,
env_vars: props.script.env_vars,
};
try {
ret.value = await testScript(props.agent, data);
Expand Down
Loading

0 comments on commit f24c6a7

Please sign in to comment.