Compare commits

...

37 Commits

Author SHA1 Message Date
wh1te909
b4b63826dc Release 0.101.47 2024-07-12 08:33:55 +00:00
wh1te909
45e2690a81 bump versions 2024-07-12 08:33:14 +00:00
wh1te909
2ff504db09 update quasar 2024-07-12 08:29:36 +00:00
wh1te909
0c89e58d8c add copy to clipboard button for command/script output 2024-07-12 08:23:49 +00:00
wh1te909
e1dc75e2d8 make dialog a bit wider for webhooks and move buttons to the left 2024-07-12 08:18:09 +00:00
wh1te909
8f1c694071 Release 0.101.44 2024-04-09 00:13:26 +00:00
wh1te909
e837c494cb Release 0.101.43 2024-03-25 17:38:24 +00:00
wh1te909
13f0f117da Release 0.101.40 2024-02-03 01:44:41 +00:00
wh1te909
0b6ae80777 Release 0.101.39 2024-02-02 00:55:23 +00:00
wh1te909
cfe1cb2dbf Release 0.101.38 2023-12-22 17:50:19 +00:00
wh1te909
e1dc8050e3 Release 0.101.37 2023-12-01 18:55:37 +00:00
wh1te909
3e6365574e Release 0.101.36 2023-11-23 00:03:20 +00:00
wh1te909
5114ff40aa Release 0.101.35 2023-11-07 17:25:24 +00:00
wh1te909
6ea7c92b20 Release 0.101.34 2023-10-31 17:51:19 +00:00
wh1te909
20d534eab0 Release 0.101.31 2023-10-01 17:36:52 +00:00
wh1te909
1b2286c4f8 Release 0.101.30 2023-09-30 21:59:09 +00:00
wh1te909
8207f30234 Release 0.101.29 2023-08-30 04:10:11 +00:00
wh1te909
68036f6837 Release 0.101.28 2023-08-14 06:39:49 +00:00
wh1te909
03fae45ac5 Release 0.101.25 2023-07-04 18:49:46 +00:00
wh1te909
c2591c9e7d Release 0.101.22 2023-05-30 22:11:30 +00:00
wh1te909
7fcbe6fbd8 Release 0.101.20 2023-05-09 21:09:45 +00:00
wh1te909
a2f472ef9c Release 0.101.18 2023-04-09 03:28:23 +00:00
wh1te909
8403ac0e93 Release 0.101.16 2023-03-22 17:00:29 +00:00
wh1te909
b7a91563b0 Release 0.101.13 2023-01-18 20:05:20 +00:00
wh1te909
ab19afca16 Release 0.101.11 2022-12-21 18:44:46 +00:00
wh1te909
f24c6a7a80 Release 0.101.9 2022-12-04 23:01:59 +00:00
wh1te909
99490bf859 Release 0.101.7 2022-11-13 01:20:33 +00:00
wh1te909
72cdeeaa6a Release 0.101.5 2022-10-25 22:02:34 +00:00
wh1te909
1eca4d605b Release 0.101.3 2022-10-19 22:35:54 +00:00
wh1te909
52ee98f6f8 Release 0.101.0 2022-09-24 02:43:53 +00:00
wh1te909
d270b877c9 Release 0.100.9 2022-08-23 05:04:57 +00:00
wh1te909
fd8b2a1d98 Release 0.100.8 2022-08-09 20:40:48 +00:00
wh1te909
f518043d8d Release 0.100.7 2022-08-01 17:36:11 +00:00
wh1te909
cc2335558d Release 0.100.6 2022-07-27 06:15:49 +00:00
wh1te909
a8a171ba2c Release 0.100.5 2022-07-10 00:00:08 +00:00
wh1te909
24a63f477e Release 0.100.4 2022-07-07 16:38:14 +00:00
wh1te909
ddeb6293a1 init 2022-05-17 20:46:22 +00:00
9 changed files with 76 additions and 14 deletions

