Compare commits
	
		
			25 Commits
		
	
	
		
			v0.101.10-
			...
			v0.101.17-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					8c6ac164ba | ||
| 
						 | 
					dc68b16ff2 | ||
| 
						 | 
					a4f15fd05a | ||
| 
						 | 
					176675abd8 | ||
| 
						 | 
					73dc278ac4 | ||
| 
						 | 
					d6b443296b | ||
| 
						 | 
					f3c718d29c | ||
| 
						 | 
					5955af08c7 | ||
| 
						 | 
					dec1ccc98a | ||
| 
						 | 
					a78780b837 | ||
| 
						 | 
					beff8eb10e | ||
| 
						 | 
					c2f21b70dd | ||
| 
						 | 
					520145e0e3 | ||
| 
						 | 
					6a132187a2 | ||
| 
						 | 
					a63a9ccd76 | ||
| 
						 | 
					ff1eb791db | ||
| 
						 | 
					13bd88b979 | ||
| 
						 | 
					5b0c244920 | ||
| 
						 | 
					0318a17cac | ||
| 
						 | 
					75296ed8ee | ||
| 
						 | 
					09bee45b2f | ||
| 
						 | 
					3573c48872 | ||
| 
						 | 
					784841c221 | ||
| 
						 | 
					ed788a1861 | ||
