mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
This commit is contained in:
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "",
|
"UI_PRESENCE_name": "",
|
||||||
"UI_REFRESH_description": "",
|
"UI_REFRESH_description": "",
|
||||||
"UI_REFRESH_name": "",
|
"UI_REFRESH_name": "",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "",
|
"devices_old": "",
|
||||||
"general_event_description": "",
|
"general_event_description": "",
|
||||||
"general_event_title": "",
|
"general_event_title": "",
|
||||||
|
|||||||
@@ -723,6 +723,8 @@
|
|||||||
"UI_PRESENCE_name": "Anzeige im Präsenzdiagramm",
|
"UI_PRESENCE_name": "Anzeige im Präsenzdiagramm",
|
||||||
"UI_REFRESH_description": "",
|
"UI_REFRESH_description": "",
|
||||||
"UI_REFRESH_name": "Automatisch Aktualisieren",
|
"UI_REFRESH_name": "Automatisch Aktualisieren",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"WEBHOOK_PAYLOAD_description": "The Webhook payload data format for the <code>body</code> > <code>attachments</code> > <code>text</code> attribute in the payload json. See an example of the payload <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json\">here</a>. (e.g.: for discord use <code>text</code>)",
|
"WEBHOOK_PAYLOAD_description": "The Webhook payload data format for the <code>body</code> > <code>attachments</code> > <code>text</code> attribute in the payload json. See an example of the payload <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json\">here</a>. (e.g.: for discord use <code>text</code>)",
|
||||||
"WEBHOOK_PAYLOAD_name": "Payload type",
|
"WEBHOOK_PAYLOAD_name": "Payload type",
|
||||||
"WEBHOOK_REQUEST_METHOD_description": "The HTTP request method to be used for the webhook call.",
|
"WEBHOOK_REQUEST_METHOD_description": "The HTTP request method to be used for the webhook call.",
|
||||||
|
|||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "Show in presence chart",
|
"UI_PRESENCE_name": "Show in presence chart",
|
||||||
"UI_REFRESH_description": "Enter number of seconds after which the UI reloads. Set to <code>0</code> to disable.",
|
"UI_REFRESH_description": "Enter number of seconds after which the UI reloads. Set to <code>0</code> to disable.",
|
||||||
"UI_REFRESH_name": "Auto-refresh UI",
|
"UI_REFRESH_name": "Auto-refresh UI",
|
||||||
|
"VERSION_description": "Version timestamp helper value to check if app was upgarded.",
|
||||||
|
"VERSION_name": "Version timestamp",
|
||||||
"devices_old": "Refreshing...",
|
"devices_old": "Refreshing...",
|
||||||
"general_event_description": "The event you have triggered might take a while until background processes finish. The execution ended once the below execution queue empties (Check the <a href='/maintenance.php#tab_Logging'>error log</a> if you encounter issues). <br/> <br/> Execution queue:",
|
"general_event_description": "The event you have triggered might take a while until background processes finish. The execution ended once the below execution queue empties (Check the <a href='/maintenance.php#tab_Logging'>error log</a> if you encounter issues). <br/> <br/> Execution queue:",
|
||||||
"general_event_title": "Executing an ad-hoc event",
|
"general_event_title": "Executing an ad-hoc event",
|
||||||
|
|||||||
@@ -723,6 +723,8 @@
|
|||||||
"UI_PRESENCE_name": "Mostrar en el gráfico de presencia",
|
"UI_PRESENCE_name": "Mostrar en el gráfico de presencia",
|
||||||
"UI_REFRESH_description": "Ingrese el número de segundos después de los cuales se recarga la interfaz de usuario. Ajustado a <code> 0 </code> para desactivar.",
|
"UI_REFRESH_description": "Ingrese el número de segundos después de los cuales se recarga la interfaz de usuario. Ajustado a <code> 0 </code> para desactivar.",
|
||||||
"UI_REFRESH_name": "Actualización automática de la interfaz de usuario",
|
"UI_REFRESH_name": "Actualización automática de la interfaz de usuario",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"WEBHOOK_PAYLOAD_description": "El formato de datos de carga de Webhook para el atributo <code>body</code> > <code>attachments</code> > <code>text</code> en el json de carga. Vea un ejemplo de la carga <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json\">aquí</a>. (por ejemplo: para discord use <code>text</code>)",
|
"WEBHOOK_PAYLOAD_description": "El formato de datos de carga de Webhook para el atributo <code>body</code> > <code>attachments</code> > <code>text</code> en el json de carga. Vea un ejemplo de la carga <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/blob/main/front/report_templates/webhook_json_sample.json\">aquí</a>. (por ejemplo: para discord use <code>text</code>)",
|
||||||
"WEBHOOK_PAYLOAD_name": "Tipo de carga",
|
"WEBHOOK_PAYLOAD_name": "Tipo de carga",
|
||||||
"WEBHOOK_REQUEST_METHOD_description": "El método de solicitud HTTP que se utilizará para la llamada de webhook.",
|
"WEBHOOK_REQUEST_METHOD_description": "El método de solicitud HTTP que se utilizará para la llamada de webhook.",
|
||||||
@@ -770,4 +772,4 @@
|
|||||||
"settings_update_item_warning": "Actualice el valor a continuación. Tenga cuidado de seguir el formato anterior. <b>O la validación no se realiza.</b>",
|
"settings_update_item_warning": "Actualice el valor a continuación. Tenga cuidado de seguir el formato anterior. <b>O la validación no se realiza.</b>",
|
||||||
"test_event_icon": "fa-vial-circle-check",
|
"test_event_icon": "fa-vial-circle-check",
|
||||||
"test_event_tooltip": "Guarda tus cambios antes de probar nuevos ajustes."
|
"test_event_tooltip": "Guarda tus cambios antes de probar nuevos ajustes."
|
||||||
}
|
}
|
||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "Afficher dans le graphique de présence",
|
"UI_PRESENCE_name": "Afficher dans le graphique de présence",
|
||||||
"UI_REFRESH_description": "Renseignez le nombre de secondes après lequel rafraîchir l'interface graphique. Renseignez <code>0</code> pour désactiver.",
|
"UI_REFRESH_description": "Renseignez le nombre de secondes après lequel rafraîchir l'interface graphique. Renseignez <code>0</code> pour désactiver.",
|
||||||
"UI_REFRESH_name": "Rafraîchir automatiquement l'interface graphique",
|
"UI_REFRESH_name": "Rafraîchir automatiquement l'interface graphique",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "Rafraichissement...",
|
"devices_old": "Rafraichissement...",
|
||||||
"general_event_description": "L'événement que vous avez lancé peut prendre du temps avant que les tâches de fond ne soit terminées. La durée d'exécution finira une fois que la file d'exécution ci-dessous sera vide (consulter les <a href='/maintenance.php#tab_Logging'>journaux d'erreur</a> si vous rencontrez des erreurs). <br/> <br/> File d'exécution :",
|
"general_event_description": "L'événement que vous avez lancé peut prendre du temps avant que les tâches de fond ne soit terminées. La durée d'exécution finira une fois que la file d'exécution ci-dessous sera vide (consulter les <a href='/maintenance.php#tab_Logging'>journaux d'erreur</a> si vous rencontrez des erreurs). <br/> <br/> File d'exécution :",
|
||||||
"general_event_title": "Lancement d'un événement sur mesure",
|
"general_event_title": "Lancement d'un événement sur mesure",
|
||||||
@@ -690,4 +692,4 @@
|
|||||||
"settings_update_item_warning": "Mettre à jour la valeur ci-dessous. Veillez à bien suivre le même format qu'auparavant. <b>Il n'y a pas de pas de contrôle.</b>",
|
"settings_update_item_warning": "Mettre à jour la valeur ci-dessous. Veillez à bien suivre le même format qu'auparavant. <b>Il n'y a pas de pas de contrôle.</b>",
|
||||||
"test_event_icon": "fa-vial-circle-check",
|
"test_event_icon": "fa-vial-circle-check",
|
||||||
"test_event_tooltip": "Enregistrer d'abord vos modifications avant de tester vôtre paramétrage."
|
"test_event_tooltip": "Enregistrer d'abord vos modifications avant de tester vôtre paramétrage."
|
||||||
}
|
}
|
||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "Mostra nel grafico delle presenze",
|
"UI_PRESENCE_name": "Mostra nel grafico delle presenze",
|
||||||
"UI_REFRESH_description": "Inserisci il numero di secondi dopo il quale la UI si ricarica. Imposta a <code>0</code> per disabilitare.",
|
"UI_REFRESH_description": "Inserisci il numero di secondi dopo il quale la UI si ricarica. Imposta a <code>0</code> per disabilitare.",
|
||||||
"UI_REFRESH_name": "Aggiorna automaticamente la UI",
|
"UI_REFRESH_name": "Aggiorna automaticamente la UI",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "Aggiornamento...",
|
"devices_old": "Aggiornamento...",
|
||||||
"general_event_description": "L'evento che hai attivato potrebbe richiedere del tempo prima che i processi in background vengano completati. L'esecuzione è terminata una volta che la coda di esecuzione sottostante si è svuotata (controlla il <a href='/maintenance.php#tab_Logging'>log degli errori</a> se riscontri problemi). <br/> <br/> Coda di esecuzione:",
|
"general_event_description": "L'evento che hai attivato potrebbe richiedere del tempo prima che i processi in background vengano completati. L'esecuzione è terminata una volta che la coda di esecuzione sottostante si è svuotata (controlla il <a href='/maintenance.php#tab_Logging'>log degli errori</a> se riscontri problemi). <br/> <br/> Coda di esecuzione:",
|
||||||
"general_event_title": "Esecuzione di un evento ad-hoc",
|
"general_event_title": "Esecuzione di un evento ad-hoc",
|
||||||
|
|||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "Vis i tilstedeværelse-diagrammet",
|
"UI_PRESENCE_name": "Vis i tilstedeværelse-diagrammet",
|
||||||
"UI_REFRESH_description": "Skriv inn antall sekunder før UI laster inn på nytt. Sett til <code>0</code> for å deaktivere.",
|
"UI_REFRESH_description": "Skriv inn antall sekunder før UI laster inn på nytt. Sett til <code>0</code> for å deaktivere.",
|
||||||
"UI_REFRESH_name": "Oppdater UI automatisk",
|
"UI_REFRESH_name": "Oppdater UI automatisk",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "Oppdaterer...",
|
"devices_old": "Oppdaterer...",
|
||||||
"general_event_description": "Hendelsen du har utløst kan ta en stund til før bakgrunnsprosesser er ferdig. Utførelsen ble avsluttet når utførelseskøen nedenfor tømmes (sjekk <a href='/maintenance.php#tab_Logging'>Feillogg</a> Hvis du møter problemer). <br/> <br/> Utførelseskø:",
|
"general_event_description": "Hendelsen du har utløst kan ta en stund til før bakgrunnsprosesser er ferdig. Utførelsen ble avsluttet når utførelseskøen nedenfor tømmes (sjekk <a href='/maintenance.php#tab_Logging'>Feillogg</a> Hvis du møter problemer). <br/> <br/> Utførelseskø:",
|
||||||
"general_event_title": "Utfører en ad-hoc hendelse",
|
"general_event_title": "Utfører en ad-hoc hendelse",
|
||||||
|
|||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "Pokaż w tabeli obecności",
|
"UI_PRESENCE_name": "Pokaż w tabeli obecności",
|
||||||
"UI_REFRESH_description": "Wprowadź liczbę sekund po której UI ma się przeładować. Ustaw na <code>0</code> by wyłączyć.",
|
"UI_REFRESH_description": "Wprowadź liczbę sekund po której UI ma się przeładować. Ustaw na <code>0</code> by wyłączyć.",
|
||||||
"UI_REFRESH_name": "Automatycznie odświeżaj UI",
|
"UI_REFRESH_name": "Automatycznie odświeżaj UI",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "Odświeżanie...",
|
"devices_old": "Odświeżanie...",
|
||||||
"general_event_description": "Wydarzenie które wyzwoliłeś może chwilę zająć dopóki procesy w tle nie zakończą się. Wykonanie zakończy się kiedy kolejka się opróżni (Sprawdź <a href='/maintenance.php#tab_Logging'>logi błędów</a> jeżeli napotkasz błędy).<br/><br/> Kolejka wykonywania:",
|
"general_event_description": "Wydarzenie które wyzwoliłeś może chwilę zająć dopóki procesy w tle nie zakończą się. Wykonanie zakończy się kiedy kolejka się opróżni (Sprawdź <a href='/maintenance.php#tab_Logging'>logi błędów</a> jeżeli napotkasz błędy).<br/><br/> Kolejka wykonywania:",
|
||||||
"general_event_title": "Wykonywanie wydarzeń ad-hoc",
|
"general_event_title": "Wykonywanie wydarzeń ad-hoc",
|
||||||
|
|||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "",
|
"UI_PRESENCE_name": "",
|
||||||
"UI_REFRESH_description": "",
|
"UI_REFRESH_description": "",
|
||||||
"UI_REFRESH_name": "",
|
"UI_REFRESH_name": "",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "",
|
"devices_old": "",
|
||||||
"general_event_description": "",
|
"general_event_description": "",
|
||||||
"general_event_title": "",
|
"general_event_title": "",
|
||||||
|
|||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "Показать в диаграмме присутствия",
|
"UI_PRESENCE_name": "Показать в диаграмме присутствия",
|
||||||
"UI_REFRESH_description": "Введите количество секунд, по истечении которых пользовательский интерфейс перезагружается. Установите значение <code>0</code>, чтобы отключить.",
|
"UI_REFRESH_description": "Введите количество секунд, по истечении которых пользовательский интерфейс перезагружается. Установите значение <code>0</code>, чтобы отключить.",
|
||||||
"UI_REFRESH_name": "Автоматическое обновление интерфейса",
|
"UI_REFRESH_name": "Автоматическое обновление интерфейса",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "Актуализируется...",
|
"devices_old": "Актуализируется...",
|
||||||
"general_event_description": "Событие, которое вы инициировали, может занять некоторое время, прежде чем фоновые процессы завершатся. Выполнение завершится, как только очередь выполнения, указанная ниже, опустеет (Проверьте <a href='/maintenance.php#tab_Logging'>журнал ошибок</a> при возникновении проблем). <br/> <br/>· · Очередь выполнения:",
|
"general_event_description": "Событие, которое вы инициировали, может занять некоторое время, прежде чем фоновые процессы завершатся. Выполнение завершится, как только очередь выполнения, указанная ниже, опустеет (Проверьте <a href='/maintenance.php#tab_Logging'>журнал ошибок</a> при возникновении проблем). <br/> <br/>· · Очередь выполнения:",
|
||||||
"general_event_title": "Выполнение специального события",
|
"general_event_title": "Выполнение специального события",
|
||||||
@@ -690,4 +692,4 @@
|
|||||||
"settings_update_item_warning": "Обновить значение ниже. Будьте осторожны, следуя предыдущему формату. <b>Проверка не выполняется.</b>",
|
"settings_update_item_warning": "Обновить значение ниже. Будьте осторожны, следуя предыдущему формату. <b>Проверка не выполняется.</b>",
|
||||||
"test_event_icon": "fa-vial-circle-check",
|
"test_event_icon": "fa-vial-circle-check",
|
||||||
"test_event_tooltip": "Сначала сохраните изменения, прежде чем проверять настройки."
|
"test_event_tooltip": "Сначала сохраните изменения, прежде чем проверять настройки."
|
||||||
}
|
}
|
||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "",
|
"UI_PRESENCE_name": "",
|
||||||
"UI_REFRESH_description": "",
|
"UI_REFRESH_description": "",
|
||||||
"UI_REFRESH_name": "",
|
"UI_REFRESH_name": "",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "Yenileniyor...",
|
"devices_old": "Yenileniyor...",
|
||||||
"general_event_description": "",
|
"general_event_description": "",
|
||||||
"general_event_title": "",
|
"general_event_title": "",
|
||||||
|
|||||||
@@ -654,6 +654,8 @@
|
|||||||
"UI_PRESENCE_name": "在存在图表中显示",
|
"UI_PRESENCE_name": "在存在图表中显示",
|
||||||
"UI_REFRESH_description": "输入界面重新加载的秒数。设置为 <code>0</code> 可禁用。",
|
"UI_REFRESH_description": "输入界面重新加载的秒数。设置为 <code>0</code> 可禁用。",
|
||||||
"UI_REFRESH_name": "自动刷新界面",
|
"UI_REFRESH_name": "自动刷新界面",
|
||||||
|
"VERSION_description": "",
|
||||||
|
"VERSION_name": "",
|
||||||
"devices_old": "刷新中...",
|
"devices_old": "刷新中...",
|
||||||
"general_event_description": "您触发的事件可能需要一段时间才能完成后台进程。一旦以下执行队列清空,执行就会结束(如果遇到问题,请检查<a href='/maintenance.php#tab_Logging'>错误日志</a>)。<br/> <br/> 执行队列:",
|
"general_event_description": "您触发的事件可能需要一段时间才能完成后台进程。一旦以下执行队列清空,执行就会结束(如果遇到问题,请检查<a href='/maintenance.php#tab_Logging'>错误日志</a>)。<br/> <br/> 执行队列:",
|
||||||
"general_event_title": "执行自组织网络事件",
|
"general_event_title": "执行自组织网络事件",
|
||||||
@@ -690,4 +692,4 @@
|
|||||||
"settings_update_item_warning": "更新下面的值。请注意遵循先前的格式。<b>未执行验证。</b>",
|
"settings_update_item_warning": "更新下面的值。请注意遵循先前的格式。<b>未执行验证。</b>",
|
||||||
"test_event_icon": "",
|
"test_event_icon": "",
|
||||||
"test_event_tooltip": "在测试设置之前,请先保存更改。"
|
"test_event_tooltip": "在测试设置之前,请先保存更改。"
|
||||||
}
|
}
|
||||||
@@ -11,13 +11,14 @@ import re
|
|||||||
|
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
from const import fullConfPath
|
from const import fullConfPath, applicationPath
|
||||||
from helper import collect_lang_strings, updateSubnets, initOrSetParam, isJsonObject, updateState, setting_value_to_python_type
|
from helper import collect_lang_strings, updateSubnets, initOrSetParam, isJsonObject, updateState, setting_value_to_python_type, timeNowTZ
|
||||||
from logger import mylog
|
from logger import mylog
|
||||||
from api import update_api
|
from api import update_api
|
||||||
from scheduler import schedule_class
|
from scheduler import schedule_class
|
||||||
from plugin import print_plugin_info, run_plugin_scripts
|
from plugin import print_plugin_info, run_plugin_scripts
|
||||||
from plugin_utils import get_plugins_configs, get_plugin_setting_obj
|
from plugin_utils import get_plugins_configs, get_plugin_setting_obj
|
||||||
|
from notification import write_notification
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Initialise user defined values
|
# Initialise user defined values
|
||||||
@@ -140,6 +141,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.VERSION = ccd('VERSION', '' , c_d, 'Version', '{"dataType":"string", "elements": [{"elementType" : "input", "elementOptions" : [{ "readonly": "true" }] ,"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')
|
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
|
||||||
@@ -285,8 +287,7 @@ def importConfigs (db, all_plugins):
|
|||||||
for plugin in all_plugins:
|
for plugin in all_plugins:
|
||||||
pref = plugin["unique_prefix"]
|
pref = plugin["unique_prefix"]
|
||||||
loaded_plugins_prefixes.append(pref)
|
loaded_plugins_prefixes.append(pref)
|
||||||
|
|
||||||
|
|
||||||
# save the newly discovered plugins as options and default values
|
# save the newly discovered plugins as options and default values
|
||||||
conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', loaded_plugins_prefixes , c_d, 'Loaded plugins', '{"dataType":"array", "elements": [{"elementType" : "select", "elementOptions" : [{"multiple":"true"}] ,"transformers": []}]}', str(sorted(all_plugins_prefixes)), 'General')
|
conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', loaded_plugins_prefixes , c_d, 'Loaded plugins', '{"dataType":"array", "elements": [{"elementType" : "select", "elementOptions" : [{"multiple":"true"}] ,"transformers": []}]}', str(sorted(all_plugins_prefixes)), 'General')
|
||||||
|
|
||||||
@@ -297,6 +298,15 @@ def importConfigs (db, all_plugins):
|
|||||||
# -----------------
|
# -----------------
|
||||||
# Plugins END
|
# Plugins END
|
||||||
|
|
||||||
|
# manage upgrade
|
||||||
|
with open(applicationPath + '/front/buildtimestamp.txt', 'r') as f:
|
||||||
|
buildTimestamp = int(f.read().strip())
|
||||||
|
|
||||||
|
if conf.VERSION != buildTimestamp:
|
||||||
|
conf.VERSION = ccd('VERSION', buildTimestamp , c_d, 'Version', '{"dataType":"string", "elements": [{"elementType" : "input", "elementOptions" : [{ "readonly": "true" }] ,"transformers": []}]}', '', 'General')
|
||||||
|
|
||||||
|
write_notification(f'[Upgrade] : App upgarded, please clear cache.', 'interrupt', timeNowTZ())
|
||||||
|
|
||||||
|
|
||||||
# Insert settings into the DB
|
# Insert settings into the DB
|
||||||
sql.execute ("DELETE FROM Settings")
|
sql.execute ("DELETE FROM Settings")
|
||||||
|
|||||||
Reference in New Issue
Block a user