12
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "web",
"version": "0.101.45",
"version": "0.101.47",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "web",
"version": "0.101.45",
"version": "0.101.47",
"dependencies": {
"@quasar/extras": "1.16.12",
"@vueuse/core": "10.11.0",
@@ -20,7 +20,7 @@
"monaco-editor": "0.50.0",
"pinia": "2.1.7",
"qrcode": "1.5.3",
"quasar": "2.16.5",
"quasar": "2.16.6",
"vue": "3.4.31",
"vue-router": "4.4.0",
"vue3-apexcharts": "1.5.3",
@@ -6068,9 +6068,9 @@
}
},
"node_modules/quasar": {
"version": "2.16.5",
"resolved": "https://registry.npmjs.org/quasar/-/quasar-2.16.5.tgz",
"integrity": "sha512-9pjKOg/ZpbbBaKDLIkIKgd2JLaX+R3H2jKDPrlkHD56rp7L8WdxFZhxnG5JVfvW94pCNGtlepjgnli8wRhVFCQ==",
"version": "2.16.6",
"resolved": "https://registry.npmjs.org/quasar/-/quasar-2.16.6.tgz",
"integrity": "sha512-nFFS/WniZy052wUNr0UHxc46KVB0hVg7IlBpVScxQAANQxL5uJVqaiw0z2CEM8IM+MCObXANqxHX/m7woG7zIw==",
"license": "MIT",
"engines": {
"node": ">= 10.18.1",

View File

@@ -1,6 +1,6 @@
{
"name": "web",
"version": "0.101.46",
"version": "0.101.47",
"private": true,
"productName": "Tactical RMM",
"scripts": {
@@ -20,7 +20,7 @@
"monaco-editor": "0.50.0",
"pinia": "2.1.7",
"qrcode": "1.5.3",
"quasar": "2.16.5",
"quasar": "2.16.6",
"vue": "3.4.31",
"vue-router": "4.4.0",
"vue3-apexcharts": "1.5.3",

View File

@@ -20,12 +20,18 @@
</div>
<br />
<div v-if="scriptInfo.stdout">
Standard Output
<script-output-copy-clip
label="Standard Output"
:data="scriptInfo.stdout"
/>
<q-separator />
<pre>{{ scriptInfo.stdout }}</pre>
</div>
<div v-if="scriptInfo.stderr">
Standard Error
<script-output-copy-clip
label="Standard Error"
:data="scriptInfo.stderr"
/>
<q-separator />
<pre>{{ scriptInfo.stderr }}</pre>
</div>
@@ -43,8 +49,13 @@ import { computed } from "vue";
import { useStore } from "vuex";
import { useDialogPluginComponent } from "quasar";
import ScriptOutputCopyClip from "@/components/scripts/ScriptOutputCopyClip.vue";
export default {
name: "ScriptOutput",
components: {
ScriptOutputCopyClip,
},
emits: [...useDialogPluginComponent.emits],
props: { scriptInfo: !Object },
setup() {

View File

@@ -175,6 +175,8 @@
class="q-pl-md q-pr-md q-pt-none q-ma-none scroll"
style="max-height: 50vh"
>
<script-output-copy-clip label="Output" :data="ret" />
<q-separator />
<pre>{{ ret }}</pre>
</q-card-section>
</q-form>
@@ -195,6 +197,7 @@ import { formatScriptSyntax } from "@/utils/format";
//ui imports
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
import ScriptOutputCopyClip from "@/components/scripts/ScriptOutputCopyClip.vue";
// types
import type { Agent } from "@/types/agents";

View File

@@ -104,6 +104,9 @@
type="submit"
/>
</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
v-if="ret !== null"
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 { runAsUserToolTip } from "@/constants/constants";
import ScriptOutputCopyClip from "@/components/scripts/ScriptOutputCopyClip.vue";
export default {
name: "SendCommand",
components: {
ScriptOutputCopyClip,
},
emits: [...useDialogPluginComponent.emits],
props: {
agent: !Object,

View File

@@ -5,7 +5,10 @@
@show="loadEditor"
@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>
{{
props.action
@@ -71,7 +74,6 @@
<q-card-section v-show="type === 'rest'">
<q-toolbar>
<q-space />
<q-tabs v-model="tab" dense shrink>
<q-tab
name="body"

View 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>

View File

@@ -18,12 +18,12 @@
</div>
<br />
<div v-if="ret.stdout">
Standard Output
<script-output-copy-clip label="Standard Output" :data="ret.stdout" />
<q-separator />
<pre>{{ ret.stdout }}</pre>
</div>
<div v-if="ret.stderr">
Standard Error
<script-output-copy-clip label="Standard Error" :data="ret.stderr" />
<q-separator />
<pre>{{ ret.stderr }}</pre>
</div>
@@ -38,9 +38,13 @@
import { ref, onMounted } from "vue";
import { testScript, testScriptOnServer } from "@/api/scripts";
import { useDialogPluginComponent } from "quasar";
import ScriptOutputCopyClip from "@/components/scripts/ScriptOutputCopyClip.vue";
export default {
name: "TestScriptModal",
components: {
ScriptOutputCopyClip,
},
emits: [...useDialogPluginComponent.emits],
props: {
script: !Object,

8
src/utils/helpers.ts Normal file
View 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");
});
}