| 
						 | 
					bd6b08505a | 
							
								
								
									
										2
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							@@ -5,7 +5,7 @@
 | 
			
		||||
    "esbenp.prettier-vscode",
 | 
			
		||||
    "editorconfig.editorconfig",
 | 
			
		||||
    "vue.volar",
 | 
			
		||||
    "wayou.vscode-todo-highlight",
 | 
			
		||||
    "wayou.vscode-todo-highlight"
 | 
			
		||||
  ],
 | 
			
		||||
  "unwantedRecommendations": [
 | 
			
		||||
    "octref.vetur",
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							@@ -4,16 +4,9 @@
 | 
			
		||||
  "editor.formatOnSave": true,
 | 
			
		||||
  "[vue][javascript][typescript][javascriptreact]": {
 | 
			
		||||
    "editor.defaultFormatter": "esbenp.prettier-vscode",
 | 
			
		||||
    "editor.codeActionsOnSave": [
 | 
			
		||||
      "source.fixAll.eslint"
 | 
			
		||||
    ],
 | 
			
		||||
    "editor.codeActionsOnSave": ["source.fixAll.eslint"]
 | 
			
		||||
  },
 | 
			
		||||
  "eslint.validate": [
 | 
			
		||||
    "javascript",
 | 
			
		||||
    "javascriptreact",
 | 
			
		||||
    "typescript",
 | 
			
		||||
    "vue"
 | 
			
		||||
  ],
 | 
			
		||||
  "eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
 | 
			
		||||
  "typescript.tsdk": "node_modules/typescript/lib",
 | 
			
		||||
  "files.watcherExclude": {
 | 
			
		||||
    "files.watcherExclude": {
 | 
			
		||||
@@ -22,7 +15,7 @@
 | 
			
		||||
      "**/node_modules/": true,
 | 
			
		||||
      "/node_modules/**": true,
 | 
			
		||||
      "**/env/": true,
 | 
			
		||||
      "/env/**": true,
 | 
			
		||||
      "/env/**": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										36
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								index.html
									
									
									
									
									
								
							@@ -1,24 +1,22 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <title><%= productName %></title>
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
  <title>
 | 
			
		||||
    <%= productName %>
 | 
			
		||||
  </title>
 | 
			
		||||
 | 
			
		||||
  <meta charset="utf-8" />
 | 
			
		||||
  <meta name="robots" content="noindex" />
 | 
			
		||||
  <meta name="description" content="<%= productDescription %>" />
 | 
			
		||||
  <meta name="format-detection" content="telephone=no" />
 | 
			
		||||
  <meta name="msapplication-tap-highlight" content="no" />
 | 
			
		||||
  <meta name="viewport"
 | 
			
		||||
    content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>" />
 | 
			
		||||
  <link rel="icon" type="image/ico" href="favicon.ico" />
 | 
			
		||||
  <script src="/env-config.js"></script>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <!-- quasar:entry-point -->
 | 
			
		||||
</body>
 | 
			
		||||
    <meta charset="utf-8" />
 | 
			
		||||
    <meta name="robots" content="noindex" />
 | 
			
		||||
    <meta name="description" content="<%= productDescription %>" />
 | 
			
		||||
    <meta name="format-detection" content="telephone=no" />
 | 
			
		||||
    <meta name="msapplication-tap-highlight" content="no" />
 | 
			
		||||
    <meta
 | 
			
		||||
      name="viewport"
 | 
			
		||||
      content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
 | 
			
		||||
    />
 | 
			
		||||
    <link rel="icon" type="image/ico" href="favicon.ico" />
 | 
			
		||||
    <script src="/env-config.js"></script>
 | 
			
		||||
  </head>
 | 
			
		||||
 | 
			
		||||
  <body>
 | 
			
		||||
    <!-- quasar:entry-point -->
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6292
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6292
									
								
								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",
 | 
			
		||||
  "version": "0.101.10-dev",
 | 
			
		||||
  "version": "0.101.17-dev",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "productName": "Tactical RMM",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
@@ -10,13 +10,13 @@
 | 
			
		||||
    "format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@quasar/extras": "1.15.8",
 | 
			
		||||
    "apexcharts": "3.36.3",
 | 
			
		||||
    "axios": "0.27.2",
 | 
			
		||||
    "@quasar/extras": "1.16.2",
 | 
			
		||||
    "apexcharts": "3.37.3",
 | 
			
		||||
    "axios": "1.3.5",
 | 
			
		||||
    "dotenv": "16.0.3",
 | 
			
		||||
    "qrcode.vue": "3.3.3",
 | 
			
		||||
    "quasar": "2.11.1",
 | 
			
		||||
    "vue": "3.2.45",
 | 
			
		||||
    "qrcode.vue": "3.3.4",
 | 
			
		||||
    "quasar": "2.11.10",
 | 
			
		||||
    "vue": "3.2.47",
 | 
			
		||||
    "vue3-ace-editor": "2.2.2",
 | 
			
		||||
    "vue3-apexcharts": "1.4.1",
 | 
			
		||||
    "vuedraggable": "4.1.0",
 | 
			
		||||
@@ -24,17 +24,17 @@
 | 
			
		||||
    "vuex": "4.1.0"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@quasar/cli": "^1.3.2",
 | 
			
		||||
    "@intlify/vite-plugin-vue-i18n": "^6.0.3",
 | 
			
		||||
    "@quasar/app-vite": "^1.1.3",
 | 
			
		||||
    "@types/node": "^18.11.17",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^5.47.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^5.47.0",
 | 
			
		||||
    "autoprefixer": "10.4.13",
 | 
			
		||||
    "eslint": "8.30.0",
 | 
			
		||||
    "eslint-config-prettier": "8.5.0",
 | 
			
		||||
    "@quasar/cli": "^2.0.0",
 | 
			
		||||
    "@intlify/unplugin-vue-i18n": "^0.10.0",
 | 
			
		||||
    "@quasar/app-vite": "^1.2.1",
 | 
			
		||||
    "@types/node": "^18.15.11",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^5.57.1",
 | 
			
		||||
    "@typescript-eslint/parser": "^5.57.1",
 | 
			
		||||
    "autoprefixer": "10.4.14",
 | 
			
		||||
    "eslint": "8.37.0",
 | 
			
		||||
    "eslint-config-prettier": "8.8.0",
 | 
			
		||||
    "eslint-plugin-vue": "8.7.1",
 | 
			
		||||
    "prettier": "2.8.1",
 | 
			
		||||
    "typescript": "4.9.4"
 | 
			
		||||
    "prettier": "2.8.7",
 | 
			
		||||
    "typescript": "5.0.4"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -4,18 +4,18 @@
 | 
			
		||||
module.exports = {
 | 
			
		||||
  plugins: [
 | 
			
		||||
    // https://github.com/postcss/autoprefixer
 | 
			
		||||
    require('autoprefixer')({
 | 
			
		||||
    require("autoprefixer")({
 | 
			
		||||
      overrideBrowserslist: [
 | 
			
		||||
        'last 4 Chrome versions',
 | 
			
		||||
        'last 4 Firefox versions',
 | 
			
		||||
        'last 4 Edge versions',
 | 
			
		||||
        'last 4 Safari versions',
 | 
			
		||||
        'last 4 Android versions',
 | 
			
		||||
        'last 4 ChromeAndroid versions',
 | 
			
		||||
        'last 4 FirefoxAndroid versions',
 | 
			
		||||
        'last 4 iOS versions'
 | 
			
		||||
      ]
 | 
			
		||||
    })
 | 
			
		||||
        "last 4 Chrome versions",
 | 
			
		||||
        "last 4 Firefox versions",
 | 
			
		||||
        "last 4 Edge versions",
 | 
			
		||||
        "last 4 Safari versions",
 | 
			
		||||
        "last 4 Android versions",
 | 
			
		||||
        "last 4 ChromeAndroid versions",
 | 
			
		||||
        "last 4 FirefoxAndroid versions",
 | 
			
		||||
        "last 4 iOS versions",
 | 
			
		||||
      ],
 | 
			
		||||
    }),
 | 
			
		||||
 | 
			
		||||
    // https://github.com/elchininet/postcss-rtlcss
 | 
			
		||||
    // If you want to support RTL css, then
 | 
			
		||||
@@ -23,5 +23,5 @@ module.exports = {
 | 
			
		||||
    // 2. optionally set quasar.config.js > framework > lang to an RTL language
 | 
			
		||||
    // 3. uncomment the following line:
 | 
			
		||||
    // require('postcss-rtlcss')
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
  ],
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -373,17 +373,12 @@ export default {
 | 
			
		||||
        "local_ips",
 | 
			
		||||
        "make_model",
 | 
			
		||||
        "physical_disks",
 | 
			
		||||
        "custom_fields"
 | 
			
		||||
      ];
 | 
			
		||||
 | 
			
		||||
      // quasar filter only does visible columns so this is a hack to add hidden columns we want to filter
 | 
			
		||||
      for (const elem of hiddenFields) {
 | 
			
		||||
        if (!cols.find((o) => o.name === elem)) {
 | 
			
		||||
          cols.push({
 | 
			
		||||
            name: elem,
 | 
			
		||||
            field: elem,
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      // originally I was modifying cols directly but this led to phantom colum so doing it this way now
 | 
			
		||||
      // https://github.com/amidaware/tacticalrmm/issues/1264
 | 
			
		||||
      const allColumns = [...cols, ...hiddenFields.map((field) => ({ field }))];
 | 
			
		||||
 | 
			
		||||
      const lowerTerms = terms ? terms.toLowerCase() : "";
 | 
			
		||||
      let advancedFilter = false;
 | 
			
		||||
@@ -437,8 +432,12 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Normal text filter
 | 
			
		||||
        return cols.some((col) => {
 | 
			
		||||
          const val = cellValue(col, row) + "";
 | 
			
		||||
        return allColumns.some((col) => {
 | 
			
		||||
          let valObj = cellValue(col, row);
 | 
			
		||||
          if (Array.isArray(valObj)) {
 | 
			
		||||
            valObj = valObj.map((item) => item.value ? item.value : item);
 | 
			
		||||
          }
 | 
			
		||||
          const val = valObj + "";
 | 
			
		||||
          const haystack =
 | 
			
		||||
            val === "undefined" || val === "null" ? "" : val.toLowerCase();
 | 
			
		||||
          return haystack.indexOf(search) !== -1;
 | 
			
		||||
 
 | 
			
		||||
@@ -166,7 +166,7 @@ export default {
 | 
			
		||||
          type: "textarea",
 | 
			
		||||
          isValid: (val) => !!val,
 | 
			
		||||
        },
 | 
			
		||||
        style: "width: 30vw; max-width: 50vw;",
 | 
			
		||||
        style: "width: 90vw; max-width: 90vw",
 | 
			
		||||
        ok: { label: "Add" },
 | 
			
		||||
        cancel: true,
 | 
			
		||||
      }).onOk(async () => {
 | 
			
		||||
@@ -193,7 +193,7 @@ export default {
 | 
			
		||||
          type: "textarea",
 | 
			
		||||
          isValid: (val) => !!val,
 | 
			
		||||
        },
 | 
			
		||||
        style: "width: 30vw; max-width: 50vw;",
 | 
			
		||||
        style: "width: 90vw; max-width: 90vw",
 | 
			
		||||
        ok: { label: "Save" },
 | 
			
		||||
        cancel: true,
 | 
			
		||||
      }).onOk(async (data) => {
 | 
			
		||||
 
 | 
			
		||||
@@ -158,6 +158,20 @@
 | 
			
		||||
          >
 | 
			
		||||
        </div>
 | 
			
		||||
        <div v-else>No checks</div>
 | 
			
		||||
 | 
			
		||||
        <span
 | 
			
		||||
          v-if="customFields.length > 0"
 | 
			
		||||
          class="text-subtitle2 text-bold block q-mt-xl"
 | 
			
		||||
          >Custom Fields</span
 | 
			
		||||
        >
 | 
			
		||||
        <q-list dense>
 | 
			
		||||
          <q-item v-for="(field, i) in customFields" :key="field + i">
 | 
			
		||||
            <q-item-section thumbnail>
 | 
			
		||||
              <q-icon name="fas fa-user" size="xs" />
 | 
			
		||||
            </q-item-section>
 | 
			
		||||
            <q-item-section>{{ field.name }}: {{ field.value }}</q-item-section>
 | 
			
		||||
          </q-item>
 | 
			
		||||
        </q-list>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="col-1"></div>
 | 
			
		||||
      <!-- right -->
 | 
			
		||||
@@ -193,6 +207,7 @@ import {
 | 
			
		||||
  openAgentWindow,
 | 
			
		||||
} from "@/api/agents";
 | 
			
		||||
import { notifySuccess } from "@/utils/notify";
 | 
			
		||||
import { fetchCustomFields } from "@/api/core";
 | 
			
		||||
 | 
			
		||||
// ui imports
 | 
			
		||||
import AgentActionMenu from "@/components/agents/AgentActionMenu.vue";
 | 
			
		||||
@@ -210,6 +225,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    // summary tab logic
 | 
			
		||||
    const summary = ref(null);
 | 
			
		||||
    const customFieldsDefinitions = ref(null);
 | 
			
		||||
    const loading = ref(false);
 | 
			
		||||
 | 
			
		||||
    function diskBarColor(percent) {
 | 
			
		||||
@@ -236,9 +252,37 @@ export default {
 | 
			
		||||
      return ret;
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    const customFields = computed(() => {
 | 
			
		||||
      if (!summary.value.custom_fields) {
 | 
			
		||||
        return [];
 | 
			
		||||
      }
 | 
			
		||||
      if (!customFieldsDefinitions.value) {
 | 
			
		||||
        return [];
 | 
			
		||||
      }
 | 
			
		||||
      const ret = [];
 | 
			
		||||
      for (const customField of summary.value.custom_fields) {
 | 
			
		||||
        const definition = customFieldsDefinitions.value.find(
 | 
			
		||||
          (def) => def.id === customField.field
 | 
			
		||||
        );
 | 
			
		||||
        if (
 | 
			
		||||
          definition &&
 | 
			
		||||
          !definition.hide_in_ui &&
 | 
			
		||||
          customField.value?.length > 0
 | 
			
		||||
        ) {
 | 
			
		||||
          ret.push({
 | 
			
		||||
            name: definition.name,
 | 
			
		||||
            value: customField.value,
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      return ret;
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    async function getSummary() {
 | 
			
		||||
      loading.value = true;
 | 
			
		||||
      summary.value = await fetchAgent(selectedAgent.value);
 | 
			
		||||
      customFieldsDefinitions.value = await fetchCustomFields();
 | 
			
		||||
      store.commit("setRefreshSummaryTab", false);
 | 
			
		||||
      store.commit("setAgentPlatform", summary.value.plat);
 | 
			
		||||
      loading.value = false;
 | 
			
		||||
@@ -277,6 +321,7 @@ export default {
 | 
			
		||||
    return {
 | 
			
		||||
      // reactive data
 | 
			
		||||
      summary,
 | 
			
		||||
      customFields,
 | 
			
		||||
      loading,
 | 
			
		||||
      selectedAgent,
 | 
			
		||||
      disks,
 | 
			
		||||
 
 | 
			
		||||
@@ -8,16 +8,16 @@
 | 
			
		||||
            v
 | 
			
		||||
          }}</q-badge>
 | 
			
		||||
          <q-btn
 | 
			
		||||
              v-if="!!v"
 | 
			
		||||
              size="sm"
 | 
			
		||||
              class="q-ml-xs"
 | 
			
		||||
              flat
 | 
			
		||||
              round
 | 
			
		||||
              icon="content_copy"
 | 
			
		||||
              @click="copyValueToClip(v)"
 | 
			
		||||
            >
 | 
			
		||||
              <q-tooltip>Copy to Clipboard</q-tooltip>
 | 
			
		||||
            </q-btn>
 | 
			
		||||
            v-if="!!v"
 | 
			
		||||
            size="sm"
 | 
			
		||||
            class="q-ml-xs"
 | 
			
		||||
            flat
 | 
			
		||||
            round
 | 
			
		||||
            icon="content_copy"
 | 
			
		||||
            @click="copyValueToClip(v)"
 | 
			
		||||
          >
 | 
			
		||||
            <q-tooltip>Copy to Clipboard</q-tooltip>
 | 
			
		||||
          </q-btn>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <q-separator v-if="info.length > 1" />
 | 
			
		||||
@@ -42,10 +42,9 @@ export default {
 | 
			
		||||
    const tabHeight = computed(() => store.state.tabHeight);
 | 
			
		||||
 | 
			
		||||
    function copyValueToClip(val) {
 | 
			
		||||
      copyToClipboard(val)
 | 
			
		||||
        .then(() => {
 | 
			
		||||
          notifySuccess("Copied to clipboard");
 | 
			
		||||
        })
 | 
			
		||||
      copyToClipboard(val).then(() => {
 | 
			
		||||
        notifySuccess("Copied to clipboard");
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
 
 | 
			
		||||
@@ -128,7 +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"
 | 
			
		||||
import { envVarsLabel } from "@/constants/constants";
 | 
			
		||||
 | 
			
		||||
// ui imports
 | 
			
		||||
import TacticalDropdown from "@/components/ui/TacticalDropdown.vue";
 | 
			
		||||
@@ -146,10 +146,15 @@ export default {
 | 
			
		||||
    const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
 | 
			
		||||
 | 
			
		||||
    // setup script dropdown
 | 
			
		||||
    const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars } =
 | 
			
		||||
      useScriptDropdown(props.check ? props.check.script : undefined, {
 | 
			
		||||
        onMount: true,
 | 
			
		||||
      });
 | 
			
		||||
    const {
 | 
			
		||||
      script,
 | 
			
		||||
      scriptOptions,
 | 
			
		||||
      defaultTimeout,
 | 
			
		||||
      defaultArgs,
 | 
			
		||||
      defaultEnvVars,
 | 
			
		||||
    } = useScriptDropdown(props.check ? props.check.script : undefined, {
 | 
			
		||||
      onMount: true,
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // check logic
 | 
			
		||||
    const { state, loading, submit, failOptions, severityOptions } =
 | 
			
		||||
 
 | 
			
		||||
@@ -89,7 +89,8 @@
 | 
			
		||||
      <p class="text-italic">
 | 
			
		||||
        Note: the auth token above will be valid for {{ info.expires }} hours.
 | 
			
		||||
      </p>
 | 
			
		||||
      <q-btn v-if="info.plat === 'windows'"
 | 
			
		||||
      <q-btn
 | 
			
		||||
        v-if="info.plat === 'windows'"
 | 
			
		||||
        type="a"
 | 
			
		||||
        :href="info.data.url"
 | 
			
		||||
        color="primary"
 | 
			
		||||
 
 | 
			
		||||
@@ -221,11 +221,18 @@ export default {
 | 
			
		||||
    const { dialogRef, onDialogHide } = useDialogPluginComponent();
 | 
			
		||||
 | 
			
		||||
    // setup dropdowns
 | 
			
		||||
    const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars, syntax, link } =
 | 
			
		||||
      useScriptDropdown(props.script, {
 | 
			
		||||
        onMount: true,
 | 
			
		||||
        filterByPlatform: props.agent.plat,
 | 
			
		||||
      });
 | 
			
		||||
    const {
 | 
			
		||||
      script,
 | 
			
		||||
      scriptOptions,
 | 
			
		||||
      defaultTimeout,
 | 
			
		||||
      defaultArgs,
 | 
			
		||||
      defaultEnvVars,
 | 
			
		||||
      syntax,
 | 
			
		||||
      link,
 | 
			
		||||
    } = useScriptDropdown(props.script, {
 | 
			
		||||
      onMount: true,
 | 
			
		||||
      filterByPlatform: props.agent.plat,
 | 
			
		||||
    });
 | 
			
		||||
    const { customFieldOptions } = useCustomFieldDropdown({ onMount: true });
 | 
			
		||||
 | 
			
		||||
    // main run script functionaity
 | 
			
		||||
 
 | 
			
		||||
@@ -836,10 +836,15 @@ export default {
 | 
			
		||||
    const { dialogRef, onDialogHide, onDialogOK } = useDialogPluginComponent();
 | 
			
		||||
 | 
			
		||||
    // setup dropdowns
 | 
			
		||||
    const { script, scriptOptions, defaultTimeout, defaultArgs, defaultEnvVars } =
 | 
			
		||||
      useScriptDropdown(undefined, {
 | 
			
		||||
        onMount: true,
 | 
			
		||||
      });
 | 
			
		||||
    const {
 | 
			
		||||
      script,
 | 
			
		||||
      scriptOptions,
 | 
			
		||||
      defaultTimeout,
 | 
			
		||||
      defaultArgs,
 | 
			
		||||
      defaultEnvVars,
 | 
			
		||||
    } = useScriptDropdown(undefined, {
 | 
			
		||||
      onMount: true,
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // set defaultTimeout to 30
 | 
			
		||||
    defaultTimeout.value = 30;
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ export function useScriptDropdown(setScript = null, { onMount = false } = {}) {
 | 
			
		||||
      );
 | 
			
		||||
      defaultTimeout.value = tmpScript.timeout;
 | 
			
		||||
      defaultArgs.value = tmpScript.args;
 | 
			
		||||
      defaultEnvVars.value = tmpScript.env_vars,
 | 
			
		||||
      defaultEnvVars.value = tmpScript.env_vars;
 | 
			
		||||
      syntax.value = tmpScript.syntax;
 | 
			
		||||
      link.value =
 | 
			
		||||
        tmpScript.script_type === "builtin"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,5 +6,5 @@ export const GOARCH_ARM32 = "arm";
 | 
			
		||||
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.";
 | 
			
		||||
 | 
			
		||||
export const envVarsLabel = 
 | 
			
		||||
  "Environment vars (press Enter after typing each key=value pair)"
 | 
			
		||||
export const envVarsLabel =
 | 
			
		||||
  "Environment vars (press Enter after typing each key=value pair)";
 | 
			
		||||
 
 | 
			
		||||
@@ -173,6 +173,18 @@
 | 
			
		||||
                        </q-menu>
 | 
			
		||||
                      </q-item>
 | 
			
		||||
 | 
			
		||||
                      <!-- Bulk Run Checks -->
 | 
			
		||||
                      <q-item
 | 
			
		||||
                        clickable
 | 
			
		||||
                        v-close-popup
 | 
			
		||||
                        @click="runChecks(props.node)"
 | 
			
		||||
                      >
 | 
			
		||||
                        <q-item-section side>
 | 
			
		||||
                          <q-icon name="fas fa-check-double" />
 | 
			
		||||
                        </q-item-section>
 | 
			
		||||
                        <q-item-section>Run Checks</q-item-section>
 | 
			
		||||
                      </q-item>
 | 
			
		||||
 | 
			
		||||
                      <q-separator></q-separator>
 | 
			
		||||
 | 
			
		||||
                      <q-item clickable v-close-popup>
 | 
			
		||||
@@ -440,7 +452,7 @@ export default {
 | 
			
		||||
      showInstallAgentModal: false,
 | 
			
		||||
      sitePk: null,
 | 
			
		||||
      innerModel: (this.$q.screen.height - 82) / 2,
 | 
			
		||||
      search: "",
 | 
			
		||||
      search: (this.$route.query.search ? this.$route.query.search : ""),
 | 
			
		||||
      filterTextLength: 0,
 | 
			
		||||
      filterAvailability: "all",
 | 
			
		||||
      filterPatchesPending: false,
 | 
			
		||||
@@ -690,6 +702,17 @@ export default {
 | 
			
		||||
        })
 | 
			
		||||
        .onOk(() => this.$store.dispatch("refreshDashboard"));
 | 
			
		||||
    },
 | 
			
		||||
    runChecks(node) {
 | 
			
		||||
      const target = node.children ? "client" : "site";
 | 
			
		||||
      this.$axios
 | 
			
		||||
        .post(`/checks/${target}/${node.id}/csbulkrun/`)
 | 
			
		||||
        .then((r) => {
 | 
			
		||||
          this.notifySuccess(r.data);
 | 
			
		||||
        })
 | 
			
		||||
        .catch((e) => {
 | 
			
		||||
          console.error(e);
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    showToggleMaintenance(node) {
 | 
			
		||||
      let data = {
 | 
			
		||||
        id: node.id,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user