Compare commits
28 Commits
v0.100.10-
...
v0.101.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f24c6a7a80 | ||
|
|
d87861c212 | ||
|
|
5f56e7017b | ||
|
|
9c033c1c90 | ||
|
|
ba14ed348e | ||
|
|
99490bf859 | ||
|
|
7e25db6622 | ||
|
|
78636c436f | ||
|
|
72cdeeaa6a | ||
|
|
d37122386f | ||
|
|
17d960fca9 | ||
|
|
d2e0b8ad9b | ||
|
|
1eca4d605b | ||
|
|
776c27ec26 | ||
|
|
41c61ce152 | ||
|
|
8e9de8b6b6 | ||
|
|
4cf5f7a3cb | ||
|
|
9729492d1c | ||
|
|
52ee98f6f8 | ||
|
|
d6da8b4a96 | ||
|
|
9264cf4044 | ||
|
|
d270b877c9 | ||
|
|
fd8b2a1d98 | ||
|
|
f518043d8d | ||
|
|
cc2335558d | ||
|
|
a8a171ba2c | ||
|
|
24a63f477e | ||
|
|
ddeb6293a1 |
883
package-lock.json
generated
883
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.100.10-dev",
|
"version": "0.101.9",
|
||||||
"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.3",
|
"@quasar/extras": "1.15.6",
|
||||||
"apexcharts": "3.35.5",
|
"apexcharts": "3.35.5",
|
||||||
"axios": "0.27.2",
|
"axios": "0.27.2",
|
||||||
"dotenv": "16.0.2",
|
"dotenv": "16.0.3",
|
||||||
"qrcode.vue": "3.3.3",
|
"qrcode.vue": "3.3.3",
|
||||||
"quasar": "2.8.4",
|
"quasar": "2.10.2",
|
||||||
"vue": "3.2.39",
|
"vue": "3.2.45",
|
||||||
"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.5",
|
"vue-router": "4.1.6",
|
||||||
"vuex": "4.0.2"
|
"vuex": "4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@quasar/cli": "^1.3.2",
|
"@quasar/cli": "^1.3.2",
|
||||||
"@intlify/vite-plugin-vue-i18n": "^6.0.1",
|
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
|
||||||
"@quasar/app-vite": "^1.1.2",
|
"@quasar/app-vite": "^1.1.3",
|
||||||
"@types/node": "^18.7.18",
|
"@types/node": "^18.11.10",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.38.0",
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||||
"@typescript-eslint/parser": "^5.38.0",
|
"@typescript-eslint/parser": "^5.45.0",
|
||||||
"autoprefixer": "^10.4.11",
|
"autoprefixer": "10.4.13",
|
||||||
"eslint": "^8.21.0",
|
"eslint": "8.28.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "8.5.0",
|
||||||
"eslint-plugin-vue": "^8.5.0",
|
"eslint-plugin-vue": "8.7.1",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "2.8.0",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "4.9.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -310,9 +310,10 @@ 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 href='${u}' target='_blank'>${u}</a><br/>`;
|
support_urls += `<a style='color: ${color}' href='${u}' target='_blank'>${u}</a><br/>`;
|
||||||
});
|
});
|
||||||
let cats = update.categories.join(", ");
|
let cats = update.categories.join(", ");
|
||||||
$q.dialog({
|
$q.dialog({
|
||||||
|
|||||||
@@ -39,6 +39,19 @@
|
|||||||
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)"
|
||||||
@@ -115,6 +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"
|
||||||
|
|
||||||
// ui imports
|
// ui imports
|
||||||
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
||||||
@@ -132,7 +146,7 @@ export default {
|
|||||||
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup script dropdown
|
// setup script dropdown
|
||||||
const { script, scriptOptions, defaultTimeout, defaultArgs } =
|
const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars } =
|
||||||
useScriptDropdown(props.check ? props.check.script : undefined, {
|
useScriptDropdown(props.check ? props.check.script : undefined, {
|
||||||
onMount: true,
|
onMount: true,
|
||||||
});
|
});
|
||||||
@@ -145,6 +159,7 @@ 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,
|
||||||
@@ -163,6 +178,7 @@ export default {
|
|||||||
failOptions,
|
failOptions,
|
||||||
scriptOptions,
|
scriptOptions,
|
||||||
severityOptions,
|
severityOptions,
|
||||||
|
envVarsLabel,
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
submit,
|
submit,
|
||||||
|
|||||||
@@ -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,10 +10,13 @@
|
|||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<p class="text-subtitle1">
|
<p v-if="info.plat === 'windows'" 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>
|
||||||
@@ -86,12 +89,12 @@
|
|||||||
<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
|
<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,6 +102,18 @@
|
|||||||
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>
|
||||||
@@ -208,7 +220,7 @@ 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 { runAsUserToolTip } from "@/constants/constants";
|
import { envVarsLabel, runAsUserToolTip } from "@/constants/constants";
|
||||||
|
|
||||||
// ui imports
|
// ui imports
|
||||||
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
||||||
@@ -284,6 +296,7 @@ export default {
|
|||||||
scriptOptions,
|
scriptOptions,
|
||||||
defaultTimeout,
|
defaultTimeout,
|
||||||
defaultArgs,
|
defaultArgs,
|
||||||
|
defaultEnvVars,
|
||||||
getScriptOptions,
|
getScriptOptions,
|
||||||
} = useScriptDropdown();
|
} = useScriptDropdown();
|
||||||
const { agents, agentOptions, getAgentOptions } = useAgentDropdown();
|
const { agents, agentOptions, getAgentOptions } = useAgentDropdown();
|
||||||
@@ -307,6 +320,7 @@ export default {
|
|||||||
script,
|
script,
|
||||||
timeout: defaultTimeout,
|
timeout: defaultTimeout,
|
||||||
args: defaultArgs,
|
args: defaultArgs,
|
||||||
|
env_vars: defaultEnvVars,
|
||||||
run_as_user: false,
|
run_as_user: false,
|
||||||
});
|
});
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -404,6 +418,7 @@ export default {
|
|||||||
targetOptions,
|
targetOptions,
|
||||||
patchModeOptions,
|
patchModeOptions,
|
||||||
runAsUserToolTip,
|
runAsUserToolTip,
|
||||||
|
envVarsLabel,
|
||||||
|
|
||||||
//computed
|
//computed
|
||||||
modalTitle,
|
modalTitle,
|
||||||
|
|||||||
@@ -77,6 +77,18 @@
|
|||||||
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"
|
||||||
@@ -178,7 +190,7 @@ 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 { runAsUserToolTip } from "@/constants/constants";
|
import { envVarsLabel, runAsUserToolTip } from "@/constants/constants";
|
||||||
import {
|
import {
|
||||||
formatScriptSyntax,
|
formatScriptSyntax,
|
||||||
removeExtraOptionCategories,
|
removeExtraOptionCategories,
|
||||||
@@ -209,7 +221,7 @@ export default {
|
|||||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup dropdowns
|
// setup dropdowns
|
||||||
const { script, scriptOptions, defaultTimeout, defaultArgs, syntax, link } =
|
const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars, syntax, link } =
|
||||||
useScriptDropdown(props.script, {
|
useScriptDropdown(props.script, {
|
||||||
onMount: true,
|
onMount: true,
|
||||||
filterByPlatform: props.agent.plat,
|
filterByPlatform: props.agent.plat,
|
||||||
@@ -225,6 +237,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,
|
run_as_user: false,
|
||||||
});
|
});
|
||||||
@@ -281,6 +294,7 @@ export default {
|
|||||||
// non-reactive data
|
// non-reactive data
|
||||||
outputOptions,
|
outputOptions,
|
||||||
runAsUserToolTip,
|
runAsUserToolTip,
|
||||||
|
envVarsLabel,
|
||||||
|
|
||||||
//methods
|
//methods
|
||||||
formatScriptSyntax,
|
formatScriptSyntax,
|
||||||
|
|||||||
@@ -204,6 +204,20 @@
|
|||||||
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)"
|
||||||
@@ -277,6 +291,20 @@
|
|||||||
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)"
|
||||||
@@ -696,9 +724,11 @@ 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: "",
|
||||||
@@ -762,11 +792,13 @@ 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,6 +118,17 @@
|
|||||||
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
|
||||||
@@ -137,7 +148,7 @@
|
|||||||
'Run As User' checkboxes in the UI and force this script to
|
'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
|
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
|
is logged in, the script will not run and an error will be
|
||||||
returned. Not supported on Windows Server.
|
returned.
|
||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</q-checkbox>
|
</q-checkbox>
|
||||||
<q-input
|
<q-input
|
||||||
@@ -229,6 +240,7 @@ 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",
|
||||||
@@ -266,6 +278,7 @@ export default {
|
|||||||
args: [],
|
args: [],
|
||||||
script_body: "",
|
script_body: "",
|
||||||
run_as_user: false,
|
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}`;
|
||||||
@@ -363,6 +376,7 @@ 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,6 +93,20 @@
|
|||||||
/>
|
/>
|
||||||
</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"
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ export default {
|
|||||||
args: props.script.args,
|
args: props.script.args,
|
||||||
shell: props.script.shell,
|
shell: props.script.shell,
|
||||||
run_as_user: props.script.run_as_user,
|
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-4"
|
class="col-3"
|
||||||
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-5"
|
class="col-3"
|
||||||
dense
|
dense
|
||||||
label="Script Arguments (press Enter after typing each argument)"
|
label="Script Arguments (press Enter after typing each argument)"
|
||||||
filled
|
filled
|
||||||
@@ -126,6 +126,21 @@
|
|||||||
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"
|
||||||
@@ -210,6 +225,9 @@
|
|||||||
<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>
|
||||||
@@ -727,6 +745,7 @@ 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,
|
||||||
@@ -817,7 +836,7 @@ export default {
|
|||||||
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
|
||||||
|
|
||||||
// setup dropdowns
|
// setup dropdowns
|
||||||
const { script, scriptOptions, defaultTimeout, defaultArgs } =
|
const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars } =
|
||||||
useScriptDropdown(undefined, {
|
useScriptDropdown(undefined, {
|
||||||
onMount: true,
|
onMount: true,
|
||||||
});
|
});
|
||||||
@@ -914,6 +933,7 @@ 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({
|
||||||
@@ -927,6 +947,7 @@ 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 = "";
|
||||||
}
|
}
|
||||||
@@ -1089,6 +1110,7 @@ export default {
|
|||||||
script,
|
script,
|
||||||
defaultTimeout,
|
defaultTimeout,
|
||||||
defaultArgs,
|
defaultArgs,
|
||||||
|
defaultEnvVars,
|
||||||
actionType,
|
actionType,
|
||||||
command,
|
command,
|
||||||
shell,
|
shell,
|
||||||
@@ -1116,6 +1138,7 @@ 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 {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ 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("");
|
||||||
@@ -29,6 +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,
|
||||||
syntax.value = tmpScript.syntax;
|
syntax.value = tmpScript.syntax;
|
||||||
link.value =
|
link.value =
|
||||||
tmpScript.script_type === "builtin"
|
tmpScript.script_type === "builtin"
|
||||||
@@ -49,6 +51,7 @@ export function useScriptDropdown(setScript = null, { onMount = false } = {}) {
|
|||||||
scriptOptions,
|
scriptOptions,
|
||||||
defaultTimeout,
|
defaultTimeout,
|
||||||
defaultArgs,
|
defaultArgs,
|
||||||
|
defaultEnvVars,
|
||||||
syntax,
|
syntax,
|
||||||
link,
|
link,
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
const GOARCH_AMD64 = "amd64";
|
export const GOARCH_AMD64 = "amd64";
|
||||||
const GOARCH_i386 = "386";
|
export const GOARCH_i386 = "386";
|
||||||
const GOARCH_ARM64 = "arm64";
|
export const GOARCH_ARM64 = "arm64";
|
||||||
const GOARCH_ARM32 = "arm";
|
export const GOARCH_ARM32 = "arm";
|
||||||
|
|
||||||
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. Not supported on Windows Server.";
|
"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 {
|
export const envVarsLabel =
|
||||||
GOARCH_AMD64,
|
"Environment vars (press Enter after typing each key=value pair)"
|
||||||
GOARCH_i386,
|
|
||||||
GOARCH_ARM64,
|
|
||||||
GOARCH_ARM32,
|
|
||||||
runAsUserToolTip,
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -14,6 +14,22 @@
|
|||||||
@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
|
||||||
@@ -167,6 +183,7 @@ export default {
|
|||||||
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 hosted = computed(() => store.state.hosted);
|
||||||
|
const tokenExpired = computed(() => store.state.tokenExpired);
|
||||||
|
|
||||||
const latestReleaseURL = computed(() => {
|
const latestReleaseURL = computed(() => {
|
||||||
return latestTRMMVersion.value
|
return latestTRMMVersion.value
|
||||||
@@ -259,6 +276,8 @@ export default {
|
|||||||
user,
|
user,
|
||||||
needRefresh,
|
needRefresh,
|
||||||
darkMode,
|
darkMode,
|
||||||
|
hosted,
|
||||||
|
tokenExpired,
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
showUserPreferences,
|
showUserPreferences,
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ 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({
|
||||||
@@ -200,6 +201,7 @@ 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,6 +17,7 @@ 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",
|
||||||
@@ -83,6 +84,9 @@ 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`;
|
||||||
@@ -212,6 +216,7 @@ 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,6 +68,7 @@ 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,
|
||||||
@@ -80,6 +81,7 @@ 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,
|
||||||
|
|||||||
Reference in New Issue
Block a user