- Disable Auto Login for Remote Control and Remote background:
+
+
+ Sync Mesh Perms with TRMM:
+
+
+ It is recommended to keep this option enabled;
+ otherwise, all TRMM users will have full permissions in
+ MeshCentral regardless of their permissions in TRMM.
+
+
+
+
+
+ Company Name:
+
+
+ Adding your company name here will append it to the
+ user's full name that appears when doing a remote
+ control session, for example: 'John Doe - Amidaware
+ Inc.'
+
+
+
+
+
+
+
+
+
@@ -645,6 +686,11 @@ export default {
],
};
},
+ computed: {
+ hosted() {
+ return this.$store.state.hosted;
+ },
+ },
methods: {
openURL(url) {
openURL(url);
@@ -679,6 +725,19 @@ export default {
}));
});
},
+ confirmSyncChange(newValue) {
+ this.$q
+ .dialog({
+ title: "Are you sure?",
+ message:
+ "This operation may take several minutes to complete in the background and can be very CPU/disk intensive, depending on your hardware and number of agents. Please allow time for the sync to fully complete.",
+ ok: { label: "Yes", color: "primary" },
+ cancel: { label: "No", color: "negative" },
+ })
+ .onOk(() => {
+ this.settings.sync_mesh_with_trmm = newValue;
+ });
+ },
showResetPatchPolicy() {
this.$q.dialog({
component: ResetPatchPolicy,
diff --git a/src/components/scripts/ScriptFormModal.vue b/src/components/scripts/ScriptFormModal.vue
index 66f6653f..cdcf569a 100644
--- a/src/components/scripts/ScriptFormModal.vue
+++ b/src/components/scripts/ScriptFormModal.vue
@@ -222,6 +222,35 @@ import TestScriptModal from "@/components/scripts/TestScriptModal.vue";
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
import * as monaco from "monaco-editor";
+import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker";
+import cssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker";
+import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker";
+import jsWorker from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";
+import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
+
+// https://github.com/microsoft/monaco-editor/issues/4045#issuecomment-1723787448
+self.MonacoEnvironment = {
+ getWorker: function (workerId, label) {
+ switch (label) {
+ case "json":
+ return new jsonWorker();
+ case "css":
+ case "scss":
+ case "less":
+ return new cssWorker();
+ case "html":
+ case "handlebars":
+ case "razor":
+ return new htmlWorker();
+ case "typescript":
+ case "javascript":
+ return new jsWorker();
+ default:
+ return new editorWorker();
+ }
+ },
+};
+
// types
import type { Script } from "@/types/scripts";
@@ -287,8 +316,8 @@ const title = computed(() => {
return props.readonly
? `Viewing ${script.name}`
: props.clone
- ? `Copying ${script.name}`
- : `Editing ${script.name}`;
+ ? `Copying ${script.name}`
+ : `Editing ${script.name}`;
} else {
return "Adding new script";
}
@@ -296,11 +325,21 @@ const title = computed(() => {
// convert highlighter language to match what ace expects
const lang = computed(() => {
- if (script.shell === "cmd") return "bat";
- else if (script.shell === "powershell") return "powershell";
- else if (script.shell === "python") return "python";
- else if (script.shell === "shell") return "shell";
- else return "";
+ switch (script.shell) {
+ case "cmd":
+ return "bat";
+ case "powershell":
+ return "powershell";
+ case "python":
+ return "python";
+ case "shell":
+ case "nushell":
+ return "shell";
+ case "deno":
+ return "typescript";
+ default:
+ return "";
+ }
});
async function submit() {
@@ -339,12 +378,7 @@ const scriptEditor = ref(null);
let editor: monaco.editor.IStandaloneCodeEditor;
function loadEditor() {
- var modelUri = monaco.Uri.parse("model://new"); // a made up unique URI for our model
- var model = monaco.editor.createModel(
- script.script_body,
- lang.value,
- modelUri,
- );
+ var model = monaco.editor.createModel(script.script_body, lang.value);
const theme = $q.dark.isActive ? "vs-dark" : "vs-light";
diff --git a/src/components/scripts/ScriptManager.vue b/src/components/scripts/ScriptManager.vue
index 699e1fa9..ff438000 100644
--- a/src/components/scripts/ScriptManager.vue
+++ b/src/components/scripts/ScriptManager.vue
@@ -175,6 +175,20 @@
>
Shell
+
+ Nushell
+
+
+ Deno
+
Shell
+
+ Nushell
+
+
+ Deno
+
diff --git a/src/components/scripts/ScriptSnippetFormModal.vue b/src/components/scripts/ScriptSnippetFormModal.vue
index 40ea5503..91d59a29 100644
--- a/src/components/scripts/ScriptSnippetFormModal.vue
+++ b/src/components/scripts/ScriptSnippetFormModal.vue
@@ -86,6 +86,35 @@ import { notifySuccess } from "@/utils/notify";
// ui imports
import * as monaco from "monaco-editor";
+import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker";
+import cssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker";
+import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker";
+import jsWorker from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";
+import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
+
+// https://github.com/microsoft/monaco-editor/issues/4045#issuecomment-1723787448
+self.MonacoEnvironment = {
+ getWorker: function (workerId, label) {
+ switch (label) {
+ case "json":
+ return new jsonWorker();
+ case "css":
+ case "scss":
+ case "less":
+ return new cssWorker();
+ case "html":
+ case "handlebars":
+ case "razor":
+ return new htmlWorker();
+ case "typescript":
+ case "javascript":
+ return new jsWorker();
+ default:
+ return new editorWorker();
+ }
+ },
+};
+
// types
import type { ScriptSnippet } from "@/types/scripts";
@@ -124,11 +153,21 @@ const title = computed(() => {
// convert highlighter language to match what ace expects
const lang = computed(() => {
- if (snippet.shell === "cmd") return "bat";
- else if (snippet.shell === "powershell") return "powershell";
- else if (snippet.shell === "python") return "python";
- else if (snippet.shell === "shell") return "shell";
- else return "";
+ switch (snippet.shell) {
+ case "cmd":
+ return "bat";
+ case "powershell":
+ return "powershell";
+ case "python":
+ return "python";
+ case "shell":
+ case "nushell":
+ return "shell";
+ case "deno":
+ return "typescript";
+ default:
+ return "";
+ }
});
async function submit() {
@@ -150,8 +189,7 @@ const snippetEditor = ref(null);
let editor: monaco.editor.IStandaloneCodeEditor;
function loadEditor() {
- var modelUri = monaco.Uri.parse("model://snippet"); // a made up unique URI for our model
- var model = monaco.editor.createModel(snippet.code, lang.value, modelUri);
+ var model = monaco.editor.createModel(snippet.code, lang.value);
const theme = $q.dark.isActive ? "vs-dark" : "vs-light";
diff --git a/src/components/scripts/ScriptSnippets.vue b/src/components/scripts/ScriptSnippets.vue
index 1ecb18d2..aa96a311 100644
--- a/src/components/scripts/ScriptSnippets.vue
+++ b/src/components/scripts/ScriptSnippets.vue
@@ -124,6 +124,22 @@
>
Shell
+
+ Nushell
+
+
+ Deno
+
{{ props.row.name }}
diff --git a/src/composables/scripts.js b/src/composables/scripts.js
index 79574118..031b21e6 100644
--- a/src/composables/scripts.js
+++ b/src/composables/scripts.js
@@ -18,7 +18,7 @@ export function useScriptDropdown(setScript = null, { onMount = false } = {}) {
// specify parameters to filter out community scripts
async function getScriptOptions(showCommunityScripts = false) {
scriptOptions.value = Object.freeze(
- formatScriptOptions(await fetchScripts({ showCommunityScripts }))
+ formatScriptOptions(await fetchScripts({ showCommunityScripts })),
);
}
@@ -26,7 +26,7 @@ export function useScriptDropdown(setScript = null, { onMount = false } = {}) {
watch([script, scriptOptions], () => {
if (script.value && scriptOptions.value.length > 0) {
const tmpScript = scriptOptions.value.find(
- (i) => i.value === script.value
+ (i) => i.value === script.value,
);
defaultTimeout.value = tmpScript.timeout;
defaultArgs.value = tmpScript.args;
@@ -65,4 +65,6 @@ export const shellOptions = [
{ label: "Batch", value: "cmd" },
{ label: "Python", value: "python" },
{ label: "Shell", value: "shell" },
+ { label: "Nushell", value: "nushell" },
+ { label: "Deno", value: "deno" },
];
diff --git a/src/types/scripts.ts b/src/types/scripts.ts
index 9af121e9..e96bea28 100644
--- a/src/types/scripts.ts
+++ b/src/types/scripts.ts
@@ -1,6 +1,6 @@
import type { AgentPlatformType } from "@/types/agents";
-export type ScriptShellType = "powershell" | "cmd" | "shell" | "python";
+export type ScriptShellType = "powershell" | "cmd" | "shell" | "python" | "nushell" | "deno";
export interface Script {
id?: number;
diff --git a/src/views/InitialSetup.vue b/src/views/InitialSetup.vue
index ef4c7bcc..004cae08 100644
--- a/src/views/InitialSetup.vue
+++ b/src/views/InitialSetup.vue
@@ -53,6 +53,26 @@
:options="allTimezones"
/>
+
+
+
+ Company name:
+
+
+ Adding your company name here will append it to the user's
+ full name that appears when doing a remote control session,
+ for example: 'John Doe - Amidaware Inc.'
+
+
+
+
+
+
+