⚙ Settings #779

This commit is contained in:
jokob-sk
2024-09-05 08:09:23 +10:00
parent f737a71939
commit b0d07a6adc
16 changed files with 100 additions and 3 deletions

View File

@@ -1094,7 +1094,11 @@ input[readonly] {
width: 100% !important; width: 100% !important;
} }
#settingsPage .select2-container .selection
{
width: 100% !important;
display: inline-grid;
}
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
/* Devices page */ /* Devices page */

View File

@@ -304,6 +304,54 @@ function removeAllOptions(element) {
$(`#${$(element).attr("my-input-to")}`).empty(); $(`#${$(element).attr("my-input-to")}`).empty();
} }
// -------------------------------------------------------------------
// Add all options
function selectAll(element) {
settingsChanged();
// Get the <select> element with the class 'deviceSelector'
// var selectElement = $('.deviceSelector select');
var selectElement = $(`#${$(element).attr("my-input-to")}`);
// Iterate over each option within the select element
selectElement.find('option').each(function() {
// Mark each option as selected
$(this).prop('selected', true);
});
// Trigger the 'change' event to notify Bootstrap Select of the changes
selectElement.trigger('change');
}
// -----------------------------------------------------------------------------
// UN-Select All
function unselectAll(element) {
settingsChanged();
// Get the <select> element with the class 'deviceSelector'
// var selectElement = $('.deviceSelector select');
var selectElement = $(`#${$(element).attr("my-input-to")}`);
// Iterate over each option within the select element
selectElement.find('option').each(function() {
// Unselect each option
$(this).prop('selected', false);
});
// Trigger the 'change' event to notify Bootstrap Select of the changes
selectElement.trigger('change');
}
// -----------------------------------------------------------------------------
// Trigger change to open up the dropdown filed
function selectChange(element) {
settingsChanged();
// Get the <select> element with the class 'deviceSelector'
// var selectElement = $('.deviceSelector select');
var selectElement = $(`#${$(element).attr("my-input-to")}`);
selectElement.parent().find("input").focus().click();
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Function to initialize remove functionality on select options // Function to initialize remove functionality on select options

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "", "Gen_AreYouSure": "",
"Gen_Backup": "", "Gen_Backup": "",
"Gen_Cancel": "", "Gen_Cancel": "",
"Gen_Change": "",
"Gen_Copy": "", "Gen_Copy": "",
"Gen_DataUpdatedUITakesTime": "", "Gen_DataUpdatedUITakesTime": "",
"Gen_Delete": "", "Gen_Delete": "",

View File

@@ -286,6 +286,7 @@
"Gen_AreYouSure": "Sind Sie sich sicher?", "Gen_AreYouSure": "Sind Sie sich sicher?",
"Gen_Backup": "Sichern", "Gen_Backup": "Sichern",
"Gen_Cancel": "Abbrechen", "Gen_Cancel": "Abbrechen",
"Gen_Change": "",
"Gen_Copy": "Run", "Gen_Copy": "Run",
"Gen_DataUpdatedUITakesTime": "OK - It may take a while for the UI to update if a scan is runnig", "Gen_DataUpdatedUITakesTime": "OK - It may take a while for the UI to update if a scan is runnig",
"Gen_Delete": "Löschen", "Gen_Delete": "Löschen",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "Are you sure?", "Gen_AreYouSure": "Are you sure?",
"Gen_Backup": "Run Backup", "Gen_Backup": "Run Backup",
"Gen_Cancel": "Cancel", "Gen_Cancel": "Cancel",
"Gen_Change": "Change",
"Gen_Copy": "Run", "Gen_Copy": "Run",
"Gen_DataUpdatedUITakesTime": "OK - It may take a while for the UI to update if a scan is running.", "Gen_DataUpdatedUITakesTime": "OK - It may take a while for the UI to update if a scan is running.",
"Gen_Delete": "Delete", "Gen_Delete": "Delete",

View File

@@ -284,6 +284,7 @@
"Gen_AreYouSure": "¿Estás seguro?", "Gen_AreYouSure": "¿Estás seguro?",
"Gen_Backup": "Ejecutar copia de seguridad", "Gen_Backup": "Ejecutar copia de seguridad",
"Gen_Cancel": "Cancelar", "Gen_Cancel": "Cancelar",
"Gen_Change": "",
"Gen_Copy": "Ejecutar", "Gen_Copy": "Ejecutar",
"Gen_DataUpdatedUITakesTime": "Correcto - La interfaz puede tardar en actualizarse si se está ejecutando un escaneo.", "Gen_DataUpdatedUITakesTime": "Correcto - La interfaz puede tardar en actualizarse si se está ejecutando un escaneo.",
"Gen_Delete": "Eliminar", "Gen_Delete": "Eliminar",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "Êtes-vous sûr?", "Gen_AreYouSure": "Êtes-vous sûr?",
"Gen_Backup": "Lancer la sauvegarde", "Gen_Backup": "Lancer la sauvegarde",
"Gen_Cancel": "Annuler", "Gen_Cancel": "Annuler",
"Gen_Change": "",
"Gen_Copy": "Lancer", "Gen_Copy": "Lancer",
"Gen_DataUpdatedUITakesTime": "OK - cela peut prendre du temps à l'interface pour se mettre à jour si un scan est en cours.", "Gen_DataUpdatedUITakesTime": "OK - cela peut prendre du temps à l'interface pour se mettre à jour si un scan est en cours.",
"Gen_Delete": "Supprimer", "Gen_Delete": "Supprimer",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "Sei sicuro?", "Gen_AreYouSure": "Sei sicuro?",
"Gen_Backup": "Esegui backup", "Gen_Backup": "Esegui backup",
"Gen_Cancel": "Annulla", "Gen_Cancel": "Annulla",
"Gen_Change": "",
"Gen_Copy": "Esegui", "Gen_Copy": "Esegui",
"Gen_DataUpdatedUITakesTime": "OK: l'aggiornamento dell'interfaccia utente potrebbe richiedere del tempo se è in esecuzione una scansione.", "Gen_DataUpdatedUITakesTime": "OK: l'aggiornamento dell'interfaccia utente potrebbe richiedere del tempo se è in esecuzione una scansione.",
"Gen_Delete": "Elimina", "Gen_Delete": "Elimina",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "Er du sikker?", "Gen_AreYouSure": "Er du sikker?",
"Gen_Backup": "Kjør sikkerhetskopiering", "Gen_Backup": "Kjør sikkerhetskopiering",
"Gen_Cancel": "Avbryt", "Gen_Cancel": "Avbryt",
"Gen_Change": "",
"Gen_Copy": "Kjør", "Gen_Copy": "Kjør",
"Gen_DataUpdatedUITakesTime": "OK - Det kan ta litt tid før brukergrensesnittet oppdateres hvis en skanning kjøres.", "Gen_DataUpdatedUITakesTime": "OK - Det kan ta litt tid før brukergrensesnittet oppdateres hvis en skanning kjøres.",
"Gen_Delete": "Slett", "Gen_Delete": "Slett",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "Jesteś pewien?", "Gen_AreYouSure": "Jesteś pewien?",
"Gen_Backup": "Wykonaj Kopie Zapasową", "Gen_Backup": "Wykonaj Kopie Zapasową",
"Gen_Cancel": "Anuluj", "Gen_Cancel": "Anuluj",
"Gen_Change": "",
"Gen_Copy": "Wykonaj", "Gen_Copy": "Wykonaj",
"Gen_DataUpdatedUITakesTime": "OK - Aktualizacja UI może chwile potrwać jeżeli wykonywany jest skan.", "Gen_DataUpdatedUITakesTime": "OK - Aktualizacja UI może chwile potrwać jeżeli wykonywany jest skan.",
"Gen_Delete": "Usuń", "Gen_Delete": "Usuń",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "Tem certeza?", "Gen_AreYouSure": "Tem certeza?",
"Gen_Backup": "Executar backup", "Gen_Backup": "Executar backup",
"Gen_Cancel": "Cancelar", "Gen_Cancel": "Cancelar",
"Gen_Change": "",
"Gen_Copy": "Executar", "Gen_Copy": "Executar",
"Gen_DataUpdatedUITakesTime": "OK - Pode levar um tempo para a interface do usuário ser atualizada se uma verificação estiver em execução.", "Gen_DataUpdatedUITakesTime": "OK - Pode levar um tempo para a interface do usuário ser atualizada se uma verificação estiver em execução.",
"Gen_Delete": "Excluir", "Gen_Delete": "Excluir",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "Вы уверены?", "Gen_AreYouSure": "Вы уверены?",
"Gen_Backup": "Запустить резервное копирование", "Gen_Backup": "Запустить резервное копирование",
"Gen_Cancel": "Отмена", "Gen_Cancel": "Отмена",
"Gen_Change": "",
"Gen_Copy": "Запустить", "Gen_Copy": "Запустить",
"Gen_DataUpdatedUITakesTime": "ОК - Обновление UI может занять некоторое время, если сканирование выполняется.", "Gen_DataUpdatedUITakesTime": "ОК - Обновление UI может занять некоторое время, если сканирование выполняется.",
"Gen_Delete": "Удалить", "Gen_Delete": "Удалить",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "Emin misiniz?", "Gen_AreYouSure": "Emin misiniz?",
"Gen_Backup": "", "Gen_Backup": "",
"Gen_Cancel": "İptal", "Gen_Cancel": "İptal",
"Gen_Change": "",
"Gen_Copy": "Çalıştır", "Gen_Copy": "Çalıştır",
"Gen_DataUpdatedUITakesTime": "TAMAM - Eğer bir tarama çalışıyorsa arayüzün güncellenmesi biraz zaman alabilir", "Gen_DataUpdatedUITakesTime": "TAMAM - Eğer bir tarama çalışıyorsa arayüzün güncellenmesi biraz zaman alabilir",
"Gen_Delete": "Sil", "Gen_Delete": "Sil",

View File

@@ -274,6 +274,7 @@
"Gen_AreYouSure": "你确定吗?", "Gen_AreYouSure": "你确定吗?",
"Gen_Backup": "运行备份", "Gen_Backup": "运行备份",
"Gen_Cancel": "取消", "Gen_Cancel": "取消",
"Gen_Change": "",
"Gen_Copy": "运行", "Gen_Copy": "运行",
"Gen_DataUpdatedUITakesTime": "好的 - 如果扫描正在运行UI 可能需要一段时间才能更新。", "Gen_DataUpdatedUITakesTime": "好的 - 如果扫描正在运行UI 可能需要一段时间才能更新。",
"Gen_Delete": "删除", "Gen_Delete": "删除",

View File

@@ -3,7 +3,7 @@
NMAP-scan is a command-line tool to discover and fingerprint IP hosts on the local network. The NMAP-scan (and other Network-scan plugin times using the `SCAN_SUBNETS` setting) time depends on the number of IP addresses to check so set this up carefully with the appropriate network mask and interface. Check the [subnets documentation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md) for help with setting up VLANs, what VLANs are supported, or how to figure out the network mask and your interface. NMAP-scan is a command-line tool to discover and fingerprint IP hosts on the local network. The NMAP-scan (and other Network-scan plugin times using the `SCAN_SUBNETS` setting) time depends on the number of IP addresses to check so set this up carefully with the appropriate network mask and interface. Check the [subnets documentation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md) for help with setting up VLANs, what VLANs are supported, or how to figure out the network mask and your interface.
> [!NOTE] > [!NOTE]
> The `NMAPDEV` plugin is great for detecting the availability of devices, however ARP scan might be better covering multiple VLANS. You can always combine different scan methods. You can find all available network scanning options (marked as `🔍 dev scanner`) in the [Plugins overview](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md) readme. > The `NMAPDEV` plugin is great for detecting the availability of devices, however ARP scan might be better covering multiple VLANS and subnets as NMAP can't pickup the MAC address from other subnets (this is an NMAP limitation) which are necessary to identify a device. You can always combine different scan methods. You can find all available network scanning options (marked as `🔍 dev scanner`) in the [Plugins overview](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md) readme.
### Usage ### Usage

View File

@@ -35,6 +35,39 @@
"elementType": "select", "elementType": "select",
"elementOptions": [{ "multiple": "true", "ordeable": "true" }], "elementOptions": [{ "multiple": "true", "ordeable": "true" }],
"transformers": ["getString"] "transformers": ["getString"]
},
{
"elementType": "button",
"elementOptions": [
{ "sourceSuffixes": [] },
{ "separator": "" },
{ "cssClasses": "col-xs-4" },
{ "onClick": "selectAll(this)" },
{ "getStringKey": "Gen_Add_All" }
],
"transformers": []
},
{
"elementType": "button",
"elementOptions": [
{ "sourceSuffixes": [] },
{ "separator": "" },
{ "cssClasses": "col-xs-4" },
{ "onClick": "unselectAll(this)" },
{ "getStringKey": "Gen_Remove_All" }
],
"transformers": []
},
{
"elementType": "button",
"elementOptions": [
{ "sourceSuffixes": [] },
{ "separator": "" },
{ "cssClasses": "col-xs-4" },
{ "onClick": "selectChange(this)" },
{ "getStringKey": "Gen_Change" }
],
"transformers": []
} }
] ]
}, },
@@ -82,7 +115,7 @@
"description": [ "description": [
{ {
"language_code": "en_us", "language_code": "en_us",
"string": "Columns and their order that are shown on the Devices page." "string": "Columns and their order that are shown on the Devices page. Drag and drop the order of columns, click <code>x</code> to remove columns. You can also click into the field to selectivelly add fields."
} }
] ]
}, },