mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Small fixes
This commit is contained in:
@@ -11,7 +11,7 @@ There are 3 artifacts that can be used to backup the application:
|
|||||||
| `/config/app.conf` | Configuration file | Doesn't contain settings from the Maintenance section |
|
| `/config/app.conf` | Configuration file | Doesn't contain settings from the Maintenance section |
|
||||||
| `/config/devices.csv` | CSV file containing device information | Doesn't contain historical data |
|
| `/config/devices.csv` | CSV file containing device information | Doesn't contain historical data |
|
||||||
|
|
||||||
## Data and cackup storage
|
## Data and backup storage
|
||||||
|
|
||||||
To decide on a backup strategy, check where the data is stored:
|
To decide on a backup strategy, check where the data is stored:
|
||||||
|
|
||||||
|
|||||||
@@ -1390,7 +1390,7 @@ input[readonly] {
|
|||||||
|
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
z-index: 99;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pa_spinner {
|
.pa_spinner {
|
||||||
@@ -1403,7 +1403,7 @@ input[readonly] {
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
z-index: 100;
|
z-index: 1001;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loadingSpinner
|
#loadingSpinner
|
||||||
|
|||||||
@@ -399,6 +399,7 @@ function handle_locked_DB(data)
|
|||||||
showSpinner()
|
showSpinner()
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
console.warn("Database locked - reload")
|
||||||
location.reload();
|
location.reload();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
@@ -1153,8 +1154,9 @@ function clearCache() {
|
|||||||
sessionStorage.clear();
|
sessionStorage.clear();
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.reload();
|
console.warn("clearChache called");
|
||||||
}, 500);
|
window.location.reload();
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@@ -1291,6 +1293,7 @@ setTimeout(() => {
|
|||||||
// page refresh if configured
|
// page refresh if configured
|
||||||
const refreshTime = getSetting("UI_REFRESH");
|
const refreshTime = getSetting("UI_REFRESH");
|
||||||
if (refreshTime && refreshTime !== "0" && refreshTime !== "") {
|
if (refreshTime && refreshTime !== "0" && refreshTime !== "") {
|
||||||
|
console.log("Refreshing page becasue UI_REFRESH setting enabled.");
|
||||||
newTimerRefreshData(clearCache, parseInt(refreshTime)*1000);
|
newTimerRefreshData(clearCache, parseInt(refreshTime)*1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -460,7 +460,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
|
|||||||
|
|
||||||
// INPUT
|
// INPUT
|
||||||
|
|
||||||
console.log(codeName);
|
// console.log(codeName);
|
||||||
|
|
||||||
// Parse the setType JSON string into an object
|
// Parse the setType JSON string into an object
|
||||||
let inputHtml = '';
|
let inputHtml = '';
|
||||||
@@ -795,6 +795,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
console.log("isAppInitialized() returned false, reloading in 3s");
|
||||||
// reload the page if not initialized to give time the background tasks to finish
|
// reload the page if not initialized to give time the background tasks to finish
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ def importConfigs (db, all_plugins):
|
|||||||
conf.DAYS_TO_KEEP_EVENTS = ccd('DAYS_TO_KEEP_EVENTS', 90 , c_d, 'Delete events days', '{"dataType":"integer", "elements": [{"elementType" : "input", "elementOptions" : [{"type": "number"}] ,"transformers": []}]}', '[]', 'General')
|
conf.DAYS_TO_KEEP_EVENTS = ccd('DAYS_TO_KEEP_EVENTS', 90 , c_d, 'Delete events days', '{"dataType":"integer", "elements": [{"elementType" : "input", "elementOptions" : [{"type": "number"}] ,"transformers": []}]}', '[]', 'General')
|
||||||
conf.HRS_TO_KEEP_NEWDEV = ccd('HRS_TO_KEEP_NEWDEV', 0 , c_d, 'Keep new devices for', '{"dataType":"integer", "elements": [{"elementType" : "input", "elementOptions" : [{"type": "number"}] ,"transformers": []}]}', "[]", 'General')
|
conf.HRS_TO_KEEP_NEWDEV = ccd('HRS_TO_KEEP_NEWDEV', 0 , c_d, 'Keep new devices for', '{"dataType":"integer", "elements": [{"elementType" : "input", "elementOptions" : [{"type": "number"}] ,"transformers": []}]}', "[]", 'General')
|
||||||
conf.API_CUSTOM_SQL = ccd('API_CUSTOM_SQL', 'SELECT * FROM Devices WHERE dev_PresentLastScan = 0' , c_d, 'Custom endpoint', '{"dataType":"string", "elements": [{"elementType" : "input", "elementOptions" : [] ,"transformers": []}]}', '[]', 'General')
|
conf.API_CUSTOM_SQL = ccd('API_CUSTOM_SQL', 'SELECT * FROM Devices WHERE dev_PresentLastScan = 0' , c_d, 'Custom endpoint', '{"dataType":"string", "elements": [{"elementType" : "input", "elementOptions" : [] ,"transformers": []}]}', '[]', 'General')
|
||||||
conf.NETWORK_DEVICE_TYPES = ccd('NETWORK_DEVICE_TYPES', ['AP', 'Gateway', 'Firewall', 'Hypervisor', 'Powerline', 'Switch', 'WLAN', 'PLC', 'Router','USB LAN Adapter', 'USB WIFI Adapter', 'Internet'] , c_d, 'Network device types', '{"dataType":"array","elements":[{"elementType":"input","elementOptions":[{"placeholder":"Entervalue"},{"suffix":"_in"},{"cssClasses":"col-sm-10"},{"prefillValue":"null"}],"transformers":[]},{"elementType":"button","elementOptions":[{"sourceSuffixes":["_in"]},{"separator":""},{"cssClasses":"col-xs-12"},{"onClick":"addList(this,false)"},{"getStringKey":"Gen_Add"}],"transformers":[]},{"elementType":"select", "elementHasInputValue":1,"elementOptions":[{"multiple":"true"},{"readonly":"true"},{"editable":"true"}],"transformers":[]},{"elementType":"button","elementOptions":[{"sourceSuffixes":[]},{"separator":""},{"cssClasses":"col-xs-6"},{"onClick":"removeAllOptions(this)"},{"getStringKey":"Gen_Remove_All"}],"transformers":[]},{"elementType":"button","elementOptions":[{"sourceSuffixes":[]},{"separator":""},{"cssClasses":"col-xs-6"},{"onClick":"removeFromList(this)"},{"getStringKey":"Gen_Remove_Last"}],"transformers":[]}]}', '[]', 'General')
|
conf.NETWORK_DEVICE_TYPES = ccd('NETWORK_DEVICE_TYPES', ['AP', 'Gateway', 'Firewall', 'Hypervisor', 'Powerline', 'Switch', 'WLAN', 'PLC', 'Router','USB LAN Adapter', 'USB WIFI Adapter', 'Internet'] , c_d, 'Network device types', '{"dataType":"array","elements":[{"elementType":"input","elementOptions":[{"placeholder":"Enter value"},{"suffix":"_in"},{"cssClasses":"col-sm-10"},{"prefillValue":"null"}],"transformers":[]},{"elementType":"button","elementOptions":[{"sourceSuffixes":["_in"]},{"separator":""},{"cssClasses":"col-xs-12"},{"onClick":"addList(this,false)"},{"getStringKey":"Gen_Add"}],"transformers":[]},{"elementType":"select", "elementHasInputValue":1,"elementOptions":[{"multiple":"true"},{"readonly":"true"},{"editable":"true"}],"transformers":[]},{"elementType":"button","elementOptions":[{"sourceSuffixes":[]},{"separator":""},{"cssClasses":"col-xs-6"},{"onClick":"removeAllOptions(this)"},{"getStringKey":"Gen_Remove_All"}],"transformers":[]},{"elementType":"button","elementOptions":[{"sourceSuffixes":[]},{"separator":""},{"cssClasses":"col-xs-6"},{"onClick":"removeFromList(this)"},{"getStringKey":"Gen_Remove_Last"}],"transformers":[]}]}', '[]', 'General')
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
conf.UI_LANG = ccd('UI_LANG', 'English' , c_d, 'Language Interface', '{"dataType":"string", "elements": [{"elementType" : "select", "elementOptions" : [] ,"transformers": []}]}', "['English', 'French', 'German', 'Norwegian', 'Russian', 'Spanish', 'Italian (it_it)', 'Portuguese (pt_br)', 'Polish (pl_pl)', 'Turkish (tr_tr)', 'Chinese (zh_cn)', 'Czech (cs_cz)' ]", 'UI')
|
conf.UI_LANG = ccd('UI_LANG', 'English' , c_d, 'Language Interface', '{"dataType":"string", "elements": [{"elementType" : "select", "elementOptions" : [] ,"transformers": []}]}', "['English', 'French', 'German', 'Norwegian', 'Russian', 'Spanish', 'Italian (it_it)', 'Portuguese (pt_br)', 'Polish (pl_pl)', 'Turkish (tr_tr)', 'Chinese (zh_cn)', 'Czech (cs_cz)' ]", 'UI')
|
||||||
|
|||||||
Reference in New Issue
Block a user