CSS icon button fix #629 & DB fucntion test
This commit is contained in:
@@ -942,6 +942,11 @@ input[readonly] {
|
||||
height: 1.5em !important;
|
||||
}
|
||||
|
||||
#modal-input-textarea
|
||||
{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/* NETWORK page */
|
||||
|
||||
@@ -1652,7 +1652,7 @@ function askAddIcon () {
|
||||
}
|
||||
|
||||
// Add new icon as base64 string
|
||||
showModalInput ('<?= lang('DevDetail_button_AddIcon');?>', '<?= lang('DevDetail_button_AddIcon_Help');?>',
|
||||
showModalInput ('<i class="fa fa-square-plus pointer"></i> <?= lang('DevDetail_button_AddIcon');?>', '<?= lang('DevDetail_button_AddIcon_Help');?>',
|
||||
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'addAsBase64');
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
"DevDetail_Vendor_hover": "Vendor should be auto-detected. You can overwrite or add your custom value.",
|
||||
"DevDetail_WOL_Title": "<i class=\"fa fa-power-off\"></i> Wake-on-LAN",
|
||||
"DevDetail_button_AddIcon": "Add new Icon",
|
||||
"DevDetail_button_AddIcon_Help": "Paste in an SVG html tag or Font Awesome icon. Read the <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/ICONS.md\" target=\"_blank\">Icons docs</a> for details.",
|
||||
"DevDetail_button_AddIcon_Help": "Paste in an SVG html tag or Font Awesome html tag icon. Read the <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/ICONS.md\" target=\"_blank\">Icons docs</a> for details.",
|
||||
"DevDetail_button_AddIcon_Tooltip": "Add a new Icon to this device that is not yet available in the dropdown.",
|
||||
"DevDetail_button_Delete": "Delete Device",
|
||||
"DevDetail_button_DeleteEvents": "Delete Events",
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Modal input -->
|
||||
<div class="modal fade" id="modal-input" style="display: none;">
|
||||
<div class="modal modal-warning fade" id="modal-input" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import base64
|
||||
from const import fullDbPath, sql_devices_stats, sql_devices_all
|
||||
|
||||
from logger import mylog
|
||||
from helper import json_obj, initOrSetParam, row_to_json, timeNowTZ #, updateState
|
||||
from helper import json_obj, initOrSetParam, row_to_json, timeNowTZ, split_string #, updateState
|
||||
from appevent import AppEvent_obj
|
||||
|
||||
|
||||
@@ -83,6 +83,12 @@ class DB():
|
||||
Check the current tables in the DB and upgrade them if neccessary
|
||||
"""
|
||||
|
||||
# Registering UDF (User Defined Functions)
|
||||
#
|
||||
resultUDF = self.sql_connection.create_function("split_string", 2, split_string) # Register the UDF
|
||||
mylog('none',f'[upgradeDB] resultUDF: {resultUDF}')
|
||||
|
||||
|
||||
# indicates, if Online_History table is available
|
||||
onlineHistoryAvailable = self.sql.execute("""
|
||||
SELECT name FROM sqlite_master WHERE type='table'
|
||||
|
||||
@@ -597,6 +597,13 @@ def cleanDeviceName(str, match_IP):
|
||||
# String manipulation methods
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Define the split_string function
|
||||
def split_string(input_str, delimiter):
|
||||
# remove any wrapping brackets
|
||||
input_str = input_str.replace('[','').replace(']','')
|
||||
return input_str.split(delimiter)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
def bytes_to_string(value):
|
||||
|
||||
Reference in New Issue
Block a user