Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4b63826dc | ||
|
|
45e2690a81 | ||
|
|
2ff504db09 | ||
|
|
0c89e58d8c | ||
|
|
e1dc75e2d8 | ||
|
|
8f1c694071 | ||
|
|
e837c494cb | ||
|
|
13f0f117da | ||
|
|
0b6ae80777 | ||
|
|
cfe1cb2dbf | ||
|
|
e1dc8050e3 | ||
|
|
3e6365574e | ||
|
|
5114ff40aa | ||
|
|
6ea7c92b20 | ||
|
|
20d534eab0 | ||
|
|
1b2286c4f8 | ||
|
|
8207f30234 | ||
|
|
68036f6837 | ||
|
|
03fae45ac5 | ||
|
|
c2591c9e7d | ||
|
|
7fcbe6fbd8 | ||
|
|
a2f472ef9c | ||
|
|
8403ac0e93 | ||
|
|
b7a91563b0 | ||
|
|
ab19afca16 | ||
|
|
f24c6a7a80 | ||
|
|
99490bf859 | ||
|
|
72cdeeaa6a | ||
|
|
1eca4d605b | ||
|
|
52ee98f6f8 | ||
|
|
d270b877c9 | ||
|
|
fd8b2a1d98 | ||
|
|
f518043d8d | ||
|
|
cc2335558d | ||
|
|
a8a171ba2c | ||
|
|
24a63f477e | ||
|
|
ddeb6293a1 |
12
package-lock.json
generated
12
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"version": "0.101.45",
|
"version": "0.101.47",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"version": "0.101.45",
|
"version": "0.101.47",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/extras": "1.16.12",
|
"@quasar/extras": "1.16.12",
|
||||||
"@vueuse/core": "10.11.0",
|
"@vueuse/core": "10.11.0",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"monaco-editor": "0.50.0",
|
"monaco-editor": "0.50.0",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"qrcode": "1.5.3",
|
"qrcode": "1.5.3",
|
||||||
"quasar": "2.16.5",
|
"quasar": "2.16.6",
|
||||||
"vue": "3.4.31",
|
"vue": "3.4.31",
|
||||||
"vue-router": "4.4.0",
|
"vue-router": "4.4.0",
|
||||||
"vue3-apexcharts": "1.5.3",
|
"vue3-apexcharts": "1.5.3",
|
||||||
@@ -6068,9 +6068,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/quasar": {
|
"node_modules/quasar": {
|
||||||
"version": "2.16.5",
|
"version": "2.16.6",
|
||||||
"resolved": "https://registry.npmjs.org/quasar/-/quasar-2.16.5.tgz",
|
"resolved": "https://registry.npmjs.org/quasar/-/quasar-2.16.6.tgz",
|
||||||
"integrity": "sha512-9pjKOg/ZpbbBaKDLIkIKgd2JLaX+R3H2jKDPrlkHD56rp7L8WdxFZhxnG5JVfvW94pCNGtlepjgnli8wRhVFCQ==",
|
"integrity": "sha512-nFFS/WniZy052wUNr0UHxc46KVB0hVg7IlBpVScxQAANQxL5uJVqaiw0z2CEM8IM+MCObXANqxHX/m7woG7zIw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10.18.1",
|
"node": ">= 10.18.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"version": "0.101.46",
|
"version": "0.101.47",
|
||||||
"private": true,
|
"private": true,
|
||||||
"productName": "Tactical RMM",
|
"productName": "Tactical RMM",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"monaco-editor": "0.50.0",
|
"monaco-editor": "0.50.0",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"qrcode": "1.5.3",
|
"qrcode": "1.5.3",
|
||||||
"quasar": "2.16.5",
|
"quasar": "2.16.6",
|
||||||
"vue": "3.4.31",
|
"vue": "3.4.31",
|
||||||
"vue-router": "4.4.0",
|
"vue-router": "4.4.0",
|
||||||
"vue3-apexcharts": "1.5.3",
|
"vue3-apexcharts": "1.5.3",
|
||||||
|
|||||||
@@ -20,12 +20,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div v-if="scriptInfo.stdout">
|
<div v-if="scriptInfo.stdout">
|
||||||
Standard Output
|
<script-output-copy-clip
|
||||||
|
label="Standard Output"
|
||||||
|
:data="scriptInfo.stdout"
|
||||||
|
/>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<pre>{{ scriptInfo.stdout }}</pre>
|
<pre>{{ scriptInfo.stdout }}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="scriptInfo.stderr">
|
<div v-if="scriptInfo.stderr">
|
||||||
Standard Error
|
<script-output-copy-clip
|
||||||
|
label="Standard Error"
|
||||||
|
:data="scriptInfo.stderr"
|
||||||
|
/>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<pre>{{ scriptInfo.stderr }}</pre>
|
<pre>{{ scriptInfo.stderr }}</pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,8 +49,13 @@ import { computed } from "vue";
|
|||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { useDialogPluginComponent } from "quasar";
|
import { useDialogPluginComponent } from "quasar";
|
||||||
|
|
||||||
|
import ScriptOutputCopyClip from "@/components/scripts/ScriptOutputCopyClip.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ScriptOutput",
|
name: "ScriptOutput",
|
||||||
|
components: {
|
||||||
|
ScriptOutputCopyClip,
|
||||||
|
},
|
||||||
emits: [...useDialogPluginComponent.emits],
|
emits: [...useDialogPluginComponent.emits],
|
||||||
props: { scriptInfo: !Object },
|
props: { scriptInfo: !Object },
|
||||||
setup() {
|
setup() {
|
||||||
|
|||||||
@@ -175,6 +175,8 @@
|
|||||||
class="q-pl-md q-pr-md q-pt-none q-ma-none scroll"
|
class="q-pl-md q-pr-md q-pt-none q-ma-none scroll"
|
||||||
style="max-height: 50vh"
|
style="max-height: 50vh"
|
||||||
>
|
>
|
||||||
|
<script-output-copy-clip label="Output" :data="ret" />
|
||||||
|
<q-separator />
|
||||||
<pre>{{ ret }}</pre>
|
<pre>{{ ret }}</pre>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-form>
|
</q-form>
|
||||||
@@ -195,6 +197,7 @@ import { formatScriptSyntax } from "@/utils/format";
|
|||||||
|
|
||||||
//ui imports
|
//ui imports
|
||||||
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
|
||||||
|
import ScriptOutputCopyClip from "@/components/scripts/ScriptOutputCopyClip.vue";
|
||||||
|
|
||||||
// types
|
// types
|
||||||
import type { Agent } from "@/types/agents";
|
import type { Agent } from "@/types/agents";
|
||||||
|
|||||||
@@ -104,6 +104,9 @@
|
|||||||
type="submit"
|
type="submit"
|
||||||
/>
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
<q-card-section v-if="ret !== null"
|
||||||
|
><script-output-copy-clip label="Output" :data="ret" /> <q-separator
|
||||||
|
/></q-card-section>
|
||||||
<q-card-section
|
<q-card-section
|
||||||
v-if="ret !== null"
|
v-if="ret !== null"
|
||||||
class="q-pl-md q-pr-md q-pt-none q-ma-none scroll"
|
class="q-pl-md q-pr-md q-pt-none q-ma-none scroll"
|
||||||
@@ -124,8 +127,13 @@ import { sendAgentCommand } from "@/api/agents";
|
|||||||
import { cmdPlaceholder } from "@/composables/agents";
|
import { cmdPlaceholder } from "@/composables/agents";
|
||||||
import { runAsUserToolTip } from "@/constants/constants";
|
import { runAsUserToolTip } from "@/constants/constants";
|
||||||
|
|
||||||
|
import ScriptOutputCopyClip from "@/components/scripts/ScriptOutputCopyClip.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SendCommand",
|
name: "SendCommand",
|
||||||
|
components: {
|
||||||
|
ScriptOutputCopyClip,
|
||||||
|
},
|
||||||
emits: [...useDialogPluginComponent.emits],
|
emits: [...useDialogPluginComponent.emits],
|
||||||
props: {
|
props: {
|
||||||
agent: !Object,
|
agent: !Object,
|
||||||
|
|||||||
@@ -5,7 +5,10 @@
|
|||||||
@show="loadEditor"
|
@show="loadEditor"
|
||||||
@before-hide="cleanupEditors"
|
@before-hide="cleanupEditors"
|
||||||
>
|
>
|
||||||
<q-card class="q-dialog-plugin" style="width: 60vw">
|
<q-card
|
||||||
|
class="q-dialog-plugin"
|
||||||
|
:style="`width: ${props.type === 'web' ? 50 : 60}vw; max-width: ${props.type === 'web' ? 60 : 70}vw`"
|
||||||
|
>
|
||||||
<q-bar>
|
<q-bar>
|
||||||
{{
|
{{
|
||||||
props.action
|
props.action
|
||||||
@@ -71,7 +74,6 @@
|
|||||||
|
|
||||||
<q-card-section v-show="type === 'rest'">
|
<q-card-section v-show="type === 'rest'">
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
<q-space />
|
|
||||||
<q-tabs v-model="tab" dense shrink>
|
<q-tabs v-model="tab" dense shrink>
|
||||||
<q-tab
|
<q-tab
|
||||||
name="body"
|
name="body"
|
||||||
|
|||||||
26
src/components/scripts/ScriptOutputCopyClip.vue
Normal file
26
src/components/scripts/ScriptOutputCopyClip.vue
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<div class="row q-gutter-sm items-center">
|
||||||
|
<div class="col-auto">{{ label }}</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<q-btn dense flat size="md" icon="content_copy" @click="copyText">
|
||||||
|
<q-tooltip>Copy to Clipboard</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { copyOutput } from "@/utils/helpers";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
label: String,
|
||||||
|
data: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const copyText = () => {
|
||||||
|
copyOutput(props.data);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -18,12 +18,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div v-if="ret.stdout">
|
<div v-if="ret.stdout">
|
||||||
Standard Output
|
<script-output-copy-clip label="Standard Output" :data="ret.stdout" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<pre>{{ ret.stdout }}</pre>
|
<pre>{{ ret.stdout }}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="ret.stderr">
|
<div v-if="ret.stderr">
|
||||||
Standard Error
|
<script-output-copy-clip label="Standard Error" :data="ret.stderr" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<pre>{{ ret.stderr }}</pre>
|
<pre>{{ ret.stderr }}</pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,9 +38,13 @@
|
|||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { testScript, testScriptOnServer } from "@/api/scripts";
|
import { testScript, testScriptOnServer } from "@/api/scripts";
|
||||||
import { useDialogPluginComponent } from "quasar";
|
import { useDialogPluginComponent } from "quasar";
|
||||||
|
import ScriptOutputCopyClip from "@/components/scripts/ScriptOutputCopyClip.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestScriptModal",
|
name: "TestScriptModal",
|
||||||
|
components: {
|
||||||
|
ScriptOutputCopyClip,
|
||||||
|
},
|
||||||
emits: [...useDialogPluginComponent.emits],
|
emits: [...useDialogPluginComponent.emits],
|
||||||
props: {
|
props: {
|
||||||
script: !Object,
|
script: !Object,
|
||||||
|
|||||||
8
src/utils/helpers.ts
Normal file
8
src/utils/helpers.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { copyToClipboard } from "quasar";
|
||||||
|
import { notifySuccess } from "@/utils/notify";
|
||||||
|
|
||||||
|
export function copyOutput(val: string) {
|
||||||
|
copyToClipboard(val).then(() => {
|
||||||
|
notifySuccess("Copied to clipboard");
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user