mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-05-19 14:16:47 -04:00
BE: Less verbose SYNC plugin #1164
This commit is contained in:
@@ -30,6 +30,7 @@ REPORT_DASHBOARD_URL='update_REPORT_DASHBOARD_URL_setting'
|
||||
INTRNT_RUN='schedule'
|
||||
ARPSCAN_RUN='schedule'
|
||||
NSLOOKUP_RUN='before_name_updates'
|
||||
DIGSCAN_RUN='before_name_updates'
|
||||
AVAHISCAN_RUN='before_name_updates'
|
||||
NBTSCAN_RUN='before_name_updates'
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
{ "elementType": "select", "elementOptions": [], "transformers": [] }
|
||||
]
|
||||
},
|
||||
"default_value": "before_name_updates",
|
||||
"default_value": "disabled",
|
||||
"options": [
|
||||
"disabled",
|
||||
"before_name_updates",
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import os
|
||||
import base64
|
||||
from flask import jsonify, request
|
||||
from logger import mylog
|
||||
from logger import mylog, Logger
|
||||
from helper import get_setting_value
|
||||
from utils.datetime_utils import timeNowUTC
|
||||
from messaging.in_app import write_notification
|
||||
|
||||
INSTALL_PATH = os.getenv("NETALERTX_APP", "/app")
|
||||
|
||||
# Make sure log level is initialized correctly
|
||||
lggr = Logger(get_setting_value('LOG_LEVEL'))
|
||||
|
||||
def handle_sync_get():
|
||||
"""Handle GET requests for SYNC (NODE → HUB)."""
|
||||
@@ -28,7 +30,11 @@ def handle_sync_get():
|
||||
|
||||
response_data = base64.b64encode(raw_data).decode("utf-8")
|
||||
|
||||
write_notification("[Plugin: SYNC] Data sent", "info", timeNowUTC())
|
||||
message = "[Plugin: SYNC] Data sent"
|
||||
mylog('verbose', [message])
|
||||
if lggr.isAbove('verbose'):
|
||||
write_notification(message, 'info', timeNowUTC())
|
||||
|
||||
return jsonify({
|
||||
"node_name": get_setting_value("SYNC_node_name"),
|
||||
"status": 200,
|
||||
|
||||
@@ -488,7 +488,7 @@ def importConfigs(pm, db, all_plugins):
|
||||
# Plugins START
|
||||
# -----------------
|
||||
|
||||
# necessary_plugins = ['UI', 'CUSTPROP', 'CLOUD' ,'DBCLNP', 'INTRNT','MAINT','NEWDEV', 'SETPWD', 'SYNC', 'VNDRPDT', 'WORKFLOWS']
|
||||
# necessary_plugins = ['UI', 'CUSTPROP', 'HEARTBEAT' ,'DBCLNP', 'INTRNT','MAINT','NEWDEV', 'SETPWD', 'SYNC', 'VNDRPDT', 'WORKFLOWS']
|
||||
necessary_plugins = [
|
||||
"UI",
|
||||
"CUSTPROP",
|
||||
|
||||
Reference in New Issue
Block a user