plugins columns cleanup, devDetail cleanup, better icon selector CUSTPROP

This commit is contained in:
jokob-sk
2025-07-23 22:25:35 +10:00
parent 7d26966250
commit 10a0921e35
51 changed files with 115 additions and 72 deletions

View File

@@ -1198,6 +1198,9 @@ if (eventsList.length > 0) {
let eventIcon = "fa-play";
switch (event) {
case "select_icon":
eventIcon = "fa-chevron-down";
break;
case "add_icon":
case "add_option":
eventIcon = "fa-square-plus";

View File

@@ -323,8 +323,12 @@ function execute_settingEvent(element) {
() => addIconAsBase64(element), // Wrap in an arrow function
feSourceId // triggered by id
);
} else if (["copy_icons"].includes(feEvent)) {
} else if (["select_icon"].includes(feEvent)) {
showIconSelection(feSetKey)
// myparam-setkey
} else if (["copy_icons"].includes(feEvent)) {
// Ask overwrite icon types
showModalWarning (
@@ -449,10 +453,11 @@ function addIconAsBase64 (el) {
}
// -----------------------------------------------
// modal pop up for icon selection
function showIconSelection(setKey) {
function showIconSelection() {
const selectElement = document.getElementById('NEWDEV_devIcon');
const selectElement = document.getElementById(setKey);
const modalId = 'dynamicIconModal';
// Create modal HTML dynamically
@@ -560,7 +565,10 @@ function getColumnNameFromLangString(headStringKey) {
"Device_TableHead_SourcePlugin": "devSourcePlugin",
"Device_TableHead_PresentLastScan": "devPresentLastScan",
"Device_TableHead_AlertDown": "devAlertDown",
"Device_TableHead_CustomProps": "devCustomProps"
"Device_TableHead_CustomProps": "devCustomProps",
"Device_TableHead_FQDN": "devFQDN",
"Device_TableHead_ParentRelType": "devParentRelType",
"Device_TableHead_ReqNicsOnline": "devReqNicsOnline"
};
return columnNameMap[headStringKey] || "";