Plugin tweaks
This commit is contained in:
@@ -251,7 +251,7 @@ Plugin entries can be filtered based on values entered into filter fields. The `
|
|||||||
|
|
||||||
7. Filters are only applied if a filter is specified and the `txtMacFilter` is not `undefined` or empty (`--`).
|
7. Filters are only applied if a filter is specified and the `txtMacFilter` is not `undefined` or empty (`--`).
|
||||||
|
|
||||||
### Mapping the plugin results into a database table
|
### 🗺 Mapping the plugin results into a database table
|
||||||
|
|
||||||
PiAlert will take the results of the plugin execution and insert these results into a database table, if a plugin contains the property `"mapped_to_table"` in the `config.json` root. The mapping of the columns is defined in the `database_column_definitions` array.
|
PiAlert will take the results of the plugin execution and insert these results into a database table, if a plugin contains the property `"mapped_to_table"` in the `config.json` root. The mapping of the columns is defined in the `database_column_definitions` array.
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@ You can have any `"function": "my_custom_name"` custom name, however, the ones l
|
|||||||
> }
|
> }
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
##### Localized strings
|
##### 🌍Localized strings
|
||||||
|
|
||||||
- `"language_code":"<en_us|es_es|de_de>"` - code name of the language string. Only these three are currently supported. At least the `"language_code":"en_us"` variant has to be defined.
|
- `"language_code":"<en_us|es_es|de_de>"` - code name of the language string. Only these three are currently supported. At least the `"language_code":"en_us"` variant has to be defined.
|
||||||
- `"string"` - The string to be displayed in the given language.
|
- `"string"` - The string to be displayed in the given language.
|
||||||
|
|||||||
@@ -32,3 +32,4 @@
|
|||||||
192.168.1.1|localdomain|2023-06-10 08:32:03|null|192.168.1.168|null|192.168.1.1|5m00s,255.255.255.0|192.168.1.1
|
192.168.1.1|localdomain|2023-06-10 08:32:03|null|192.168.1.168|null|192.168.1.1|5m00s,255.255.255.0|192.168.1.1
|
||||||
192.168.1.1|localdomain|2023-06-10 11:03:18|null|192.168.1.168|null|192.168.1.1|5m00s,255.255.255.0|192.168.1.1
|
192.168.1.1|localdomain|2023-06-10 11:03:18|null|192.168.1.168|null|192.168.1.1|5m00s,255.255.255.0|192.168.1.1
|
||||||
192.168.1.1|localdomain|2023-06-11 16:40:30|null|192.168.1.168|null|192.168.1.1|5m00s,255.255.255.0|192.168.1.1
|
192.168.1.1|localdomain|2023-06-11 16:40:30|null|192.168.1.168|null|192.168.1.1|5m00s,255.255.255.0|192.168.1.1
|
||||||
|
192.168.1.1|localdomain|2023-07-22 12:22:51|null|192.168.1.168|null|192.168.1.1|5m00s,255.255.255.0|192.168.1.1
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
"data_source": "pialert-db-query",
|
"data_source": "pialert-db-query",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column" : "Object_PrimaryID",
|
"compare_column" : "ForeignKey",
|
||||||
"compare_operator" : "==",
|
"compare_operator" : "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}.toString()'",
|
||||||
"compare_use_quotes": true
|
"compare_use_quotes": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -58,13 +58,13 @@
|
|||||||
"column": "Object_PrimaryID",
|
"column": "Object_PrimaryID",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "devicemac",
|
"type": "label",
|
||||||
"default_value":"",
|
"default_value":"",
|
||||||
"options": [],
|
"options": [],
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
"name":[{
|
"name":[{
|
||||||
"language_code":"en_us",
|
"language_code":"en_us",
|
||||||
"string" : "Device MAC"
|
"string" : "Device name"
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
https://google.com|null|2023-06-11 16:40:26|200|0.340850|null|null|null|null
|
https://google.com|null|2023-07-22 12:22:47|200|0.492018|null|null|null|null
|
||||||
https://duck.com|null|2023-06-11 16:40:26|200|0.051173|null|null|null|null
|
https://duck.com|null|2023-07-22 12:22:48|200|0.262285|null|null|null|null
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ Pi.Alert [Prototype]:
|
|||||||
Current User: root
|
Current User: root
|
||||||
|
|
||||||
Monitor Web-Services
|
Monitor Web-Services
|
||||||
Timestamp: 2023-06-11 16:40:25
|
Timestamp: 2023-07-22 12:22:46
|
||||||
|
|
||||||
Start Services Monitoring
|
Start Services Monitoring
|
||||||
|
|
||||||
| Timestamp | URL | StatusCode | ResponseTime |
|
| Timestamp | URL | StatusCode | ResponseTime |
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
2023-06-11 16:40:26 | https://google.com | 200 | 0.340850
|
2023-07-22 12:22:47 | https://google.com | 200 | 0.492018
|
||||||
2023-06-11 16:40:26 | https://duck.com | 200 | 0.051173
|
2023-07-22 12:22:48 | https://duck.com | 200 | 0.262285
|
||||||
|
|||||||
Reference in New Issue
Block a user