@@ -182,14 +183,12 @@ if ($_REQUEST['mac'] == 'Internet') { $DevDetail_Tap_temp = "Tools"; } else { $D
@@ -218,16 +217,12 @@ if ($_REQUEST['mac'] == 'Internet') { $DevDetail_Tap_temp = "Tools"; } else { $D
@@ -240,17 +235,12 @@ if ($_REQUEST['mac'] == 'Internet') { $DevDetail_Tap_temp = "Tools"; } else { $D
@@ -357,9 +347,8 @@ if ($_REQUEST['mac'] == 'Internet') { $DevDetail_Tap_temp = "Tools"; } else { $D
@@ -831,7 +820,7 @@ function initializeCombos () {
// Initialize static combos
initializeComboSkipRepeated ();
}
-
+// -----------------------------------------------------------------------------
function initializeCombo (dropdownId, queryAction, txtDataField, useCache) {
// check if we have the value cached already
@@ -873,7 +862,15 @@ function initializeCombo (dropdownId, queryAction, txtDataField, useCache) {
writeDropdownHtml(dropdownId, dropdownHtmlContent)
}
}
+// -----------------------------------------------------------------------------
+// Edit dropdown value
+function editDrp(dropdownId)
+{
+ $('#'+dropdownId).focus();
+}
+
+// -----------------------------------------------------------------------------
// write out the HTML for the dropdown
function writeDropdownHtml(dropdownId, dropdownHtmlContent)
{
@@ -885,7 +882,7 @@ function writeDropdownHtml(dropdownId, dropdownHtmlContent)
HTMLelement.innerHTML = ''
HTMLelement.innerHTML += dropdownHtmlContent;
}
-
+// -----------------------------------------------------------------------------
function getCache(key)
{
// check cache
@@ -897,12 +894,12 @@ function getCache(key)
return "";
}
}
-
+// -----------------------------------------------------------------------------
function setCache(key, data)
{
sessionStorage.setItem(key, data);
}
-
+// -----------------------------------------------------------------------------
function initializeComboSkipRepeated () {
// find dropdown menu element
@@ -918,6 +915,8 @@ function initializeComboSkipRepeated () {
});
}
+// -----------------------------------------------------------------------------
+
function findSkipRepeated (value='0') {
var itemSelected = skipRepeatedItems[0];
@@ -1286,7 +1285,7 @@ function getDeviceData (readAllData=false) {
$('#txtStatus').val (deviceData['dev_Status'].replace('-', ''));
if (deviceData['dev_StaticIP'] == 1) {$('#chkStaticIP').iCheck('check');} else {$('#chkStaticIP').iCheck('uncheck');}
- $('#txtScanCycle').val (deviceData['dev_ScanCycle'] +' min');
+ $('#txtScanCycle').val (deviceData['dev_ScanCycle'] == "1" ? "yes" : "no");
if (deviceData['dev_AlertEvents'] == 1) {$('#chkAlertEvents').iCheck('check');} else {$('#chkAlertEvents').iCheck('uncheck');}
if (deviceData['dev_AlertDeviceDown'] == 1) {$('#chkAlertDown').iCheck('check');} else {$('#chkAlertDown').iCheck('uncheck');}
$('#txtSkipRepeated').val (findSkipRepeated (deviceData['dev_SkipRepeated']));
@@ -1390,7 +1389,7 @@ function setDeviceData (refreshCallback='') {
+ '&networknode=' + $('#txtNetworkNodeMac').val()
+ '&networknodeport=' + $('#txtNetworkPort').val()
+ '&staticIP=' + ($('#chkStaticIP')[0].checked * 1)
- + '&scancycle=' + $('#txtScanCycle').val().split(' ')[0]
+ + '&scancycle=' + ($('#txtScanCycle').val() == "yes" ? "1" : "0")
+ '&alertevents=' + ($('#chkAlertEvents')[0].checked * 1)
+ '&alertdown=' + ($('#chkAlertDown')[0].checked * 1)
+ '&skiprepeated=' + $('#txtSkipRepeated').val().split(' ')[0]
@@ -1402,6 +1401,13 @@ function setDeviceData (refreshCallback='') {
deactivateSaveRestoreData ();
showMessage (msg);
+ // clear session storage
+ setCache("#dropdownOwner","");
+ setCache("#dropdownDeviceType","");
+ setCache("#dropdownGroup","");
+ setCache("#dropdownLocation","");
+ setCache("#dropdownNetworkNodeMac","");
+
// Callback fuction
if (typeof refreshCallback == 'function') {
refreshCallback();
@@ -1419,7 +1425,7 @@ function askSkipNotifications () {
}
// When Archived
- if ($('#chkArchived')[0].checked && $('#txtScanCycle').val().split(' ')[0] != "0") {
+ if ($('#chkArchived')[0].checked && $('#txtScanCycle').val() != "no") {
// Ask skip notifications
showModalDefault ('Device Archived', 'Do you want to skip all notifications for this device?',
'', '', 'skipNotifications');
@@ -1434,7 +1440,7 @@ function skipNotifications () {
}
// Set cycle 0
- $('#txtScanCycle').val ('0 min');
+ $('#txtScanCycle').val ('no');
activateSaveRestoreData();
}
@@ -1552,4 +1558,9 @@ function setTextValue (textElement, textValue) {
activateSaveRestoreData ();
}
+function addNewDrpItem(textElement)
+{
+ showModalDefault("Add new item","Enter new item:
","Cancel","OK", "alert");
+}
+
diff --git a/front/php/templates/header.php b/front/php/templates/header.php
index bec70142..df018275 100755
--- a/front/php/templates/header.php
+++ b/front/php/templates/header.php
@@ -237,23 +237,6 @@ if ($ENABLED_DARKMODE === True) {
-
diff --git a/front/php/templates/language/de_de.php b/front/php/templates/language/de_de.php
index 089649f2..6ec296de 100755
--- a/front/php/templates/language/de_de.php
+++ b/front/php/templates/language/de_de.php
@@ -183,8 +183,8 @@ $lang['de_de'] = array(
'DevDetail_EveandAl_NewDevice' => 'Neues Gerät',
'DevDetail_EveandAl_Archived' => 'Archivierung',
'DevDetail_EveandAl_RandomMAC' => 'Zufällige MAC',
-'DevDetail_EveandAl_ScanCycle_a' => 'Gerät scannen (1 min)',
-'DevDetail_EveandAl_ScanCycle_z' => 'Gerät nicht scannen (0 min)',
+'DevDetail_EveandAl_ScanCycle_a' => 'Gerät scannen',
+'DevDetail_EveandAl_ScanCycle_z' => 'Gerät nicht scannen',
'DevDetail_button_Delete' => 'Lösche Gerät',
'DevDetail_button_Reset' => 'Verwerfen',
'DevDetail_button_Save' => 'Speichern',
diff --git a/front/php/templates/language/en_us.php b/front/php/templates/language/en_us.php
index f5d540e5..a7bc685e 100755
--- a/front/php/templates/language/en_us.php
+++ b/front/php/templates/language/en_us.php
@@ -172,15 +172,15 @@ $lang['en_us'] = array(
'DevDetail_SessionInfo_LastIP' => 'Last IP',
'DevDetail_SessionInfo_StaticIP' => 'Static IP',
'DevDetail_EveandAl_Title' => 'Events & Alerts config',
-'DevDetail_EveandAl_ScanCycle' => 'Scan Cycle',
+'DevDetail_EveandAl_ScanCycle' => 'Scan device',
'DevDetail_EveandAl_AlertAllEvents' => 'Alert All Events',
'DevDetail_EveandAl_AlertDown' => 'Alert Down',
'DevDetail_EveandAl_Skip' => 'Skip repeated notifications during',
'DevDetail_EveandAl_NewDevice' => 'New Device',
'DevDetail_EveandAl_Archived' => 'Archived',
'DevDetail_EveandAl_RandomMAC' => 'Random MAC',
-'DevDetail_EveandAl_ScanCycle_a' => 'Scan Device (1 min)',
-'DevDetail_EveandAl_ScanCycle_z' => 'Don't Scan Device (0 min)',
+'DevDetail_EveandAl_ScanCycle_a' => 'Scan Device',
+'DevDetail_EveandAl_ScanCycle_z' => 'Don't Scan Device',
'DevDetail_button_Delete' => 'Delete Device',
'DevDetail_button_DeleteEvents' => 'Delete Events',
'DevDetail_button_DeleteEvents_Warning' => 'Are you sure you want to delete all Events of this device?
(this will clear the
Events history and the
Sessions and might help with constant (persistent) notifications)',
diff --git a/front/php/templates/language/es_es.php b/front/php/templates/language/es_es.php
index 9da2d98a..9e7131a8 100755
--- a/front/php/templates/language/es_es.php
+++ b/front/php/templates/language/es_es.php
@@ -179,8 +179,8 @@ $lang['es_es'] = array(
'DevDetail_EveandAl_NewDevice' => 'Nuevo dispositivo',
'DevDetail_EveandAl_Archived' => 'Archivada',
'DevDetail_EveandAl_RandomMAC' => 'MAC al azar',
-'DevDetail_EveandAl_ScanCycle_a' => 'Escanear Dispositivo (1 min)',
-'DevDetail_EveandAl_ScanCycle_z' => 'No Escanear Dispositivo (0 min)',
+'DevDetail_EveandAl_ScanCycle_a' => 'Escanear Dispositivo',
+'DevDetail_EveandAl_ScanCycle_z' => 'No Escanear Dispositivo',
'DevDetail_button_Delete' => 'Eliminar dispositivo',
'DevDetail_button_Reset' => 'Restablecer cambios',
'DevDetail_button_Save' => 'Guardar',