From 97f7494c345c0f2c1e4cf14a9f69fb0a2b77e40d Mon Sep 17 00:00:00 2001 From: Jokob-sk Date: Sun, 12 Feb 2023 17:03:04 +1100 Subject: [PATCH] Plugin UI 0.1 --- back/pialert.py | 100 ++++++--- docker-compose.yml | 1 + docs/API.md | 2 + front/css/pialert.css | 7 + front/php/server/util.php | 2 +- front/php/templates/header.php | 4 + front/php/templates/language/en_us.php | 3 +- front/plugins.php | 34 +++ front/plugins/README.md | 250 +++++++++++++++------- front/plugins/website_monitor/config.json | 47 ++-- 10 files changed, 314 insertions(+), 136 deletions(-) create mode 100755 front/plugins.php diff --git a/back/pialert.py b/back/pialert.py index b4c4abac..88a25b89 100755 --- a/back/pialert.py +++ b/back/pialert.py @@ -51,6 +51,8 @@ sql_nmap_scan_all = "SELECT * FROM Nmap_Scan" sql_pholus_scan_all = "SELECT * FROM Pholus_Scan" sql_events_pending_alert = "SELECT * FROM Events where eve_PendingAlertEmail is not 0" sql_settings = "SELECT * FROM Settings" +sql_plugins_entries = "SELECT * FROM Plugins_Entries" +sql_plugins_unprocessed_entries = "SELECT * FROM Plugins_Unprocessed_Entries" sql_new_devices = """SELECT * FROM ( SELECT eve_IP as dev_LastIP, eve_MAC as dev_MAC FROM Events_Devices WHERE eve_PendingAlertEmail = 1 AND eve_EventType = 'New Device' @@ -295,7 +297,7 @@ def ccd(key, default, config, name, inputtype, options, group, events=[], desc = global mySettings if inputtype == 'text': - result = result.replace('\'', "_single_quote_") + result = result.replace('\'', "{s-quote}") mySettingsSQLsafe.append((key, name, desc, inputtype, options, regex, str(result), group, str(events))) mySettings.append((key, name, desc, inputtype, options, regex, result, group, str(events))) @@ -3130,7 +3132,7 @@ def upgradeDB (): """) # Plugin state - sql_Plugins_State = """ CREATE TABLE IF NOT EXISTS Plugins_State( + sql_Plugins_Entries = """ CREATE TABLE IF NOT EXISTS Plugins_Entries( "Index" INTEGER, Plugin TEXT NOT NULL, Object_PrimaryID TEXT NOT NULL, @@ -3143,10 +3145,10 @@ def upgradeDB (): Extra TEXT NOT NULL, PRIMARY KEY("Index" AUTOINCREMENT) ); """ - sql.execute(sql_Plugins_State) + sql.execute(sql_Plugins_Entries) # Plugin execution results - sql_Plugin_Events = """ CREATE TABLE IF NOT EXISTS Plugins_Events( + sql_Plugins_Unprocessed_Entries = """ CREATE TABLE IF NOT EXISTS Plugins_Unprocessed_Entries( "Index" INTEGER, Plugin TEXT NOT NULL, Object_PrimaryID TEXT NOT NULL, @@ -3156,22 +3158,23 @@ def upgradeDB (): Watched_Value2 TEXT NOT NULL, Watched_Value3 TEXT NOT NULL, Watched_Value4 TEXT NOT NULL, - Processed TEXT NOT NULL, + Processed TEXT NOT NULL, + Extra TEXT NOT NULL, PRIMARY KEY("Index" AUTOINCREMENT) ); """ - sql.execute(sql_Plugin_Events) + sql.execute(sql_Plugins_Unprocessed_Entries) # Dynamically generated language strings # indicates, if Language_Strings table is available languageStringsMissing = sql.execute(""" SELECT name FROM sqlite_master WHERE type='table' - AND name='Language_Strings'; + AND name='Plugins_Language_Strings'; """).fetchone() == None if languageStringsMissing == False: - sql.execute("DROP TABLE Language_Strings;") + sql.execute("DROP TABLE Plugins_Language_Strings;") - sql.execute(""" CREATE TABLE IF NOT EXISTS Language_Strings( + sql.execute(""" CREATE TABLE IF NOT EXISTS Plugins_Language_Strings( "Index" INTEGER, Language_Code TEXT NOT NULL, String_Key TEXT NOT NULL, @@ -3234,14 +3237,16 @@ def update_api(isNotification = False, updateOnlyDataSources = []): write_file(folder + 'notification_text.html' , mail_html) write_file(folder + 'notification_json_final.json' , json.dumps(json_final)) - # prepare databse tables we want to expose + # prepare databse tables we want to expose dataSourcesSQLs = [ ["devices", sql_devices_all], ["nmap_scan", sql_nmap_scan_all], ["pholus_scan", sql_pholus_scan_all], ["events_pending_alert", sql_events_pending_alert], ["settings", sql_settings], - ["custom_endpoint", API_CUSTOM_SQL] + ["plugins_unprocessed_entries", sql_plugins_unprocessed_entries], + ["plugins_entries", sql_plugins_entries], + ["custom_endpoint", API_CUSTOM_SQL], ] # Save selected database tables @@ -3448,6 +3453,25 @@ def get_all_devices(): commitDB() return row +#------------------------------------------------------------------------------- +def get_sql_array(query): + + sql.execute(query) + + rows = sql.fetchall() + + commitDB() + + # convert result into list of lists + arr = [] + for row in rows: + r_temp = [] + for column in row: + r_temp.append(column) + arr.append(r_temp) + + return arr + #------------------------------------------------------------------------------- def removeDuplicateNewLines(text): @@ -3611,7 +3635,7 @@ def collect_lang_strings(json, pref): #------------------------------------------------------------------------------- def import_language_string(code, key, value, extra = ""): - sql.execute ("""INSERT INTO Language_Strings ("Language_Code", "String_Key", "String_Value", "Extra") VALUES (?, ?, ?, ?)""", (str(code), str(key), str(value), str(extra))) + sql.execute ("""INSERT INTO Plugins_Language_Strings ("Language_Code", "String_Key", "String_Value", "Extra") VALUES (?, ?, ?, ?)""", (str(code), str(key), str(value), str(extra))) commitDB () @@ -3669,11 +3693,11 @@ def execute_plugin(plugin): set = get_plugin_setting(plugin, "RUN_TIMEOUT") - # handle missing "function":"RUN_TIMEOUT" setting + # handle missing "function":"_TIMEOUT" setting if set == None: - return - - set_RUN_TIMEOUT = set["value"] + set_RUN_TIMEOUT = 10 + else: + set_RUN_TIMEOUT = set["value"] # Prepare custom params params = [] @@ -3689,9 +3713,9 @@ def execute_plugin(plugin): if resolved != None: resolved = plugin_param_from_glob_set(resolved) - # TODO HERE - # if param["type"] == "sql": - # resolved = get_sql(param["value"]) + # Get Sql result + if param["type"] == "sql": + resolved = flatten_array(get_sql_array(param["value"])) if resolved == None: mylog('none', [' [Plugins] The parameter "name":"', param["name"], '" was resolved as None']) @@ -3732,9 +3756,9 @@ def execute_plugin(plugin): else: mylog('verbose', ['[', timeNow(), '] [Plugins]: SUCCESS, received ', len(newLines), ' entries']) - # regular logging - for line in newLines: - append_line_to_file (pluginsPath + '/plugin.log', line +'\n') + # # regular logging + # for line in newLines: + # append_line_to_file (pluginsPath + '/plugin.log', line +'\n') # build SQL query parameters to insert into the DB sqlParams = [] @@ -3743,14 +3767,17 @@ def execute_plugin(plugin): columns = line.split("|") # There has to be always 8 columns if len(columns) == 8: - sqlParams.append((plugin["unique_prefix"], columns[0], columns[1], columns[2], columns[3], columns[4], columns[5], columns[6], columns[7])) + sqlParams.append((plugin["unique_prefix"], columns[0], columns[1], columns[2], columns[3], columns[4], columns[5], columns[6], False, columns[7])) else: mylog('none', [' [Plugins]: Skipped invalid line in the output: ', line]) if len(sqlParams) > 0: - sql.executemany ("""INSERT INTO Plugins_State ("Plugin", "Object_PrimaryID", "Object_SecondaryID", "DateTime", "Watched_Value1", "Watched_Value2", "Watched_Value3", "Watched_Value4", "Extra") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)""", sqlParams) + sql.executemany ("""INSERT INTO Plugins_Unprocessed_Entries ("Plugin", "Object_PrimaryID", "Object_SecondaryID", "DateTime", "Watched_Value1", "Watched_Value2", "Watched_Value3", "Watched_Value4", "Processed" ,"Extra") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""", sqlParams) commitDB () + # update API endpoints + update_api(False, ["plugins_unprocessed_entries","plugins_entries"]) + #------------------------------------------------------------------------------- # Flattens a setting to make it passable to a script @@ -3782,13 +3809,7 @@ def plugin_param_from_glob_set(globalSetting): return setVal if setTyp in arrayConversion: - tmp = '' - for arrayItem in setVal: - - tmp += arrayItem + ',' - tmp = tmp.replace("'","").replace(' ','') # No single quotes or empty spaces allowed - - return tmp[:-1] # Remove last comma ',' + return flatten_array(setVal) #------------------------------------------------------------------------------- @@ -3835,6 +3856,23 @@ def print_plugin_info(plugin, elements = ['display_name']): res = get_plugin_string(plugin, el) mylog('verbose', [' [Plugins] ', el ,': ', res]) +#------------------------------------------------------------------------------- +def flatten_array(arr): + + tmp = '' + + for arrayItem in arr: + # only one column flattening is supported + if isinstance(arrayItem, list): + arrayItem = str(arrayItem[0]) + + tmp += arrayItem + ',' + tmp = tmp.replace("'","").replace(' ','') # No single quotes or empty spaces allowed + + return tmp[:-1] # Remove last comma ',' + + + #------------------------------------------------------------------------------- # Cron-like Scheduling #------------------------------------------------------------------------------- diff --git a/docker-compose.yml b/docker-compose.yml index 40ee843c..6345993e 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,7 @@ services: - ${DEV_LOCATION}/front/deviceDetails.php:/home/pi/pialert/front/deviceDetails.php - ${DEV_LOCATION}/front/devices.php:/home/pi/pialert/front/devices.php - ${DEV_LOCATION}/front/events.php:/home/pi/pialert/front/events.php + - ${DEV_LOCATION}/front/plugins.php:/home/pi/pialert/front/plugins.php - ${DEV_LOCATION}/front/help_faq.php:/home/pi/pialert/front/help_faq.php - ${DEV_LOCATION}/front/index.php:/home/pi/pialert/front/index.php - ${DEV_LOCATION}/front/maintenance.php:/home/pi/pialert/front/maintenance.php diff --git a/docs/API.md b/docs/API.md index bd3ca722..38eac9ac 100755 --- a/docs/API.md +++ b/docs/API.md @@ -30,6 +30,8 @@ You can access the following files: | `table_pholus_scan.json` | The latest state of the [pholus](https://github.com/jokob-sk/Pi.Alert/tree/main/pholus) (A multicast DNS and DNS Service Discovery Security Assessment Tool) scan results. | | `table_events_pending_alert.json` | The list of the unprocessed (pending) notification events. | | `table_settings.json` | The content of the settings table. | + | `table_plugins_entries.json` | The content of the plugins_entries table. | + | `table_plugins_unprocessed_entries.json` | The content of the plugins_unprocessed_entries table. | | `table_custom_endpoint.json` | A custom endpoint generated by the SQL query specified by the `API_CUSTOM_SQL` setting. | Current/latest state of the aforementioned files depends on your settings. diff --git a/front/css/pialert.css b/front/css/pialert.css index ff7f1746..1b8eea41 100755 --- a/front/css/pialert.css +++ b/front/css/pialert.css @@ -747,6 +747,13 @@ height: 50px; margin-bottom: 6px; } +.pageHelp{ + position: absolute; + font-size: x-small; + margin-bottom: 6px; +} + + #networkTree .box { padding:2px; diff --git a/front/php/server/util.php b/front/php/server/util.php index 577d442c..0cb57875 100755 --- a/front/php/server/util.php +++ b/front/php/server/util.php @@ -345,7 +345,7 @@ function getString ($codeName, $default) { function encode_single_quotes ($val) { - $result = str_replace ('\'','_single_quote_',$val); + $result = str_replace ('\'','{s-quote}',$val); return $result; } diff --git a/front/php/templates/header.php b/front/php/templates/header.php index 71e8f51a..4958c2e8 100755 --- a/front/php/templates/header.php +++ b/front/php/templates/header.php @@ -222,6 +222,10 @@ if ($ENABLED_DARKMODE === True) { +
  • + +
  • +
  • ">🆕
    diff --git a/front/php/templates/language/en_us.php b/front/php/templates/language/en_us.php index baa9c63d..14ea1f62 100755 --- a/front/php/templates/language/en_us.php +++ b/front/php/templates/language/en_us.php @@ -50,9 +50,10 @@ $lang['en_us'] = array( 'Navigation_Devices' => 'Devices', 'Navigation_Presence' => 'Presence', 'Navigation_Events' => 'Events', +'Navigation_Network' => 'Network', +'Navigation_Plugins' => 'Plugins', 'Navigation_Maintenance' => 'Maintenance', 'Navigation_Settings' => 'Settings', -'Navigation_Network' => 'Network', 'Navigation_HelpFAQ' => 'Help / FAQ', 'Device_Title' => 'Devices', 'Device_Shortcut_AllDevices' => 'All Devices', diff --git a/front/plugins.php b/front/plugins.php new file mode 100755 index 00000000..51e72323 --- /dev/null +++ b/front/plugins.php @@ -0,0 +1,34 @@ + + +
    + + +
    + +

    + + +

    +
    + + +
    +
    +
    + +
    + aaa +
    +
    + + +
    + + + + \ No newline at end of file diff --git a/front/plugins/README.md b/front/plugins/README.md index 95d2b322..09ef149f 100755 --- a/front/plugins/README.md +++ b/front/plugins/README.md @@ -66,45 +66,100 @@ https://www.google.com|null|2023-01-02 15:56:30|200|0.7898| ### config.json -##### Setting object struncture +#### params + +- `"name":"name_value"` - is used as a wildcard replacement in the `CMD` setting value by using curly brackets `{name_value}`. The wildcard is replaced by the result of the `"value" : "param_value"` and `"type":"type_value"` combo configuration below. +- `"type":""` - is used to specify the type of the params, currently only 2 supported (`sql`,`setting`). + - `"type":"sql"` - will execute the SQL query specified in the `value` property. The sql query needs to return only one column. The column is flattened and separated by commas (`,`), e.g: `SELECT dev_MAC from DEVICES` -> `Internet,74:ac:74:ac:74:ac,44:44:74:ac:74:ac`. This is then used to replace the wildcards in the `CMD`setting. + - `"type":"setting"` - The setting code name. A combination of the value from `unique_prefix` + `_` + `function` value, or otherwise the code name you can find in the Settings page under the Setting dispaly name, e.g. `SCAN_CYCLE_MINUTES`. +- `"value" : "param_value"` - Needs to contain a setting code name or sql query without wildcards. + + +Example: ```json { - "type": "RUN", - "default_value":"disabled", - "options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"], - "localized": ["name", "description"], - "name" :[{ - "language_code":"en_us", - "string" : "Run condition" - }, - { - "language_code":"de_de", - "string" : "Ausführungsbedingung" - }], - "description": [{ - "language_code":"en_us", - "string" : "Enable a regular scan of your services. If you select schedule the scheduling settings from below are applied. If you select once the scan is run only once on start of the application (container) for the time specified in WEBMON_TIMEOUT setting." - }] - } + "params" : [{ + "name" : "macs", + "type" : "sql", + "value" : "SELECT dev_MAC from DEVICES" + }, + { + "name" : "urls", + "type" : "setting", + "value" : "WEBMON_urls_to_check" + }, + { + "name" : "internet_ip", + "type" : "setting", + "value" : "WEBMON_SQL_internet_ip" + }] +} ``` -###### Supported settings types + + +#### Setting object struncture + +- `"function": ""` - What function the setting drives or a simple unique code name +- `"type": ""` - The form control used for the setting displayed in the Settings page and what values are accepted. +- `"localized"` - a list of properties on the current JSON level which need to be localized +- `"name"` and `"description"` - Displayed in the Settings page. An array of localized strings. (see Localized strings below). + +##### Supported settings `function` values - `RUN` - (required) Specifies when the service is executed - Supported Options: "disabled", "once", "schedule" (if included then a `RUN_SCHD` setting needs to be specified), "always_after_scan", "on_new_device" - `RUN_SCHD` - (required if you include the `RUN`) Cron-like scheduling used if the `RUN` setting set to `schedule` - `CMD` - (required) What command should be executed. -- `API_SQL` - (optional) Generates a `table_` + code_name + `.json` file as per (API docs)[https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md]. -- `TIMEOUT` - (optional) Max execution time of the script. If not specified a default value of 10 seconds is used to prevent hanging. -- `WATCH` - (optional) Which database columns are watched for changes. If not specified no notifications are sent. +- `API_SQL` - (optional) Generates a `table_` + code_name + `.json` file as per [API docs](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md). +- `RUN_TIMEOUT` - (optional) Max execution time of the script. If not specified a default value of 10 seconds is used to prevent hanging. +- `WATCH` - (optional) Which database columns are watched for changes for this particular plugin. If not specified no notifications are sent. -#### Example +Example: ```json { + "function": "RUN", + "type": "selecttext", + "default_value":"disabled", + "options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"], + "localized": ["name", "description"], + "name" :[{ + "language_code":"en_us", + "string" : "When to run" + }], + "description": [{ + "language_code":"en_us", + "string" : "Enable a regular scan of your services. If you select schedule the scheduling settings from below are applied. If you select once the scan is run only once on start of the application (container) for the time specified in WEBMON_RUN_TIMEOUT setting." + }] +} +``` +##### Localized strings + + +- `"language_code":""` - code name of the language string. Only these three currently supported. +- `"string"` - The string to be displayed in the given language. + +Example: + +```json + + { + "language_code":"en_us", + "string" : "When to run" + } + +``` + + +## Full Example + +```json +{ + { "code_name": "website_monitor", - "settings_short_prefix": "WEBMON", + "unique_prefix": "WEBMON", "localized": ["display_name", "description", "icon"], "display_name" : [{ "language_code":"en_us", @@ -113,82 +168,103 @@ https://www.google.com|null|2023-01-02 15:56:30|200|0.7898| "icon":[{ "language_code":"en_us", "string" : "" - }], - "argument" : "urls", + }], "description": [{ "language_code":"en_us", "string" : "This plugin is to monitor status changes of different services or websites." }], - "database_column_aliases":{ - "Plugins_Events":{ - "Index":[{ - "language_code":"en_us", - "string" : "Index" - }], - "Object_PrimaryID":[{ - "language_code":"en_us", - "string" : "Monitored URL" - }], - "DateTime":[{ - "language_code":"en_us", - "string" : "Checked on" - }], - "Watched_Value1":[{ - "language_code":"en_us", - "string" : "Status code" - }], - "Watched_Value2":[{ - "language_code":"en_us", - "string" : "Latency" - }] - } + "params" : [{ + "name" : "macs", + "type" : "sql", + "value" : "SELECT dev_MAC from DEVICES" + }, + { + "name" : "urls", + "type" : "setting", + "value" : "WEBMON_urls_to_check" + }, + { + "name" : "internet_ip", + "type" : "setting", + "value" : "WEBMON_SQL_internet_ip" + }], + "database_column_aliases":{ + "localized": ["Index", "Object_PrimaryID", "DateTime", "Watched_Value1", "Watched_Value2"], + "Index":[{ + "language_code":"en_us", + "string" : "Index" + }], + "Object_PrimaryID":[{ + "language_code":"en_us", + "string" : "Monitored URL" + }], + "DateTime":[{ + "language_code":"en_us", + "string" : "Checked on" + }], + "Watched_Value1":[{ + "language_code":"en_us", + "string" : "Status code" + }], + "Watched_Value2":[{ + "language_code":"en_us", + "string" : "Latency" + }] }, "settings":[ { - "type": "ENABLE", - "default_value":"False", + "function": "RUN", + "type": "selecttext", + "default_value":"disabled", + "options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"], + "localized": ["name", "description"], + "name" :[{ + "language_code":"en_us", + "string" : "When to run" + }], + "description": [{ + "language_code":"en_us", + "string" : "Enable a regular scan of your services. If you select schedule the scheduling settings from below are applied. If you select once the scan is run only once on start of the application (container) for the time specified in WEBMON_RUN_TIMEOUT setting." + }] + }, + { + "function": "CMD", + "type": "text", + "default_value":"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}", "options": [], "localized": ["name", "description"], "name" : [{ "language_code":"en_us", - "string" : "Enable plugin" + "string" : "Command" }], "description": [{ "language_code":"en_us", - "string" : "Enable a regular scan of your services. You need to enable this setting for anything to be executed regarding this plugin." - }] - }, - { - "type": "RUN", - "default_value":"none", - "options": ["none","once","schedule"], - "localized": ["name", "description"], - "name" :[{ - "language_code":"en_us", - "string" : "Schedule" - }], - "description": [{ - "language_code":"en_us", - "string" : "Enable a regular scan of your services. If you select schedule the scheduling settings from below are applied. If you select once the scan is run only once on start of the application (container) for the time specified in WEBMON_TIMEOUT setting." + "string" : "Comamnd to run" }] }, { - "type": "FORCE_REPORT", + "function": "FORCE_REPORT", + "type": "boolean", "default_value": false, "options": [], "localized": ["name", "description"], "name" : [{ "language_code":"en_us", "string" : "Force report" + }, + { + "language_code":"de_de", + "string" : "Zwing Bericht" }], "description": [{ "language_code":"en_us", - "string" : "Force a notification message even if there are nochanges detected." + "string" : "Force a notification message even if there are no changes detected." }] }, { - "type": "RUN_SCHD", + "function": "RUN_SCHD", + "type": "text", "default_value":"0 2 * * *", "options": [], "localized": ["name", "description"], @@ -202,7 +278,8 @@ https://www.google.com|null|2023-01-02 15:56:30|200|0.7898| }] }, { - "type": "API_SQL", + "function": "API_SQL", + "type": "text", "default_value":"SELECT * FROM plugin_website_monitor", "options": [], "localized": ["name", "description"], @@ -216,7 +293,8 @@ https://www.google.com|null|2023-01-02 15:56:30|200|0.7898| }] }, { - "type": "RUN_TIMEOUT", + "function": "RUN_TIMEOUT", + "type": "integer", "default_value":5, "options": [], "localized": ["name", "description"], @@ -230,7 +308,8 @@ https://www.google.com|null|2023-01-02 15:56:30|200|0.7898| }] }, { - "type": "WATCH", + "function": "WATCH", + "type": "multiselect", "default_value":["Watched_Value1"], "options": ["Watched_Value1","Watched_Value2","Watched_Value3","Watched_Value4"], "localized": ["name", "description"], @@ -244,8 +323,9 @@ https://www.google.com|null|2023-01-02 15:56:30|200|0.7898| }] }, { - "type": "ARGS", - "default_value":"", + "function": "urls_to_check", + "type": "list", + "default_value":[], "options": [], "localized": ["name", "description"], "name" : [{ @@ -254,14 +334,26 @@ https://www.google.com|null|2023-01-02 15:56:30|200|0.7898| }], "description": [{ "language_code":"en_us", - "string" : "Change the dig utility arguments if you have issues resolving your Internet IP. Arguments are added at the end of the following command: dig +short ." + "string" : "Services to watch. Enter full URL, e.g. https://google.com." + }] + }, + { + "function": "SQL_internet_ip", + "type": "readonly", + "default_value":"SELECT dev_LastIP FROM Devices WHERE dev_MAC = 'Internet'", + "options": [], + "localized": ["name", "description"], + "name" : [{ + "language_code":"en_us", + "string" : "Helper variable" + }], + "description": [{ + "language_code":"en_us", + "string" : "Getting the IP address of the Router / Internet" }] } ] } - - - ``` diff --git a/front/plugins/website_monitor/config.json b/front/plugins/website_monitor/config.json index 8a14d609..4cf1de43 100755 --- a/front/plugins/website_monitor/config.json +++ b/front/plugins/website_monitor/config.json @@ -29,29 +29,28 @@ "type" : "setting", "value" : "WEBMON_SQL_internet_ip" }], - "database_column_aliases":{ - "Plugins_Events":{ - "Index":[{ - "language_code":"en_us", - "string" : "Index" - }], - "Object_PrimaryID":[{ - "language_code":"en_us", - "string" : "Monitored URL" - }], - "DateTime":[{ - "language_code":"en_us", - "string" : "Checked on" - }], - "Watched_Value1":[{ - "language_code":"en_us", - "string" : "Status code" - }], - "Watched_Value2":[{ - "language_code":"en_us", - "string" : "Latency" - }] - } + "database_column_aliases":{ + "localized": ["Index", "Object_PrimaryID", "DateTime", "Watched_Value1", "Watched_Value2"], + "Index":[{ + "language_code":"en_us", + "string" : "Index" + }], + "Object_PrimaryID":[{ + "language_code":"en_us", + "string" : "Monitored URL" + }], + "DateTime":[{ + "language_code":"en_us", + "string" : "Checked on" + }], + "Watched_Value1":[{ + "language_code":"en_us", + "string" : "Status code" + }], + "Watched_Value2":[{ + "language_code":"en_us", + "string" : "Latency" + }] }, "settings":[ { @@ -66,7 +65,7 @@ }], "description": [{ "language_code":"en_us", - "string" : "Enable a regular scan of your services. If you select schedule the scheduling settings from below are applied. If you select once the scan is run only once on start of the application (container) for the time specified in WEBMON_TIMEOUT setting." + "string" : "Enable a regular scan of your services. If you select schedule the scheduling settings from below are applied. If you select once the scan is run only once on start of the application (container) for the time specified in WEBMON_RUN_TIMEOUT setting." }] }, {