Compare commits
	
		
			12 Commits
		
	
	
		
			v0.101.15-
			...
			v0.101.17-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 8c6ac164ba | ||
|  | dc68b16ff2 | ||
|  | a4f15fd05a | ||
|  | 176675abd8 | ||
|  | 73dc278ac4 | ||
|  | d6b443296b | ||
|  | f3c718d29c | ||
|  | 5955af08c7 | ||
|  | dec1ccc98a | ||
|  | a78780b837 | ||
|  | beff8eb10e | ||
|  | c2f21b70dd | 
							
								
								
									
										733
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										733
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										26
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "web", | ||||
|   "version": "0.101.15-dev", | ||||
|   "version": "0.101.17-dev", | ||||
|   "private": true, | ||||
|   "productName": "Tactical RMM", | ||||
|   "scripts": { | ||||
| @@ -10,12 +10,12 @@ | ||||
|     "format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@quasar/extras": "1.15.11", | ||||
|     "apexcharts": "3.37.1", | ||||
|     "axios": "1.3.4", | ||||
|     "@quasar/extras": "1.16.2", | ||||
|     "apexcharts": "3.37.3", | ||||
|     "axios": "1.3.5", | ||||
|     "dotenv": "16.0.3", | ||||
|     "qrcode.vue": "3.3.4", | ||||
|     "quasar": "2.11.8", | ||||
|     "quasar": "2.11.10", | ||||
|     "vue": "3.2.47", | ||||
|     "vue3-ace-editor": "2.2.2", | ||||
|     "vue3-apexcharts": "1.4.1", | ||||
| @@ -25,16 +25,16 @@ | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@quasar/cli": "^2.0.0", | ||||
|     "@intlify/unplugin-vue-i18n": "^0.9.2", | ||||
|     "@intlify/unplugin-vue-i18n": "^0.10.0", | ||||
|     "@quasar/app-vite": "^1.2.1", | ||||
|     "@types/node": "^18.15.3", | ||||
|     "@typescript-eslint/eslint-plugin": "^5.55.0", | ||||
|     "@typescript-eslint/parser": "^5.55.0", | ||||
|     "@types/node": "^18.15.11", | ||||
|     "@typescript-eslint/eslint-plugin": "^5.57.1", | ||||
|     "@typescript-eslint/parser": "^5.57.1", | ||||
|     "autoprefixer": "10.4.14", | ||||
|     "eslint": "8.36.0", | ||||
|     "eslint-config-prettier": "8.7.0", | ||||
|     "eslint": "8.37.0", | ||||
|     "eslint-config-prettier": "8.8.0", | ||||
|     "eslint-plugin-vue": "8.7.1", | ||||
|     "prettier": "2.8.4", | ||||
|     "typescript": "4.9.5" | ||||
|     "prettier": "2.8.7", | ||||
|     "typescript": "5.0.4" | ||||
|   } | ||||
| } | ||||
| @@ -373,6 +373,7 @@ 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 | ||||
|       // originally I was modifying cols directly but this led to phantom colum so doing it this way now | ||||
| @@ -432,7 +433,11 @@ export default { | ||||
|  | ||||
|         // Normal text filter | ||||
|         return allColumns.some((col) => { | ||||
|           const val = cellValue(col, row) + ""; | ||||
|           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; | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -452,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, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user