mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-04 09:11:34 -07:00
Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8131a6d69 | ||
|
|
4b6bdeae77 | ||
|
|
998c38f519 | ||
|
|
4c117db463 | ||
|
|
9f3dbe2de1 | ||
|
|
4f2fa86a49 | ||
|
|
bf986a35a4 | ||
|
|
cfa75178a4 | ||
|
|
4c7ea21bd8 | ||
|
|
8b80a6d59c | ||
|
|
d17256cff6 | ||
|
|
3f80d2e57f | ||
|
|
82dafbb188 | ||
|
|
b18cf98266 | ||
|
|
77369c3ce8 | ||
|
|
49b72acd82 | ||
|
|
cd0a3f6de0 | ||
|
|
adc78e6a2d | ||
|
|
13e91731be | ||
|
|
7ef19b1c12 | ||
|
|
448e17ce45 | ||
|
|
4daead1f8f | ||
|
|
48454f6f2f | ||
|
|
9b71662eda | ||
|
|
7305fd78e3 | ||
|
|
ec3e4c8988 | ||
|
|
54a249f043 | ||
|
|
e30bdc526b | ||
|
|
21f6a53830 | ||
|
|
84eb4d2c92 | ||
|
|
770ec9c447 | ||
|
|
250e533655 | ||
|
|
2bcb77f293 | ||
|
|
30e363354b | ||
|
|
37730301f4 | ||
|
|
8e72386a39 | ||
|
|
7278ee8cfa | ||
|
|
fa22523a0b | ||
|
|
7569923481 | ||
|
|
4a81a4594c | ||
|
|
d7c7bd2cd2 | ||
|
|
d40d1795d2 | ||
|
|
b311113575 | ||
|
|
9df6643610 | ||
|
|
43984132c4 | ||
|
|
0a7ecb5b7c | ||
|
|
c7399215ec | ||
|
|
23e16ae4fa | ||
|
|
dc8b82e997 | ||
|
|
0bb6db155b | ||
|
|
7221b4ba96 | ||
|
|
c4904739b2 | ||
|
|
67cab9d606 | ||
|
|
f75c53fc5d |
4
.github/skills/code-standards/SKILL.md
vendored
4
.github/skills/code-standards/SKILL.md
vendored
@@ -12,6 +12,8 @@ description: NetAlertX coding standards and conventions. Use this when writing c
|
|||||||
- code has to be maintainable, no duplicate code
|
- code has to be maintainable, no duplicate code
|
||||||
- follow DRY principle - maintainability of code is more important than speed of implementation
|
- follow DRY principle - maintainability of code is more important than speed of implementation
|
||||||
- code files should be less than 500 LOC for better maintainability
|
- code files should be less than 500 LOC for better maintainability
|
||||||
|
- DB columns must not contain underscores, use camelCase instead (e.g., deviceInstanceId, not device_instance_id)
|
||||||
|
- treat DB as temporary storage for stats, long term configuration should be stored in the /config folder, the /config folder should allow you to restore most of your functionality (excluding historical data)
|
||||||
|
|
||||||
## File Length
|
## File Length
|
||||||
|
|
||||||
@@ -64,7 +66,7 @@ Use timeNowUTC(as_string=False) for datetime operations (scheduling, comparisons
|
|||||||
|
|
||||||
## String Sanitization
|
## String Sanitization
|
||||||
|
|
||||||
Use sanitizers from `server/helper.py` before storing user input.
|
Use sanitizers from `server/helper.py` before storing user input. MAC addresses are always lowercased and normalized. IP addresses should be validated.
|
||||||
|
|
||||||
## Devcontainer Constraints
|
## Devcontainer Constraints
|
||||||
|
|
||||||
|
|||||||
8
.github/workflows/mkdocs.yml
vendored
8
.github/workflows/mkdocs.yml
vendored
@@ -18,12 +18,14 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install MkDocs
|
- name: Install MkDocs
|
||||||
run: |
|
run: |
|
||||||
pip install mkdocs mkdocs-material
|
pip install \
|
||||||
pip install mkdocs-github-admonitions-plugin
|
mkdocs==1.6.0 \
|
||||||
|
mkdocs-material==9.5.21 \
|
||||||
|
mkdocs-github-admonitions-plugin==0.1.1
|
||||||
|
|
||||||
- name: Build MkDocs
|
- name: Build MkDocs
|
||||||
run: mkdocs build
|
run: mkdocs build
|
||||||
|
|||||||
@@ -15,6 +15,21 @@ Before opening a new issue:
|
|||||||
- [Check Common Issues & Debug Tips](https://docs.netalertx.com/DEBUG_TIPS#common-issues)
|
- [Check Common Issues & Debug Tips](https://docs.netalertx.com/DEBUG_TIPS#common-issues)
|
||||||
- [Search Closed Issues](https://github.com/netalertx/NetAlertX/issues?q=is%3Aissue+is%3Aclosed)
|
- [Search Closed Issues](https://github.com/netalertx/NetAlertX/issues?q=is%3Aissue+is%3Aclosed)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Use of AI
|
||||||
|
|
||||||
|
Use of AI-assisted tools is permitted, provided all generated code is reviewed, understood, and verified before submission.
|
||||||
|
|
||||||
|
- All AI-generated code must meet the project's **quality, security, and performance standards**.
|
||||||
|
- Contributors are responsible for **fully understanding** any code they submit, regardless of how it was produced.
|
||||||
|
- Prefer **clarity and maintainability over cleverness or brevity**. Readable code is always favored over dense or obfuscated implementations.
|
||||||
|
- Follow the **DRY (Don't Repeat Yourself) principle** where appropriate, without sacrificing readability.
|
||||||
|
- Do not submit code that you cannot confidently explain or debug.
|
||||||
|
|
||||||
|
All changes must pass the **full test suite** before opening a PR.
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Submitting Pull Requests (PRs)
|
## Submitting Pull Requests (PRs)
|
||||||
@@ -28,11 +43,19 @@ Please:
|
|||||||
- Provide a clear title and description for your PR
|
- Provide a clear title and description for your PR
|
||||||
- If relevant, add or update tests and documentation
|
- If relevant, add or update tests and documentation
|
||||||
- For plugins, refer to the [Plugin Dev Guide](https://docs.netalertx.com/PLUGINS_DEV)
|
- For plugins, refer to the [Plugin Dev Guide](https://docs.netalertx.com/PLUGINS_DEV)
|
||||||
|
- Switch the PR to DRAFT mode if still being worked on
|
||||||
|
- Keep PRs **focused and minimal** — avoid unrelated changes in a single PR
|
||||||
|
- PRs that do not meet these guidelines may be closed without review
|
||||||
|
|
||||||
|
## Commit Messages
|
||||||
|
|
||||||
## Code quality
|
- Use clear, descriptive commit messages
|
||||||
|
- Explain *why* a change was made, not just *what* changed
|
||||||
|
- Reference related issues where applicable
|
||||||
|
|
||||||
- read and follow the [code-standards](/.github/skills/code-standards/SKILL.md)
|
## Code Quality
|
||||||
|
|
||||||
|
- Read and follow the [code standards](/.github/skills/code-standards/SKILL.md)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ The Events API provides access to **device event logs**, allowing creation, retr
|
|||||||
"success": true,
|
"success": true,
|
||||||
"events": [
|
"events": [
|
||||||
{
|
{
|
||||||
"eve_MAC": "00:11:22:33:44:55",
|
"eveMac": "00:11:22:33:44:55",
|
||||||
"eve_IP": "192.168.1.10",
|
"eveIp": "192.168.1.10",
|
||||||
"eve_DateTime": "2025-08-24T12:00:00Z",
|
"eveDateTime": "2025-08-24T12:00:00Z",
|
||||||
"eve_EventType": "Device Down",
|
"eveEventType": "Device Down",
|
||||||
"eve_AdditionalInfo": "",
|
"eveAdditionalInfo": "",
|
||||||
"eve_PendingAlertEmail": 1
|
"evePendingAlertEmail": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -102,11 +102,11 @@ The Events API provides access to **device event logs**, allowing creation, retr
|
|||||||
"count": 5,
|
"count": 5,
|
||||||
"events": [
|
"events": [
|
||||||
{
|
{
|
||||||
"eve_DateTime": "2025-12-07 12:00:00",
|
"eveDateTime": "2025-12-07 12:00:00",
|
||||||
"eve_EventType": "New Device",
|
"eveEventType": "New Device",
|
||||||
"eve_MAC": "AA:BB:CC:DD:EE:FF",
|
"eveMac": "AA:BB:CC:DD:EE:FF",
|
||||||
"eve_IP": "192.168.1.100",
|
"eveIp": "192.168.1.100",
|
||||||
"eve_AdditionalInfo": "Device detected"
|
"eveAdditionalInfo": "Device detected"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -127,9 +127,9 @@ The Events API provides access to **device event logs**, allowing creation, retr
|
|||||||
"count": 10,
|
"count": 10,
|
||||||
"events": [
|
"events": [
|
||||||
{
|
{
|
||||||
"eve_DateTime": "2025-12-07 12:00:00",
|
"eveDateTime": "2025-12-07 12:00:00",
|
||||||
"eve_EventType": "Device Down",
|
"eveEventType": "Device Down",
|
||||||
"eve_MAC": "AA:BB:CC:DD:EE:FF"
|
"eveMac": "AA:BB:CC:DD:EE:FF"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -159,9 +159,9 @@ The Events API provides access to **device event logs**, allowing creation, retr
|
|||||||
1. Total events in the period
|
1. Total events in the period
|
||||||
2. Total sessions
|
2. Total sessions
|
||||||
3. Missing sessions
|
3. Missing sessions
|
||||||
4. Voided events (`eve_EventType LIKE 'VOIDED%'`)
|
4. Voided events (`eveEventType LIKE 'VOIDED%'`)
|
||||||
5. New device events (`eve_EventType LIKE 'New Device'`)
|
5. New device events (`eveEventType LIKE 'New Device'`)
|
||||||
6. Device down events (`eve_EventType LIKE 'Device Down'`)
|
6. Device down events (`eveEventType LIKE 'Device Down'`)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ Event endpoints are available as **MCP Tools** for AI assistant integration:
|
|||||||
```
|
```
|
||||||
|
|
||||||
* Events are stored in the **Events table** with the following fields:
|
* Events are stored in the **Events table** with the following fields:
|
||||||
`eve_MAC`, `eve_IP`, `eve_DateTime`, `eve_EventType`, `eve_AdditionalInfo`, `eve_PendingAlertEmail`.
|
`eveMac`, `eveIp`, `eveDateTime`, `eveEventType`, `eveAdditionalInfo`, `evePendingAlertEmail`.
|
||||||
|
|
||||||
* Event creation automatically logs activity for debugging.
|
* Event creation automatically logs activity for debugging.
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ GraphQL queries are **read-optimized for speed**. Data may be slightly out of da
|
|||||||
|
|
||||||
* Devices
|
* Devices
|
||||||
* Settings
|
* Settings
|
||||||
|
* Events
|
||||||
|
* PluginsObjects
|
||||||
|
* PluginsHistory
|
||||||
|
* PluginsEvents
|
||||||
* Language Strings (LangStrings)
|
* Language Strings (LangStrings)
|
||||||
|
|
||||||
## Endpoints
|
## Endpoints
|
||||||
@@ -254,11 +258,160 @@ curl 'http://host:GRAPHQL_PORT/graphql' \
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Plugin Tables (Objects, Events, History)
|
||||||
|
|
||||||
|
Three queries expose the plugin database tables with server-side pagination, filtering, and search:
|
||||||
|
|
||||||
|
* `pluginsObjects` — current plugin object state
|
||||||
|
* `pluginsEvents` — unprocessed plugin events
|
||||||
|
* `pluginsHistory` — historical plugin event log
|
||||||
|
|
||||||
|
All three share the same `PluginQueryOptionsInput` and return the same `PluginEntry` shape.
|
||||||
|
|
||||||
|
### Sample Query
|
||||||
|
|
||||||
|
```graphql
|
||||||
|
query GetPluginObjects($options: PluginQueryOptionsInput) {
|
||||||
|
pluginsObjects(options: $options) {
|
||||||
|
dbCount
|
||||||
|
count
|
||||||
|
entries {
|
||||||
|
index plugin objectPrimaryId objectSecondaryId
|
||||||
|
dateTimeCreated dateTimeChanged
|
||||||
|
watchedValue1 watchedValue2 watchedValue3 watchedValue4
|
||||||
|
status extra userData foreignKey
|
||||||
|
syncHubNodeName helpVal1 helpVal2 helpVal3 helpVal4 objectGuid
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Query Parameters (`PluginQueryOptionsInput`)
|
||||||
|
|
||||||
|
| Parameter | Type | Description |
|
||||||
|
| ------------ | ----------------- | ------------------------------------------------------ |
|
||||||
|
| `page` | Int | Page number (1-based). |
|
||||||
|
| `limit` | Int | Rows per page (max 1000). |
|
||||||
|
| `sort` | [SortOptionsInput] | Sorting options (`field`, `order`). |
|
||||||
|
| `search` | String | Free-text search across key columns. |
|
||||||
|
| `filters` | [FilterOptionsInput] | Column-value exact-match filters. |
|
||||||
|
| `plugin` | String | Plugin prefix to scope results (e.g. `"ARPSCAN"`). |
|
||||||
|
| `foreignKey` | String | Foreign key filter (e.g. device MAC). |
|
||||||
|
| `dateFrom` | String | Start of date range filter on `dateTimeCreated`. |
|
||||||
|
| `dateTo` | String | End of date range filter on `dateTimeCreated`. |
|
||||||
|
|
||||||
|
### Response Fields
|
||||||
|
|
||||||
|
| Field | Type | Description |
|
||||||
|
| --------- | ------------- | ------------------------------------------------------------- |
|
||||||
|
| `dbCount` | Int | Total rows for the requested plugin (before search/filters). |
|
||||||
|
| `count` | Int | Total rows after all filters (before pagination). |
|
||||||
|
| `entries` | [PluginEntry] | Paginated list of plugin entries. |
|
||||||
|
|
||||||
|
### `curl` Example
|
||||||
|
|
||||||
|
```sh
|
||||||
|
curl 'http://host:GRAPHQL_PORT/graphql' \
|
||||||
|
-X POST \
|
||||||
|
-H 'Authorization: Bearer API_TOKEN' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"query": "query GetPluginObjects($options: PluginQueryOptionsInput) { pluginsObjects(options: $options) { dbCount count entries { index plugin objectPrimaryId status foreignKey } } }",
|
||||||
|
"variables": {
|
||||||
|
"options": {
|
||||||
|
"plugin": "ARPSCAN",
|
||||||
|
"page": 1,
|
||||||
|
"limit": 25
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Badge Prefetch (Batched Counts)
|
||||||
|
|
||||||
|
Use GraphQL aliases to fetch counts for all plugins in a single request:
|
||||||
|
|
||||||
|
```graphql
|
||||||
|
query BadgeCounts {
|
||||||
|
ARPSCAN: pluginsObjects(options: {plugin: "ARPSCAN", page: 1, limit: 1}) { dbCount }
|
||||||
|
INTRNT: pluginsObjects(options: {plugin: "INTRNT", page: 1, limit: 1}) { dbCount }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Events Query
|
||||||
|
|
||||||
|
Access the Events table with server-side pagination, filtering, and search.
|
||||||
|
|
||||||
|
### Sample Query
|
||||||
|
|
||||||
|
```graphql
|
||||||
|
query GetEvents($options: EventQueryOptionsInput) {
|
||||||
|
events(options: $options) {
|
||||||
|
dbCount
|
||||||
|
count
|
||||||
|
entries {
|
||||||
|
eveMac
|
||||||
|
eveIp
|
||||||
|
eveDateTime
|
||||||
|
eveEventType
|
||||||
|
eveAdditionalInfo
|
||||||
|
evePendingAlertEmail
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Query Parameters (`EventQueryOptionsInput`)
|
||||||
|
|
||||||
|
| Parameter | Type | Description |
|
||||||
|
| ----------- | ------------------ | ------------------------------------------------ |
|
||||||
|
| `page` | Int | Page number (1-based). |
|
||||||
|
| `limit` | Int | Rows per page (max 1000). |
|
||||||
|
| `sort` | [SortOptionsInput] | Sorting options (`field`, `order`). |
|
||||||
|
| `search` | String | Free-text search across key columns. |
|
||||||
|
| `filters` | [FilterOptionsInput] | Column-value exact-match filters. |
|
||||||
|
| `eveMac` | String | Filter by device MAC address. |
|
||||||
|
| `eventType` | String | Filter by event type (e.g. `"New Device"`). |
|
||||||
|
| `dateFrom` | String | Start of date range filter on `eveDateTime`. |
|
||||||
|
| `dateTo` | String | End of date range filter on `eveDateTime`. |
|
||||||
|
|
||||||
|
### Response Fields
|
||||||
|
|
||||||
|
| Field | Type | Description |
|
||||||
|
| --------- | ------------ | ------------------------------------------------------------ |
|
||||||
|
| `dbCount` | Int | Total rows in the Events table (before any filters). |
|
||||||
|
| `count` | Int | Total rows after all filters (before pagination). |
|
||||||
|
| `entries` | [EventEntry] | Paginated list of event entries. |
|
||||||
|
|
||||||
|
### `curl` Example
|
||||||
|
|
||||||
|
```sh
|
||||||
|
curl 'http://host:GRAPHQL_PORT/graphql' \
|
||||||
|
-X POST \
|
||||||
|
-H 'Authorization: Bearer API_TOKEN' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"query": "query GetEvents($options: EventQueryOptionsInput) { events(options: $options) { dbCount count entries { eveMac eveIp eveDateTime eveEventType } } }",
|
||||||
|
"variables": {
|
||||||
|
"options": {
|
||||||
|
"eveMac": "00:11:22:33:44:55",
|
||||||
|
"page": 1,
|
||||||
|
"limit": 50
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
* Device, settings, and LangStrings queries can be combined in **one request** since GraphQL supports batching.
|
* Device, settings, LangStrings, plugin, and event queries can be combined in **one request** since GraphQL supports batching.
|
||||||
* The `fallback_to_en` feature ensures UI always has a value even if a translation is missing.
|
* The `fallback_to_en` feature ensures UI always has a value even if a translation is missing.
|
||||||
* Data is **cached in memory** per JSON file; changes to language or plugin files will only refresh after the cache detects a file modification.
|
* Data is **cached in memory** per JSON file; changes to language or plugin files will only refresh after the cache detects a file modification.
|
||||||
* The `setOverriddenByEnv` flag helps identify setting values that are locked at container runtime.
|
* The `setOverriddenByEnv` flag helps identify setting values that are locked at container runtime.
|
||||||
* The schema is **read-only** — updates must be performed through other APIs or configuration management. See the other [API](API.md) endpoints for details.
|
* Plugin queries scope `dbCount` to the requested `plugin`/`foreignKey` so badge counts reflect per-plugin totals.
|
||||||
|
* The schema is **read-only** — updates must be performed through other APIs or configuration management. See the other [API](API.md) endpoints for details.
|
||||||
|
|
||||||
|
|||||||
@@ -106,12 +106,12 @@ curl -X DELETE "http://<server_ip>:<GRAPHQL_PORT>/sessions/delete" \
|
|||||||
"success": true,
|
"success": true,
|
||||||
"sessions": [
|
"sessions": [
|
||||||
{
|
{
|
||||||
"ses_MAC": "AA:BB:CC:DD:EE:FF",
|
"sesMac": "AA:BB:CC:DD:EE:FF",
|
||||||
"ses_Connection": "2025-08-01 10:00",
|
"sesDateTimeConnection": "2025-08-01 10:00",
|
||||||
"ses_Disconnection": "2025-08-01 12:00",
|
"sesDateTimeDisconnection": "2025-08-01 12:00",
|
||||||
"ses_Duration": "2h 0m",
|
"sesDuration": "2h 0m",
|
||||||
"ses_IP": "192.168.1.10",
|
"sesIp": "192.168.1.10",
|
||||||
"ses_Info": ""
|
"sesAdditionalInfo": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -194,12 +194,12 @@ curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/calendar?start=2025-08-0
|
|||||||
"success": true,
|
"success": true,
|
||||||
"sessions": [
|
"sessions": [
|
||||||
{
|
{
|
||||||
"ses_MAC": "AA:BB:CC:DD:EE:FF",
|
"sesMac": "AA:BB:CC:DD:EE:FF",
|
||||||
"ses_Connection": "2025-08-01 10:00",
|
"sesDateTimeConnection": "2025-08-01 10:00",
|
||||||
"ses_Disconnection": "2025-08-01 12:00",
|
"sesDateTimeDisconnection": "2025-08-01 12:00",
|
||||||
"ses_Duration": "2h 0m",
|
"sesDuration": "2h 0m",
|
||||||
"ses_IP": "192.168.1.10",
|
"sesIp": "192.168.1.10",
|
||||||
"ses_Info": ""
|
"sesAdditionalInfo": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -224,15 +224,33 @@ curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/AA:BB:CC:DD:EE:FF?period
|
|||||||
* `type` → Event type (`all`, `sessions`, `missing`, `voided`, `new`, `down`)
|
* `type` → Event type (`all`, `sessions`, `missing`, `voided`, `new`, `down`)
|
||||||
Default: `all`
|
Default: `all`
|
||||||
* `period` → Period to retrieve events (`7 days`, `1 month`, etc.)
|
* `period` → Period to retrieve events (`7 days`, `1 month`, etc.)
|
||||||
|
* `page` → Page number, 1-based (default: `1`)
|
||||||
|
* `limit` → Rows per page, max 1000 (default: `100`)
|
||||||
|
* `search` → Free-text search filter across all columns
|
||||||
|
* `sortCol` → Column index to sort by, 0-based (default: `0`)
|
||||||
|
* `sortDir` → Sort direction: `asc` or `desc` (default: `desc`)
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```
|
```
|
||||||
/sessions/session-events?type=all&period=7 days
|
/sessions/session-events?type=all&period=7 days&page=1&limit=25&sortCol=3&sortDir=desc
|
||||||
```
|
```
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
Returns a list of events or sessions with formatted connection, disconnection, duration, and IP information.
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"data": [...],
|
||||||
|
"total": 150,
|
||||||
|
"recordsFiltered": 150
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Field | Type | Description |
|
||||||
|
| ----------------- | ---- | ------------------------------------------------- |
|
||||||
|
| `data` | list | Paginated rows (each row is a list of values). |
|
||||||
|
| `total` | int | Total rows before search filter. |
|
||||||
|
| `recordsFiltered` | int | Total rows after search filter (before paging). |
|
||||||
|
|
||||||
#### `curl` Example
|
#### `curl` Example
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Input data from the plugin might cause mapping issues in specific edge cases. Lo
|
|||||||
17:31:05 [Scheduler] run for PIHOLE: YES
|
17:31:05 [Scheduler] run for PIHOLE: YES
|
||||||
17:31:05 [Plugin utils] ---------------------------------------------
|
17:31:05 [Plugin utils] ---------------------------------------------
|
||||||
17:31:05 [Plugin utils] display_name: PiHole (Device sync)
|
17:31:05 [Plugin utils] display_name: PiHole (Device sync)
|
||||||
17:31:05 [Plugins] CMD: SELECT n.hwaddr AS Object_PrimaryID, {s-quote}null{s-quote} AS Object_SecondaryID, datetime() AS DateTime, na.ip AS Watched_Value1, n.lastQuery AS Watched_Value2, na.name AS Watched_Value3, n.macVendor AS Watched_Value4, {s-quote}null{s-quote} AS Extra, n.hwaddr AS ForeignKey FROM EXTERNAL_PIHOLE.Network AS n LEFT JOIN EXTERNAL_PIHOLE.Network_Addresses AS na ON na.network_id = n.id WHERE n.hwaddr NOT LIKE {s-quote}ip-%{s-quote} AND n.hwaddr is not {s-quote}00:00:00:00:00:00{s-quote} AND na.ip is not null
|
17:31:05 [Plugins] CMD: SELECT n.hwaddr AS objectPrimaryId, {s-quote}null{s-quote} AS objectSecondaryId, datetime() AS DateTime, na.ip AS watchedValue1, n.lastQuery AS watchedValue2, na.name AS watchedValue3, n.macVendor AS watchedValue4, {s-quote}null{s-quote} AS Extra, n.hwaddr AS ForeignKey FROM EXTERNAL_PIHOLE.Network AS n LEFT JOIN EXTERNAL_PIHOLE.Network_Addresses AS na ON na.network_id = n.id WHERE n.hwaddr NOT LIKE {s-quote}ip-%{s-quote} AND n.hwaddr is not {s-quote}00:00:00:00:00:00{s-quote} AND na.ip is not null
|
||||||
17:31:05 [Plugins] setTyp: subnets
|
17:31:05 [Plugins] setTyp: subnets
|
||||||
17:31:05 [Plugin utils] Flattening the below array
|
17:31:05 [Plugin utils] Flattening the below array
|
||||||
17:31:05 ['192.168.1.0/24 --interface=eth1']
|
17:31:05 ['192.168.1.0/24 --interface=eth1']
|
||||||
@@ -52,7 +52,7 @@ Input data from the plugin might cause mapping issues in specific edge cases. Lo
|
|||||||
17:31:05 [Plugins] Convert to Base64: True
|
17:31:05 [Plugins] Convert to Base64: True
|
||||||
17:31:05 [Plugins] base64 value: b'MTkyLjE2OC4xLjAvMjQgLS1pbnRlcmZhY2U9ZXRoMQ=='
|
17:31:05 [Plugins] base64 value: b'MTkyLjE2OC4xLjAvMjQgLS1pbnRlcmZhY2U9ZXRoMQ=='
|
||||||
17:31:05 [Plugins] Timeout: 10
|
17:31:05 [Plugins] Timeout: 10
|
||||||
17:31:05 [Plugins] Executing: SELECT n.hwaddr AS Object_PrimaryID, 'null' AS Object_SecondaryID, datetime() AS DateTime, na.ip AS Watched_Value1, n.lastQuery AS Watched_Value2, na.name AS Watched_Value3, n.macVendor AS Watched_Value4, 'null' AS Extra, n.hwaddr AS ForeignKey FROM EXTERNAL_PIHOLE.Network AS n LEFT JOIN EXTERNAL_PIHOLE.Network_Addresses AS na ON na.network_id = n.id WHERE n.hwaddr NOT LIKE 'ip-%' AND n.hwaddr is not '00:00:00:00:00:00' AND na.ip is not null
|
17:31:05 [Plugins] Executing: SELECT n.hwaddr AS objectPrimaryId, 'null' AS objectSecondaryId, datetime() AS DateTime, na.ip AS watchedValue1, n.lastQuery AS watchedValue2, na.name AS watchedValue3, n.macVendor AS watchedValue4, 'null' AS Extra, n.hwaddr AS ForeignKey FROM EXTERNAL_PIHOLE.Network AS n LEFT JOIN EXTERNAL_PIHOLE.Network_Addresses AS na ON na.network_id = n.id WHERE n.hwaddr NOT LIKE 'ip-%' AND n.hwaddr is not '00:00:00:00:00:00' AND na.ip is not null
|
||||||
🔻
|
🔻
|
||||||
17:31:05 [Plugins] SUCCESS, received 2 entries
|
17:31:05 [Plugins] SUCCESS, received 2 entries
|
||||||
17:31:05 [Plugins] sqlParam entries: [(0, 'PIHOLE', '01:01:01:01:01:01', 'null', 'null', '2023-12-25 06:31:05', '172.30.0.1', 0, 'aaaa', 'vvvvvvvvv', 'not-processed', 'null', 'null', '01:01:01:01:01:01'), (0, 'PIHOLE', '02:42:ac:1e:00:02', 'null', 'null', '2023-12-25 06:31:05', '172.30.0.2', 0, 'dddd', 'vvvvv2222', 'not-processed', 'null', 'null', '02:42:ac:1e:00:02')]
|
17:31:05 [Plugins] sqlParam entries: [(0, 'PIHOLE', '01:01:01:01:01:01', 'null', 'null', '2023-12-25 06:31:05', '172.30.0.1', 0, 'aaaa', 'vvvvvvvvv', 'not-processed', 'null', 'null', '01:01:01:01:01:01'), (0, 'PIHOLE', '02:42:ac:1e:00:02', 'null', 'null', '2023-12-25 06:31:05', '172.30.0.2', 0, 'dddd', 'vvvvv2222', 'not-processed', 'null', 'null', '02:42:ac:1e:00:02')]
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# Notifications 📧
|
# Notifications 📧
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Want to customize how devices appear in text notifications? See [Notification Text Templates](NOTIFICATION_TEMPLATES.md).
|
||||||
|
|
||||||
There are 4 ways how to influence notifications:
|
There are 4 ways how to influence notifications:
|
||||||
|
|
||||||
1. On the device itself
|
1. On the device itself
|
||||||
@@ -33,7 +36,7 @@ The following device properties influence notifications. You can:
|
|||||||
On almost all plugins there are 2 core settings, `<plugin>_WATCH` and `<plugin>_REPORT_ON`.
|
On almost all plugins there are 2 core settings, `<plugin>_WATCH` and `<plugin>_REPORT_ON`.
|
||||||
|
|
||||||
1. `<plugin>_WATCH` specifies the columns which the app should watch. If watched columns change the device state is considered changed. This changed status is then used to decide to send out notifications based on the `<plugin>_REPORT_ON` setting.
|
1. `<plugin>_WATCH` specifies the columns which the app should watch. If watched columns change the device state is considered changed. This changed status is then used to decide to send out notifications based on the `<plugin>_REPORT_ON` setting.
|
||||||
2. `<plugin>_REPORT_ON` let's you specify on which events the app should notify you. This is related to the `<plugin>_WATCH` setting. So if you select `watched-changed` and in `<plugin>_WATCH` you only select `Watched_Value1`, then a notification is triggered if `Watched_Value1` is changed from the previous value, but no notification is send if `Watched_Value2` changes.
|
2. `<plugin>_REPORT_ON` let's you specify on which events the app should notify you. This is related to the `<plugin>_WATCH` setting. So if you select `watched-changed` and in `<plugin>_WATCH` you only select `watchedValue1`, then a notification is triggered if `watchedValue1` is changed from the previous value, but no notification is send if `watchedValue2` changes.
|
||||||
|
|
||||||
Click the **Read more in the docs.** Link at the top of each plugin to get more details on how the given plugin works.
|
Click the **Read more in the docs.** Link at the top of each plugin to get more details on how the given plugin works.
|
||||||
|
|
||||||
|
|||||||
100
docs/NOTIFICATION_TEMPLATES.md
Normal file
100
docs/NOTIFICATION_TEMPLATES.md
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
# Notification Text Templates
|
||||||
|
|
||||||
|
> Customize how devices and events appear in **text** notifications (email previews, push notifications, Apprise messages).
|
||||||
|
|
||||||
|
By default, NetAlertX formats each device as a vertical list of `Header: Value` pairs. Text templates let you define a **single-line format per device** using `{FieldName}` placeholders — ideal for mobile notification previews and high-volume alerts.
|
||||||
|
|
||||||
|
HTML email tables are **not affected** by these templates.
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
1. Go to **Settings → Notification Processing**.
|
||||||
|
2. Set a template string for the section you want to customize, e.g.:
|
||||||
|
- **Text Template: New Devices** → `{devName} ({eveMac}) - {eveIp}`
|
||||||
|
3. Save. The next notification will use your format.
|
||||||
|
|
||||||
|
**Before (default):**
|
||||||
|
```
|
||||||
|
🆕 New devices
|
||||||
|
---------
|
||||||
|
devName: MyPhone
|
||||||
|
eveMac: aa:bb:cc:dd:ee:ff
|
||||||
|
devVendor: Apple
|
||||||
|
eveIp: 192.168.1.42
|
||||||
|
eveDateTime: 2025-01-15 10:30:00
|
||||||
|
eveEventType: New Device
|
||||||
|
devComments:
|
||||||
|
```
|
||||||
|
|
||||||
|
**After (with template `{devName} ({eveMac}) - {eveIp}`):**
|
||||||
|
```
|
||||||
|
🆕 New devices
|
||||||
|
---------
|
||||||
|
MyPhone (aa:bb:cc:dd:ee:ff) - 192.168.1.42
|
||||||
|
```
|
||||||
|
|
||||||
|
## Settings Reference
|
||||||
|
|
||||||
|
| Setting | Type | Default | Description |
|
||||||
|
|---------|------|---------|-------------|
|
||||||
|
| `NTFPRCS_TEXT_SECTION_HEADERS` | Boolean | `true` | Show/hide section titles (e.g. `🆕 New devices \n---------`). |
|
||||||
|
| `NTFPRCS_TEXT_TEMPLATE_new_devices` | String | *(empty)* | Template for new device rows. |
|
||||||
|
| `NTFPRCS_TEXT_TEMPLATE_down_devices` | String | *(empty)* | Template for down device rows. |
|
||||||
|
| `NTFPRCS_TEXT_TEMPLATE_down_reconnected` | String | *(empty)* | Template for reconnected device rows. |
|
||||||
|
| `NTFPRCS_TEXT_TEMPLATE_events` | String | *(empty)* | Template for event rows. |
|
||||||
|
| `NTFPRCS_TEXT_TEMPLATE_plugins` | String | *(empty)* | Template for plugin event rows. |
|
||||||
|
|
||||||
|
When a template is **empty**, the section uses the original vertical `Header: Value` format (full backward compatibility).
|
||||||
|
|
||||||
|
## Template Syntax
|
||||||
|
|
||||||
|
Use `{FieldName}` to insert a value from the notification data. Field names are **case-sensitive** and must match the column names exactly.
|
||||||
|
|
||||||
|
```
|
||||||
|
{devName} ({eveMac}) connected at {eveDateTime}
|
||||||
|
```
|
||||||
|
|
||||||
|
- No loops, conditionals, or nesting — just simple string replacement.
|
||||||
|
- If a `{FieldName}` does not exist in the data, it is left as-is in the output (safe failure). For example, `{NonExistent}` renders literally as `{NonExistent}`.
|
||||||
|
|
||||||
|
## Variable Availability by Section
|
||||||
|
|
||||||
|
All four device sections (`new_devices`, `down_devices`, `down_reconnected`, `events`) share the same unified field names.
|
||||||
|
|
||||||
|
### `new_devices`, `down_devices`, `down_reconnected`, and `events`
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
|----------|-------------|
|
||||||
|
| `{devName}` | Device display name |
|
||||||
|
| `{eveMac}` | Device MAC address |
|
||||||
|
| `{devVendor}` | Device vendor/manufacturer |
|
||||||
|
| `{eveIp}` | Device IP address |
|
||||||
|
| `{eveDateTime}` | Event timestamp |
|
||||||
|
| `{eveEventType}` | Type of event (e.g. `New Device`, `Connected`, `Device Down`) |
|
||||||
|
| `{devComments}` | Device comments |
|
||||||
|
|
||||||
|
**Example (new_devices/events):** `{devName} ({eveMac}) - {eveIp} [{eveEventType}]`
|
||||||
|
|
||||||
|
**Example (down_devices):** `{devName} ({eveMac}) {devVendor} - went down at {eveDateTime}`
|
||||||
|
|
||||||
|
**Example (down_reconnected):** `{devName} ({eveMac}) reconnected at {eveDateTime}`
|
||||||
|
|
||||||
|
### `plugins`
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
|----------|-------------|
|
||||||
|
| `{plugin}` | Plugin code name |
|
||||||
|
| `{objectPrimaryId}` | Primary identifier of the object |
|
||||||
|
| `{objectSecondaryId}` | Secondary identifier |
|
||||||
|
| `{dateTimeChanged}` | Timestamp of change |
|
||||||
|
| `{watchedValue1}` | First watched value |
|
||||||
|
| `{watchedValue2}` | Second watched value |
|
||||||
|
| `{watchedValue3}` | Third watched value |
|
||||||
|
| `{watchedValue4}` | Fourth watched value |
|
||||||
|
| `{status}` | Plugin event status |
|
||||||
|
|
||||||
|
**Example:** `{plugin}: {objectPrimaryId} - {status}`
|
||||||
|
|
||||||
|
## Section Headers Toggle
|
||||||
|
|
||||||
|
Set **Text Section Headers** (`NTFPRCS_TEXT_SECTION_HEADERS`) to `false` to remove the section title separators from text notifications. This is useful when you want compact output without the `🆕 New devices \n---------` banners.
|
||||||
@@ -179,13 +179,13 @@ Quick reference:
|
|||||||
|
|
||||||
| Column | Name | Required | Example |
|
| Column | Name | Required | Example |
|
||||||
|--------|------|----------|---------|
|
|--------|------|----------|---------|
|
||||||
| 0 | Object_PrimaryID | **YES** | `"device_name"` or `"192.168.1.1"` |
|
| 0 | objectPrimaryId | **YES** | `"device_name"` or `"192.168.1.1"` |
|
||||||
| 1 | Object_SecondaryID | no | `"secondary_id"` or `null` |
|
| 1 | objectSecondaryId | no | `"secondary_id"` or `null` |
|
||||||
| 2 | DateTime | **YES** | `"2023-01-02 15:56:30"` |
|
| 2 | DateTime | **YES** | `"2023-01-02 15:56:30"` |
|
||||||
| 3 | Watched_Value1 | **YES** | `"online"` or `"200"` |
|
| 3 | watchedValue1 | **YES** | `"online"` or `"200"` |
|
||||||
| 4 | Watched_Value2 | no | `"ip_address"` or `null` |
|
| 4 | watchedValue2 | no | `"ip_address"` or `null` |
|
||||||
| 5 | Watched_Value3 | no | `null` |
|
| 5 | watchedValue3 | no | `null` |
|
||||||
| 6 | Watched_Value4 | no | `null` |
|
| 6 | watchedValue4 | no | `null` |
|
||||||
| 7 | Extra | no | `"additional data"` or `null` |
|
| 7 | Extra | no | `"additional data"` or `null` |
|
||||||
| 8 | ForeignKey | no | `"aa:bb:cc:dd:ee:ff"` or `null` |
|
| 8 | ForeignKey | no | `"aa:bb:cc:dd:ee:ff"` or `null` |
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ Control which rows display in the UI:
|
|||||||
{
|
{
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -267,7 +267,7 @@ To import plugin data into NetAlertX tables for device discovery or notification
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_mac",
|
"type": "device_mac",
|
||||||
@@ -345,7 +345,7 @@ See [PLUGINS_DEV_SETTINGS.md](PLUGINS_DEV_SETTINGS.md) for complete settings doc
|
|||||||
|
|
||||||
### Plugin Output Format
|
### Plugin Output Format
|
||||||
```
|
```
|
||||||
Object_PrimaryID|Object_SecondaryID|DateTime|Watched_Value1|Watched_Value2|Watched_Value3|Watched_Value4|Extra|ForeignKey
|
objectPrimaryId|objectSecondaryId|DateTime|watchedValue1|watchedValue2|watchedValue3|watchedValue4|Extra|ForeignKey
|
||||||
```
|
```
|
||||||
9 required columns, 4 optional helpers = 13 max
|
9 required columns, 4 optional helpers = 13 max
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ It also describes plugin output expectations and the main plugin categories.
|
|||||||
* `database_column_definitions`
|
* `database_column_definitions`
|
||||||
* `mapped_to_table`
|
* `mapped_to_table`
|
||||||
|
|
||||||
**Example:** `Object_PrimaryID → devMAC`
|
**Example:** `objectPrimaryId → devMAC`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -88,9 +88,9 @@ Output values are pipe-delimited in a fixed order.
|
|||||||
|
|
||||||
#### Identifiers
|
#### Identifiers
|
||||||
|
|
||||||
* `Object_PrimaryID` and `Object_SecondaryID` uniquely identify records (for example, `MAC|IP`).
|
* `objectPrimaryId` and `objectSecondaryId` uniquely identify records (for example, `MAC|IP`).
|
||||||
|
|
||||||
#### Watched Values (`Watched_Value1–4`)
|
#### Watched Values (`watchedValue1–4`)
|
||||||
|
|
||||||
* Used by the core to detect changes between runs.
|
* Used by the core to detect changes between runs.
|
||||||
* Changes in these fields can trigger notifications.
|
* Changes in these fields can trigger notifications.
|
||||||
@@ -114,7 +114,7 @@ Output values are pipe-delimited in a fixed order.
|
|||||||
### 7. Persistence
|
### 7. Persistence
|
||||||
|
|
||||||
* Parsed data is **upserted** into the database.
|
* Parsed data is **upserted** into the database.
|
||||||
* Conflicts are resolved using the combined key: `Object_PrimaryID + Object_SecondaryID`.
|
* Conflicts are resolved using the combined key: `objectPrimaryId + objectSecondaryId`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ Query the NetAlertX SQLite database and display results.
|
|||||||
{
|
{
|
||||||
"function": "CMD",
|
"function": "CMD",
|
||||||
"type": {"dataType": "string", "elements": [{"elementType": "input", "elementOptions": [], "transformers": []}]},
|
"type": {"dataType": "string", "elements": [{"elementType": "input", "elementOptions": [], "transformers": []}]},
|
||||||
"default_value": "SELECT dv.devName as Object_PrimaryID, cast(dv.devLastIP as VARCHAR(100)) || ':' || cast(SUBSTR(ns.Port, 0, INSTR(ns.Port, '/')) as VARCHAR(100)) as Object_SecondaryID, datetime() as DateTime, ns.Service as Watched_Value1, ns.State as Watched_Value2, null as Watched_Value3, null as Watched_Value4, ns.Extra as Extra, dv.devMac as ForeignKey FROM (SELECT * FROM Nmap_Scan) ns LEFT JOIN (SELECT devName, devMac, devLastIP FROM Devices) dv ON ns.MAC = dv.devMac",
|
"default_value": "SELECT dv.devName as objectPrimaryId, cast(dv.devLastIP as VARCHAR(100)) || ':' || cast(SUBSTR(ns.Port, 0, INSTR(ns.Port, '/')) as VARCHAR(100)) as objectSecondaryId, datetime() as DateTime, ns.Service as watchedValue1, ns.State as watchedValue2, null as watchedValue3, null as watchedValue4, ns.Extra as Extra, dv.devMac as ForeignKey FROM (SELECT * FROM Nmap_Scan) ns LEFT JOIN (SELECT devName, devMac, devLastIP FROM Devices) dv ON ns.MAC = dv.devMac",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
"name": [{"language_code": "en_us", "string": "SQL to run"}],
|
"name": [{"language_code": "en_us", "string": "SQL to run"}],
|
||||||
"description": [{"language_code": "en_us", "string": "This SQL query populates the plugin table"}]
|
"description": [{"language_code": "en_us", "string": "This SQL query populates the plugin table"}]
|
||||||
@@ -118,13 +118,13 @@ Query the NetAlertX SQLite database and display results.
|
|||||||
|
|
||||||
```sql
|
```sql
|
||||||
SELECT
|
SELECT
|
||||||
e.EventValue as Object_PrimaryID,
|
e.EventValue as objectPrimaryId,
|
||||||
d.devName as Object_SecondaryID,
|
d.devName as objectSecondaryId,
|
||||||
e.EventDateTime as DateTime,
|
e.EventDateTime as DateTime,
|
||||||
e.EventType as Watched_Value1,
|
e.EventType as watchedValue1,
|
||||||
d.devLastIP as Watched_Value2,
|
d.devLastIP as watchedValue2,
|
||||||
null as Watched_Value3,
|
null as watchedValue3,
|
||||||
null as Watched_Value4,
|
null as watchedValue4,
|
||||||
e.EventDetails as Extra,
|
e.EventDetails as Extra,
|
||||||
d.devMac as ForeignKey
|
d.devMac as ForeignKey
|
||||||
FROM
|
FROM
|
||||||
@@ -181,7 +181,7 @@ Then set data source and query:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"function": "CMD",
|
"function": "CMD",
|
||||||
"default_value": "SELECT hwaddr as Object_PrimaryID, cast('http://' || (SELECT ip FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC LIMIT 1) as VARCHAR(100)) || ':' || cast(SUBSTR((SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC LIMIT 1), 0, INSTR((SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC LIMIT 1), '/')) as VARCHAR(100)) as Object_SecondaryID, datetime() as DateTime, macVendor as Watched_Value1, lastQuery as Watched_Value2, (SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC LIMIT 1) as Watched_Value3, null as Watched_Value4, '' as Extra, hwaddr as ForeignKey FROM EXTERNAL_PIHOLE.network WHERE hwaddr NOT LIKE 'ip-%' AND hwaddr <> '00:00:00:00:00:00'",
|
"default_value": "SELECT hwaddr as objectPrimaryId, cast('http://' || (SELECT ip FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC LIMIT 1) as VARCHAR(100)) || ':' || cast(SUBSTR((SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC LIMIT 1), 0, INSTR((SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC LIMIT 1), '/')) as VARCHAR(100)) as objectSecondaryId, datetime() as DateTime, macVendor as watchedValue1, lastQuery as watchedValue2, (SELECT name FROM EXTERNAL_PIHOLE.network_addresses WHERE network_id = id ORDER BY lastseen DESC LIMIT 1) as watchedValue3, null as watchedValue4, '' as Extra, hwaddr as ForeignKey FROM EXTERNAL_PIHOLE.network WHERE hwaddr NOT LIKE 'ip-%' AND hwaddr <> '00:00:00:00:00:00'",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
"name": [{"language_code": "en_us", "string": "SQL to run"}]
|
"name": [{"language_code": "en_us", "string": "SQL to run"}]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,19 +18,19 @@ Plugins communicate with NetAlertX by writing results to a **pipe-delimited log
|
|||||||
## Column Specification
|
## Column Specification
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> The order of columns is **FIXED** and cannot be changed. All 9 mandatory columns must be provided. If you use any optional column (`HelpVal1`), you must supply all optional columns (`HelpVal1` through `HelpVal4`).
|
> The order of columns is **FIXED** and cannot be changed. All 9 mandatory columns must be provided. If you use any optional column (`helpVal1`), you must supply all optional columns (`helpVal1` through `helpVal4`).
|
||||||
|
|
||||||
### Mandatory Columns (0–8)
|
### Mandatory Columns (0–8)
|
||||||
|
|
||||||
| Order | Column Name | Type | Required | Description |
|
| Order | Column Name | Type | Required | Description |
|
||||||
|-------|-------------|------|----------|-------------|
|
|-------|-------------|------|----------|-------------|
|
||||||
| 0 | `Object_PrimaryID` | string | **YES** | The primary identifier for grouping. Examples: device MAC, hostname, service name, or any unique ID |
|
| 0 | `objectPrimaryId` | string | **YES** | The primary identifier for grouping. Examples: device MAC, hostname, service name, or any unique ID |
|
||||||
| 1 | `Object_SecondaryID` | string | no | Secondary identifier for relationships (e.g., IP address, port, sub-ID). Use `null` if not needed |
|
| 1 | `objectSecondaryId` | string | no | Secondary identifier for relationships (e.g., IP address, port, sub-ID). Use `null` if not needed |
|
||||||
| 2 | `DateTime` | string | **YES** | Timestamp when the event/data was collected. Format: `YYYY-MM-DD HH:MM:SS` |
|
| 2 | `DateTime` | string | **YES** | Timestamp when the event/data was collected. Format: `YYYY-MM-DD HH:MM:SS` |
|
||||||
| 3 | `Watched_Value1` | string | **YES** | Primary watched value. Changes trigger notifications. Examples: IP address, status, version |
|
| 3 | `watchedValue1` | string | **YES** | Primary watched value. Changes trigger notifications. Examples: IP address, status, version |
|
||||||
| 4 | `Watched_Value2` | string | no | Secondary watched value. Use `null` if not needed |
|
| 4 | `watchedValue2` | string | no | Secondary watched value. Use `null` if not needed |
|
||||||
| 5 | `Watched_Value3` | string | no | Tertiary watched value. Use `null` if not needed |
|
| 5 | `watchedValue3` | string | no | Tertiary watched value. Use `null` if not needed |
|
||||||
| 6 | `Watched_Value4` | string | no | Quaternary watched value. Use `null` if not needed |
|
| 6 | `watchedValue4` | string | no | Quaternary watched value. Use `null` if not needed |
|
||||||
| 7 | `Extra` | string | no | Any additional metadata to display in UI and notifications. Use `null` if not needed |
|
| 7 | `Extra` | string | no | Any additional metadata to display in UI and notifications. Use `null` if not needed |
|
||||||
| 8 | `ForeignKey` | string | no | Foreign key linking to parent object (usually MAC address for device relationship). Use `null` if not needed |
|
| 8 | `ForeignKey` | string | no | Foreign key linking to parent object (usually MAC address for device relationship). Use `null` if not needed |
|
||||||
|
|
||||||
@@ -38,10 +38,10 @@ Plugins communicate with NetAlertX by writing results to a **pipe-delimited log
|
|||||||
|
|
||||||
| Order | Column Name | Type | Required | Description |
|
| Order | Column Name | Type | Required | Description |
|
||||||
|-------|-------------|------|----------|-------------|
|
|-------|-------------|------|----------|-------------|
|
||||||
| 9 | `HelpVal1` | string | *conditional* | Helper value 1. If used, all help values must be supplied |
|
| 9 | `helpVal1` | string | *conditional* | Helper value 1. If used, all help values must be supplied |
|
||||||
| 10 | `HelpVal2` | string | *conditional* | Helper value 2. If used, all help values must be supplied |
|
| 10 | `helpVal2` | string | *conditional* | Helper value 2. If used, all help values must be supplied |
|
||||||
| 11 | `HelpVal3` | string | *conditional* | Helper value 3. If used, all help values must be supplied |
|
| 11 | `helpVal3` | string | *conditional* | Helper value 3. If used, all help values must be supplied |
|
||||||
| 12 | `HelpVal4` | string | *conditional* | Helper value 4. If used, all help values must be supplied |
|
| 12 | `helpVal4` | string | *conditional* | Helper value 4. If used, all help values must be supplied |
|
||||||
|
|
||||||
## Usage Guide
|
## Usage Guide
|
||||||
|
|
||||||
@@ -58,15 +58,15 @@ Watched values are fields that the NetAlertX core monitors for **changes between
|
|||||||
|
|
||||||
**How to use them:**
|
**How to use them:**
|
||||||
|
|
||||||
- `Watched_Value1`: Always required; primary indicator of status/state
|
- `watchedValue1`: Always required; primary indicator of status/state
|
||||||
- `Watched_Value2–4`: Optional; use for secondary/tertiary state information
|
- `watchedValue2–4`: Optional; use for secondary/tertiary state information
|
||||||
- Leave unused ones as `null`
|
- Leave unused ones as `null`
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
- Device scanner: `Watched_Value1 = "online"` or `"offline"`
|
- Device scanner: `watchedValue1 = "online"` or `"offline"`
|
||||||
- Port scanner: `Watched_Value1 = "80"` (port number), `Watched_Value2 = "open"` (state)
|
- Port scanner: `watchedValue1 = "80"` (port number), `watchedValue2 = "open"` (state)
|
||||||
- Service monitor: `Watched_Value1 = "200"` (HTTP status), `Watched_Value2 = "0.45"` (response time)
|
- Service monitor: `watchedValue1 = "200"` (HTTP status), `watchedValue2 = "0.45"` (response time)
|
||||||
|
|
||||||
### Foreign Key
|
### Foreign Key
|
||||||
|
|
||||||
@@ -110,14 +110,14 @@ https://google.com|null|2023-01-02 15:56:30|200|0.7898||null|null
|
|||||||
Missing pipe
|
Missing pipe
|
||||||
```
|
```
|
||||||
|
|
||||||
❌ **Missing mandatory Watched_Value1** (column 3):
|
❌ **Missing mandatory watchedValue1** (column 3):
|
||||||
```csv
|
```csv
|
||||||
https://duckduckgo.com|192.168.1.1|2023-01-02 15:56:30|null|0.9898|null|null|Best|null
|
https://duckduckgo.com|192.168.1.1|2023-01-02 15:56:30|null|0.9898|null|null|Best|null
|
||||||
↑
|
↑
|
||||||
Must not be null
|
Must not be null
|
||||||
```
|
```
|
||||||
|
|
||||||
❌ **Incomplete optional columns** (has HelpVal1 but missing HelpVal2–4):
|
❌ **Incomplete optional columns** (has helpVal1 but missing helpVal2–4):
|
||||||
```csv
|
```csv
|
||||||
device|null|2023-01-02 15:56:30|status|null|null|null|null|null|helper1
|
device|null|2023-01-02 15:56:30|status|null|null|null|null|null|helper1
|
||||||
↑
|
↑
|
||||||
@@ -146,19 +146,19 @@ plugin_objects = Plugin_Objects("YOURPREFIX")
|
|||||||
|
|
||||||
# Add objects
|
# Add objects
|
||||||
plugin_objects.add_object(
|
plugin_objects.add_object(
|
||||||
Object_PrimaryID="device_id",
|
objectPrimaryId="device_id",
|
||||||
Object_SecondaryID="192.168.1.1",
|
objectSecondaryId="192.168.1.1",
|
||||||
DateTime="2023-01-02 15:56:30",
|
DateTime="2023-01-02 15:56:30",
|
||||||
Watched_Value1="online",
|
watchedValue1="online",
|
||||||
Watched_Value2=None,
|
watchedValue2=None,
|
||||||
Watched_Value3=None,
|
watchedValue3=None,
|
||||||
Watched_Value4=None,
|
watchedValue4=None,
|
||||||
Extra="Additional data",
|
Extra="Additional data",
|
||||||
ForeignKey="aa:bb:cc:dd:ee:ff",
|
ForeignKey="aa:bb:cc:dd:ee:ff",
|
||||||
HelpVal1=None,
|
helpVal1=None,
|
||||||
HelpVal2=None,
|
helpVal2=None,
|
||||||
HelpVal3=None,
|
helpVal3=None,
|
||||||
HelpVal4=None
|
helpVal4=None
|
||||||
)
|
)
|
||||||
|
|
||||||
# Write results (handles formatting, sanitization, and file creation)
|
# Write results (handles formatting, sanitization, and file creation)
|
||||||
@@ -177,7 +177,7 @@ The library automatically:
|
|||||||
|
|
||||||
The core runs **de-duplication once per hour** on the `Plugins_Objects` table:
|
The core runs **de-duplication once per hour** on the `Plugins_Objects` table:
|
||||||
|
|
||||||
- **Duplicate Detection Key:** Combination of `Object_PrimaryID`, `Object_SecondaryID`, `Plugin` (auto-filled from `unique_prefix`), and `UserData`
|
- **Duplicate Detection Key:** Combination of `objectPrimaryId`, `objectSecondaryId`, `Plugin` (auto-filled from `unique_prefix`), and `UserData`
|
||||||
- **Resolution:** Oldest duplicate entries are removed, newest are kept
|
- **Resolution:** Oldest duplicate entries are removed, newest are kept
|
||||||
- **Use Case:** Prevents duplicate notifications when the same object is detected multiple times
|
- **Use Case:** Prevents duplicate notifications when the same object is detected multiple times
|
||||||
|
|
||||||
@@ -213,9 +213,9 @@ Before writing your plugin's `script.py`, ensure:
|
|||||||
|
|
||||||
- [ ] **9 or 13 columns** in each output line (8 or 12 pipe separators)
|
- [ ] **9 or 13 columns** in each output line (8 or 12 pipe separators)
|
||||||
- [ ] **Mandatory columns filled:**
|
- [ ] **Mandatory columns filled:**
|
||||||
- Column 0: `Object_PrimaryID` (not null)
|
- Column 0: `objectPrimaryId` (not null)
|
||||||
- Column 2: `DateTime` in `YYYY-MM-DD HH:MM:SS` format
|
- Column 2: `DateTime` in `YYYY-MM-DD HH:MM:SS` format
|
||||||
- Column 3: `Watched_Value1` (not null)
|
- Column 3: `watchedValue1` (not null)
|
||||||
- [ ] **Null values as literal string** `null` (not empty string or special chars)
|
- [ ] **Null values as literal string** `null` (not empty string or special chars)
|
||||||
- [ ] **No extra pipes or misaligned columns**
|
- [ ] **No extra pipes or misaligned columns**
|
||||||
- [ ] **If using optional helpers** (columns 9–12), all 4 must be present
|
- [ ] **If using optional helpers** (columns 9–12), all 4 must be present
|
||||||
|
|||||||
@@ -68,13 +68,13 @@ try:
|
|||||||
|
|
||||||
# Add an object to results
|
# Add an object to results
|
||||||
plugin_objects.add_object(
|
plugin_objects.add_object(
|
||||||
Object_PrimaryID="example_id",
|
objectPrimaryId="example_id",
|
||||||
Object_SecondaryID=None,
|
objectSecondaryId=None,
|
||||||
DateTime="2023-01-02 15:56:30",
|
DateTime="2023-01-02 15:56:30",
|
||||||
Watched_Value1="value1",
|
watchedValue1="value1",
|
||||||
Watched_Value2=None,
|
watchedValue2=None,
|
||||||
Watched_Value3=None,
|
watchedValue3=None,
|
||||||
Watched_Value4=None,
|
watchedValue4=None,
|
||||||
Extra="additional_data",
|
Extra="additional_data",
|
||||||
ForeignKey=None
|
ForeignKey=None
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Each column definition specifies:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "devMac",
|
"mapped_to_column": "devMac",
|
||||||
"mapped_to_column_data": null,
|
"mapped_to_column_data": null,
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
@@ -39,7 +39,7 @@ Each column definition specifies:
|
|||||||
|
|
||||||
| Property | Type | Required | Description |
|
| Property | Type | Required | Description |
|
||||||
|----------|------|----------|-------------|
|
|----------|------|----------|-------------|
|
||||||
| `column` | string | **YES** | Source column name from data contract (e.g., `Object_PrimaryID`, `Watched_Value1`) |
|
| `column` | string | **YES** | Source column name from data contract (e.g., `objectPrimaryId`, `watchedValue1`) |
|
||||||
| `mapped_to_column` | string | no | Target database column if mapping to a table like `CurrentScan` |
|
| `mapped_to_column` | string | no | Target database column if mapping to a table like `CurrentScan` |
|
||||||
| `mapped_to_column_data` | object | no | Static value to map instead of using column data |
|
| `mapped_to_column_data` | object | no | Static value to map instead of using column data |
|
||||||
| `css_classes` | string | no | Bootstrap CSS classes for width/spacing (e.g., `"col-sm-2"`, `"col-sm-6"`) |
|
| `css_classes` | string | no | Bootstrap CSS classes for width/spacing (e.g., `"col-sm-2"`, `"col-sm-6"`) |
|
||||||
@@ -64,7 +64,7 @@ Plain text display (read-only).
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -99,7 +99,7 @@ Resolves an IP address to a MAC address and creates a device link.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_ip",
|
"type": "device_ip",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -117,7 +117,7 @@ Creates a device link with the target device's name as the link label.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -135,7 +135,7 @@ Renders as a clickable HTTP/HTTPS link.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "url",
|
"type": "url",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -153,7 +153,7 @@ Creates two links (HTTP and HTTPS) as lock icons for the given IP/hostname.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "url_http_https",
|
"type": "url_http_https",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -207,7 +207,7 @@ Color-codes values based on ranges. Useful for status codes, latency, capacity p
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "threshold",
|
"type": "threshold",
|
||||||
"options": [
|
"options": [
|
||||||
@@ -252,7 +252,7 @@ Replaces specific values with display strings or HTML.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
"options": [
|
"options": [
|
||||||
@@ -286,7 +286,7 @@ Applies a regular expression to extract/transform values.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "regex",
|
"type": "regex",
|
||||||
"options": [
|
"options": [
|
||||||
@@ -310,7 +310,7 @@ Evaluates JavaScript code with access to the column value (use `${value}` or `{v
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
@@ -322,7 +322,7 @@ Evaluates JavaScript code with access to the column value (use `${value}` or `{v
|
|||||||
**Example with custom formatting:**
|
**Example with custom formatting:**
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
"options": [
|
"options": [
|
||||||
@@ -347,7 +347,7 @@ You can chain multiple transformations with dot notation:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "regex.url_http_https",
|
"type": "regex.url_http_https",
|
||||||
"options": [
|
"options": [
|
||||||
@@ -376,7 +376,7 @@ Use SQL query results to populate dropdown options:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"options": ["{value}"],
|
"options": ["{value}"],
|
||||||
@@ -405,7 +405,7 @@ Use plugin settings to populate options:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"options": ["{value}"],
|
"options": ["{value}"],
|
||||||
@@ -439,7 +439,7 @@ To import plugin data into the device scan pipeline (for notifications, heuristi
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_mac",
|
"type": "device_mac",
|
||||||
@@ -447,7 +447,7 @@ To import plugin data into the device scan pipeline (for notifications, heuristi
|
|||||||
"name": [{"language_code": "en_us", "string": "MAC Address"}]
|
"name": [{"language_code": "en_us", "string": "MAC Address"}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_ip",
|
"type": "device_ip",
|
||||||
@@ -501,7 +501,7 @@ Control which rows are displayed based on filter conditions. Filters are applied
|
|||||||
{
|
{
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -545,7 +545,7 @@ When viewing a device detail page, the `txtMacFilter` field is populated with th
|
|||||||
{
|
{
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -555,7 +555,7 @@ When viewing a device detail page, the `txtMacFilter` field is populated with th
|
|||||||
"name": [{"language_code": "en_us", "string": "MAC Address"}]
|
"name": [{"language_code": "en_us", "string": "MAC Address"}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -574,7 +574,7 @@ When viewing a device detail page, the `txtMacFilter` field is populated with th
|
|||||||
"name": [{"language_code": "en_us", "string": "Last Seen"}]
|
"name": [{"language_code": "en_us", "string": "Last Seen"}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "threshold",
|
"type": "threshold",
|
||||||
@@ -589,7 +589,7 @@ When viewing a device detail page, the `txtMacFilter` field is populated with th
|
|||||||
"name": [{"language_code": "en_us", "string": "HTTP Status"}]
|
"name": [{"language_code": "en_us", "string": "HTTP Status"}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -61,16 +61,16 @@ $(document).ready(function () {
|
|||||||
appEvents(options: $options) {
|
appEvents(options: $options) {
|
||||||
count
|
count
|
||||||
appEvents {
|
appEvents {
|
||||||
DateTimeCreated
|
dateTimeCreated
|
||||||
AppEventProcessed
|
appEventProcessed
|
||||||
AppEventType
|
appEventType
|
||||||
ObjectType
|
objectType
|
||||||
ObjectPrimaryID
|
objectPrimaryId
|
||||||
ObjectSecondaryID
|
objectSecondaryId
|
||||||
ObjectStatus
|
objectStatus
|
||||||
ObjectPlugin
|
objectPlugin
|
||||||
ObjectGUID
|
objectGuid
|
||||||
GUID
|
guid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,16 +128,16 @@ $(document).ready(function () {
|
|||||||
},
|
},
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{ data: 'DateTimeCreated', title: getString('AppEvents_DateTimeCreated') },
|
{ data: 'dateTimeCreated', title: getString('AppEvents_DateTimeCreated') },
|
||||||
{ data: 'AppEventProcessed', title: getString('AppEvents_AppEventProcessed') },
|
{ data: 'appEventProcessed', title: getString('AppEvents_AppEventProcessed') },
|
||||||
{ data: 'AppEventType', title: getString('AppEvents_Type') },
|
{ data: 'appEventType', title: getString('AppEvents_Type') },
|
||||||
{ data: 'ObjectType', title: getString('AppEvents_ObjectType') },
|
{ data: 'objectType', title: getString('AppEvents_ObjectType') },
|
||||||
{ data: 'ObjectPrimaryID', title: getString('AppEvents_ObjectPrimaryID') },
|
{ data: 'objectPrimaryId', title: getString('AppEvents_ObjectPrimaryID') },
|
||||||
{ data: 'ObjectSecondaryID', title: getString('AppEvents_ObjectSecondaryID') },
|
{ data: 'objectSecondaryId', title: getString('AppEvents_ObjectSecondaryID') },
|
||||||
{ data: 'ObjectStatus', title: getString('AppEvents_ObjectStatus') },
|
{ data: 'objectStatus', title: getString('AppEvents_ObjectStatus') },
|
||||||
{ data: 'ObjectPlugin', title: getString('AppEvents_Plugin') },
|
{ data: 'objectPlugin', title: getString('AppEvents_Plugin') },
|
||||||
{ data: 'ObjectGUID', title: 'Object GUID' },
|
{ data: 'objectGuid', title: 'Object GUID' },
|
||||||
{ data: 'GUID', title: 'Event GUID' }
|
{ data: 'guid', title: 'Event GUID' }
|
||||||
],
|
],
|
||||||
|
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
|
|||||||
@@ -32,51 +32,64 @@
|
|||||||
|
|
||||||
function loadEventsData() {
|
function loadEventsData() {
|
||||||
const hideConnections = $('#chkHideConnectionEvents')[0].checked;
|
const hideConnections = $('#chkHideConnectionEvents')[0].checked;
|
||||||
const hideConnectionsStr = hideConnections ? 'true' : 'false';
|
|
||||||
|
|
||||||
let period = $("#period").val();
|
let period = $("#period").val();
|
||||||
let { start, end } = getPeriodStartEnd(period);
|
let { start, end } = getPeriodStartEnd(period);
|
||||||
|
|
||||||
const rawSql = `
|
const apiToken = getSetting("API_TOKEN");
|
||||||
SELECT eve_DateTime, eve_EventType, eve_IP, eve_AdditionalInfo
|
const apiBase = getApiBase();
|
||||||
FROM Events
|
const graphqlUrl = `${apiBase}/graphql`;
|
||||||
WHERE eve_MAC = "${mac}"
|
|
||||||
AND eve_DateTime BETWEEN "${start}" AND "${end}"
|
const query = `
|
||||||
AND (
|
query Events($options: EventQueryOptionsInput) {
|
||||||
(eve_EventType NOT IN ("Connected", "Disconnected", "VOIDED - Connected", "VOIDED - Disconnected"))
|
events(options: $options) {
|
||||||
OR "${hideConnectionsStr}" = "false"
|
count
|
||||||
)
|
entries {
|
||||||
|
eveDateTime
|
||||||
|
eveEventType
|
||||||
|
eveIp
|
||||||
|
eveAdditionalInfo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const apiToken = getSetting("API_TOKEN");
|
|
||||||
|
|
||||||
const apiBaseUrl = getApiBase();
|
|
||||||
const url = `${apiBaseUrl}/dbquery/read`;
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: graphqlUrl,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": `Bearer ${apiToken}`
|
"Authorization": `Bearer ${apiToken}`
|
||||||
},
|
},
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
rawSql: btoa(rawSql)
|
query,
|
||||||
|
variables: {
|
||||||
|
options: {
|
||||||
|
eveMac: mac,
|
||||||
|
dateFrom: start,
|
||||||
|
dateTo: end,
|
||||||
|
limit: 500,
|
||||||
|
sort: [{ field: "eveDateTime", order: "desc" }]
|
||||||
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
// assuming read_query returns rows directly
|
const CONNECTION_TYPES = ["Connected", "Disconnected", "VOIDED - Connected", "VOIDED - Disconnected"];
|
||||||
const rows = data["results"].map(row => {
|
|
||||||
const rawDate = row.eve_DateTime;
|
|
||||||
const formattedDate = rawDate ? localizeTimestamp(rawDate) : '-';
|
|
||||||
|
|
||||||
return [
|
const rows = data.data.events.entries
|
||||||
formattedDate,
|
.filter(row => !hideConnections || !CONNECTION_TYPES.includes(row.eveEventType))
|
||||||
row.eve_DateTime,
|
.map(row => {
|
||||||
row.eve_EventType,
|
const rawDate = row.eveDateTime;
|
||||||
row.eve_IP,
|
const formattedDate = rawDate ? localizeTimestamp(rawDate) : '-';
|
||||||
row.eve_AdditionalInfo
|
|
||||||
];
|
return [
|
||||||
});
|
formattedDate,
|
||||||
|
row.eveDateTime,
|
||||||
|
row.eveEventType,
|
||||||
|
row.eveIp,
|
||||||
|
row.eveAdditionalInfo
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
const table = $('#tableEvents').DataTable();
|
const table = $('#tableEvents').DataTable();
|
||||||
table.clear();
|
table.clear();
|
||||||
|
|||||||
@@ -121,12 +121,12 @@ function loadSessionsData() {
|
|||||||
if (data.success && data.sessions.length) {
|
if (data.success && data.sessions.length) {
|
||||||
data.sessions.forEach(session => {
|
data.sessions.forEach(session => {
|
||||||
table.row.add([
|
table.row.add([
|
||||||
session.ses_DateTimeOrder,
|
session.sesDateTimeOrder,
|
||||||
session.ses_Connection,
|
session.sesConnection,
|
||||||
session.ses_Disconnection,
|
session.sesDisconnection,
|
||||||
session.ses_Duration,
|
session.sesDuration,
|
||||||
session.ses_IP,
|
session.sesIp,
|
||||||
session.ses_Info
|
session.sesInfo
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
111
front/events.php
111
front/events.php
@@ -105,21 +105,64 @@ function main() {
|
|||||||
$('#period').val(period);
|
$('#period').val(period);
|
||||||
initializeDatatable();
|
initializeDatatable();
|
||||||
getEventsTotals();
|
getEventsTotals();
|
||||||
getEvents(eventsType);
|
getEvents(eventsType); // triggers first serverSide draw
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------- Initialize DataTable ---------------- */
|
/* ---------------- Initialize DataTable ---------------- */
|
||||||
function initializeDatatable() {
|
function initializeDatatable() {
|
||||||
const table = $('#tableEvents').DataTable({
|
const apiBase = getApiBase();
|
||||||
paging: true,
|
const apiToken = getSetting("API_TOKEN");
|
||||||
|
|
||||||
|
$('#tableEvents').DataTable({
|
||||||
|
processing: true,
|
||||||
|
serverSide: true,
|
||||||
|
paging: true,
|
||||||
lengthChange: true,
|
lengthChange: true,
|
||||||
lengthMenu: getLengthMenu(getSetting("UI_DEFAULT_PAGE_SIZE")),
|
lengthMenu: getLengthMenu(getSetting("UI_DEFAULT_PAGE_SIZE")),
|
||||||
searching: true,
|
searching: true,
|
||||||
ordering: true,
|
ordering: true,
|
||||||
info: true,
|
info: true,
|
||||||
autoWidth: false,
|
autoWidth: false,
|
||||||
order: [[0, "desc"], [3, "desc"], [5, "desc"]],
|
order: [[0, "desc"]],
|
||||||
pageLength: tableRows,
|
pageLength: tableRows,
|
||||||
|
|
||||||
|
ajax: function (dtRequest, callback) {
|
||||||
|
const page = Math.floor(dtRequest.start / dtRequest.length) + 1;
|
||||||
|
const limit = dtRequest.length;
|
||||||
|
const search = dtRequest.search?.value || '';
|
||||||
|
const sortCol = dtRequest.order?.length ? dtRequest.order[0].column : 0;
|
||||||
|
const sortDir = dtRequest.order?.length ? dtRequest.order[0].dir : 'desc';
|
||||||
|
|
||||||
|
const url = `${apiBase}/sessions/session-events`
|
||||||
|
+ `?type=${encodeURIComponent(eventsType)}`
|
||||||
|
+ `&period=${encodeURIComponent(period)}`
|
||||||
|
+ `&page=${page}`
|
||||||
|
+ `&limit=${limit}`
|
||||||
|
+ `&sortCol=${sortCol}`
|
||||||
|
+ `&sortDir=${sortDir}`
|
||||||
|
+ (search ? `&search=${encodeURIComponent(search)}` : '');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url,
|
||||||
|
method: "GET",
|
||||||
|
dataType: "json",
|
||||||
|
headers: { "Authorization": `Bearer ${apiToken}` },
|
||||||
|
success: function (response) {
|
||||||
|
callback({
|
||||||
|
data: response.data || [],
|
||||||
|
recordsTotal: response.total || 0,
|
||||||
|
recordsFiltered: response.recordsFiltered || 0
|
||||||
|
});
|
||||||
|
hideSpinner();
|
||||||
|
},
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
console.error("Error fetching session events:", status, error, xhr.responseText);
|
||||||
|
callback({ data: [], recordsTotal: 0, recordsFiltered: 0 });
|
||||||
|
hideSpinner();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
{ targets: [0,5,6,7,8,10,11,12,13], visible: false },
|
{ targets: [0,5,6,7,8,10,11,12,13], visible: false },
|
||||||
{ targets: [7], orderData: [8] },
|
{ targets: [7], orderData: [8] },
|
||||||
@@ -131,14 +174,14 @@ function initializeDatatable() {
|
|||||||
{ targets: [3], createdCell: (td, cellData) => $(td).html(localizeTimestamp(cellData)) },
|
{ targets: [3], createdCell: (td, cellData) => $(td).html(localizeTimestamp(cellData)) },
|
||||||
{ targets: [4,5,6,7], createdCell: (td, cellData) => $(td).html(translateHTMLcodes(cellData)) }
|
{ targets: [4,5,6,7], createdCell: (td, cellData) => $(td).html(translateHTMLcodes(cellData)) }
|
||||||
],
|
],
|
||||||
processing: true, // Shows "processing" overlay
|
|
||||||
language: {
|
language: {
|
||||||
processing: '<table><td width="130px" align="middle"><?= lang("Events_Loading"); ?></td><td><i class="fa-solid fa-spinner fa-spin-pulse"></i></td></table>',
|
processing: '<table><td width="130px" align="middle"><?= lang("Events_Loading"); ?></td><td><i class="fa-solid fa-spinner fa-spin-pulse"></i></td></table>',
|
||||||
emptyTable: 'No data',
|
emptyTable: 'No data',
|
||||||
lengthMenu: "<?= lang('Events_Tablelenght'); ?>",
|
lengthMenu: "<?= lang('Events_Tablelenght'); ?>",
|
||||||
search: "<?= lang('Events_Searchbox'); ?>: ",
|
search: "<?= lang('Events_Searchbox'); ?>: ",
|
||||||
paginate: { next: "<?= lang('Events_Table_nav_next'); ?>", previous: "<?= lang('Events_Table_nav_prev'); ?>" },
|
paginate: { next: "<?= lang('Events_Table_nav_next'); ?>", previous: "<?= lang('Events_Table_nav_prev'); ?>" },
|
||||||
info: "<?= lang('Events_Table_info'); ?>"
|
info: "<?= lang('Events_Table_info'); ?>"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -179,53 +222,33 @@ function getEventsTotals() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------- Fetch events and reload DataTable ---------------- */
|
/* ---------------- Switch event type and reload DataTable ---------------- */
|
||||||
function getEvents(type) {
|
function getEvents(type) {
|
||||||
eventsType = type;
|
eventsType = type;
|
||||||
const table = $('#tableEvents').DataTable();
|
const table = $('#tableEvents').DataTable();
|
||||||
|
|
||||||
// Event type config: title, color, session columns visibility
|
// Event type config: title, color, session columns visibility
|
||||||
const config = {
|
const config = {
|
||||||
all: {title: 'Events_Shortcut_AllEvents', color: 'aqua', sesionCols: false},
|
all: {title: 'Events_Shortcut_AllEvents', color: 'aqua', sesionCols: false},
|
||||||
sessions: {title: 'Events_Shortcut_Sessions', color: 'green', sesionCols: true},
|
sessions: {title: 'Events_Shortcut_Sessions', color: 'green', sesionCols: true},
|
||||||
missing: {title: 'Events_Shortcut_MissSessions', color: 'yellow', sesionCols: true},
|
missing: {title: 'Events_Shortcut_MissSessions', color: 'yellow', sesionCols: true},
|
||||||
voided: {title: 'Events_Shortcut_VoidSessions', color: 'yellow', sesionCols: false},
|
voided: {title: 'Events_Shortcut_VoidSessions', color: 'yellow', sesionCols: false},
|
||||||
new: {title: 'Events_Shortcut_NewDevices', color: 'yellow', sesionCols: false},
|
new: {title: 'Events_Shortcut_NewDevices', color: 'yellow', sesionCols: false},
|
||||||
down: {title: 'Events_Shortcut_DownAlerts', color: 'red', sesionCols: false}
|
down: {title: 'Events_Shortcut_DownAlerts', color: 'red', sesionCols: false}
|
||||||
}[type] || {title: 'Events_Shortcut_Events', color: '', sesionCols: false};
|
}[type] || {title: 'Events_Shortcut_Events', color: '', sesionCols: false};
|
||||||
|
|
||||||
// Update title and color
|
// Update title and color
|
||||||
$('#tableEventsTitle').attr('class', 'box-title text-' + config.color).html(getString(config.title));
|
$('#tableEventsTitle').attr('class', 'box-title text-' + config.color).html(getString(config.title));
|
||||||
$('#tableEventsBox').attr('class', 'box box-' + config.color);
|
$('#tableEventsBox').attr('class', 'box box-' + config.color);
|
||||||
|
|
||||||
// Toggle columns visibility
|
// Toggle column visibility
|
||||||
table.column(3).visible(!config.sesionCols);
|
table.column(3).visible(!config.sesionCols);
|
||||||
table.column(4).visible(!config.sesionCols);
|
table.column(4).visible(!config.sesionCols);
|
||||||
table.column(5).visible(config.sesionCols);
|
table.column(5).visible(config.sesionCols);
|
||||||
table.column(6).visible(config.sesionCols);
|
table.column(6).visible(config.sesionCols);
|
||||||
table.column(7).visible(config.sesionCols);
|
table.column(7).visible(config.sesionCols);
|
||||||
|
|
||||||
// Build API URL
|
showSpinner();
|
||||||
const apiBase = getApiBase();
|
table.ajax.reload(null, true); // reset to page 1
|
||||||
const apiToken = getSetting("API_TOKEN");
|
|
||||||
const url = `${apiBase}/sessions/session-events?type=${encodeURIComponent(type)}&period=${encodeURIComponent(period)}`;
|
|
||||||
|
|
||||||
table.clear().draw(); // Clear old rows
|
|
||||||
|
|
||||||
showSpinner()
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url,
|
|
||||||
method: "GET",
|
|
||||||
dataType: "json",
|
|
||||||
headers: { "Authorization": `Bearer ${apiToken}` },
|
|
||||||
beforeSend: showSpinner, // Show spinner during fetch
|
|
||||||
complete: hideSpinner, // Hide spinner after fetch
|
|
||||||
success: response => {
|
|
||||||
const data = Array.isArray(response) ? response : response.data || [];
|
|
||||||
table.rows.add(data).draw();
|
|
||||||
},
|
|
||||||
error: (xhr, status, error) => console.error("Error fetching session events:", status, error, xhr.responseText)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
var completedCalls = []
|
var completedCalls = []
|
||||||
var completedCalls_final = ['cacheApiConfig', 'cacheSettings', 'cacheStrings', 'cacheDevices'];
|
var completedCalls_final = ['cacheApiConfig', 'cacheSettings', 'cacheStrings_v2', 'cacheDevices'];
|
||||||
var lang_completedCalls = 0;
|
var lang_completedCalls = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ function getSetting (key) {
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
function cacheStrings() {
|
function cacheStrings() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if(getCache(CACHE_KEYS.initFlag('cacheStrings')) === "true")
|
if(getCache(CACHE_KEYS.initFlag('cacheStrings_v2')) === "true")
|
||||||
{
|
{
|
||||||
// Core strings are cached, but plugin strings may have failed silently on
|
// Core strings are cached, but plugin strings may have failed silently on
|
||||||
// the first load (non-fatal fetch). Always re-fetch them so that plugin
|
// the first load (non-fatal fetch). Always re-fetch them so that plugin
|
||||||
@@ -304,7 +304,7 @@ function cacheStrings() {
|
|||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (!Array.isArray(data)) { data = []; }
|
if (!Array.isArray(data)) { data = []; }
|
||||||
data.forEach((langString) => {
|
data.forEach((langString) => {
|
||||||
setCache(CACHE_KEYS.langString(langString.String_Key, langString.Language_Code), langString.String_Value);
|
setCache(CACHE_KEYS.langString(langString.stringKey, langString.languageCode), langString.stringValue);
|
||||||
});
|
});
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
@@ -347,11 +347,11 @@ function cacheStrings() {
|
|||||||
if (!Array.isArray(data)) { data = []; }
|
if (!Array.isArray(data)) { data = []; }
|
||||||
// Store plugin translations
|
// Store plugin translations
|
||||||
data.forEach((langString) => {
|
data.forEach((langString) => {
|
||||||
setCache(CACHE_KEYS.langString(langString.String_Key, langString.Language_Code), langString.String_Value);
|
setCache(CACHE_KEYS.langString(langString.stringKey, langString.languageCode), langString.stringValue);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle successful completion of language processing
|
// Handle successful completion of language processing
|
||||||
handleSuccess('cacheStrings');
|
handleSuccess('cacheStrings_v2');
|
||||||
resolveLang();
|
resolveLang();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@@ -370,7 +370,7 @@ function cacheStrings() {
|
|||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
// Handle failure in any of the language processing
|
// Handle failure in any of the language processing
|
||||||
handleFailure('cacheStrings');
|
handleFailure('cacheStrings_v2');
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -789,7 +789,7 @@ const handleElementOptions = (setKey, elementOptions, transformers, val) => {
|
|||||||
let inputType = "text";
|
let inputType = "text";
|
||||||
let readOnly = "";
|
let readOnly = "";
|
||||||
let isMultiSelect = false;
|
let isMultiSelect = false;
|
||||||
let isOrdeable = false;
|
let isOrderable = false;
|
||||||
let cssClasses = "";
|
let cssClasses = "";
|
||||||
let placeholder = "";
|
let placeholder = "";
|
||||||
let suffix = "";
|
let suffix = "";
|
||||||
@@ -820,8 +820,8 @@ const handleElementOptions = (setKey, elementOptions, transformers, val) => {
|
|||||||
if (option.multiple === "true") {
|
if (option.multiple === "true") {
|
||||||
isMultiSelect = true;
|
isMultiSelect = true;
|
||||||
}
|
}
|
||||||
if (option.ordeable === "true") {
|
if (option.orderable === "true") {
|
||||||
isOrdeable = true;
|
isOrderable = true;
|
||||||
}
|
}
|
||||||
if (option.editable === "true") {
|
if (option.editable === "true") {
|
||||||
editable = true;
|
editable = true;
|
||||||
@@ -877,7 +877,7 @@ const handleElementOptions = (setKey, elementOptions, transformers, val) => {
|
|||||||
inputType,
|
inputType,
|
||||||
readOnly,
|
readOnly,
|
||||||
isMultiSelect,
|
isMultiSelect,
|
||||||
isOrdeable,
|
isOrderable,
|
||||||
cssClasses,
|
cssClasses,
|
||||||
placeholder,
|
placeholder,
|
||||||
suffix,
|
suffix,
|
||||||
@@ -1076,7 +1076,7 @@ function collectSetting(prefix, setCodeName, setType, settingsArray) {
|
|||||||
},
|
},
|
||||||
array: () => {
|
array: () => {
|
||||||
let temps = [];
|
let temps = [];
|
||||||
if (opts.isOrdeable) {
|
if (opts.isOrderable) {
|
||||||
temps = $(`#${setCodeName}`).val();
|
temps = $(`#${setCodeName}`).val();
|
||||||
} else {
|
} else {
|
||||||
const sel = $(`#${setCodeName}`).attr("my-editable") === "true" ? "" : ":selected";
|
const sel = $(`#${setCodeName}`).attr("my-editable") === "true" ? "" : ":selected";
|
||||||
@@ -1189,7 +1189,7 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori
|
|||||||
inputType,
|
inputType,
|
||||||
readOnly,
|
readOnly,
|
||||||
isMultiSelect,
|
isMultiSelect,
|
||||||
isOrdeable,
|
isOrderable,
|
||||||
cssClasses,
|
cssClasses,
|
||||||
placeholder,
|
placeholder,
|
||||||
suffix,
|
suffix,
|
||||||
@@ -1225,7 +1225,7 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori
|
|||||||
switch (elementType) {
|
switch (elementType) {
|
||||||
case 'select':
|
case 'select':
|
||||||
const multi = isMultiSelect ? "multiple" : "";
|
const multi = isMultiSelect ? "multiple" : "";
|
||||||
const addCss = isOrdeable ? "select2 select2-hidden-accessible" : "";
|
const addCss = isOrderable ? "select2 select2-hidden-accessible" : "";
|
||||||
|
|
||||||
inputHtml += `<select onChange="settingsChanged();${onChange}"
|
inputHtml += `<select onChange="settingsChanged();${onChange}"
|
||||||
onfocusout="${focusout}"
|
onfocusout="${focusout}"
|
||||||
|
|||||||
@@ -9059,6 +9059,11 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
|||||||
// Convert response if prev dataType is non-auto and differs from current
|
// Convert response if prev dataType is non-auto and differs from current
|
||||||
} else if ( prev !== "*" && prev !== current ) {
|
} else if ( prev !== "*" && prev !== current ) {
|
||||||
|
|
||||||
|
// Mitigate possible XSS vulnerability (gh-2432)
|
||||||
|
if ( s.crossDomain && current === "script" ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Seek a direct converter
|
// Seek a direct converter
|
||||||
conv = converters[ prev + " " + current ] || converters[ "* " + current ];
|
conv = converters[ prev + " " + current ] || converters[ "* " + current ];
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// check if authenticated
|
// check if authenticated
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
|
||||||
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/server/db.php';
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/language/lang.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/language/lang.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -135,7 +136,7 @@
|
|||||||
inputType,
|
inputType,
|
||||||
readOnly,
|
readOnly,
|
||||||
isMultiSelect,
|
isMultiSelect,
|
||||||
isOrdeable,
|
isOrderable,
|
||||||
cssClasses,
|
cssClasses,
|
||||||
placeholder,
|
placeholder,
|
||||||
suffix,
|
suffix,
|
||||||
|
|||||||
@@ -28,13 +28,13 @@ function initOnlineHistoryGraph() {
|
|||||||
|
|
||||||
res.data.forEach(function(entry) {
|
res.data.forEach(function(entry) {
|
||||||
|
|
||||||
var formattedTime = localizeTimestamp(entry.Scan_Date).slice(11, 17);
|
var formattedTime = localizeTimestamp(entry.scanDate).slice(11, 17);
|
||||||
|
|
||||||
timeStamps.push(formattedTime);
|
timeStamps.push(formattedTime);
|
||||||
onlineCounts.push(entry.Online_Devices);
|
onlineCounts.push(entry.onlineDevices);
|
||||||
downCounts.push(entry.Down_Devices);
|
downCounts.push(entry.downDevices);
|
||||||
offlineCounts.push(entry.Offline_Devices);
|
offlineCounts.push(entry.offlineDevices);
|
||||||
archivedCounts.push(entry.Archived_Devices);
|
archivedCounts.push(entry.archivedDevices);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Call your presenceOverTime function after data is ready
|
// Call your presenceOverTime function after data is ready
|
||||||
|
|||||||
@@ -143,7 +143,7 @@
|
|||||||
"DevDetail_SessionTable_Duration": "Dauer",
|
"DevDetail_SessionTable_Duration": "Dauer",
|
||||||
"DevDetail_SessionTable_IP": "IP",
|
"DevDetail_SessionTable_IP": "IP",
|
||||||
"DevDetail_SessionTable_Order": "Reihenfolge",
|
"DevDetail_SessionTable_Order": "Reihenfolge",
|
||||||
"DevDetail_Shortcut_CurrentStatus": "aktueller Status",
|
"DevDetail_Shortcut_CurrentStatus": "Status",
|
||||||
"DevDetail_Shortcut_DownAlerts": "Down Meldungen",
|
"DevDetail_Shortcut_DownAlerts": "Down Meldungen",
|
||||||
"DevDetail_Shortcut_Presence": "Anwesenheit",
|
"DevDetail_Shortcut_Presence": "Anwesenheit",
|
||||||
"DevDetail_Shortcut_Sessions": "Sitzungen",
|
"DevDetail_Shortcut_Sessions": "Sitzungen",
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
"Device_NextScan_In": "",
|
"Device_NextScan_In": "",
|
||||||
"Device_NoData_Help": "",
|
"Device_NoData_Help": "",
|
||||||
"Device_NoData_Scanning": "",
|
"Device_NoData_Scanning": "",
|
||||||
"Device_NoData_Title": "",
|
"Device_NoData_Title": "Noch keine Geräte gefunden",
|
||||||
"Device_NoMatch_Title": "",
|
"Device_NoMatch_Title": "",
|
||||||
"Device_Save_Failed": "",
|
"Device_Save_Failed": "",
|
||||||
"Device_Save_Unauthorized": "",
|
"Device_Save_Unauthorized": "",
|
||||||
@@ -239,8 +239,8 @@
|
|||||||
"Device_TableHead_Flapping": "",
|
"Device_TableHead_Flapping": "",
|
||||||
"Device_TableHead_GUID": "GUID",
|
"Device_TableHead_GUID": "GUID",
|
||||||
"Device_TableHead_Group": "Gruppe",
|
"Device_TableHead_Group": "Gruppe",
|
||||||
"Device_TableHead_IPv4": "",
|
"Device_TableHead_IPv4": "IPv4",
|
||||||
"Device_TableHead_IPv6": "",
|
"Device_TableHead_IPv6": "IPv6",
|
||||||
"Device_TableHead_Icon": "Icon",
|
"Device_TableHead_Icon": "Icon",
|
||||||
"Device_TableHead_LastIP": "Letzte IP",
|
"Device_TableHead_LastIP": "Letzte IP",
|
||||||
"Device_TableHead_LastIPOrder": "Letzte erhaltene IP",
|
"Device_TableHead_LastIPOrder": "Letzte erhaltene IP",
|
||||||
@@ -251,7 +251,7 @@
|
|||||||
"Device_TableHead_Name": "Name",
|
"Device_TableHead_Name": "Name",
|
||||||
"Device_TableHead_NetworkSite": "Netzwerkseite",
|
"Device_TableHead_NetworkSite": "Netzwerkseite",
|
||||||
"Device_TableHead_Owner": "Eigentümer",
|
"Device_TableHead_Owner": "Eigentümer",
|
||||||
"Device_TableHead_ParentRelType": "",
|
"Device_TableHead_ParentRelType": "Beziehungstyp",
|
||||||
"Device_TableHead_Parent_MAC": "Übergeordneter Netzwerkknoten",
|
"Device_TableHead_Parent_MAC": "Übergeordneter Netzwerkknoten",
|
||||||
"Device_TableHead_Port": "Port",
|
"Device_TableHead_Port": "Port",
|
||||||
"Device_TableHead_PresentLastScan": "Anwesenheit",
|
"Device_TableHead_PresentLastScan": "Anwesenheit",
|
||||||
@@ -315,11 +315,11 @@
|
|||||||
"FakeMAC_hover": "",
|
"FakeMAC_hover": "",
|
||||||
"FieldLock_Error": "",
|
"FieldLock_Error": "",
|
||||||
"FieldLock_Lock_Tooltip": "",
|
"FieldLock_Lock_Tooltip": "",
|
||||||
"FieldLock_Locked": "",
|
"FieldLock_Locked": "Feld gesperrt",
|
||||||
"FieldLock_SaveBeforeLocking": "",
|
"FieldLock_SaveBeforeLocking": "",
|
||||||
"FieldLock_Source_Label": "",
|
"FieldLock_Source_Label": "Quelle: ",
|
||||||
"FieldLock_Unlock_Tooltip": "",
|
"FieldLock_Unlock_Tooltip": "",
|
||||||
"FieldLock_Unlocked": "",
|
"FieldLock_Unlocked": "Feld entsperrt",
|
||||||
"GRAPHQL_PORT_description": "Die Portnummer des GraphQL-Servers. Stellen Sie sicher, dass dieser Port von keiner anderen Anwendung oder NetAlertX Instanz verwendet wird.",
|
"GRAPHQL_PORT_description": "Die Portnummer des GraphQL-Servers. Stellen Sie sicher, dass dieser Port von keiner anderen Anwendung oder NetAlertX Instanz verwendet wird.",
|
||||||
"GRAPHQL_PORT_name": "GraphQL-Port",
|
"GRAPHQL_PORT_name": "GraphQL-Port",
|
||||||
"Gen_Action": "Action",
|
"Gen_Action": "Action",
|
||||||
@@ -327,13 +327,13 @@
|
|||||||
"Gen_AddDevice": "Gerät hinzufügen",
|
"Gen_AddDevice": "Gerät hinzufügen",
|
||||||
"Gen_Add_All": "Alle hinzufügen",
|
"Gen_Add_All": "Alle hinzufügen",
|
||||||
"Gen_All_Devices": "Alle Geräte",
|
"Gen_All_Devices": "Alle Geräte",
|
||||||
"Gen_Archived": "",
|
"Gen_Archived": "Archiviert",
|
||||||
"Gen_AreYouSure": "Sind Sie sich sicher?",
|
"Gen_AreYouSure": "Sind Sie sich sicher?",
|
||||||
"Gen_Backup": "Sichern",
|
"Gen_Backup": "Sichern",
|
||||||
"Gen_Cancel": "Abbrechen",
|
"Gen_Cancel": "Abbrechen",
|
||||||
"Gen_Change": "Ändern",
|
"Gen_Change": "Ändern",
|
||||||
"Gen_Copy": "Ausführen",
|
"Gen_Copy": "Ausführen",
|
||||||
"Gen_CopyToClipboard": "",
|
"Gen_CopyToClipboard": "In die Zwischenablage kopieren",
|
||||||
"Gen_DataUpdatedUITakesTime": "OK – Es kann einen Moment dauern, bis die Benutzeroberfläche aktualisiert wird, während ein Scan ausgeführt wird.",
|
"Gen_DataUpdatedUITakesTime": "OK – Es kann einen Moment dauern, bis die Benutzeroberfläche aktualisiert wird, während ein Scan ausgeführt wird.",
|
||||||
"Gen_Delete": "Löschen",
|
"Gen_Delete": "Löschen",
|
||||||
"Gen_DeleteAll": "Alles löschen",
|
"Gen_DeleteAll": "Alles löschen",
|
||||||
@@ -344,10 +344,10 @@
|
|||||||
"Gen_Flapping": "",
|
"Gen_Flapping": "",
|
||||||
"Gen_Generate": "Generieren",
|
"Gen_Generate": "Generieren",
|
||||||
"Gen_InvalidMac": "Ungültige MAC-Adresse.",
|
"Gen_InvalidMac": "Ungültige MAC-Adresse.",
|
||||||
"Gen_Invalid_Value": "",
|
"Gen_Invalid_Value": "Ein ungültiger Wert wurde eingegeben",
|
||||||
"Gen_LockedDB": "ERROR - DB eventuell gesperrt - Nutze die Konsole in den Entwickler Werkzeugen (F12) zur Überprüfung oder probiere es später erneut.",
|
"Gen_LockedDB": "ERROR - DB eventuell gesperrt - Nutze die Konsole in den Entwickler Werkzeugen (F12) zur Überprüfung oder probiere es später erneut.",
|
||||||
"Gen_NetworkMask": "",
|
"Gen_NetworkMask": "Netzmaske",
|
||||||
"Gen_New": "",
|
"Gen_New": "Neu",
|
||||||
"Gen_Offline": "Offline",
|
"Gen_Offline": "Offline",
|
||||||
"Gen_Okay": "Ok",
|
"Gen_Okay": "Ok",
|
||||||
"Gen_Online": "Online",
|
"Gen_Online": "Online",
|
||||||
@@ -366,7 +366,7 @@
|
|||||||
"Gen_SelectToPreview": "Zur Vorschau auswählen",
|
"Gen_SelectToPreview": "Zur Vorschau auswählen",
|
||||||
"Gen_Selected_Devices": "Ausgewählte Geräte:",
|
"Gen_Selected_Devices": "Ausgewählte Geräte:",
|
||||||
"Gen_Sleeping": "",
|
"Gen_Sleeping": "",
|
||||||
"Gen_Subnet": "",
|
"Gen_Subnet": "Subnetz",
|
||||||
"Gen_Switch": "Umschalten",
|
"Gen_Switch": "Umschalten",
|
||||||
"Gen_Upd": "Aktualisierung erfolgreich",
|
"Gen_Upd": "Aktualisierung erfolgreich",
|
||||||
"Gen_Upd_Fail": "Aktualisierung fehlgeschlagen",
|
"Gen_Upd_Fail": "Aktualisierung fehlgeschlagen",
|
||||||
@@ -878,4 +878,4 @@
|
|||||||
"settings_system_label": "System",
|
"settings_system_label": "System",
|
||||||
"settings_update_item_warning": "",
|
"settings_update_item_warning": "",
|
||||||
"test_event_tooltip": "Speichere die Änderungen, bevor Sie die Einstellungen testen."
|
"test_event_tooltip": "Speichere die Änderungen, bevor Sie die Einstellungen testen."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
"Device_NoData_Help": "Si les appareils n'apparaissent pas après le scan, vérifiez vos paramètres SCAN_SUBNETS et la <a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">documentation</a>.",
|
"Device_NoData_Help": "Si les appareils n'apparaissent pas après le scan, vérifiez vos paramètres SCAN_SUBNETS et la <a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">documentation</a>.",
|
||||||
"Device_NoData_Scanning": "En attente du premier scan - cela peut prendre quelques minutes après le premier paramétrage.",
|
"Device_NoData_Scanning": "En attente du premier scan - cela peut prendre quelques minutes après le premier paramétrage.",
|
||||||
"Device_NoData_Title": "Aucun appareil trouvé pour le moment",
|
"Device_NoData_Title": "Aucun appareil trouvé pour le moment",
|
||||||
"Device_NoMatch_Title": "",
|
"Device_NoMatch_Title": "Aucun appareil ne correspond au filtre actuel",
|
||||||
"Device_Save_Failed": "Erreur à l'enregistrement de l'appareil",
|
"Device_Save_Failed": "Erreur à l'enregistrement de l'appareil",
|
||||||
"Device_Save_Unauthorized": "Non autorisé - Jeton d'API invalide",
|
"Device_Save_Unauthorized": "Non autorisé - Jeton d'API invalide",
|
||||||
"Device_Saved_Success": "Appareil enregistré avec succès",
|
"Device_Saved_Success": "Appareil enregistré avec succès",
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
"Device_TableHead_FQDN": "Nom de domaine FQDN",
|
"Device_TableHead_FQDN": "Nom de domaine FQDN",
|
||||||
"Device_TableHead_Favorite": "Favori",
|
"Device_TableHead_Favorite": "Favori",
|
||||||
"Device_TableHead_FirstSession": "Première session",
|
"Device_TableHead_FirstSession": "Première session",
|
||||||
"Device_TableHead_Flapping": "",
|
"Device_TableHead_Flapping": "Flapping",
|
||||||
"Device_TableHead_GUID": "GUID",
|
"Device_TableHead_GUID": "GUID",
|
||||||
"Device_TableHead_Group": "Groupe",
|
"Device_TableHead_Group": "Groupe",
|
||||||
"Device_TableHead_IPv4": "IPv4",
|
"Device_TableHead_IPv4": "IPv4",
|
||||||
@@ -337,7 +337,7 @@
|
|||||||
"Gen_Down": "En panne",
|
"Gen_Down": "En panne",
|
||||||
"Gen_Error": "Erreur",
|
"Gen_Error": "Erreur",
|
||||||
"Gen_Filter": "Filtrer",
|
"Gen_Filter": "Filtrer",
|
||||||
"Gen_Flapping": "",
|
"Gen_Flapping": "Flapping",
|
||||||
"Gen_Generate": "Générer",
|
"Gen_Generate": "Générer",
|
||||||
"Gen_InvalidMac": "Adresse MAC invalide.",
|
"Gen_InvalidMac": "Adresse MAC invalide.",
|
||||||
"Gen_Invalid_Value": "Une valeur invalide a été renseignée",
|
"Gen_Invalid_Value": "Une valeur invalide a été renseignée",
|
||||||
@@ -591,8 +591,8 @@
|
|||||||
"PIALERT_WEB_PROTECTION_name": "Activer la connexion par login",
|
"PIALERT_WEB_PROTECTION_name": "Activer la connexion par login",
|
||||||
"PLUGINS_KEEP_HIST_description": "Combien d'entrées de résultats de scan doivent être conservés dans l'historique des plugins (par plugin, pas par appareil).",
|
"PLUGINS_KEEP_HIST_description": "Combien d'entrées de résultats de scan doivent être conservés dans l'historique des plugins (par plugin, pas par appareil).",
|
||||||
"PLUGINS_KEEP_HIST_name": "Historique des plugins",
|
"PLUGINS_KEEP_HIST_name": "Historique des plugins",
|
||||||
"PRAGMA_JOURNAL_SIZE_LIMIT_description": "",
|
"PRAGMA_JOURNAL_SIZE_LIMIT_description": "Taille maximale du SQLite WAL (Write-Ahead Log) en Mo avant le déclenchement automatique des points de contrôle. Des valeurs basses (10-20 Mo) réduisent l'utilisation du disque/stockage mais augmentent l'utilisation du CPU durant ces scans. Des valeurs élevées (50-100 Mo) réduisent les pics CPU durant les opérations mais peuvent utiliser plus de RAM et d'espace disque. Par défaut, <code>50 Mo</code> est un compromis entre ces 2. Utilise pour les systèmes à ressources limitées comme des NAS avec des cartes SD. Redémarrer le serveur pour que le changement soit effective après avoir sauvegardé ce paramètre.",
|
||||||
"PRAGMA_JOURNAL_SIZE_LIMIT_name": "",
|
"PRAGMA_JOURNAL_SIZE_LIMIT_name": "Limite de taille du WAL (Mo)",
|
||||||
"Plugins_DeleteAll": "Tout supprimer (ne prend pas en compte les filtres)",
|
"Plugins_DeleteAll": "Tout supprimer (ne prend pas en compte les filtres)",
|
||||||
"Plugins_Filters_Mac": "Filtrer par MAC",
|
"Plugins_Filters_Mac": "Filtrer par MAC",
|
||||||
"Plugins_History": "Historique des événements",
|
"Plugins_History": "Historique des événements",
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
"Device_NoData_Help": "Se i dispositivi non vengono visualizzati dopo la scansione, controlla l'impostazione SCAN_SUBNETS e la <a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">documentazione</a>.",
|
"Device_NoData_Help": "Se i dispositivi non vengono visualizzati dopo la scansione, controlla l'impostazione SCAN_SUBNETS e la <a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">documentazione</a>.",
|
||||||
"Device_NoData_Scanning": "In attesa della prima scansione: potrebbero volerci diversi minuti dopo la configurazione iniziale.",
|
"Device_NoData_Scanning": "In attesa della prima scansione: potrebbero volerci diversi minuti dopo la configurazione iniziale.",
|
||||||
"Device_NoData_Title": "Ancora nessun dispositivo trovato",
|
"Device_NoData_Title": "Ancora nessun dispositivo trovato",
|
||||||
"Device_NoMatch_Title": "",
|
"Device_NoMatch_Title": "Nessun dispositivo corrisponde al filtro attuale",
|
||||||
"Device_Save_Failed": "Impossibile salvare il dispositivo",
|
"Device_Save_Failed": "Impossibile salvare il dispositivo",
|
||||||
"Device_Save_Unauthorized": "Non autorizzato: token API non valido",
|
"Device_Save_Unauthorized": "Non autorizzato: token API non valido",
|
||||||
"Device_Saved_Success": "Dispositivo salvato correttamente",
|
"Device_Saved_Success": "Dispositivo salvato correttamente",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"API_CUSTOM_SQL_description": "カスタムSQLクエリを指定するとJSONファイルが生成され、<a href=\"/php/server/query_json.php?file=table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code>ファイルエンドポイント</a>経由で公開できます。",
|
"API_CUSTOM_SQL_description": "カスタムSQLクエリを指定するとJSONファイルが生成され、<a href=\"/php/server/query_json.php?file=table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code> ファイルエンドポイント</a> 経由で公開できます。",
|
||||||
"API_CUSTOM_SQL_name": "カスタムエンドポイント",
|
"API_CUSTOM_SQL_name": "カスタムエンドポイント",
|
||||||
"API_TOKEN_description": "安全な通信のための API トークン。生成するか、任意の値を入力してください。リクエストヘッダーで送信され、<code>SYNC</code>プラグイン、GraphQLサーバー、その他のAPIエンドポイントで使用されます。<a href=\"https://docs.netalertx.com/API\" target=\"_blank\">APIドキュメント</a>に記載の通り、API エンドポイントを使用して独自の連携機能を作成できます。",
|
"API_TOKEN_description": "安全な通信のための API トークン。生成するか、任意の値を入力してください。リクエストヘッダーで送信され、<code>SYNC</code> プラグイン、GraphQLサーバー、その他のAPIエンドポイントで使用されます。<a href=\"https://docs.netalertx.com/API\" target=\"_blank\">APIドキュメント</a> に記載の通り、API エンドポイントを使用して独自の連携機能を作成できます。",
|
||||||
"API_TOKEN_name": "APIトークン",
|
"API_TOKEN_name": "APIトークン",
|
||||||
"API_display_name": "API",
|
"API_display_name": "API",
|
||||||
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"AppEvents_ObjectType": "オブジェクトタイプ",
|
"AppEvents_ObjectType": "オブジェクトタイプ",
|
||||||
"AppEvents_Plugin": "プラグイン",
|
"AppEvents_Plugin": "プラグイン",
|
||||||
"AppEvents_Type": "種別",
|
"AppEvents_Type": "種別",
|
||||||
"BACKEND_API_URL_description": "フロントエンドからバックエンドに通信するために使用します。 デフォルトでは<code>/server</code>に設定されており、通常変更する必要はありません。",
|
"BACKEND_API_URL_description": "フロントエンドからバックエンドに通信するために使用します。デフォルトでは <code>/server</code> に設定されており、通常変更する必要はありません。",
|
||||||
"BACKEND_API_URL_name": "バックエンド API URL",
|
"BACKEND_API_URL_name": "バックエンド API URL",
|
||||||
"BackDevDetail_Actions_Ask_Run": "このアクションを実行してよろしいですか?",
|
"BackDevDetail_Actions_Ask_Run": "このアクションを実行してよろしいですか?",
|
||||||
"BackDevDetail_Actions_Not_Registered": "登録されていないアクション: ",
|
"BackDevDetail_Actions_Not_Registered": "登録されていないアクション: ",
|
||||||
@@ -61,12 +61,12 @@
|
|||||||
"BackDevices_Restore_okay": "復元が正常に完了しました。",
|
"BackDevices_Restore_okay": "復元が正常に完了しました。",
|
||||||
"BackDevices_darkmode_disabled": "ダークモード無効化",
|
"BackDevices_darkmode_disabled": "ダークモード無効化",
|
||||||
"BackDevices_darkmode_enabled": "ダークモード有効化",
|
"BackDevices_darkmode_enabled": "ダークモード有効化",
|
||||||
"CLEAR_NEW_FLAG_description": "有効にした場合(<code>0</code>で無効)、<b>新規デバイス</b>のフラグは<b>初回検知時刻</b>から指定された時間(1時間単位)が経過すると自動的に解除されます。",
|
"CLEAR_NEW_FLAG_description": "有効にした場合(<code>0</code> で無効)、<b>新規デバイス</b> のフラグは <b>初回検知時刻</b> から指定された時間(1時間単位)が経過すると自動的に解除されます。",
|
||||||
"CLEAR_NEW_FLAG_name": "新規フラグの解除",
|
"CLEAR_NEW_FLAG_name": "新規フラグの解除",
|
||||||
"CustProps_cant_remove": "削除できません。少なくとも1つのプロパティが必要です。",
|
"CustProps_cant_remove": "削除できません。少なくとも1つのプロパティが必要です。",
|
||||||
"DAYS_TO_KEEP_EVENTS_description": "これはメンテナンス設定です。イベントエントリを保持する日数を指定します。それより古いイベントは定期的に削除されます。プラグインイベント履歴にも適用されます。",
|
"DAYS_TO_KEEP_EVENTS_description": "これはメンテナンス設定です。イベントエントリを保持する日数を指定します。それより古いイベントは定期的に削除されます。プラグインイベント履歴にも適用されます。",
|
||||||
"DAYS_TO_KEEP_EVENTS_name": "古いイベントの削除",
|
"DAYS_TO_KEEP_EVENTS_name": "古いイベントの削除",
|
||||||
"DISCOVER_PLUGINS_description": "このオプションを無効にすると、初期化と設定の保存が高速化されます。無効にした場合、プラグインは検出されず、<code>LOADED_PLUGINS</code>設定に新しいプラグインを追加することはできません。",
|
"DISCOVER_PLUGINS_description": "このオプションを無効にすると、初期化と設定の保存が高速化されます。無効にした場合、プラグインは検出されず、<code>LOADED_PLUGINS</code> 設定に新しいプラグインを追加することはできません。",
|
||||||
"DISCOVER_PLUGINS_name": "プラグインの検出",
|
"DISCOVER_PLUGINS_name": "プラグインの検出",
|
||||||
"DevDetail_Children_Title": "親子関係",
|
"DevDetail_Children_Title": "親子関係",
|
||||||
"DevDetail_Copy_Device_Title": "デバイスから詳細をコピー",
|
"DevDetail_Copy_Device_Title": "デバイスから詳細をコピー",
|
||||||
@@ -95,8 +95,8 @@
|
|||||||
"DevDetail_MainInfo_Group": "グループ",
|
"DevDetail_MainInfo_Group": "グループ",
|
||||||
"DevDetail_MainInfo_Location": "位置",
|
"DevDetail_MainInfo_Location": "位置",
|
||||||
"DevDetail_MainInfo_Name": "名前",
|
"DevDetail_MainInfo_Name": "名前",
|
||||||
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i>ノード(MAC)",
|
"DevDetail_MainInfo_Network": "<i class=\"fa fa-server\"></i> ノード(MAC)",
|
||||||
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i>ポート",
|
"DevDetail_MainInfo_Network_Port": "<i class=\"fa fa-ethernet\"></i> ポート",
|
||||||
"DevDetail_MainInfo_Network_Site": "サイト",
|
"DevDetail_MainInfo_Network_Site": "サイト",
|
||||||
"DevDetail_MainInfo_Network_Title": "ネットワーク詳細",
|
"DevDetail_MainInfo_Network_Title": "ネットワーク詳細",
|
||||||
"DevDetail_MainInfo_Owner": "所有者",
|
"DevDetail_MainInfo_Owner": "所有者",
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
"DevDetail_Nmap_buttonFast_text": "高速スキャン: デフォルトのスキャンよりも少ないポート数(100)をスキャンする(数秒)",
|
"DevDetail_Nmap_buttonFast_text": "高速スキャン: デフォルトのスキャンよりも少ないポート数(100)をスキャンする(数秒)",
|
||||||
"DevDetail_Nmap_buttonSkipDiscovery": "ホスト検出をスキップ",
|
"DevDetail_Nmap_buttonSkipDiscovery": "ホスト検出をスキップ",
|
||||||
"DevDetail_Nmap_buttonSkipDiscovery_text": "ホスト検出をスキップ(-Pnオプション): ホスト検出なしのデフォルトスキャン",
|
"DevDetail_Nmap_buttonSkipDiscovery_text": "ホスト検出をスキップ(-Pnオプション): ホスト検出なしのデフォルトスキャン",
|
||||||
"DevDetail_Nmap_resultsLink": "スキャン開始後、このページを離れても構いません。結果は<code>app_front.log</code>ファイルにも記録されます。",
|
"DevDetail_Nmap_resultsLink": "スキャン開始後、このページを離れても構いません。結果は <code>app_front.log</code> ファイルにも記録されます。",
|
||||||
"DevDetail_Owner_hover": "このデバイスを所有者は誰ですか。自由入力欄。",
|
"DevDetail_Owner_hover": "このデバイスを所有者は誰ですか。自由入力欄。",
|
||||||
"DevDetail_Periodselect_All": "全件",
|
"DevDetail_Periodselect_All": "全件",
|
||||||
"DevDetail_Periodselect_LastMonth": "先月",
|
"DevDetail_Periodselect_LastMonth": "先月",
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
"DevDetail_Vendor_hover": "ベンダーは自動検出されるべきです。カスタム値を上書きまたは追加できます。",
|
"DevDetail_Vendor_hover": "ベンダーは自動検出されるべきです。カスタム値を上書きまたは追加できます。",
|
||||||
"DevDetail_WOL_Title": "<i class=\"fa fa-power-off\"></i> Wake-on-LAN",
|
"DevDetail_WOL_Title": "<i class=\"fa fa-power-off\"></i> Wake-on-LAN",
|
||||||
"DevDetail_button_AddIcon": "アイコンの追加",
|
"DevDetail_button_AddIcon": "アイコンの追加",
|
||||||
"DevDetail_button_AddIcon_Help": "SVG HTMLタグまたはFont Awesome HTMLタグのアイコンを貼り付けてください。詳細は<a href=\"https://docs.netalertx.com/ICONS\" target=\"_blank\">アイコンのドキュメント</a>を参照してください。",
|
"DevDetail_button_AddIcon_Help": "SVG HTMLタグまたはFont Awesome HTMLタグのアイコンを貼り付けてください。詳細は <a href=\"https://docs.netalertx.com/ICONS\" target=\"_blank\">アイコンのドキュメント</a> を参照してください。",
|
||||||
"DevDetail_button_AddIcon_Tooltip": "このデバイスに、ドロップダウンにない新しいアイコンを追加します。",
|
"DevDetail_button_AddIcon_Tooltip": "このデバイスに、ドロップダウンにない新しいアイコンを追加します。",
|
||||||
"DevDetail_button_Delete": "デバイスの削除",
|
"DevDetail_button_Delete": "デバイスの削除",
|
||||||
"DevDetail_button_DeleteEvents": "イベントの削除",
|
"DevDetail_button_DeleteEvents": "イベントの削除",
|
||||||
@@ -196,19 +196,19 @@
|
|||||||
"DevDetail_button_OverwriteIcons_Warning": "このデバイスと同じデバイス種別を持つすべてのデバイスにアイコンを上書きしてもよろしいですか?",
|
"DevDetail_button_OverwriteIcons_Warning": "このデバイスと同じデバイス種別を持つすべてのデバイスにアイコンを上書きしてもよろしいですか?",
|
||||||
"DevDetail_button_Reset": "変更をリセット",
|
"DevDetail_button_Reset": "変更をリセット",
|
||||||
"DevDetail_button_Save": "保存",
|
"DevDetail_button_Save": "保存",
|
||||||
"DeviceEdit_ValidMacIp": "有効な<b>Mac</b>と<b>IP</b>アドレスを入力します.",
|
"DeviceEdit_ValidMacIp": "有効な <b>Mac</b> と <b>IP</b> アドレスを入力します.",
|
||||||
"Device_MultiEdit": "マルチエディタ",
|
"Device_MultiEdit": "マルチエディタ",
|
||||||
"Device_MultiEdit_Backup": "注意:以下の項目に誤った値を入力すると設定が破損します。まずデータベースまたはデバイスの設定をバックアップしてください(<a href=\"#\" onclick=\"ExportCSV()\">クリックしてダウンロード<i class=\"fa-solid fa-download fa-bounce\"></i></a>)。このファイルからデバイスを復元する方法については、<a href=\"https://docs.netalertx.com/BACKUPS#scenario-2-corrupted-database\" target=\"_blank\">バックアップのドキュメント</a>を参照してください。変更を適用するには、更新したい各フィールドの<b>保存<i class=\"fa-solid fa-save\"></i></b>アイコンをクリックしてください。",
|
"Device_MultiEdit_Backup": "注意:以下の項目に誤った値を入力すると設定が破損します。まずデータベースまたはデバイスの設定をバックアップしてください(<a href=\"#\" onclick=\"ExportCSV()\">クリックしてダウンロード <i class=\"fa-solid fa-download fa-bounce\"></i></a>)。このファイルからデバイスを復元する方法については、<a href=\"https://docs.netalertx.com/BACKUPS#scenario-2-corrupted-database\" target=\"_blank\">バックアップのドキュメント</a> を参照してください。変更を適用するには、更新したい各フィールドの <b>保存<i class=\"fa-solid fa-save\"></i></b> アイコンをクリックしてください。",
|
||||||
"Device_MultiEdit_Fields": "フィールドの編集:",
|
"Device_MultiEdit_Fields": "フィールドの編集:",
|
||||||
"Device_MultiEdit_MassActions": "大量のアクション:",
|
"Device_MultiEdit_MassActions": "大量のアクション:",
|
||||||
"Device_MultiEdit_No_Devices": "デバイスが選択されていません。",
|
"Device_MultiEdit_No_Devices": "デバイスが選択されていません。",
|
||||||
"Device_MultiEdit_Tooltip": "注意。これをクリックすると、左側の値が上記で選択したすべてのデバイスに適用されます。",
|
"Device_MultiEdit_Tooltip": "注意。これをクリックすると、左側の値が上記で選択したすべてのデバイスに適用されます。",
|
||||||
"Device_NextScan_Imminent": "まもなく...",
|
"Device_NextScan_Imminent": "まもなく...",
|
||||||
"Device_NextScan_In": "次のスキャンまでおよそ ",
|
"Device_NextScan_In": "次のスキャンまでおよそ ",
|
||||||
"Device_NoData_Help": "スキャン後にデバイスが表示されない場合は、SCAN_SUBNETS設定と<a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">ドキュメント</a>を確認してください。",
|
"Device_NoData_Help": "スキャン後にデバイスが表示されない場合は、SCAN_SUBNETS設定と <a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">ドキュメント</a> を確認してください。",
|
||||||
"Device_NoData_Scanning": "最初のスキャンを待機中 - 初期設定後、数分かかる場合があります。",
|
"Device_NoData_Scanning": "最初のスキャンを待機中 - 初期設定後、数分かかる場合があります。",
|
||||||
"Device_NoData_Title": "デバイスが見つかりません",
|
"Device_NoData_Title": "デバイスが見つかりません",
|
||||||
"Device_NoMatch_Title": "",
|
"Device_NoMatch_Title": "このフィルタ条件に一致するデバイスはありません",
|
||||||
"Device_Save_Failed": "デバイスの保存に失敗しました",
|
"Device_Save_Failed": "デバイスの保存に失敗しました",
|
||||||
"Device_Save_Unauthorized": "許可されていない - 無効なAPIトークン",
|
"Device_Save_Unauthorized": "許可されていない - 無効なAPIトークン",
|
||||||
"Device_Saved_Success": "デバイスが正常に保存されました",
|
"Device_Saved_Success": "デバイスが正常に保存されました",
|
||||||
@@ -269,7 +269,7 @@
|
|||||||
"Device_Tablelenght_all": "全件",
|
"Device_Tablelenght_all": "全件",
|
||||||
"Device_Title": "デバイス",
|
"Device_Title": "デバイス",
|
||||||
"Devices_Filters": "フィルター",
|
"Devices_Filters": "フィルター",
|
||||||
"ENABLE_PLUGINS_description": "<a target=\"_blank\" href=\"https://docs.netalertx.com/PLUGINS\">プラグイン</a>機能を有効にします。プラグインの読み込みにはより多くのハードウェアリソースを必要とするため、リソースが限られているシステムでは無効にすることをお勧めします。",
|
"ENABLE_PLUGINS_description": "<a target=\"_blank\" href=\"https://docs.netalertx.com/PLUGINS\">プラグイン</a> 機能を有効にします。プラグインの読み込みにはより多くのハードウェアリソースを必要とするため、リソースが限られているシステムでは無効にすることをお勧めします。",
|
||||||
"ENABLE_PLUGINS_name": "有効プラグイン",
|
"ENABLE_PLUGINS_name": "有効プラグイン",
|
||||||
"ENCRYPTION_KEY_description": "データ暗号化キー。",
|
"ENCRYPTION_KEY_description": "データ暗号化キー。",
|
||||||
"ENCRYPTION_KEY_name": "暗号化キー",
|
"ENCRYPTION_KEY_name": "暗号化キー",
|
||||||
@@ -372,21 +372,21 @@
|
|||||||
"Gen_Warning": "警告",
|
"Gen_Warning": "警告",
|
||||||
"Gen_Work_In_Progress": "作業中、https://github.com/netalertx/NetAlertX/issues へのフィードバックの好機です",
|
"Gen_Work_In_Progress": "作業中、https://github.com/netalertx/NetAlertX/issues へのフィードバックの好機です",
|
||||||
"Gen_create_new_device": "新規デバイス",
|
"Gen_create_new_device": "新規デバイス",
|
||||||
"Gen_create_new_device_info": "デバイスは通常、<a target=\"_blank\" href=\"https://docs.netalertx.com/PLUGINS\">プラグイン</a>を使用して検出されます。ただし、特定のケースでは手動でデバイスを追加する必要がある場合があります。具体的なシナリオについては、<a target=\"_blank\" href=\"https://docs.netalertx.com/REMOTE_NETWORKS\">リモートネットワークドキュメント</a>を参照してください。",
|
"Gen_create_new_device_info": "デバイスは通常、<a target=\"_blank\" href=\"https://docs.netalertx.com/PLUGINS\">プラグイン</a> を使用して検出されます。ただし、特定のケースでは手動でデバイスを追加する必要がある場合があります。具体的なシナリオについては、<a target=\"_blank\" href=\"https://docs.netalertx.com/REMOTE_NETWORKS\">リモートネットワークドキュメント</a> を参照してください。",
|
||||||
"General_display_name": "一般",
|
"General_display_name": "一般",
|
||||||
"General_icon": "<i class=\"fa fa-gears\"></i>",
|
"General_icon": "<i class=\"fa fa-gears\"></i>",
|
||||||
"HRS_TO_KEEP_NEWDEV_description": "これは<b>デバイスを削除</b>するメンテナンス設定です。有効にした場合(<code>0</code>で無効)、<b>新規デバイス</b>としてマークされたデバイスの内、<b>初回検知時刻</b>が指定された時間より古いものは削除されます。<b>新規デバイス</b>を<code>X</code>時間後に自動削除したい場合に使用してください。",
|
"HRS_TO_KEEP_NEWDEV_description": "これは <b>デバイスを削除</b> するメンテナンス設定です。有効にした場合(<code>0</code> で無効)、<b>新規デバイス</b> としてマークされたデバイスの内、<b>初回検知時刻</b> が指定された時間より古いものは削除されます。<b>新規デバイス</b> を <code>X</code> 時間後に自動削除したい場合に使用してください。",
|
||||||
"HRS_TO_KEEP_NEWDEV_name": "新規デバイスの削除",
|
"HRS_TO_KEEP_NEWDEV_name": "新規デバイスの削除",
|
||||||
"HRS_TO_KEEP_OFFDEV_description": "これは<b>デバイスを削除</b>するメンテナンス設定です。有効にした場合(<code>0</code>で無効)、<b>オフライン</b>状態のデバイスの内、<b>最終接続日時</b>が指定された時間より古いものは削除されます。<b>オフラインデバイス</b>を<code>X</code>時間経過後に自動削除したい場合に使用してください。",
|
"HRS_TO_KEEP_OFFDEV_description": "これは <b>デバイスを削除</b> するメンテナンス設定です。有効にした場合(<code>0</code> で無効)、<b>オフライン</b> 状態のデバイスの内、<b>最終接続日時</b> が指定された時間より古いものは削除されます。<b>オフラインデバイス</b> を <code>X</code> 時間経過後に自動削除したい場合に使用してください。",
|
||||||
"HRS_TO_KEEP_OFFDEV_name": "オフラインデバイスを削除する",
|
"HRS_TO_KEEP_OFFDEV_name": "オフラインデバイスを削除する",
|
||||||
"LOADED_PLUGINS_description": "読み込まれたプラグイン。プラグインの追加はアプリケーションの速度を低下させる可能性があります。有効化が必要なプラグインの種類やスキャンオプションについては、<a target=\"_blank\" href=\"https://docs.netalertx.com/PLUGINS\">プラグインのドキュメント</a>を参照してください。読み込まれなかったプラグインの設定は失われます。読み込まない設定にできるのは<code>無効化</code>されたプラグインのみです。",
|
"LOADED_PLUGINS_description": "読み込まれたプラグイン。プラグインの追加はアプリケーションの速度を低下させる可能性があります。有効化が必要なプラグインの種類やスキャンオプションについては、<a target=\"_blank\" href=\"https://docs.netalertx.com/PLUGINS\">プラグインのドキュメント</a> を参照してください。読み込まれなかったプラグインの設定は失われます。読み込まない設定にできるのは <code>無効化</code> されたプラグインのみです。",
|
||||||
"LOADED_PLUGINS_name": "読み込まれたプラグイン",
|
"LOADED_PLUGINS_name": "読み込まれたプラグイン",
|
||||||
"LOG_LEVEL_description": "この設定により、より詳細なログ出力が有効になります。データベースへのイベント書き込みのデバッグに有用です。",
|
"LOG_LEVEL_description": "この設定により、より詳細なログ出力が有効になります。データベースへのイベント書き込みのデバッグに有用です。",
|
||||||
"LOG_LEVEL_name": "追加のログ出力",
|
"LOG_LEVEL_name": "追加のログ出力",
|
||||||
"Loading": "読み込み中…",
|
"Loading": "読み込み中…",
|
||||||
"Login_Box": "パスワードを入力してください",
|
"Login_Box": "パスワードを入力してください",
|
||||||
"Login_Default_PWD": "デフォルトパスワード「123456」は有効なままです。",
|
"Login_Default_PWD": "デフォルトパスワード「123456」は有効なままです。",
|
||||||
"Login_Info": "パスワードはSet Passwordプラグインで設定されます。ログインに問題がある場合は<a target=\"_blank\" href=\"https://github.com/netalertx/NetAlertX/tree/main/front/plugins/set_password\">SETPWDのドキュメント</a>を確認してください。",
|
"Login_Info": "パスワードはSet Passwordプラグインで設定されます。ログインに問題がある場合は <a target=\"_blank\" href=\"https://github.com/netalertx/NetAlertX/tree/main/front/plugins/set_password\">SETPWDのドキュメント</a> を確認してください。",
|
||||||
"Login_Psw-box": "パスワード",
|
"Login_Psw-box": "パスワード",
|
||||||
"Login_Psw_alert": "パスワードアラート!",
|
"Login_Psw_alert": "パスワードアラート!",
|
||||||
"Login_Psw_folder": "config フォルダ内。",
|
"Login_Psw_folder": "config フォルダ内。",
|
||||||
@@ -403,31 +403,31 @@
|
|||||||
"Maint_Restart_Server_noti_text": "バックエンドサーバーを再起動してもよろしいですか?アプリの不整合が発生する可能性があります。まず設定のバックアップを行ってください。<br/> <br/> 注:この操作には数分かかる場合があります。",
|
"Maint_Restart_Server_noti_text": "バックエンドサーバーを再起動してもよろしいですか?アプリの不整合が発生する可能性があります。まず設定のバックアップを行ってください。<br/> <br/> 注:この操作には数分かかる場合があります。",
|
||||||
"Maintenance_InitCheck": "初期化チェック",
|
"Maintenance_InitCheck": "初期化チェック",
|
||||||
"Maintenance_InitCheck_Checking": "確認中…",
|
"Maintenance_InitCheck_Checking": "確認中…",
|
||||||
"Maintenance_InitCheck_QuickSetupGuide": "<a href=\"https://docs.netalertx.com/INITIAL_SETUP/\" target=\"_blank\">クイックセットアップガイド</a>に従ったことを確認してください。",
|
"Maintenance_InitCheck_QuickSetupGuide": "<a href=\"https://docs.netalertx.com/INITIAL_SETUP/\" target=\"_blank\">クイックセットアップガイド</a> に従ったことを確認してください。",
|
||||||
"Maintenance_InitCheck_Success": "アプリケーションの初期化に成功!",
|
"Maintenance_InitCheck_Success": "アプリケーションの初期化に成功!",
|
||||||
"Maintenance_ReCheck": "再チェック",
|
"Maintenance_ReCheck": "再チェック",
|
||||||
"Maintenance_Running_Version": "インストールバージョン",
|
"Maintenance_Running_Version": "インストールバージョン",
|
||||||
"Maintenance_Status": "状態",
|
"Maintenance_Status": "状態",
|
||||||
"Maintenance_Title": "メンテナンスツール",
|
"Maintenance_Title": "メンテナンスツール",
|
||||||
"Maintenance_Tool_DownloadConfig": "設定エクスポート",
|
"Maintenance_Tool_DownloadConfig": "設定エクスポート",
|
||||||
"Maintenance_Tool_DownloadConfig_text": "<code>app.conf</code>ファイルに保存されている構成設定の完全なバックアップをダウンロードしてください。",
|
"Maintenance_Tool_DownloadConfig_text": "<code>app.conf</code> ファイルに保存されている構成設定の完全なバックアップをダウンロードしてください。",
|
||||||
"Maintenance_Tool_DownloadWorkflows": "ワークフローのエクスポート",
|
"Maintenance_Tool_DownloadWorkflows": "ワークフローのエクスポート",
|
||||||
"Maintenance_Tool_DownloadWorkflows_text": "<code>workflows.json</code>ファイルに保存されているワークフロー設定の完全なバックアップをダウンロードしてください。",
|
"Maintenance_Tool_DownloadWorkflows_text": "<code>workflows.json</code> ファイルに保存されているワークフロー設定の完全なバックアップをダウンロードしてください。",
|
||||||
"Maintenance_Tool_ExportCSV": "デバイスエクスポート(csv)",
|
"Maintenance_Tool_ExportCSV": "デバイスエクスポート(csv)",
|
||||||
"Maintenance_Tool_ExportCSV_noti": "デバイスエクスポート(csv)",
|
"Maintenance_Tool_ExportCSV_noti": "デバイスエクスポート(csv)",
|
||||||
"Maintenance_Tool_ExportCSV_noti_text": "CSVファイルを生成してよろしいですか?",
|
"Maintenance_Tool_ExportCSV_noti_text": "CSVファイルを生成してよろしいですか?",
|
||||||
"Maintenance_Tool_ExportCSV_text": "ネットワークノードとデバイス間の接続関係を含むデバイス一覧を記載したCSV(カンマ区切り値)ファイルを生成します。この操作は、<a href=\"settings.php#CSVBCKP_header\">CSVバックアップ</a>プラグインを有効化することで実行できます。",
|
"Maintenance_Tool_ExportCSV_text": "ネットワークノードとデバイス間の接続関係を含むデバイス一覧を記載したCSV(カンマ区切り値)ファイルを生成します。この操作は、<a href=\"settings.php#CSVBCKP_header\">CSVバックアップ</a> プラグインを有効化することで実行できます。",
|
||||||
"Maintenance_Tool_ImportCSV": "デバイスインポート(csv)",
|
"Maintenance_Tool_ImportCSV": "デバイスインポート(csv)",
|
||||||
"Maintenance_Tool_ImportCSV_noti": "デバイスインポート(csv)",
|
"Maintenance_Tool_ImportCSV_noti": "デバイスインポート(csv)",
|
||||||
"Maintenance_Tool_ImportCSV_noti_text": "CSVファイルを本当にインポートしますか?これによりデータベース内のデバイスが完全に<b>上書き</b>されます。",
|
"Maintenance_Tool_ImportCSV_noti_text": "CSVファイルを本当にインポートしますか?これによりデータベース内のデバイスが完全に <b>上書き</b> されます。",
|
||||||
"Maintenance_Tool_ImportCSV_text": "この機能を使用する前に、必ずバックアップを作成してください。ネットワークノードとデバイス間の接続関係を含むデバイス一覧を記載したCSV(カンマ区切り値)ファイルをインポートします。そのためには、<b>devices.csv</b> という名前のCSVファイルを<b>/config</b>フォルダに配置してください。",
|
"Maintenance_Tool_ImportCSV_text": "この機能を使用する前に、必ずバックアップを作成してください。ネットワークノードとデバイス間の接続関係を含むデバイス一覧を記載したCSV(カンマ区切り値)ファイルをインポートします。そのためには、<b>devices.csv</b> という名前のCSVファイルを <b>/config</b> フォルダに配置してください。",
|
||||||
"Maintenance_Tool_ImportConfig_noti": "設定のインポート (app.conf)",
|
"Maintenance_Tool_ImportConfig_noti": "設定のインポート (app.conf)",
|
||||||
"Maintenance_Tool_ImportPastedCSV": "デバイスのインポート(csv貼り付け)",
|
"Maintenance_Tool_ImportPastedCSV": "デバイスのインポート(csv貼り付け)",
|
||||||
"Maintenance_Tool_ImportPastedCSV_noti_text": "貼り付けたCSVを本当にインポートしますか?これによりデータベース内のデバイスが完全に<b>上書き</b>されます。",
|
"Maintenance_Tool_ImportPastedCSV_noti_text": "貼り付けたCSVを本当にインポートしますか?これによりデータベース内のデバイスが完全に <b>上書き</b> されます。",
|
||||||
"Maintenance_Tool_ImportPastedCSV_text": "この機能を使用する前に、必ずバックアップを作成してください。ネットワークノードとデバイス間の接続関係を含むデバイス一覧が記載されたCSV(カンマ区切り値)ファイルをインポートします。",
|
"Maintenance_Tool_ImportPastedCSV_text": "この機能を使用する前に、必ずバックアップを作成してください。ネットワークノードとデバイス間の接続関係を含むデバイス一覧が記載されたCSV(カンマ区切り値)ファイルをインポートします。",
|
||||||
"Maintenance_Tool_ImportPastedConfig": "設定のインポート(貼り付け)",
|
"Maintenance_Tool_ImportPastedConfig": "設定のインポート(貼り付け)",
|
||||||
"Maintenance_Tool_ImportPastedConfig_noti_text": "貼り付けた設定を本当にインポートしますか?これにより<code>app.conf</code>ファイルが完全に<b>上書き</b>されます。",
|
"Maintenance_Tool_ImportPastedConfig_noti_text": "貼り付けた設定を本当にインポートしますか?これにより <code>app.conf</code> ファイルが完全に <b>上書き</b> されます。",
|
||||||
"Maintenance_Tool_ImportPastedConfig_text": "アプリケーション設定をすべて含む<code>app.conf</code>ファイルをインポートします。まず<b>設定のエクスポート</b>で現在の<code>app.conf</code>ファイルをダウンロードすることをお勧めします。",
|
"Maintenance_Tool_ImportPastedConfig_text": "アプリケーション設定をすべて含む <code>app.conf</code> ファイルをインポートします。まず <b>設定のエクスポート</b> で現在の <code>app.conf</code> ファイルをダウンロードすることをお勧めします。",
|
||||||
"Maintenance_Tool_UnlockFields": "デバイスフィールドのロック解除",
|
"Maintenance_Tool_UnlockFields": "デバイスフィールドのロック解除",
|
||||||
"Maintenance_Tool_UnlockFields_noti": "デバイスフィールドのロック解除",
|
"Maintenance_Tool_UnlockFields_noti": "デバイスフィールドのロック解除",
|
||||||
"Maintenance_Tool_UnlockFields_noti_text": "全デバイスのデバイスフィールドのソース値(LOCKED/USER)をすべてクリアしてもよろしいですか? この操作は元に戻せません。",
|
"Maintenance_Tool_UnlockFields_noti_text": "全デバイスのデバイスフィールドのソース値(LOCKED/USER)をすべてクリアしてもよろしいですか? この操作は元に戻せません。",
|
||||||
@@ -435,7 +435,7 @@
|
|||||||
"Maintenance_Tool_arpscansw": "arpスキャンの切り替え(オン/オフ)",
|
"Maintenance_Tool_arpscansw": "arpスキャンの切り替え(オン/オフ)",
|
||||||
"Maintenance_Tool_arpscansw_noti": "arpスキャンをオンまたはオフにする",
|
"Maintenance_Tool_arpscansw_noti": "arpスキャンをオンまたはオフにする",
|
||||||
"Maintenance_Tool_arpscansw_noti_text": "スキャンをオフにした場合、再度有効化されるまでオフのままとなります。",
|
"Maintenance_Tool_arpscansw_noti_text": "スキャンをオフにした場合、再度有効化されるまでオフのままとなります。",
|
||||||
"Maintenance_Tool_arpscansw_text": "ARPスキャンの有効化または無効化。スキャンを無効化した場合、再度有効化されるまで無効状態が維持されます。アクティブなスキャンはキャンセルされません。",
|
"Maintenance_Tool_arpscansw_text": "arpスキャンの有効化または無効化。スキャンを無効化した場合、再度有効化されるまで無効状態が維持されます。アクティブなスキャンはキャンセルされません。",
|
||||||
"Maintenance_Tool_backup": "DBバックアップ",
|
"Maintenance_Tool_backup": "DBバックアップ",
|
||||||
"Maintenance_Tool_backup_noti": "DBバックアップ",
|
"Maintenance_Tool_backup_noti": "DBバックアップ",
|
||||||
"Maintenance_Tool_backup_noti_text": "データベースのバックアップを実行してもよろしいですか? 現在スキャンが実行されていないことを確認してください。",
|
"Maintenance_Tool_backup_noti_text": "データベースのバックアップを実行してもよろしいですか? 現在スキャンが実行されていないことを確認してください。",
|
||||||
@@ -475,7 +475,7 @@
|
|||||||
"Maintenance_Tool_del_unknowndev_noti_text": "すべての(Unknown)のデバイスと(name not found)のデバイスを削除してもよろしいですか?",
|
"Maintenance_Tool_del_unknowndev_noti_text": "すべての(Unknown)のデバイスと(name not found)のデバイスを削除してもよろしいですか?",
|
||||||
"Maintenance_Tool_del_unknowndev_text": "この機能を使用する前に、必ずバックアップを作成してください。削除操作は元に戻せません。データベースから(Unknown)という名前のデバイスをすべて削除します。",
|
"Maintenance_Tool_del_unknowndev_text": "この機能を使用する前に、必ずバックアップを作成してください。削除操作は元に戻せません。データベースから(Unknown)という名前のデバイスをすべて削除します。",
|
||||||
"Maintenance_Tool_del_unlockFields_selecteddev_text": "これにより、選択したデバイスの「LOCKED/USER」フィールドのロックが解除されます。この操作は取り消せません。",
|
"Maintenance_Tool_del_unlockFields_selecteddev_text": "これにより、選択したデバイスの「LOCKED/USER」フィールドのロックが解除されます。この操作は取り消せません。",
|
||||||
"Maintenance_Tool_displayed_columns_text": "<a href=\"devices.php\"><b><i class=\"fa fa-laptop\"></i>デバイス</b></a>ページの列の表示状態と順序を変更します。",
|
"Maintenance_Tool_displayed_columns_text": "<a href=\"devices.php\"><b><i class=\"fa fa-laptop\"></i> デバイス</b></a> ページの列の表示状態と順序を変更します。",
|
||||||
"Maintenance_Tool_drag_me": "ドラッグして列を並べ替え。",
|
"Maintenance_Tool_drag_me": "ドラッグして列を並べ替え。",
|
||||||
"Maintenance_Tool_order_columns_text": "Maintenance_Tool_order_columns_text",
|
"Maintenance_Tool_order_columns_text": "Maintenance_Tool_order_columns_text",
|
||||||
"Maintenance_Tool_purgebackup": "バックアップ除去",
|
"Maintenance_Tool_purgebackup": "バックアップ除去",
|
||||||
@@ -500,7 +500,7 @@
|
|||||||
"Maintenance_arp_status_off": "無効化中",
|
"Maintenance_arp_status_off": "無効化中",
|
||||||
"Maintenance_arp_status_on": "スキャン中",
|
"Maintenance_arp_status_on": "スキャン中",
|
||||||
"Maintenance_built_on": "ビルド日",
|
"Maintenance_built_on": "ビルド日",
|
||||||
"Maintenance_current_version": "最新です。<a href=\"https://github.com/netalertx/NetAlertX/issues/138\" target=\"_blank\">現在の取り組み</a>をご覧ください。",
|
"Maintenance_current_version": "最新です。<a href=\"https://github.com/netalertx/NetAlertX/issues/138\" target=\"_blank\">現在の取り組み</a> をご覧ください。",
|
||||||
"Maintenance_database_backup": "DBバックアップ",
|
"Maintenance_database_backup": "DBバックアップ",
|
||||||
"Maintenance_database_backup_found": "バックアップが見つかりました",
|
"Maintenance_database_backup_found": "バックアップが見つかりました",
|
||||||
"Maintenance_database_backup_total": "総ディスク使用量",
|
"Maintenance_database_backup_total": "総ディスク使用量",
|
||||||
@@ -512,13 +512,13 @@
|
|||||||
"Maintenance_lang_selector_empty": "言語を選択",
|
"Maintenance_lang_selector_empty": "言語を選択",
|
||||||
"Maintenance_lang_selector_lable": "言語を選択",
|
"Maintenance_lang_selector_lable": "言語を選択",
|
||||||
"Maintenance_lang_selector_text": "変更はクライアント側で行われるため、現在のブラウザにのみ影響します。",
|
"Maintenance_lang_selector_text": "変更はクライアント側で行われるため、現在のブラウザにのみ影響します。",
|
||||||
"Maintenance_new_version": "新しいバージョンが利用可能です。<a href=\"https://github.com/netalertx/NetAlertX/releases\" target=\"_blank\">リリースノート</a>を確認してください。",
|
"Maintenance_new_version": "新しいバージョンが利用可能です。<a href=\"https://github.com/netalertx/NetAlertX/releases\" target=\"_blank\">リリースノート</a> を確認してください。",
|
||||||
"Maintenance_themeselector_apply": "適用",
|
"Maintenance_themeselector_apply": "適用",
|
||||||
"Maintenance_themeselector_empty": "スキンを選択",
|
"Maintenance_themeselector_empty": "スキンを選択",
|
||||||
"Maintenance_themeselector_lable": "スキンを選択",
|
"Maintenance_themeselector_lable": "スキンを選択",
|
||||||
"Maintenance_themeselector_text": "変更はサーバー側で行われるため、使用中のすべてのデバイスに影響します。",
|
"Maintenance_themeselector_text": "変更はサーバー側で行われるため、使用中のすべてのデバイスに影響します。",
|
||||||
"Maintenance_version": "アプリのアップデート",
|
"Maintenance_version": "アプリのアップデート",
|
||||||
"NETWORK_DEVICE_TYPES_description": "ネットワークビューにおいてネットワーク機器として使用できるデバイス種別。デバイス種別は、デバイス詳細の特定のデバイスにおける<code>種別</code>設定と一致する必要があります。デバイスに追加するには<code>+</code>ボタンを使用してください。既存の種別を削除せず、新しい種別のみを追加してください。",
|
"NETWORK_DEVICE_TYPES_description": "ネットワークビューにおいてネットワーク機器として使用できるデバイス種別。デバイス種別は、デバイス詳細の特定のデバイスにおける <code>種別</code> 設定と一致する必要があります。デバイスに追加するには <code>+</code> ボタンを使用してください。既存の種別を削除せず、新しい種別のみを追加してください。",
|
||||||
"NETWORK_DEVICE_TYPES_name": "ネットワーク機器の種別",
|
"NETWORK_DEVICE_TYPES_name": "ネットワーク機器の種別",
|
||||||
"Navigation_About": "概要",
|
"Navigation_About": "概要",
|
||||||
"Navigation_AppEvents": "アプリイベント",
|
"Navigation_AppEvents": "アプリイベント",
|
||||||
@@ -536,7 +536,7 @@
|
|||||||
"Navigation_Settings": "設定",
|
"Navigation_Settings": "設定",
|
||||||
"Navigation_SystemInfo": "システム情報",
|
"Navigation_SystemInfo": "システム情報",
|
||||||
"Navigation_Workflows": "ワークフロー",
|
"Navigation_Workflows": "ワークフロー",
|
||||||
"Network_Assign": "上記<i class=\"fa fa-server\"></i>ネットワークノードに接続",
|
"Network_Assign": "上記 <i class=\"fa fa-server\"></i> ネットワークノードに接続",
|
||||||
"Network_Cant_Assign": "ルートインターネットノードを子リーフノードとして割り当てることはできません.",
|
"Network_Cant_Assign": "ルートインターネットノードを子リーフノードとして割り当てることはできません.",
|
||||||
"Network_Cant_Assign_No_Node_Selected": "割り当てられません、親ノードが選択されていません。",
|
"Network_Cant_Assign_No_Node_Selected": "割り当てられません、親ノードが選択されていません。",
|
||||||
"Network_Configuration_Error": "設定エラー",
|
"Network_Configuration_Error": "設定エラー",
|
||||||
@@ -546,7 +546,7 @@
|
|||||||
"Network_ManageAdd_Name": "デバイス名",
|
"Network_ManageAdd_Name": "デバイス名",
|
||||||
"Network_ManageAdd_Name_text": "特殊文字を含まない名前",
|
"Network_ManageAdd_Name_text": "特殊文字を含まない名前",
|
||||||
"Network_ManageAdd_Port": "ポート数",
|
"Network_ManageAdd_Port": "ポート数",
|
||||||
"Network_ManageAdd_Port_text": "Wi-FiおよびPLCの場合は空欄にしてください",
|
"Network_ManageAdd_Port_text": "wifiおよびplcの場合は空欄にしてください",
|
||||||
"Network_ManageAdd_Submit": "デバイス追加",
|
"Network_ManageAdd_Submit": "デバイス追加",
|
||||||
"Network_ManageAdd_Type": "デバイス種別",
|
"Network_ManageAdd_Type": "デバイス種別",
|
||||||
"Network_ManageAdd_Type_text": "-- 種別選択 --",
|
"Network_ManageAdd_Type_text": "-- 種別選択 --",
|
||||||
@@ -562,19 +562,19 @@
|
|||||||
"Network_ManageEdit_Name": "新規デバイス名",
|
"Network_ManageEdit_Name": "新規デバイス名",
|
||||||
"Network_ManageEdit_Name_text": "特殊文字を含まない名前",
|
"Network_ManageEdit_Name_text": "特殊文字を含まない名前",
|
||||||
"Network_ManageEdit_Port": " 新規ポート数",
|
"Network_ManageEdit_Port": " 新規ポート数",
|
||||||
"Network_ManageEdit_Port_text": "Wi-FiおよびPLCの場合は空欄にしてください",
|
"Network_ManageEdit_Port_text": "wifiおよびplcの場合は空欄にしてください",
|
||||||
"Network_ManageEdit_Submit": "変更を保存",
|
"Network_ManageEdit_Submit": "変更を保存",
|
||||||
"Network_ManageEdit_Type": "新規デバイス種別",
|
"Network_ManageEdit_Type": "新規デバイス種別",
|
||||||
"Network_ManageEdit_Type_text": "-- 種別選択 --",
|
"Network_ManageEdit_Type_text": "-- 種別選択 --",
|
||||||
"Network_ManageLeaf": "割り当ての管理",
|
"Network_ManageLeaf": "割り当ての管理",
|
||||||
"Network_ManageUnassign": "割り当て解除",
|
"Network_ManageUnassign": "割り当て解除",
|
||||||
"Network_NoAssignedDevices": "このネットワークノードには割り当てられたデバイス(リーフノード)がありません。以下のデバイスから1つを割り当てるか、<a href=\"devices.php\"><b><i class=\"fa fa-laptop\"></i>デバイス</b></a>内の任意のデバイスの<b><i class=\"fa fa-info-circle\"></i>詳細</b>タブに移動し、そこでネットワーク<b><i class=\"fa fa-server\"></i>ノード(MAC)</b>と<b><i class=\"fa fa-ethernet\"></i>ポート</b>に割り当ててください。",
|
"Network_NoAssignedDevices": "このネットワークノードには割り当てられたデバイス(リーフノード)がありません。以下のデバイスから1つを割り当てるか、<a href=\"devices.php\"><b><i class=\"fa fa-laptop\"></i> デバイス</b></a> 内の任意のデバイスの <b><i class=\"fa fa-info-circle\"></i> 詳細</b> タブに移動し、そこでネットワーク <b><i class=\"fa fa-server\"></i> ノード(MAC)</b> と <b><i class=\"fa fa-ethernet\"></i> ポート</b> に割り当ててください。",
|
||||||
"Network_NoDevices": "設定するデバイスがありません",
|
"Network_NoDevices": "設定するデバイスがありません",
|
||||||
"Network_Node": "ネットワークノード",
|
"Network_Node": "ネットワークノード",
|
||||||
"Network_Node_Name": "ノード名",
|
"Network_Node_Name": "ノード名",
|
||||||
"Network_Parent": "上位のネットワーク機器",
|
"Network_Parent": "上位のネットワーク機器",
|
||||||
"Network_Root": "ルートノード",
|
"Network_Root": "ルートノード",
|
||||||
"Network_Root_Not_Configured": "<a href=\"deviceDetails.php?mac=Internet\">インターネットルートデバイス</a>の<b>種別</b>フィールドで、<b>ゲートウェイ</b>などのネットワーク機器種別を選択し、この画面の設定を開始してください。<br/><br/>詳細なドキュメントは<a href=\"https://docs.netalertx.com/NETWORK_TREE\" target=\"_blank\">ネットワークの設定方法ページ</a>ガイドでご覧いただけます",
|
"Network_Root_Not_Configured": "<a href=\"deviceDetails.php?mac=Internet\">インターネットルートデバイス</a> の <b>種別</b> フィールドで、<b>ゲートウェイ</b> などのネットワーク機器種別を選択し、この画面の設定を開始してください。<br/><br/> 詳細なドキュメントは <a href=\"https://docs.netalertx.com/NETWORK_TREE\" target=\"_blank\">ネットワークの設定方法ページ</a> ガイドでご覧いただけます",
|
||||||
"Network_Root_Unconfigurable": "設定不可のルート",
|
"Network_Root_Unconfigurable": "設定不可のルート",
|
||||||
"Network_ShowArchived": "アーカイブを表示",
|
"Network_ShowArchived": "アーカイブを表示",
|
||||||
"Network_ShowOffline": "オフラインを表示",
|
"Network_ShowOffline": "オフラインを表示",
|
||||||
@@ -585,13 +585,13 @@
|
|||||||
"Network_UnassignedDevices": "未割り当てデバイス",
|
"Network_UnassignedDevices": "未割り当てデバイス",
|
||||||
"Notifications_All": "すべての通知",
|
"Notifications_All": "すべての通知",
|
||||||
"Notifications_Mark_All_Read": "すべて既読にする",
|
"Notifications_Mark_All_Read": "すべて既読にする",
|
||||||
"PIALERT_WEB_PASSWORD_description": "デフォルトのパスワードは<code>123456</code>です。パスワードを変更するには、コンテナ内で<code>/app/back/pialert-cli</code>を実行するか、<a onclick=\"toggleAllSettings()\" href=\"#SETPWD_RUN\"><code>SETPWD_RUN</code>パスワード設定プラグイン</a>を使用してください。",
|
"PIALERT_WEB_PASSWORD_description": "デフォルトのパスワードは <code>123456</code> です。パスワードを変更するには、コンテナ内で <code>/app/back/pialert-cli</code> を実行するか、<a onclick=\"toggleAllSettings()\" href=\"#SETPWD_RUN\"><code>SETPWD_RUN</code> パスワード設定プラグイン</a> を使用してください。",
|
||||||
"PIALERT_WEB_PASSWORD_name": "ログインパスワード",
|
"PIALERT_WEB_PASSWORD_name": "ログインパスワード",
|
||||||
"PIALERT_WEB_PROTECTION_description": "有効にするとログインダイアログが表示されます。インスタンスにロックアウトされた場合は、以下をよくご確認ください。",
|
"PIALERT_WEB_PROTECTION_description": "有効にするとログインダイアログが表示されます。インスタンスにロックアウトされた場合は、以下をよくご確認ください。",
|
||||||
"PIALERT_WEB_PROTECTION_name": "ログインを有効化",
|
"PIALERT_WEB_PROTECTION_name": "ログインを有効化",
|
||||||
"PLUGINS_KEEP_HIST_description": "プラグイン履歴スキャン結果のエントリをいくつ保持すべきか(デバイス固有ではなく、プラグインごとに)。",
|
"PLUGINS_KEEP_HIST_description": "プラグイン履歴スキャン結果のエントリをいくつ保持すべきか(デバイス固有ではなく、プラグインごとに)。",
|
||||||
"PLUGINS_KEEP_HIST_name": "プラグイン履歴",
|
"PLUGINS_KEEP_HIST_name": "プラグイン履歴",
|
||||||
"PRAGMA_JOURNAL_SIZE_LIMIT_description": "SQLite WAL(Write-Ahead Log)の自動チェックポイント発生前の最大サイズ(MB単位)。低い値(10~20 MB)ではディスク/ストレージ使用量を削減しますが、スキャン時のCPU使用率が増加します。高い値(50~100 MB)は操作中のCPUスパイクを軽減しますが、RAMとディスク容量をより多く消費する可能性があります。デフォルトの<code>50 MB</code>は両者のバランスを取ります。SDカードを搭載したNASデバイスなどのリソース制約のあるシステムで有用です。設定保存後、変更を有効にするにはサーバーを再起動してください。",
|
"PRAGMA_JOURNAL_SIZE_LIMIT_description": "SQLite WAL(Write-Ahead Log)の自動チェックポイント発生前の最大サイズ(MB単位)。低い値(10~20 MB)ではディスク/ストレージ使用量を削減しますが、スキャン時のCPU使用率が増加します。高い値(50~100 MB)は操作中のCPUスパイクを軽減しますが、RAMとディスク容量をより多く消費する可能性があります。デフォルトの <code>50 MB</code> は両者のバランスを取ります。SDカードを搭載したNASデバイスなどのリソース制約のあるシステムで有用です。設定保存後、変更を有効にするにはサーバーを再起動してください。",
|
||||||
"PRAGMA_JOURNAL_SIZE_LIMIT_name": "WALサイズ制限(MB)",
|
"PRAGMA_JOURNAL_SIZE_LIMIT_name": "WALサイズ制限(MB)",
|
||||||
"Plugins_DeleteAll": "すべて削除(フィルターは無視されます)",
|
"Plugins_DeleteAll": "すべて削除(フィルターは無視されます)",
|
||||||
"Plugins_Filters_Mac": "Macフィルター",
|
"Plugins_Filters_Mac": "Macフィルター",
|
||||||
@@ -628,12 +628,12 @@
|
|||||||
"REPORT_DASHBOARD_URL_description": "このURLは、HTMLレポート(例:メール)内のリンク生成のベースとして使用されます。ポート番号を含め、<code>http://</code> で始まる完全なURLを入力してください(末尾のスラッシュ <code>/</code> は不要です)。",
|
"REPORT_DASHBOARD_URL_description": "このURLは、HTMLレポート(例:メール)内のリンク生成のベースとして使用されます。ポート番号を含め、<code>http://</code> で始まる完全なURLを入力してください(末尾のスラッシュ <code>/</code> は不要です)。",
|
||||||
"REPORT_DASHBOARD_URL_name": "NetAlertX URL",
|
"REPORT_DASHBOARD_URL_name": "NetAlertX URL",
|
||||||
"REPORT_ERROR": "お探しのページは一時的に利用できません、数秒後に再度お試しください",
|
"REPORT_ERROR": "お探しのページは一時的に利用できません、数秒後に再度お試しください",
|
||||||
"REPORT_MAIL_description": "有効化すると、購読した変更点のリストが記載されたメールが送信されます。以下のSMTP設定に関連する残りの設定もすべて入力してください。問題が発生した場合は、<code>LOG_LEVEL</code>を<code>debug</code>に設定し、<a href=\"/maintenance.php#tab_Logging\">エラーログ</a>を確認してください。",
|
"REPORT_MAIL_description": "有効化すると、購読した変更点のリストが記載されたメールが送信されます。以下のSMTP設定に関連する残りの設定もすべて入力してください。問題が発生した場合は、<code>LOG_LEVEL</code> を <code>debug</code> に設定し、<a href=\"/maintenance.php#tab_Logging\">エラーログ</a> を確認してください。",
|
||||||
"REPORT_MAIL_name": "メールを有効化",
|
"REPORT_MAIL_name": "メールを有効化",
|
||||||
"REPORT_TITLE": "レポート",
|
"REPORT_TITLE": "レポート",
|
||||||
"RandomMAC_hover": "このデバイスはランダムなMACアドレスを使用しています",
|
"RandomMAC_hover": "このデバイスはランダムなMACアドレスを使用しています",
|
||||||
"Reports_Sent_Log": "送信レポートログ",
|
"Reports_Sent_Log": "送信レポートログ",
|
||||||
"SCAN_SUBNETS_description": "ほとんどのネットワーク内スキャナー(ARP-SCAN、NMAP、NSLOOKUP、DIG)は、特定のネットワークインターフェースとサブネットをスキャンすることに依存しています。この設定に関するヘルプについては、<a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">サブネットのドキュメント</a>を確認してください。特にVLAN、サポートされているVLANの種類、ネットワークマスクとインターフェースの確認方法についてです。<br/><br/>ネットワーク内スキャナーの代替手段として、NetAlert<sup>X</sup>がネットワークにアクセスする必要のない他のデバイススキャナー/インポーター(UNIFI、dhcp.leases、PiHoleなど)を有効化できます。<br/><br/>注:スキャン時間自体は確認するIPアドレス数に依存するため、適切なネットワークマスクとインターフェースで慎重に設定してください。",
|
"SCAN_SUBNETS_description": "ほとんどのネットワーク内スキャナー(ARP-SCAN、NMAP、NSLOOKUP、DIG)は、特定のネットワークインターフェースとサブネットをスキャンすることに依存しています。この設定に関するヘルプについては、<a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">サブネットのドキュメント</a> を確認してください。特にVLAN、サポートされているVLANの種類、ネットワークマスクとインターフェースの確認方法についてです。<br/><br/> ネットワーク内スキャナーの代替手段として、NetAlert<sup>X</sup> がネットワークにアクセスする必要のない他のデバイススキャナー/インポーター(UNIFI、dhcp.leases、PiHoleなど)を有効化できます。<br/><br/> 注:スキャン時間自体は確認するIPアドレス数に依存するため、適切なネットワークマスクとインターフェースで慎重に設定してください。",
|
||||||
"SCAN_SUBNETS_name": "スキャン対象ネットワーク",
|
"SCAN_SUBNETS_name": "スキャン対象ネットワーク",
|
||||||
"SYSTEM_TITLE": "システム情報",
|
"SYSTEM_TITLE": "システム情報",
|
||||||
"Setting_Override": "上書き値",
|
"Setting_Override": "上書き値",
|
||||||
@@ -641,7 +641,7 @@
|
|||||||
"Settings_Metadata_Toggle": "指定された設定のメタデータを表示/非表示にする。",
|
"Settings_Metadata_Toggle": "指定された設定のメタデータを表示/非表示にする。",
|
||||||
"Settings_Show_Description": "説明を表示",
|
"Settings_Show_Description": "説明を表示",
|
||||||
"Settings_device_Scanners_desync": "⚠デバイススキャナーのスケジュールが同期されていません。",
|
"Settings_device_Scanners_desync": "⚠デバイススキャナーのスケジュールが同期されていません。",
|
||||||
"Settings_device_Scanners_desync_popup": "デバイススキャナーのスケジュール(<code>*_RUN_SCHD</code>)は同一ではありません。これにより、デバイスのオンライン/オフライン通知に一貫性が生じます。意図的な場合を除き、有効化されているすべての<b>🔍デバイススキャナー</b>で同一のスケジュールを使用してください。",
|
"Settings_device_Scanners_desync_popup": "デバイススキャナーのスケジュール(<code>*_RUN_SCHD</code>)は同一ではありません。これにより、デバイスのオンライン/オフライン通知に一貫性が生じます。意図的な場合を除き、有効化されているすべての <b>🔍デバイススキャナー</b> で同一のスケジュールを使用してください。",
|
||||||
"Speedtest_Results": "スピードテスト結果",
|
"Speedtest_Results": "スピードテスト結果",
|
||||||
"Systeminfo_AvailableIps": "利用可能なIP",
|
"Systeminfo_AvailableIps": "利用可能なIP",
|
||||||
"Systeminfo_CPU": "CPU",
|
"Systeminfo_CPU": "CPU",
|
||||||
@@ -718,22 +718,22 @@
|
|||||||
"Systeminfo_System_Uptime": "稼働時間:",
|
"Systeminfo_System_Uptime": "稼働時間:",
|
||||||
"Systeminfo_This_Client": "使用中のクライアント",
|
"Systeminfo_This_Client": "使用中のクライアント",
|
||||||
"Systeminfo_USB_Devices": "USBデバイス",
|
"Systeminfo_USB_Devices": "USBデバイス",
|
||||||
"TICKER_MIGRATE_TO_NETALERTX": "⚠古いマウント位置が検出されました。新しい<code>/data/config</code>および<code>/data/db</code>フォルダと<code>netalertx</code>コンテナへの移行については、<a href=\"https://docs.netalertx.com/MIGRATION\" target=\"_blank\">このガイド</a>に従ってください。",
|
"TICKER_MIGRATE_TO_NETALERTX": "⚠古いマウント位置が検出されました。新しい <code>/data/config</code> および <code>/data/db</code> フォルダと <code>netalertx</code> コンテナへの移行については、<a href=\"https://docs.netalertx.com/MIGRATION\" target=\"_blank\">このガイド</a> に従ってください。",
|
||||||
"TIMEZONE_description": "統計情報を正しく表示するためのタイムゾーン。タイムゾーンは<a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\" rel=\"nofollow\">こちら</a>で確認してください。",
|
"TIMEZONE_description": "統計情報を正しく表示するためのタイムゾーン。タイムゾーンは <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\" rel=\"nofollow\">こちら</a> で確認してください。",
|
||||||
"TIMEZONE_name": "タイムゾーン",
|
"TIMEZONE_name": "タイムゾーン",
|
||||||
"UI_DEV_SECTIONS_description": "デバイスページで非表示にするUI要素を選択してください。",
|
"UI_DEV_SECTIONS_description": "デバイスページで非表示にするUI要素を選択してください。",
|
||||||
"UI_DEV_SECTIONS_name": "デバイスセクションを非表示",
|
"UI_DEV_SECTIONS_name": "デバイスセクションを非表示",
|
||||||
"UI_ICONS_description": "事前定義済みアイコンの一覧。注意して操作してください。アイコン追加の推奨方法は、<a href=\"https://docs.netalertx.com/ICONS\" target=\"_blank\">アイコンのドキュメント</a>に記載されています。base64エンコードされたSVG HTMLまたはFont Awesome HTMLタグを追加できます。",
|
"UI_ICONS_description": "事前定義済みアイコンの一覧。注意して操作してください。アイコン追加の推奨方法は、<a href=\"https://docs.netalertx.com/ICONS\" target=\"_blank\">アイコンのドキュメント</a> に記載されています。base64エンコードされたSVG HTMLまたはFont Awesome HTMLタグを追加できます。",
|
||||||
"UI_ICONS_name": "事前定義済みアイコン",
|
"UI_ICONS_name": "事前定義済みアイコン",
|
||||||
"UI_LANG_description": "お好みのUI言語を選択してください。翻訳のお手伝いや言語の提案は、<a href=\"https://hosted.weblate.org/projects/pialert/core/\" target=\"_blank\">Weblate</a>のオンラインポータルで行えます。",
|
"UI_LANG_description": "お好みのUI言語を選択してください。翻訳のお手伝いや言語の提案は、<a href=\"https://hosted.weblate.org/projects/pialert/core/\" target=\"_blank\">Weblate</a> のオンラインポータルで行えます。",
|
||||||
"UI_LANG_name": "UI言語",
|
"UI_LANG_name": "UI言語",
|
||||||
"UI_MY_DEVICES_description": "デフォルトの<b>マイデバイス</b>ビューに表示すべきデバイスの状態。",
|
"UI_MY_DEVICES_description": "デフォルトの <b>マイデバイス</b> ビューに表示すべきデバイスの状態。",
|
||||||
"UI_MY_DEVICES_name": "自分のデバイスビューに表示",
|
"UI_MY_DEVICES_name": "自分のデバイスビューに表示",
|
||||||
"UI_NOT_RANDOM_MAC_description": "ランダムデバイスとしてマークすべきでないMACプレフィックス。例えば<code>52</code>と入力すると、<code>52:xx:xx:xx:xx:xx</code>で始まるデバイスがランダムMACアドレスを持つデバイスとしてマークされるのを除外します。",
|
"UI_NOT_RANDOM_MAC_description": "ランダムデバイスとしてマークすべきでないMACプレフィックス。例えば <code>52</code> と入力すると、<code>52:xx:xx:xx:xx:xx</code> で始まるデバイスがランダムMACアドレスを持つデバイスとしてマークされるのを除外します。",
|
||||||
"UI_NOT_RANDOM_MAC_name": "ランダムとしてマークしない",
|
"UI_NOT_RANDOM_MAC_name": "ランダムとしてマークしない",
|
||||||
"UI_PRESENCE_description": "<a href=\"/devices.php\" target=\"_blank\">デバイス</a>ページ内の<b>デバイス状態</b>チャートに表示するステータスを選択してください。",
|
"UI_PRESENCE_description": "<a href=\"/devices.php\" target=\"_blank\">デバイス</a> ページ内の <b>デバイス状態</b> チャートに表示するステータスを選択してください。",
|
||||||
"UI_PRESENCE_name": "検出チャートの表示",
|
"UI_PRESENCE_name": "検出チャートの表示",
|
||||||
"UI_REFRESH_description": "UIが再読み込みされるまでの秒数を指定します。無効にするには<code>0</code>を設定してください。",
|
"UI_REFRESH_description": "UIが再読み込みされるまでの秒数を指定します。無効にするには <code>0</code> を設定してください。",
|
||||||
"UI_REFRESH_name": "UI自動更新",
|
"UI_REFRESH_name": "UI自動更新",
|
||||||
"VERSION_description": "バージョンまたはタイムスタンプヘルパー値で、アプリがアップグレードされたかどうかを確認します。",
|
"VERSION_description": "バージョンまたはタイムスタンプヘルパー値で、アプリがアップグレードされたかどうかを確認します。",
|
||||||
"VERSION_name": "バージョンまたはタイムスタンプ",
|
"VERSION_name": "バージョンまたはタイムスタンプ",
|
||||||
@@ -767,13 +767,13 @@
|
|||||||
"add_option_event_tooltip": "値の追加",
|
"add_option_event_tooltip": "値の追加",
|
||||||
"copy_icons_event_tooltip": "同じ種別の全デバイスにアイコンを上書き",
|
"copy_icons_event_tooltip": "同じ種別の全デバイスにアイコンを上書き",
|
||||||
"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": "アドホックイベントの実行",
|
||||||
"go_to_device_event_tooltip": "デバイスに移動",
|
"go_to_device_event_tooltip": "デバイスに移動",
|
||||||
"go_to_node_event_tooltip": "指定されたノードのネットワークページに移動する",
|
"go_to_node_event_tooltip": "指定されたノードのネットワークページに移動する",
|
||||||
"new_version_available": "新しいバージョンが利用可能です。",
|
"new_version_available": "新しいバージョンが利用可能です。",
|
||||||
"report_guid": "通知GUID:",
|
"report_guid": "通知guid:",
|
||||||
"report_guid_missing": "リンクされた通知が見つかりません。送信された通知が利用可能になるまで、わずかな遅延が生じます。数秒後にページとキャッシュを更新してください。また、<code>DBCLNP_NOTIFI_HIST</code>設定で指定されているメンテナンス中に、選択した通知が削除された可能性もあります。<br/> <br/>代わりに最新の通知が表示されます。欠落している通知のGUIDは以下の通りです:",
|
"report_guid_missing": "リンクされた通知が見つかりません。送信された通知が利用可能になるまで、わずかな遅延が生じます。数秒後にページとキャッシュを更新してください。また、<code>DBCLNP_NOTIFI_HIST</code> 設定で指定されているメンテナンス中に、選択した通知が削除された可能性もあります。<br/> <br/>代わりに最新の通知が表示されます。欠落している通知のGUIDは以下の通りです:",
|
||||||
"report_select_format": "フォーマット選択:",
|
"report_select_format": "フォーマット選択:",
|
||||||
"report_time": "通知時刻:",
|
"report_time": "通知時刻:",
|
||||||
"run_event_tooltip": "設定を有効にし、実行する前にまず変更を保存してください。",
|
"run_event_tooltip": "設定を有効にし、実行する前にまず変更を保存してください。",
|
||||||
@@ -782,7 +782,7 @@
|
|||||||
"settings_core_label": "Core",
|
"settings_core_label": "Core",
|
||||||
"settings_device_scanners": "デバイススキャナーは、CurrentScanデータベーステーブルに書き込みを行うデバイスを発見するために使用されます。",
|
"settings_device_scanners": "デバイススキャナーは、CurrentScanデータベーステーブルに書き込みを行うデバイスを発見するために使用されます。",
|
||||||
"settings_device_scanners_icon": "fa-solid fa-magnifying-glass-plus",
|
"settings_device_scanners_icon": "fa-solid fa-magnifying-glass-plus",
|
||||||
"settings_device_scanners_info": "<a href=\"/settings.php#LOADED_PLUGINS\">LOADED_PLUGINS</a>設定でより多くのデバイススキャナーを読み込みます",
|
"settings_device_scanners_info": "<a href=\"/settings.php#LOADED_PLUGINS\">LOADED_PLUGINS</a> 設定でより多くのデバイススキャナーを読み込みます",
|
||||||
"settings_device_scanners_label": "デバイススキャナー",
|
"settings_device_scanners_label": "デバイススキャナー",
|
||||||
"settings_enabled": "有効な設定",
|
"settings_enabled": "有効な設定",
|
||||||
"settings_enabled_icon": "fa-solid fa-toggle-on",
|
"settings_enabled_icon": "fa-solid fa-toggle-on",
|
||||||
@@ -797,10 +797,10 @@
|
|||||||
"settings_other_scanners_label": "その他のスキャナー",
|
"settings_other_scanners_label": "その他のスキャナー",
|
||||||
"settings_publishers": "有効化された通知ゲートウェイ - 設定に応じて通知を送信する発行元。",
|
"settings_publishers": "有効化された通知ゲートウェイ - 設定に応じて通知を送信する発行元。",
|
||||||
"settings_publishers_icon": "fa-solid fa-paper-plane",
|
"settings_publishers_icon": "fa-solid fa-paper-plane",
|
||||||
"settings_publishers_info": "<a href=\"/settings.php#LOADED_PLUGINS\">LOADED_PLUGINS</a>設定でさらに多くのパブリッシャーを読み込みます",
|
"settings_publishers_info": "<a href=\"/settings.php#LOADED_PLUGINS\">LOADED_PLUGINS</a> 設定でさらに多くのパブリッシャーを読み込みます",
|
||||||
"settings_publishers_label": "パブリッシャー",
|
"settings_publishers_label": "パブリッシャー",
|
||||||
"settings_readonly": "<code>app.conf</code>の読み取りまたは書き込みができません。コンテナを再起動し、<a href=\"https://docs.netalertx.com/FILE_PERMISSIONS\" target=\"_blank\">ファイルの権限に関するドキュメント</a>を参照してください",
|
"settings_readonly": "<code>app.conf</code> の読み取りまたは書き込みができません。コンテナを再起動し、<a href=\"https://docs.netalertx.com/FILE_PERMISSIONS\" target=\"_blank\">ファイルの権限に関するドキュメント</a> を参照してください",
|
||||||
"settings_saved": "<br/>設定が保存されました。<br/>再読込中…<br/><i class=\"ion ion-ios-loop-strong fa-spin fa-2x fa-fw\"></i><br/>",
|
"settings_saved": "<br/>設定が保存されました。<br/> 再読込中…<br/><i class=\"ion ion-ios-loop-strong fa-spin fa-2x fa-fw\"></i><br/>",
|
||||||
"settings_system_icon": "fa-solid fa-gear",
|
"settings_system_icon": "fa-solid fa-gear",
|
||||||
"settings_system_label": "システム",
|
"settings_system_label": "システム",
|
||||||
"settings_update_item_warning": "以下の値を更新してください。以前のフォーマットに従うよう注意してください。<b>検証は行われません。</b>",
|
"settings_update_item_warning": "以下の値を更新してください。以前のフォーマットに従うよう注意してください。<b>検証は行われません。</b>",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ $pia_lang_selected = isset($_langMatch[1]) ? strtolower($_langMatch[1]) : $defau
|
|||||||
$result = $db->query("SELECT * FROM Plugins_Language_Strings");
|
$result = $db->query("SELECT * FROM Plugins_Language_Strings");
|
||||||
$strings = array();
|
$strings = array();
|
||||||
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
|
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
|
||||||
$strings[$row['String_Key']] = $row['String_Value'];
|
$strings[$row['stringKey']] = $row['stringValue'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"default": "en_us",
|
"default": "en_us",
|
||||||
"languages": [
|
"languages": [
|
||||||
|
{ "code": "en_us", "display": "English (en_us)" },
|
||||||
{ "code": "ar_ar", "display": "Arabic (ar_ar)" },
|
{ "code": "ar_ar", "display": "Arabic (ar_ar)" },
|
||||||
{ "code": "ca_ca", "display": "Catalan (ca_ca)" },
|
{ "code": "ca_ca", "display": "Catalan (ca_ca)" },
|
||||||
{ "code": "cs_cz", "display": "Czech (cs_cz)" },
|
{ "code": "cs_cz", "display": "Czech (cs_cz)" },
|
||||||
{ "code": "de_de", "display": "German (de_de)" },
|
{ "code": "de_de", "display": "German (de_de)" },
|
||||||
{ "code": "en_us", "display": "English (en_us)" },
|
|
||||||
{ "code": "es_es", "display": "Spanish (es_es)" },
|
{ "code": "es_es", "display": "Spanish (es_es)" },
|
||||||
{ "code": "fa_fa", "display": "Farsi (fa_fa)" },
|
{ "code": "fa_fa", "display": "Farsi (fa_fa)" },
|
||||||
{ "code": "id_id", "display": "Indonesian (id_id)" },
|
{ "code": "id_id", "display": "Indonesian (id_id)" },
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
"Device_NoData_Help": "Если устройства не отображаются после сканирования, проверьте настройку SCAN_SUBNETS и <a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">документацию</a>.",
|
"Device_NoData_Help": "Если устройства не отображаются после сканирования, проверьте настройку SCAN_SUBNETS и <a href=\"https://docs.netalertx.com/SUBNETS\" target=\"_blank\">документацию</a>.",
|
||||||
"Device_NoData_Scanning": "Ожидание первого сканирования — это может занять несколько минут после первоначальной настройки.",
|
"Device_NoData_Scanning": "Ожидание первого сканирования — это может занять несколько минут после первоначальной настройки.",
|
||||||
"Device_NoData_Title": "Устройства пока не найдены",
|
"Device_NoData_Title": "Устройства пока не найдены",
|
||||||
"Device_NoMatch_Title": "",
|
"Device_NoMatch_Title": "Нет устройств, соответствующих текущему фильтру",
|
||||||
"Device_Save_Failed": "Не удалось сохранить устройство",
|
"Device_Save_Failed": "Не удалось сохранить устройство",
|
||||||
"Device_Save_Unauthorized": "Не авторизован - недействительный токен API",
|
"Device_Save_Unauthorized": "Не авторизован - недействительный токен API",
|
||||||
"Device_Saved_Success": "Устройство успешно сохранено",
|
"Device_Saved_Success": "Устройство успешно сохранено",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -341,7 +341,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -372,7 +372,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -418,7 +418,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -434,7 +434,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -450,7 +450,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -466,7 +466,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -482,7 +482,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -498,7 +498,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -532,7 +532,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -547,7 +547,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -562,7 +562,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ def main():
|
|||||||
# make sure the below mapping is mapped in config.json, for example:
|
# make sure the below mapping is mapped in config.json, for example:
|
||||||
# "database_column_definitions": [
|
# "database_column_definitions": [
|
||||||
# {
|
# {
|
||||||
# "column": "Object_PrimaryID", <--------- the value I save into primaryId
|
# "column": "objectPrimaryId", <--------- the value I save into primaryId
|
||||||
# "mapped_to_column": "scanMac", <--------- gets inserted into the CurrentScan DB
|
# "mapped_to_column": "scanMac", <--------- gets inserted into the CurrentScan DB
|
||||||
# table column scanMac
|
# table column scanMac
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "url",
|
"type": "url",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-8",
|
"css_classes": "col-sm-8",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "url",
|
"type": "url",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-8",
|
"css_classes": "col-sm-8",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"show_ui": true,
|
"show_ui": true,
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Watched_Value4",
|
"compare_column": "watchedValue4",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -260,7 +260,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -212,14 +212,14 @@ class sensor_config:
|
|||||||
already known. If not, it marks the sensor as new and logs relevant information.
|
already known. If not, it marks the sensor as new and logs relevant information.
|
||||||
"""
|
"""
|
||||||
# Retrieve the plugin object based on the sensor's hash
|
# Retrieve the plugin object based on the sensor's hash
|
||||||
plugObj = getPluginObject({"Plugin": "MQTT", "Watched_Value3": self.hash})
|
plugObj = getPluginObject({"plugin": "MQTT", "watchedValue3": self.hash})
|
||||||
|
|
||||||
# Check if the plugin object is new
|
# Check if the plugin object is new
|
||||||
if not plugObj:
|
if not plugObj:
|
||||||
self.isNew = True
|
self.isNew = True
|
||||||
mylog('verbose', [f"[{pluginName}] New sensor entry (name|mac|hash) : ({self.deviceName}|{self.mac}|{self.hash}"])
|
mylog('verbose', [f"[{pluginName}] New sensor entry (name|mac|hash) : ({self.deviceName}|{self.mac}|{self.hash}"])
|
||||||
else:
|
else:
|
||||||
device_name = plugObj.get("Watched_Value1", "Unknown")
|
device_name = plugObj.get("watchedValue1", "Unknown")
|
||||||
mylog('verbose', [f"[{pluginName}] Existing, skip Device Name: {device_name}"])
|
mylog('verbose', [f"[{pluginName}] Existing, skip Device Name: {device_name}"])
|
||||||
self.isNew = False
|
self.isNew = False
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "device_mac",
|
"type": "device_mac",
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "device_mac",
|
"type": "device_mac",
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "device_mac",
|
"type": "device_mac",
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "url",
|
"type": "url",
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-8",
|
"css_classes": "col-sm-8",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "eval",
|
"type": "eval",
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "device_mac",
|
"type": "device_mac",
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -315,7 +315,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -348,7 +348,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -378,7 +378,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -393,7 +393,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -409,7 +409,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -425,7 +425,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -441,7 +441,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -457,7 +457,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -472,7 +472,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -506,7 +506,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -521,7 +521,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -536,7 +536,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -274,7 +274,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -305,7 +305,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -338,17 +338,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1", "Watched_Value2"],
|
"default_value": ["watchedValue1", "watchedValue2"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -368,15 +368,15 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is IP</li><li><code>Watched_Value2</code> is Vendor</li><li><code>Watched_Value3</code> is Interface </li><li><code>Watched_Value4</code> is N/A </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is IP</li><li><code>watchedValue2</code> is Vendor</li><li><code>watchedValue3</code> is Interface </li><li><code>watchedValue4</code> is N/A </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envía una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Valor_observado1</code> es IP</li><li><code>Valor_observado2</code> es Proveedor</li><li><code>Valor_observado3</code> es Interfaz </li><li><code>Valor_observado4</code> es N/A </li></ul>"
|
"string": "Envía una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es IP</li><li><code>watchedValue2</code> es Proveedor</li><li><code>watchedValue3</code> es Interfaz </li><li><code>watchedValue4</code> es N/A </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>Watched_Value1</code> ist die IP</li><li><code>Watched_Value2</code> ist der Hersteller</li><li><code>Watched_Value3</code> ist das Interface </li><li><code>Watched_Value4</code> ist nicht in Verwendung </li></ul>"
|
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>watchedValue1</code> ist die IP</li><li><code>watchedValue2</code> ist der Hersteller</li><li><code>watchedValue3</code> ist das Interface </li><li><code>watchedValue4</code> ist nicht in Verwendung </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -387,7 +387,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -484,7 +484,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -515,7 +515,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -531,7 +531,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -582,7 +582,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -605,7 +605,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -628,7 +628,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -431,7 +431,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -448,7 +448,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": [
|
"localized": [
|
||||||
@@ -474,7 +474,7 @@
|
|||||||
"type": "device_mac"
|
"type": "device_mac"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": [
|
"localized": [
|
||||||
@@ -500,7 +500,7 @@
|
|||||||
"type": "device_ip"
|
"type": "device_ip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": [
|
"localized": [
|
||||||
@@ -526,7 +526,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
@@ -573,7 +573,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -590,7 +590,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -607,7 +607,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"show_ui": true,
|
"show_ui": true,
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -264,7 +264,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -306,7 +306,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -374,7 +374,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -389,7 +389,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -82,16 +82,16 @@ def cleanup_database(
|
|||||||
# Cleanup Online History
|
# Cleanup Online History
|
||||||
mylog("verbose", [f"[{pluginName}] Online_History: Delete all but keep latest 150 entries"])
|
mylog("verbose", [f"[{pluginName}] Online_History: Delete all but keep latest 150 entries"])
|
||||||
cursor.execute(
|
cursor.execute(
|
||||||
"""DELETE from Online_History where "Index" not in (
|
"""DELETE from Online_History where "index" not in (
|
||||||
SELECT "Index" from Online_History
|
SELECT "index" from Online_History
|
||||||
order by Scan_Date desc limit 150)"""
|
order by scanDate desc limit 150)"""
|
||||||
)
|
)
|
||||||
mylog("verbose", [f"[{pluginName}] Online_History deleted rows: {cursor.rowcount}"])
|
mylog("verbose", [f"[{pluginName}] Online_History deleted rows: {cursor.rowcount}"])
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Cleanup Events
|
# Cleanup Events
|
||||||
mylog("verbose", f"[{pluginName}] Events: Delete all older than {str(DAYS_TO_KEEP_EVENTS)} days (DAYS_TO_KEEP_EVENTS setting)")
|
mylog("verbose", f"[{pluginName}] Events: Delete all older than {str(DAYS_TO_KEEP_EVENTS)} days (DAYS_TO_KEEP_EVENTS setting)")
|
||||||
sql = f"""DELETE FROM Events WHERE eve_DateTime <= date('now', '-{str(DAYS_TO_KEEP_EVENTS)} day')"""
|
sql = f"""DELETE FROM Events WHERE eveDateTime <= date('now', '-{str(DAYS_TO_KEEP_EVENTS)} day')"""
|
||||||
mylog("verbose", [f"[{pluginName}] SQL : {sql}"])
|
mylog("verbose", [f"[{pluginName}] SQL : {sql}"])
|
||||||
cursor.execute(sql)
|
cursor.execute(sql)
|
||||||
mylog("verbose", [f"[{pluginName}] Events deleted rows: {cursor.rowcount}"])
|
mylog("verbose", [f"[{pluginName}] Events deleted rows: {cursor.rowcount}"])
|
||||||
@@ -100,7 +100,7 @@ def cleanup_database(
|
|||||||
# Sessions (derived snapshot — trimmed to the same window as Events so the
|
# Sessions (derived snapshot — trimmed to the same window as Events so the
|
||||||
# two tables stay in sync without introducing a separate setting)
|
# two tables stay in sync without introducing a separate setting)
|
||||||
mylog("verbose", f"[{pluginName}] Sessions: Delete all older than {str(DAYS_TO_KEEP_EVENTS)} days (reuses DAYS_TO_KEEP_EVENTS)")
|
mylog("verbose", f"[{pluginName}] Sessions: Delete all older than {str(DAYS_TO_KEEP_EVENTS)} days (reuses DAYS_TO_KEEP_EVENTS)")
|
||||||
sql = f"""DELETE FROM Sessions WHERE ses_DateTimeConnection <= date('now', '-{str(DAYS_TO_KEEP_EVENTS)} day')"""
|
sql = f"""DELETE FROM Sessions WHERE sesDateTimeConnection <= date('now', '-{str(DAYS_TO_KEEP_EVENTS)} day')"""
|
||||||
mylog("verbose", [f"[{pluginName}] SQL : {sql}"])
|
mylog("verbose", [f"[{pluginName}] SQL : {sql}"])
|
||||||
cursor.execute(sql)
|
cursor.execute(sql)
|
||||||
mylog("verbose", [f"[{pluginName}] Sessions deleted rows: {cursor.rowcount}"])
|
mylog("verbose", [f"[{pluginName}] Sessions deleted rows: {cursor.rowcount}"])
|
||||||
@@ -113,7 +113,7 @@ def cleanup_database(
|
|||||||
SELECT "Index"
|
SELECT "Index"
|
||||||
FROM (
|
FROM (
|
||||||
SELECT "Index",
|
SELECT "Index",
|
||||||
ROW_NUMBER() OVER(PARTITION BY "Plugin" ORDER BY DateTimeChanged DESC) AS row_num
|
ROW_NUMBER() OVER(PARTITION BY plugin ORDER BY dateTimeChanged DESC) AS row_num
|
||||||
FROM Plugins_History
|
FROM Plugins_History
|
||||||
) AS ranked_objects
|
) AS ranked_objects
|
||||||
WHERE row_num <= {str(PLUGINS_KEEP_HIST)}
|
WHERE row_num <= {str(PLUGINS_KEEP_HIST)}
|
||||||
@@ -130,7 +130,7 @@ def cleanup_database(
|
|||||||
SELECT "Index"
|
SELECT "Index"
|
||||||
FROM (
|
FROM (
|
||||||
SELECT "Index",
|
SELECT "Index",
|
||||||
ROW_NUMBER() OVER(PARTITION BY "Notifications" ORDER BY DateTimeCreated DESC) AS row_num
|
ROW_NUMBER() OVER(PARTITION BY "index" ORDER BY dateTimeCreated DESC) AS row_num
|
||||||
FROM Notifications
|
FROM Notifications
|
||||||
) AS ranked_objects
|
) AS ranked_objects
|
||||||
WHERE row_num <= {histCount}
|
WHERE row_num <= {histCount}
|
||||||
@@ -147,7 +147,7 @@ def cleanup_database(
|
|||||||
SELECT "Index"
|
SELECT "Index"
|
||||||
FROM (
|
FROM (
|
||||||
SELECT "Index",
|
SELECT "Index",
|
||||||
ROW_NUMBER() OVER(PARTITION BY "AppEvents" ORDER BY DateTimeCreated DESC) AS row_num
|
ROW_NUMBER() OVER(PARTITION BY "index" ORDER BY dateTimeCreated DESC) AS row_num
|
||||||
FROM AppEvents
|
FROM AppEvents
|
||||||
) AS ranked_objects
|
) AS ranked_objects
|
||||||
WHERE row_num <= {histCount}
|
WHERE row_num <= {histCount}
|
||||||
@@ -192,10 +192,10 @@ def cleanup_database(
|
|||||||
DELETE FROM Plugins_Objects
|
DELETE FROM Plugins_Objects
|
||||||
WHERE rowid > (
|
WHERE rowid > (
|
||||||
SELECT MIN(rowid) FROM Plugins_Objects p2
|
SELECT MIN(rowid) FROM Plugins_Objects p2
|
||||||
WHERE Plugins_Objects.Plugin = p2.Plugin
|
WHERE Plugins_Objects.plugin = p2.plugin
|
||||||
AND Plugins_Objects.Object_PrimaryID = p2.Object_PrimaryID
|
AND Plugins_Objects.objectPrimaryId = p2.objectPrimaryId
|
||||||
AND Plugins_Objects.Object_SecondaryID = p2.Object_SecondaryID
|
AND Plugins_Objects.objectSecondaryId = p2.objectSecondaryId
|
||||||
AND Plugins_Objects.UserData = p2.UserData
|
AND Plugins_Objects.userData = p2.userData
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"enabled": true,
|
"enabled": true,
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -432,17 +432,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1"],
|
"default_value": ["watchedValue1"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -462,11 +462,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Previous IP (not recommended)</li><li><code>Watched_Value2</code> unused</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Previous IP (not recommended)</li><li><code>watchedValue2</code> unused</li><li><code>watchedValue3</code> unused </li><li><code>watchedValue4</code> unused </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>Watched_Value1</code> ist die Vorige IP (nicht empfohlen)</li><li><code>Watched_Value2</code> ist nicht in Verwendung</li><li><code>Watched_Value3</code> ist nicht in Verwendung </li><li><code>Watched_Value4</code> ist nicht in Verwendung </li></ul>"
|
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>watchedValue1</code> ist die Vorige IP (nicht empfohlen)</li><li><code>watchedValue2</code> ist nicht in Verwendung</li><li><code>watchedValue3</code> ist nicht in Verwendung </li><li><code>watchedValue4</code> ist nicht in Verwendung </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -477,7 +477,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -507,22 +507,22 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>Watched_ValueN</code>-Spalte hat sich geändert."
|
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>watchedValueN</code>-Spalte hat sich geändert."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -537,7 +537,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
@@ -560,7 +560,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_ip",
|
"type": "device_ip",
|
||||||
@@ -583,7 +583,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -628,7 +628,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -651,7 +651,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -674,7 +674,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ volumes:
|
|||||||
|
|
||||||
10. Load the `DHCPLSS` plugin and add the search path: `/etc/dnsmasq/dnsmasq.leases`
|
10. Load the `DHCPLSS` plugin and add the search path: `/etc/dnsmasq/dnsmasq.leases`
|
||||||
|
|
||||||
Configure the plugin, and save everything. You can trigger a manual run.
|
Configure the plugin, and save everything. You can trigger a manual run.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> DHCP leases don't allow for realtime tracking and the freshness of the data depends on the DHCP leasing time (usually set to 1 or 24h, or 3600 to 86400 seconds).
|
> DHCP leases don't allow for realtime tracking and the freshness of the data depends on the DHCP leasing time (usually set to 1 or 24h, or 3600 to 86400 seconds).
|
||||||
@@ -93,8 +93,8 @@ DHCPLSS_CMD: 'python3 /app/front/plugins/dhcp_leases/script.py paths={paths}'
|
|||||||
DHCPLSS_paths_to_check: ['/etc/dnsmasq/dnsmasq.leases']
|
DHCPLSS_paths_to_check: ['/etc/dnsmasq/dnsmasq.leases']
|
||||||
DHCPLSS_RUN_SCHD: '*/5 * * * *'
|
DHCPLSS_RUN_SCHD: '*/5 * * * *'
|
||||||
DHCPLSS_TUN_TIMEOUT: 5
|
DHCPLSS_TUN_TIMEOUT: 5
|
||||||
DHCPLSS_WATCH: ['Watched_Value1', 'Watched_Value4']
|
DHCPLSS_WATCH: ['watchedValue1', 'watchedValue4']
|
||||||
DHCPLSS_REPORT_ON: ['new', 'watched_changed']
|
DHCPLSS_REPORT_ON: ['new', 'watched-changed']
|
||||||
```
|
```
|
||||||
|
|
||||||
You can check the the `dnsmasq.leases` file in the container by running `ls /etc/dnsmasq/`:
|
You can check the the `dnsmasq.leases` file in the container by running `ls /etc/dnsmasq/`:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"data_source": "script",
|
"data_source": "script",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"mapped_to_column": "scanLastConnection",
|
"mapped_to_column": "scanLastConnection",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -267,7 +267,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -290,7 +290,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -363,7 +363,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -689,7 +689,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -720,7 +720,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -753,17 +753,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1", "Watched_Value4"],
|
"default_value": ["watchedValue1", "watchedValue4"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -783,15 +783,15 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Active </li><li><code>Watched_Value2</code> is Hostname </li><li><code>Watched_Value3</code> is hardware </li><li><code>Watched_Value4</code> is State </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Active </li><li><code>watchedValue2</code> is Hostname </li><li><code>watchedValue3</code> is hardware </li><li><code>watchedValue4</code> is State </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Enviar una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> está activo </li><li><code>Watched_Value2</code> es el nombre de host </li><li><code>Watched_Value3</code > es hardware </li><li><code>Watched_Value4</code> es Estado </li></ul>"
|
"string": "Enviar una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> está activo </li><li><code>watchedValue2</code> es el nombre de host </li><li><code>watchedValue3</code > es hardware </li><li><code>watchedValue4</code> es Estado </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>Watched_Value1</code> ist der Aktivstatus</li><li><code>Watched_Value2</code> ist der Hostname</li><li><code>Watched_Value3</code> ist die Hardware</li><li><code>Watched_Value4</code> ist der Zustand </li></ul>"
|
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>watchedValue1</code> ist der Aktivstatus</li><li><code>watchedValue2</code> ist der Hostname</li><li><code>watchedValue3</code> ist die Hardware</li><li><code>watchedValue4</code> ist der Zustand </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -802,7 +802,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -832,15 +832,15 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>Watched_ValueN</code>-Spalte hat sich geändert."
|
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>watchedValueN</code>-Spalte hat sich geändert."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_ip",
|
"type": "device_ip",
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -245,7 +245,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -281,7 +281,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -478,17 +478,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1"],
|
"default_value": ["watchedValue1"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -504,11 +504,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Domain Name Server</li><li><code>Watched_Value2</code> is IP Offered</li><li><code>Watched_Value3</code> is Interface </li><li><code>Watched_Value4</code> is Router </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Domain Name Server</li><li><code>watchedValue2</code> is IP Offered</li><li><code>watchedValue3</code> is Interface </li><li><code>watchedValue4</code> is Router </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es servidor de nombres de dominio</li><li><code>Watched_Value2</code> es IP ofrecida</li><li><code>Watched_Value3</code> es Interfaz </li><li><code>Watched_Value4</code> es enrutador </li></ul>"
|
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es servidor de nombres de dominio</li><li><code>watchedValue2</code> es IP ofrecida</li><li><code>watchedValue3</code> es Interfaz </li><li><code>watchedValue4</code> es enrutador </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -519,7 +519,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -540,11 +540,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"show_ui": true,
|
"show_ui": true,
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -272,7 +272,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
@@ -333,7 +333,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -352,7 +352,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -367,7 +367,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -382,7 +382,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -397,7 +397,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -412,7 +412,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -28,31 +28,17 @@ Limitations:
|
|||||||
- The Freebox must be your gateway
|
- The Freebox must be your gateway
|
||||||
- The device must be in the same lan as the Freebox
|
- The device must be in the same lan as the Freebox
|
||||||
|
|
||||||
### Offline setup (recommended)
|
|
||||||
|
|
||||||
Use this configuration if you wish to connect to your Freebox even when you are offline, or the Freebox is not your gateway.
|
|
||||||
|
|
||||||
Find the local IP address of your Freebox, if it is your gateway, you can find the address on your computer/smartphone network configuration (usually it's `192.168.1.1`). Go in the plugin settings and set the IP as address and `80` as the port (do *not* use `443` as the port). This configuration works regardless of your internet connection and poses little limitations.
|
|
||||||
|
|
||||||
Limitations:
|
|
||||||
- *If* there is no internet connection, the plugin will fallback to HTTP (not HTTPS)
|
|
||||||
|
|
||||||
For more detail: the plugin will connect to the specified address and port to fetch information about the Freebox, then it will either connect in HTTPS through the Freebox's unique domain name, or connect over HTTP if there is no internet connection. The freebox does offer an HTTPS port on the local network, but the certificate will be invalid for the local IP, and the connection will be aborted.
|
|
||||||
|
|
||||||
### Remote setup
|
### Remote setup
|
||||||
|
|
||||||
Use this configuration if you wish to connect to your Freebox through the internet. You still need to pair from the local network.
|
Use this configuration if you wish to connect to your Freebox through the internet. You still need to pair from the local network.
|
||||||
|
|
||||||
If the Freebox is not your gateway, configure a NAT and follow the [offline setup](#offline-setup-recommended).
|
|
||||||
|
|
||||||
If the Freebox is your gateway you need to find its HTTPS (or HTTP if you prefer) public port. This can be found either in the Freeboxe's web interface and by navigating to `settings>access management`, or (just for the HTTPS port) by visiting http://mafreebox.freebox.fr:80/api_version from the local network (you can use the local ip as well). This is the port you need to access your Freebox through the internet
|
If the Freebox is your gateway you need to find its HTTPS (or HTTP if you prefer) public port. This can be found either in the Freeboxe's web interface and by navigating to `settings>access management`, or (just for the HTTPS port) by visiting http://mafreebox.freebox.fr:80/api_version from the local network (you can use the local ip as well). This is the port you need to access your Freebox through the internet
|
||||||
|
|
||||||
As address, you can either use the public IP of the Freebox, or the unique domain name you found on http://mafreebox.freebox.fr:80/api_version listed as `api_domain`.
|
As address, you can either use the public IP of the Freebox, or the unique domain name you found on http://mafreebox.freebox.fr:80/api_version listed as `api_domain`.
|
||||||
|
|
||||||
|
|
||||||
## Other info
|
## Other info
|
||||||
|
|
||||||
- Version: 1.0
|
- Version: 2.0
|
||||||
- Author: [KayJay7](https://github.com/KayJay7), [Lucide](https://github.com/Lucide)
|
- Author: [KayJay7](https://github.com/KayJay7), [Lucide](https://github.com/Lucide)
|
||||||
- Maintainers: [mathoudebine](https://github.com/mathoudebine)
|
- Maintainers: [mathoudebine](https://github.com/mathoudebine)
|
||||||
- Release Date: 2-Dec-2024
|
- Release Date: 2-Dec-2024
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -311,7 +311,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -345,7 +345,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -393,7 +393,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -411,7 +411,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -429,7 +429,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -447,7 +447,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -465,7 +465,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -483,7 +483,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -521,7 +521,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -538,7 +538,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -555,7 +555,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -8,10 +8,11 @@ from datetime import datetime
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import cast
|
from typing import cast
|
||||||
import socket
|
import socket
|
||||||
import aiofreepybox
|
import freebox_api
|
||||||
from aiofreepybox import Freepybox
|
from freebox_api import Freepybox
|
||||||
from aiofreepybox.api.lan import Lan
|
from freebox_api.api.lan import Lan
|
||||||
from aiofreepybox.exceptions import NotOpenError, AuthorizationError
|
from freebox_api.api.system import System
|
||||||
|
from freebox_api.exceptions import NotOpenError, AuthorizationError
|
||||||
|
|
||||||
# Define the installation path and extend the system path for plugin imports
|
# Define the installation path and extend the system path for plugin imports
|
||||||
INSTALL_PATH = os.getenv('NETALERTX_APP', '/app')
|
INSTALL_PATH = os.getenv('NETALERTX_APP', '/app')
|
||||||
@@ -83,8 +84,7 @@ def map_device_type(type: str):
|
|||||||
|
|
||||||
async def get_device_data(api_version: int, api_address: str, api_port: int):
|
async def get_device_data(api_version: int, api_address: str, api_port: int):
|
||||||
# ensure existence of db path
|
# ensure existence of db path
|
||||||
config_base = Path(os.getenv("NETALERTX_CONFIG", "/data/config"))
|
data_dir = Path(os.getenv("NETALERTX_CONFIG", "/data/config")) / "freeboxdb"
|
||||||
data_dir = config_base / "freeboxdb"
|
|
||||||
data_dir.mkdir(parents=True, exist_ok=True)
|
data_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
# Instantiate Freepybox class using default application descriptor
|
# Instantiate Freepybox class using default application descriptor
|
||||||
@@ -93,25 +93,27 @@ async def get_device_data(api_version: int, api_address: str, api_port: int):
|
|||||||
app_desc={
|
app_desc={
|
||||||
"app_id": "netalertx",
|
"app_id": "netalertx",
|
||||||
"app_name": "NetAlertX",
|
"app_name": "NetAlertX",
|
||||||
"app_version": aiofreepybox.__version__,
|
"app_version": freebox_api.__version__,
|
||||||
"device_name": socket.gethostname(),
|
"device_name": socket.gethostname(),
|
||||||
},
|
},
|
||||||
api_version="v" + str(api_version),
|
api_version="v" + str(api_version),
|
||||||
data_dir=data_dir,
|
token_file=data_dir / "token",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Connect to the freebox
|
# Connect to the freebox
|
||||||
# Be ready to authorize the application on the Freebox if you run this
|
# Be ready to authorize the application on the Freebox if you run this
|
||||||
# for the first time
|
# for the first time
|
||||||
try:
|
try:
|
||||||
await fbx.open(host=api_address, port=api_port)
|
await fbx.open(host=api_address, port=str(api_port))
|
||||||
except NotOpenError as e:
|
except NotOpenError as e:
|
||||||
mylog("verbose", [f"[{pluginName}] Error connecting to freebox: {e}"])
|
mylog("verbose", [f"[{pluginName}] Error connecting to freebox: {e}"])
|
||||||
|
return None, []
|
||||||
except AuthorizationError as e:
|
except AuthorizationError as e:
|
||||||
mylog("verbose", [f"[{pluginName}] Auth error: {str(e)}"])
|
mylog("verbose", [f"[{pluginName}] Auth error: {str(e)}"])
|
||||||
|
return None, []
|
||||||
|
|
||||||
# get also info of the freebox itself
|
# get also info of the freebox itself
|
||||||
config = await fbx.system.get_config()
|
config = await cast(System, fbx.system).get_config()
|
||||||
freebox = await cast(Lan, fbx.lan).get_config()
|
freebox = await cast(Lan, fbx.lan).get_config()
|
||||||
hosts = await cast(Lan, fbx.lan).get_hosts_list()
|
hosts = await cast(Lan, fbx.lan).get_hosts_list()
|
||||||
assert config is not None
|
assert config is not None
|
||||||
@@ -145,16 +147,17 @@ def main():
|
|||||||
mylog("verbose", [freebox])
|
mylog("verbose", [freebox])
|
||||||
mylog("verbose", [hosts])
|
mylog("verbose", [hosts])
|
||||||
|
|
||||||
plugin_objects.add_object(
|
if freebox:
|
||||||
primaryId=freebox["mac"],
|
plugin_objects.add_object(
|
||||||
secondaryId=freebox["ip"],
|
primaryId=freebox["mac"],
|
||||||
watched1=freebox["name"],
|
secondaryId=freebox["ip"],
|
||||||
watched2=freebox["operator"],
|
watched1=freebox["name"],
|
||||||
watched3="Gateway",
|
watched2=freebox["operator"],
|
||||||
watched4=timeNowUTC(),
|
watched3="Gateway",
|
||||||
extra="",
|
watched4=timeNowUTC(),
|
||||||
foreignKey=freebox["mac"],
|
extra="",
|
||||||
)
|
foreignKey=freebox["mac"],
|
||||||
|
)
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
# Check if 'l3connectivities' exists and is a list
|
# Check if 'l3connectivities' exists and is a list
|
||||||
if "l3connectivities" in host and isinstance(host["l3connectivities"], list):
|
if "l3connectivities" in host and isinstance(host["l3connectivities"], list):
|
||||||
@@ -175,7 +178,7 @@ def main():
|
|||||||
# Optional: Log or handle hosts without 'l3connectivities'
|
# Optional: Log or handle hosts without 'l3connectivities'
|
||||||
mylog("verbose", [f"[{pluginName}] Host missing 'l3connectivities': {host}"])
|
mylog("verbose", [f"[{pluginName}] Host missing 'l3connectivities': {host}"])
|
||||||
|
|
||||||
# commit result
|
# Commit result
|
||||||
plugin_objects.write_result_file()
|
plugin_objects.write_result_file()
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"show_ui": true,
|
"show_ui": true,
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -304,7 +304,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -335,7 +335,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -364,7 +364,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -381,7 +381,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -399,7 +399,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -417,7 +417,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -434,7 +434,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -451,7 +451,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -468,7 +468,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -506,7 +506,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -523,7 +523,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -540,7 +540,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -324,17 +324,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1"],
|
"default_value": ["watchedValue1"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -354,11 +354,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Previous IP (not recommended)</li><li><code>Watched_Value2</code> unused</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> type </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Previous IP (not recommended)</li><li><code>watchedValue2</code> unused</li><li><code>watchedValue3</code> unused </li><li><code>watchedValue4</code> type </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>Watched_Value1</code> ist die Vorige IP (nicht empfohlen)</li><li><code>Watched_Value2</code> ist nicht in Verwendung</li><li><code>Watched_Value3</code> ist nicht in Verwendung </li><li><code>Watched_Value4</code> ist nicht in Verwendung </li></ul>"
|
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>watchedValue1</code> ist die Vorige IP (nicht empfohlen)</li><li><code>watchedValue2</code> ist nicht in Verwendung</li><li><code>watchedValue3</code> ist nicht in Verwendung </li><li><code>watchedValue4</code> ist nicht in Verwendung </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -399,15 +399,15 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>Watched_ValueN</code>-Spalte hat sich geändert."
|
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>watchedValueN</code>-Spalte hat sich geändert."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -418,7 +418,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -449,7 +449,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -478,7 +478,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -493,7 +493,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -517,7 +517,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -541,7 +541,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -560,7 +560,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textarea_readonly",
|
"type": "textarea_readonly",
|
||||||
@@ -575,7 +575,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -590,7 +590,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
@@ -633,7 +633,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -656,7 +656,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"mapped_to_column": "scanLastConnection",
|
"mapped_to_column": "scanLastConnection",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -680,7 +680,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
A plugin allowing for executing regular internet speed tests.
|
A plugin allowing for executing regular internet speed tests.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
@@ -43,9 +43,9 @@ Inside the container, a Python version of speedtest often exists in the virtual
|
|||||||
|
|
||||||
### Data Mapping
|
### Data Mapping
|
||||||
|
|
||||||
- **Watched_Value1** — Download Speed (Mbps).
|
- **watchedValue1** — Download Speed (Mbps).
|
||||||
- **Watched_Value2** — Upload Speed (Mbps).
|
- **watchedValue2** — Upload Speed (Mbps).
|
||||||
- **Watched_Value3** — Full JSON payload (useful for n8n or detailed webhooks).
|
- **watchedValue3** — Full JSON payload (useful for n8n or detailed webhooks).
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "url",
|
"type": "url",
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "threshold",
|
"type": "threshold",
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "threshold",
|
"type": "threshold",
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -256,7 +256,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -302,7 +302,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -342,7 +342,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -561,17 +561,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": [],
|
"default_value": [],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -591,15 +591,15 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Download speed (not recommended)</li><li><code>Watched_Value2</code> is Upload speed (not recommended)</li><li><code>Watched_Value3</code> is JSON payload for webhooks (schema varies by engine)</li><li><code>Watched_Value4</code> unused </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Download speed (not recommended)</li><li><code>watchedValue2</code> is Upload speed (not recommended)</li><li><code>watchedValue3</code> is JSON payload for webhooks (schema varies by engine)</li><li><code>watchedValue4</code> unused </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación si los valores seleccionados cambian. Use <code>CTRL + Clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es la velocidad de descarga (no recomendado)</li><li><code>Watched_Value2</code> es la velocidad de carga (no recomendado)</li><li><code>Watched_Value3</code> es la carga útil JSON para webhooks (el esquema varía según el motor)</li><li><code>Watched_Value4</code> no se usa </li></ul>"
|
"string": "Envíe una notificación si los valores seleccionados cambian. Use <code>CTRL + Clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es la velocidad de descarga (no recomendado)</li><li><code>watchedValue2</code> es la velocidad de carga (no recomendado)</li><li><code>watchedValue3</code> es la carga útil JSON para webhooks (el esquema varía según el motor)</li><li><code>watchedValue4</code> no se usa </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>Watched_Value1</code> ist die Download-Geschwindigkeit (nicht empfohlen)</li><li><code>Watched_Value2</code> ist die Upload-Geschwindigkeit (nicht empfohlen)</li><li><code>Watched_Value3</code> ist JSON-Payload für Webhooks (Schema variiert je nach Engine)</li><li><code>Watched_Value4</code> ist nicht in Verwendung </li></ul>"
|
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>watchedValue1</code> ist die Download-Geschwindigkeit (nicht empfohlen)</li><li><code>watchedValue2</code> ist die Upload-Geschwindigkeit (nicht empfohlen)</li><li><code>watchedValue3</code> ist JSON-Payload für Webhooks (Schema variiert je nach Engine)</li><li><code>watchedValue4</code> ist nicht in Verwendung </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -610,7 +610,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -640,15 +640,15 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que seleccionó <code>Watched_ValueN Las columnas </code> cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>Watched_ValueN</code>-Spalte hat sich geändert."
|
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>watchedValueN</code>-Spalte hat sich geändert."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -273,7 +273,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -290,7 +290,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -380,7 +380,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -418,7 +418,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -435,7 +435,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -452,7 +452,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -391,7 +391,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -422,7 +422,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -450,7 +450,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -469,7 +469,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -489,7 +489,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -509,7 +509,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -528,7 +528,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -571,7 +571,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -590,7 +590,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -609,7 +609,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -275,7 +275,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -307,7 +307,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -351,7 +351,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -382,7 +382,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -398,7 +398,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_ip",
|
"type": "device_ip",
|
||||||
@@ -413,7 +413,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -429,7 +429,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -444,7 +444,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -459,7 +459,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "HelpVal1",
|
"column": "helpVal1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -493,7 +493,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -512,7 +512,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"show_ui": true,
|
"show_ui": true,
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -272,7 +272,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
@@ -333,7 +333,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -352,7 +352,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -367,7 +367,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -382,7 +382,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -397,7 +397,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -412,7 +412,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -1463,7 +1463,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "ordeable": "true"}],
|
"elementOptions": [{ "orderable": "true"}],
|
||||||
"transformers": ["deviceRelType"]
|
"transformers": ["deviceRelType"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1528,7 +1528,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true", "readonly": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true", "readonly": "true" }],
|
||||||
"transformers": ["deviceChip"]
|
"transformers": ["deviceChip"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1899,7 +1899,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true", "readonly": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true", "readonly": "true" }],
|
||||||
"transformers": ["deviceChip"]
|
"transformers": ["deviceChip"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -290,10 +290,10 @@
|
|||||||
},
|
},
|
||||||
"default_value": [],
|
"default_value": [],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": [
|
"localized": [
|
||||||
"name",
|
"name",
|
||||||
@@ -316,15 +316,15 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Name</li><li><code>Watched_Value2</code> is Vendor</li><li><code>Watched_Value3</code> is Interface </li><li><code>Watched_Value4</code> is N/A </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Name</li><li><code>watchedValue2</code> is Vendor</li><li><code>watchedValue3</code> is Interface </li><li><code>watchedValue4</code> is N/A </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envía una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Valor_observado1</code> es Name</li><li><code>Valor_observado2</code> es Proveedor</li><li><code>Valor_observado3</code> es Interfaz </li><li><code>Valor_observado4</code> es N/A </li></ul>"
|
"string": "Envía una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es Name</li><li><code>watchedValue2</code> es Proveedor</li><li><code>watchedValue3</code> es Interfaz </li><li><code>watchedValue4</code> es N/A </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>Watched_Value1</code> ist der Namen</li><li><code>Watched_Value2</code> ist der Hersteller</li><li><code>Watched_Value3</code> ist das Interface </li><li><code>Watched_Value4</code> ist nicht in Verwendung </li></ul>"
|
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>watchedValue1</code> ist der Namen</li><li><code>watchedValue2</code> ist der Hersteller</li><li><code>watchedValue3</code> ist das Interface </li><li><code>watchedValue4</code> ist nicht in Verwendung </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -459,7 +459,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -492,7 +492,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -522,7 +522,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -539,7 +539,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -557,7 +557,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -575,7 +575,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -593,7 +593,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -619,7 +619,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanLastQuery",
|
"mapped_to_column": "scanLastQuery",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -670,7 +670,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -695,7 +695,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -720,7 +720,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "regex.url_http_https",
|
"type": "regex.url_http_https",
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -258,7 +258,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -315,7 +315,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -553,17 +553,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1"],
|
"default_value": ["watchedValue1"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -579,11 +579,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is service type (e.g.: http, ssh)</li><li><code>Watched_Value2</code> is Status (open or closed)</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is service type (e.g.: http, ssh)</li><li><code>watchedValue2</code> is Status (open or closed)</li><li><code>watchedValue3</code> unused </li><li><code>watchedValue4</code> unused </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es el tipo de servicio (p. ej., http, ssh)</li><li><code>Watched_Value2</code> es el estado (abierto o cerrado)</li> <li><code>Watched_Value3</code> no utilizado </li><li><code>Watched_Value4</code> no utilizado </li></ul>"
|
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es el tipo de servicio (p. ej., http, ssh)</li><li><code>watchedValue2</code> es el estado (abierto o cerrado)</li> <li><code>watchedValue3</code> no utilizado </li><li><code>watchedValue4</code> no utilizado </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -594,7 +594,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -615,11 +615,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que seleccionó <code>Watched_ValueN Las columnas </code> cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,12 +33,12 @@ The following notification types are available based on the `NTFPRCS_INCLUDED_SE
|
|||||||
- Notifies about specific events triggered by a device.
|
- Notifies about specific events triggered by a device.
|
||||||
- The device must have **Alert Events** enabled in its settings.
|
- The device must have **Alert Events** enabled in its settings.
|
||||||
- Includes events:
|
- Includes events:
|
||||||
- `Connected`, `Down Reconnected`, `Disconnected`,`IP Changed`
|
- `Connected`, `Down Reconnected`, `Disconnected`,`IP Changed`
|
||||||
- you can exclude devices with a custom where condition via the `NTFPRCS_event_condition` setting
|
- you can exclude devices with a custom where condition via the `NTFPRCS_event_condition` setting
|
||||||
|
|
||||||
### `plugins`
|
### `plugins`
|
||||||
- Notifies when an event is triggered by a plugin.
|
- Notifies when an event is triggered by a plugin.
|
||||||
- These notifications depend on the plugin's configuration of the `Watched_Value1-4` values and the `<plugin>_REPORT_ON` settings.
|
- These notifications depend on the plugin's configuration of the `watchedValue1-4` values and the `<plugin>_REPORT_ON` settings.
|
||||||
|
|
||||||
## Device-Specific Overrides
|
## Device-Specific Overrides
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -180,6 +180,150 @@
|
|||||||
"string": "You can specify a SQL where condition to filter out Events from notifications. For example <code>AND devLastIP NOT LIKE '192.168.3.%'</code> will always exclude any Event notifications for all devices with the IP starting with <code>192.168.3.%</code>."
|
"string": "You can specify a SQL where condition to filter out Events from notifications. For example <code>AND devLastIP NOT LIKE '192.168.3.%'</code> will always exclude any Event notifications for all devices with the IP starting with <code>192.168.3.%</code>."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "TEXT_SECTION_HEADERS",
|
||||||
|
"type": {
|
||||||
|
"dataType": "boolean",
|
||||||
|
"elements": [
|
||||||
|
{ "elementType": "input", "elementOptions": [{ "type": "checkbox" }], "transformers": [] }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"default_value": true,
|
||||||
|
"options": [],
|
||||||
|
"localized": ["name", "description"],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Text Section Headers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Enable or disable section titles (e.g. <code>🆕 New devices \\n---------</code>) in text notifications. Enabled by default for backward compatibility."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "TEXT_TEMPLATE_new_devices",
|
||||||
|
"type": {
|
||||||
|
"dataType": "string",
|
||||||
|
"elements": [
|
||||||
|
{ "elementType": "input", "elementOptions": [], "transformers": [] }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"default_value": "",
|
||||||
|
"options": [],
|
||||||
|
"localized": ["name", "description"],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Text Template: New Devices"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Custom text template for new device notifications. Use <code>{FieldName}</code> placeholders, e.g. <code>{devName} ({eveMac}) - {eveIp}</code>. Leave empty for default formatting. Available fields: <code>{devName}</code>, <code>{eveMac}</code>, <code>{devVendor}</code>, <code>{eveIp}</code>, <code>{eveDateTime}</code>, <code>{eveEventType}</code>, <code>{devComments}</code>."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "TEXT_TEMPLATE_down_devices",
|
||||||
|
"type": {
|
||||||
|
"dataType": "string",
|
||||||
|
"elements": [
|
||||||
|
{ "elementType": "input", "elementOptions": [], "transformers": [] }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"default_value": "",
|
||||||
|
"options": [],
|
||||||
|
"localized": ["name", "description"],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Text Template: Down Devices"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Custom text template for down device notifications. Use <code>{FieldName}</code> placeholders, e.g. <code>{devName} ({eveMac}) - {eveIp}</code>. Leave empty for default formatting. Available fields: <code>{devName}</code>, <code>{eveMac}</code>, <code>{devVendor}</code>, <code>{eveIp}</code>, <code>{eveDateTime}</code>, <code>{eveEventType}</code>, <code>{devComments}</code>."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "TEXT_TEMPLATE_down_reconnected",
|
||||||
|
"type": {
|
||||||
|
"dataType": "string",
|
||||||
|
"elements": [
|
||||||
|
{ "elementType": "input", "elementOptions": [], "transformers": [] }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"default_value": "",
|
||||||
|
"options": [],
|
||||||
|
"localized": ["name", "description"],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Text Template: Reconnected"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Custom text template for reconnected device notifications. Use <code>{FieldName}</code> placeholders, e.g. <code>{devName} ({eveMac}) reconnected at {eveDateTime}</code>. Leave empty for default formatting. Available fields: <code>{devName}</code>, <code>{eveMac}</code>, <code>{devVendor}</code>, <code>{eveIp}</code>, <code>{eveDateTime}</code>, <code>{eveEventType}</code>, <code>{devComments}</code>."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "TEXT_TEMPLATE_events",
|
||||||
|
"type": {
|
||||||
|
"dataType": "string",
|
||||||
|
"elements": [
|
||||||
|
{ "elementType": "input", "elementOptions": [], "transformers": [] }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"default_value": "",
|
||||||
|
"options": [],
|
||||||
|
"localized": ["name", "description"],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Text Template: Events"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Custom text template for event notifications. Use <code>{FieldName}</code> placeholders, e.g. <code>{devName} ({eveMac}) {eveEventType} at {eveDateTime}</code>. Leave empty for default formatting. Available fields: <code>{devName}</code>, <code>{eveMac}</code>, <code>{devVendor}</code>, <code>{eveIp}</code>, <code>{eveDateTime}</code>, <code>{eveEventType}</code>, <code>{devComments}</code>."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "TEXT_TEMPLATE_plugins",
|
||||||
|
"type": {
|
||||||
|
"dataType": "string",
|
||||||
|
"elements": [
|
||||||
|
{ "elementType": "input", "elementOptions": [], "transformers": [] }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"default_value": "",
|
||||||
|
"options": [],
|
||||||
|
"localized": ["name", "description"],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Text Template: Plugins"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Custom text template for plugin event notifications. Use <code>{FieldName}</code> placeholders, e.g. <code>{plugin}: {objectPrimaryId} - {status}</code>. Leave empty for default formatting. Available fields: <code>{plugin}</code>, <code>{objectPrimaryId}</code>, <code>{objectSecondaryId}</code>, <code>{dateTimeChanged}</code>, <code>{watchedValue1}</code>, <code>{watchedValue2}</code>, <code>{watchedValue3}</code>, <code>{watchedValue4}</code>, <code>{status}</code>."
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"show_ui": true,
|
"show_ui": true,
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -272,7 +272,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
@@ -329,7 +329,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -374,7 +374,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -393,7 +393,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -412,7 +412,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Hostname </li><li><code>Watched_Value2</code> is Parent Node </li><li><code>Watched_Value3</code> is Port </li><li><code>Watched_Value4</code> is SSID </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Hostname </li><li><code>watchedValue2</code> is Parent Node </li><li><code>watchedValue3</code> is Port </li><li><code>watchedValue4</code> is SSID </li></ul>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"function": "WATCH",
|
"function": "WATCH",
|
||||||
@@ -419,17 +419,17 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"type": {
|
"type": {
|
||||||
"dataType": "array",
|
"dataType": "array",
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -440,7 +440,7 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"function": "REPORT_ON",
|
"function": "REPORT_ON",
|
||||||
@@ -462,7 +462,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -475,7 +475,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -510,7 +510,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -542,7 +542,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -557,7 +557,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -581,7 +581,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -605,7 +605,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -621,7 +621,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanParentMAC",
|
"mapped_to_column": "scanParentMAC",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -637,7 +637,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanParentPort",
|
"mapped_to_column": "scanParentPort",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -653,7 +653,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"mapped_to_column": "scanSSID",
|
"mapped_to_column": "scanSSID",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -669,7 +669,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
@@ -712,7 +712,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -735,7 +735,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -758,7 +758,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ def main():
|
|||||||
# make sure the below mapping is mapped in config.json, for example:
|
# make sure the below mapping is mapped in config.json, for example:
|
||||||
# "database_column_definitions": [
|
# "database_column_definitions": [
|
||||||
# {
|
# {
|
||||||
# "column": "Object_PrimaryID", <--------- the value I save into primaryId
|
# "column": "objectPrimaryId", <--------- the value I save into primaryId
|
||||||
# "mapped_to_column": "scanMac", <--------- gets unserted into the CurrentScan DB table column scanMac
|
# "mapped_to_column": "scanMac", <--------- gets unserted into the CurrentScan DB table column scanMac
|
||||||
# watched1 = 'null' ,
|
# watched1 = 'null' ,
|
||||||
# figure a way to run my udpate script delayed
|
# figure a way to run my udpate script delayed
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -380,7 +380,7 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Device Name </li><li><code>Watched_Value2</code> is Parent Node MAC</li><li><code>Watched_Value3</code> is Parent Node Port </li><li><code>Watched_Value4</code> is Parent Node SSID </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Device Name </li><li><code>watchedValue2</code> is Parent Node MAC</li><li><code>watchedValue3</code> is Parent Node Port </li><li><code>watchedValue4</code> is Parent Node SSID </li></ul>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"function": "WATCH",
|
"function": "WATCH",
|
||||||
@@ -392,17 +392,17 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"type": {
|
"type": {
|
||||||
"dataType": "array",
|
"dataType": "array",
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -413,7 +413,7 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"function": "REPORT_ON",
|
"function": "REPORT_ON",
|
||||||
@@ -435,7 +435,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -448,7 +448,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -484,7 +484,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -517,7 +517,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -532,7 +532,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -548,7 +548,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -564,7 +564,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -580,7 +580,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanParentMAC",
|
"mapped_to_column": "scanParentMAC",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -596,7 +596,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanParentPort",
|
"mapped_to_column": "scanParentPort",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -612,7 +612,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"mapped_to_column": "scanSSID",
|
"mapped_to_column": "scanSSID",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -628,7 +628,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
@@ -663,7 +663,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -678,7 +678,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -693,7 +693,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "HelpVal1",
|
"column": "helpVal1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -708,7 +708,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "HelpVal2",
|
"column": "helpVal2",
|
||||||
"mapped_to_column": "scanSite",
|
"mapped_to_column": "scanSite",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -724,7 +724,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "HelpVal3",
|
"column": "helpVal3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -441,7 +441,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -456,7 +456,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -472,7 +472,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -488,7 +488,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -504,7 +504,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -520,7 +520,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -535,7 +535,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -569,7 +569,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -584,7 +584,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -599,7 +599,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
{ "elementType": "input", "elementOptions": [], "transformers": [] }
|
{ "elementType": "input", "elementOptions": [], "transformers": [] }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": "SELECT n.hwaddr AS Object_PrimaryID, {s-quote}null{s-quote} AS Object_SecondaryID, datetime() AS DateTime, na.ip AS Watched_Value1, n.lastQuery AS Watched_Value2, na.name AS Watched_Value3, n.macVendor AS Watched_Value4, {s-quote}null{s-quote} AS Extra, n.hwaddr AS ForeignKey FROM EXTERNAL_PIHOLE.Network AS n LEFT JOIN EXTERNAL_PIHOLE.Network_Addresses AS na ON na.network_id = n.id WHERE n.hwaddr NOT LIKE {s-quote}ip-%{s-quote} AND n.hwaddr is not {s-quote}00:00:00:00:00:00{s-quote} AND na.ip is not null",
|
"default_value": "SELECT n.hwaddr AS objectPrimaryId, {s-quote}null{s-quote} AS objectSecondaryId, datetime() AS dateTimeChanged, na.ip AS watchedValue1, n.lastQuery AS watchedValue2, na.name AS watchedValue3, n.macVendor AS watchedValue4, {s-quote}null{s-quote} AS extra, n.hwaddr AS foreignKey FROM EXTERNAL_PIHOLE.Network AS n LEFT JOIN EXTERNAL_PIHOLE.Network_Addresses AS na ON na.network_id = n.id WHERE n.hwaddr NOT LIKE {s-quote}ip-%{s-quote} AND n.hwaddr is not {s-quote}00:00:00:00:00:00{s-quote} AND na.ip is not null",
|
||||||
"options": [],
|
"options": [],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -223,7 +223,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true"}],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -290,17 +290,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1", "Watched_Value2"],
|
"default_value": ["watchedValue1", "watchedValue2"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -316,11 +316,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is IP</li><li><code>Watched_Value2</code> is Last Query</li><li><code>Watched_Value3</code> is Name </li><li><code>Watched_Value4</code> is N/A </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is IP</li><li><code>watchedValue2</code> is Last Query</li><li><code>watchedValue3</code> is Name </li><li><code>watchedValue4</code> is N/A </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es IP</li><li><code>Watched_Value2</code> es Proveedor</li><li><code>Watched_Value3</code> is es Interfaz</li><li><code>Watched_Value4</code> es N/A</li></ul>"
|
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es IP</li><li><code>watchedValue2</code> es Proveedor</li><li><code>watchedValue3</code> is es Interfaz</li><li><code>watchedValue4</code> es N/A</li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
|
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -419,7 +419,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -439,7 +439,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanLastQuery",
|
"mapped_to_column": "scanLastQuery",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -455,7 +455,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -471,7 +471,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -510,7 +510,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -529,7 +529,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"data_source": "script",
|
"data_source": "script",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"mapped_to_column": "scanLastConnection",
|
"mapped_to_column": "scanLastConnection",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -217,7 +217,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -297,7 +297,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -593,7 +593,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -625,7 +625,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -658,17 +658,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1"],
|
"default_value": ["watchedValue1"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -684,11 +684,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Hostname (not discoverable) </li><li><code>Watched_Value2</code> is Router IP </li><li><code>Watched_Value3</code> is not used </li><li><code>Watched_Value4</code> is not used </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Hostname (not discoverable) </li><li><code>watchedValue2</code> is Router IP </li><li><code>watchedValue3</code> is not used </li><li><code>watchedValue4</code> is not used </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es el nombre de host (no detectable) </li><li><code>Watched_Value2</code> es la IP del enrutador </li><li><code>Watched_Value3< /code> no se utiliza </li><li><code>Watched_Value4</code> no se utiliza </li></ul>"
|
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es el nombre de host (no detectable) </li><li><code>watchedValue2</code> es la IP del enrutador </li><li><code>watchedValue3</code> no se utiliza </li><li><code>watchedValue4</code> no se utiliza </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -699,7 +699,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -725,11 +725,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -459,7 +459,7 @@
|
|||||||
"elementOptions": [
|
"elementOptions": [
|
||||||
{
|
{
|
||||||
"multiple": "true",
|
"multiple": "true",
|
||||||
"ordeable": "true"
|
"orderable": "true"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
@@ -604,7 +604,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -636,7 +636,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -667,7 +667,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -684,7 +684,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -710,7 +710,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -736,7 +736,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -754,7 +754,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -772,7 +772,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanSyncHubNode",
|
"mapped_to_column": "scanSyncHubNode",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -790,7 +790,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -836,7 +836,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -861,7 +861,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -886,7 +886,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -187,9 +187,10 @@ def main():
|
|||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r') as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
for device in data['data']:
|
for device in data['data']:
|
||||||
if device['devMac'] not in unique_mac_addresses:
|
device['devMac'] = str(device['devMac']).lower()
|
||||||
|
if device['devMac'].lower() not in unique_mac_addresses:
|
||||||
device['devSyncHubNode'] = syncHubNodeName
|
device['devSyncHubNode'] = syncHubNodeName
|
||||||
unique_mac_addresses.add(device['devMac'])
|
unique_mac_addresses.add(device['devMac'].lower())
|
||||||
device_data.append(device)
|
device_data.append(device)
|
||||||
|
|
||||||
# Rename the file to "processed_" + current name
|
# Rename the file to "processed_" + current name
|
||||||
@@ -206,7 +207,7 @@ def main():
|
|||||||
# Retrieve existing devMac values from the Devices table
|
# Retrieve existing devMac values from the Devices table
|
||||||
placeholders = ', '.join('?' for _ in unique_mac_addresses)
|
placeholders = ', '.join('?' for _ in unique_mac_addresses)
|
||||||
cursor.execute(f'SELECT devMac FROM Devices WHERE devMac IN ({placeholders})', tuple(unique_mac_addresses))
|
cursor.execute(f'SELECT devMac FROM Devices WHERE devMac IN ({placeholders})', tuple(unique_mac_addresses))
|
||||||
existing_mac_addresses = set(row[0] for row in cursor.fetchall())
|
existing_mac_addresses = set(row[0].lower() for row in cursor.fetchall())
|
||||||
|
|
||||||
# insert devices into the last_result.log and thus CurrentScan table to manage state
|
# insert devices into the last_result.log and thus CurrentScan table to manage state
|
||||||
for device in device_data:
|
for device in device_data:
|
||||||
@@ -229,7 +230,10 @@ def main():
|
|||||||
db_columns = {row[1] for row in cursor.fetchall()}
|
db_columns = {row[1] for row in cursor.fetchall()}
|
||||||
|
|
||||||
# Filter out existing devices
|
# Filter out existing devices
|
||||||
new_devices = [device for device in device_data if device['devMac'] not in existing_mac_addresses]
|
new_devices = [
|
||||||
|
device for device in device_data
|
||||||
|
if device['devMac'].lower() not in existing_mac_addresses
|
||||||
|
]
|
||||||
|
|
||||||
mylog('verbose', [f'[{pluginName}] All devices: "{len(device_data)}"'])
|
mylog('verbose', [f'[{pluginName}] All devices: "{len(device_data)}"'])
|
||||||
mylog('verbose', [f'[{pluginName}] New devices: "{len(new_devices)}"'])
|
mylog('verbose', [f'[{pluginName}] New devices: "{len(new_devices)}"'])
|
||||||
|
|||||||
@@ -280,7 +280,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -307,7 +307,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -334,7 +334,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": ["getString"]
|
"transformers": ["getString"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -467,7 +467,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": ["getString"]
|
"transformers": ["getString"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -545,7 +545,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -590,7 +590,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"mapped_to_table": "CurrentScan",
|
"mapped_to_table": "CurrentScan",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -505,7 +505,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -538,7 +538,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -569,7 +569,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -586,7 +586,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -604,7 +604,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -622,7 +622,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -640,7 +640,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -658,7 +658,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -675,7 +675,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"mapped_to_column": "scanParentMAC",
|
"mapped_to_column": "scanParentMAC",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -714,7 +714,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -731,7 +731,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -748,7 +748,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
],
|
],
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
"type": "device_mac"
|
"type": "device_mac"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
"type": "device_ip"
|
"type": "device_ip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"mapped_to_column": "scanType",
|
"mapped_to_column": "scanType",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -382,7 +382,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "HelpVal1",
|
"column": "helpVal1",
|
||||||
"mapped_to_column": "scanParentMAC",
|
"mapped_to_column": "scanParentMAC",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
@@ -398,7 +398,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "HelpVal2",
|
"column": "helpVal2",
|
||||||
"mapped_to_column": "scanParentPort",
|
"mapped_to_column": "scanParentPort",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
@@ -414,7 +414,7 @@
|
|||||||
"type": "label"
|
"type": "label"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"localized": ["name"],
|
"localized": ["name"],
|
||||||
@@ -923,7 +923,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -960,7 +960,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -992,15 +992,15 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default_value": ["Watched_Value1", "Watched_Value4"],
|
"default_value": ["watchedValue1", "watchedValue4"],
|
||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Hostname </li><li><code>Watched_Value2</code> is Vendor </li><li><code>Watched_Value3</code> is Type </li><li><code>Watched_Value4</code> is Online </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Hostname </li><li><code>watchedValue2</code> is Vendor </li><li><code>watchedValue3</code> is Type </li><li><code>watchedValue4</code> is Online </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es el nombre de host </li><li><code>Watched_Value2</code> es el proveedor </li><li><code>Watched_Value3</code> es el tipo </li><li><code>Watched_Value4</code> es Online </li></ul>"
|
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es el nombre de host </li><li><code>watchedValue2</code> es el proveedor </li><li><code>watchedValue3</code> es el tipo </li><li><code>watchedValue4</code> es Online </li></ul>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"function": "WATCH",
|
"function": "WATCH",
|
||||||
@@ -1016,17 +1016,17 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"type": {
|
"type": {
|
||||||
"dataType": "array",
|
"dataType": "array",
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1037,11 +1037,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"function": "REPORT_ON",
|
"function": "REPORT_ON",
|
||||||
@@ -1067,7 +1067,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -233,7 +233,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -265,7 +265,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true" }],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -299,17 +299,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1"],
|
"default_value": ["watchedValue1"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -329,11 +329,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is vendor name</li><li><code>Watched_Value2</code> is device name</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is vendor name</li><li><code>watchedValue2</code> is device name</li><li><code>watchedValue3</code> unused </li><li><code>watchedValue4</code> unused </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>Watched_Value1</code> ist der Herstellername</li><li><code>Watched_Value2</code> ist der Gerätename</li><li><code>Watched_Value3</code> ist nicht in Verwendung </li><li><code>Watched_Value4</code> ist nicht in Verwendung </li></ul>"
|
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>watchedValue1</code> ist der Herstellername</li><li><code>watchedValue2</code> ist der Gerätename</li><li><code>watchedValue3</code> ist nicht in Verwendung </li><li><code>watchedValue4</code> ist nicht in Verwendung </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -374,22 +374,22 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que seleccionó <code>Watched_ValueN Las columnas </code> cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "de_de",
|
"language_code": "de_de",
|
||||||
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>Watched_ValueN</code>-Spalte hat sich geändert."
|
"string": "Benachrichtige nur bei diesen Status. <code>new</code> bedeutet ein neues eindeutiges (einzigartige Kombination aus PrimaryId und SecondaryId) Objekt wurde erkennt. <code>watched-changed</code> bedeutet eine ausgewählte <code>watchedValueN</code>-Spalte hat sich geändert."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"mapped_to_column": "scanMac",
|
"mapped_to_column": "scanMac",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -451,7 +451,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"mapped_to_column": "scanLastIP",
|
"mapped_to_column": "scanLastIP",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -475,7 +475,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -498,7 +498,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"mapped_to_column": "scanLastConnection",
|
"mapped_to_column": "scanLastConnection",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -549,7 +549,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"mapped_to_column": "scanVendor",
|
"mapped_to_column": "scanVendor",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -569,7 +569,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"mapped_to_column": "scanName",
|
"mapped_to_column": "scanName",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
@@ -593,7 +593,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -612,7 +612,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -631,7 +631,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -654,7 +654,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -673,7 +673,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"data_source": "script",
|
"data_source": "script",
|
||||||
"data_filters": [
|
"data_filters": [
|
||||||
{
|
{
|
||||||
"compare_column": "Object_PrimaryID",
|
"compare_column": "objectPrimaryId",
|
||||||
"compare_operator": "==",
|
"compare_operator": "==",
|
||||||
"compare_field_id": "txtMacFilter",
|
"compare_field_id": "txtMacFilter",
|
||||||
"compare_js_template": "'{value}'.toString()",
|
"compare_js_template": "'{value}'.toString()",
|
||||||
@@ -356,7 +356,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -371,7 +371,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_name_mac",
|
"type": "device_name_mac",
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "device_ip",
|
"type": "device_ip",
|
||||||
@@ -401,7 +401,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -416,7 +416,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -431,7 +431,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -446,7 +446,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -476,7 +476,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -491,7 +491,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -506,7 +506,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
],
|
],
|
||||||
"database_column_definitions": [
|
"database_column_definitions": [
|
||||||
{
|
{
|
||||||
"column": "Index",
|
"column": "index",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "none",
|
"type": "none",
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Plugin",
|
"column": "plugin",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_PrimaryID",
|
"column": "objectPrimaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "url",
|
"type": "url",
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Object_SecondaryID",
|
"column": "objectSecondaryId",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeCreated",
|
"column": "dateTimeCreated",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "DateTimeChanged",
|
"column": "dateTimeChanged",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value1",
|
"column": "watchedValue1",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "threshold",
|
"type": "threshold",
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value2",
|
"column": "watchedValue2",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value3",
|
"column": "watchedValue3",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Watched_Value4",
|
"column": "watchedValue4",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -258,7 +258,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "UserData",
|
"column": "userData",
|
||||||
"css_classes": "col-sm-2",
|
"css_classes": "col-sm-2",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "textbox_save",
|
"type": "textbox_save",
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Status",
|
"column": "status",
|
||||||
"css_classes": "col-sm-1",
|
"css_classes": "col-sm-1",
|
||||||
"show": true,
|
"show": true,
|
||||||
"type": "replace",
|
"type": "replace",
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"column": "Extra",
|
"column": "extra",
|
||||||
"css_classes": "col-sm-3",
|
"css_classes": "col-sm-3",
|
||||||
"show": false,
|
"show": false,
|
||||||
"type": "label",
|
"type": "label",
|
||||||
@@ -538,17 +538,17 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default_value": ["Watched_Value1"],
|
"default_value": ["watchedValue1"],
|
||||||
"options": [
|
"options": [
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4"
|
"watchedValue4"
|
||||||
],
|
],
|
||||||
"localized": ["name", "description"],
|
"localized": ["name", "description"],
|
||||||
"name": [
|
"name": [
|
||||||
@@ -564,11 +564,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is response status code (e.g.: 200, 404)</li><li><code>Watched_Value2</code> is Latency (not recommended)</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
|
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is response status code (e.g.: 200, 404)</li><li><code>watchedValue2</code> is Latency (not recommended)</li><li><code>watchedValue3</code> unused </li><li><code>watchedValue4</code> unused </li></ul>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación si los valores seleccionados cambian. Use <code>CTRL + Click</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es un código de estado de respuesta (por ejemplo: 200, 404) </li><li><code>Valor_observado2</code> es Latencia (no recomendado)</li><li><code>Valor_observado3</code> no utilizado </li><li><code>Valor_observado4 </ code> sin usar </li></ul>"
|
"string": "Envíe una notificación si los valores seleccionados cambian. Use <code>CTRL + Click</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es un código de estado de respuesta (por ejemplo: 200, 404) </li><li><code>watchedValue2</code> es Latencia (no recomendado)</li><li><code>watchedValue3</code> no utilizado </li><li><code>watchedValue4</code> sin usar </li></ul>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -579,7 +579,7 @@
|
|||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"elementType": "select",
|
"elementType": "select",
|
||||||
"elementOptions": [{ "multiple": "true" }],
|
"elementOptions": [{ "multiple": "true", "orderable": "true"}],
|
||||||
"transformers": []
|
"transformers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -605,11 +605,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
|
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of objectPrimaryId and objectSecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"language_code": "es_es",
|
"language_code": "es_es",
|
||||||
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que seleccionó <code>Watched_ValueN Las columnas </code> cambiaron."
|
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que seleccionó <code>watchedValueN Las columnas </code> cambiaron."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -246,9 +246,9 @@ function genericSaveData (id) {
|
|||||||
headers: { "Authorization": `Bearer ${apiToken}` },
|
headers: { "Authorization": `Bearer ${apiToken}` },
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
dbtable: "Plugins_Objects",
|
dbtable: "Plugins_Objects",
|
||||||
columnName: "Index",
|
columnName: "index",
|
||||||
id: index,
|
id: index,
|
||||||
columns: "UserData",
|
columns: "userData",
|
||||||
values: columnValue
|
values: columnValue
|
||||||
}),
|
}),
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@@ -273,26 +273,23 @@ function genericSaveData (id) {
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
pluginDefinitions = []
|
pluginDefinitions = []
|
||||||
pluginUnprocessedEvents = []
|
|
||||||
pluginObjects = []
|
// Global counts map, populated before tabs are rendered.
|
||||||
pluginHistory = []
|
// null = counts unavailable (fail-open: show all plugins)
|
||||||
|
let pluginCounts = null;
|
||||||
|
|
||||||
async function getData() {
|
async function getData() {
|
||||||
try {
|
try {
|
||||||
showSpinner();
|
showSpinner();
|
||||||
console.log("Plugins getData called");
|
console.log("Plugins getData called");
|
||||||
|
|
||||||
const [plugins, events, objects, history] = await Promise.all([
|
const plugins = await fetchJson('plugins.json');
|
||||||
fetchJson('plugins.json'),
|
|
||||||
fetchJson('table_plugins_events.json'),
|
|
||||||
fetchJson('table_plugins_objects.json'),
|
|
||||||
fetchJson('table_plugins_history.json')
|
|
||||||
]);
|
|
||||||
|
|
||||||
pluginDefinitions = plugins.data;
|
pluginDefinitions = plugins.data;
|
||||||
pluginUnprocessedEvents = events.data;
|
|
||||||
pluginObjects = objects.data;
|
// Fetch counts BEFORE rendering tabs so we can skip empty plugins (no flicker).
|
||||||
pluginHistory = history.data;
|
// fetchPluginCounts never throws — returns null on failure (fail-open).
|
||||||
|
const prefixes = pluginDefinitions.filter(p => p.show_ui).map(p => p.unique_prefix);
|
||||||
|
pluginCounts = await fetchPluginCounts(prefixes);
|
||||||
|
|
||||||
generateTabs();
|
generateTabs();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -306,6 +303,169 @@ async function fetchJson(filename) {
|
|||||||
return await response.json();
|
return await response.json();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GraphQL helper — fires a paginated plugin table query and calls back with
|
||||||
|
// the DataTables-compatible response plus the raw GraphQL result object.
|
||||||
|
function postPluginGraphQL(gqlField, prefix, foreignKey, dtRequest, callback) {
|
||||||
|
const apiToken = getSetting("API_TOKEN");
|
||||||
|
const apiBase = getApiBase();
|
||||||
|
const page = Math.floor(dtRequest.start / dtRequest.length) + 1;
|
||||||
|
const limit = dtRequest.length;
|
||||||
|
const search = dtRequest.search?.value || null;
|
||||||
|
|
||||||
|
let sort = [];
|
||||||
|
if (dtRequest.order?.length > 0) {
|
||||||
|
const order = dtRequest.order[0];
|
||||||
|
sort.push({ field: dtRequest.columns[order.column].data, order: order.dir });
|
||||||
|
}
|
||||||
|
|
||||||
|
const query = `
|
||||||
|
query PluginData($options: PluginQueryOptionsInput) {
|
||||||
|
${gqlField}(options: $options) {
|
||||||
|
count
|
||||||
|
dbCount
|
||||||
|
entries {
|
||||||
|
index plugin objectPrimaryId objectSecondaryId
|
||||||
|
dateTimeCreated dateTimeChanged
|
||||||
|
watchedValue1 watchedValue2 watchedValue3 watchedValue4
|
||||||
|
status extra userData foreignKey
|
||||||
|
syncHubNodeName helpVal1 helpVal2 helpVal3 helpVal4 objectGuid
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: "POST",
|
||||||
|
url: `${apiBase}/graphql`,
|
||||||
|
headers: { "Authorization": `Bearer ${apiToken}`, "Content-Type": "application/json" },
|
||||||
|
data: JSON.stringify({
|
||||||
|
query,
|
||||||
|
variables: { options: { page, limit, search, sort, plugin: prefix, foreignKey } }
|
||||||
|
}),
|
||||||
|
success: function(response) {
|
||||||
|
if (response.errors) {
|
||||||
|
console.error("[plugins] GraphQL errors:", response.errors);
|
||||||
|
callback({ data: [], recordsTotal: 0, recordsFiltered: 0 });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const result = response.data[gqlField];
|
||||||
|
callback({ data: result.entries, recordsTotal: result.dbCount, recordsFiltered: result.count }, result);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
callback({ data: [], recordsTotal: 0, recordsFiltered: 0 });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fetch counts for all plugins. Returns { PREFIX: { objects, events, history } }
|
||||||
|
// or null on failure (fail-open so tabs still render).
|
||||||
|
// Unfiltered: static JSON (~1KB pre-computed).
|
||||||
|
// MAC-filtered: lightweight REST endpoint (single SQL query).
|
||||||
|
async function fetchPluginCounts(prefixes) {
|
||||||
|
if (prefixes.length === 0) return {};
|
||||||
|
|
||||||
|
const mac = $("#txtMacFilter").val();
|
||||||
|
const foreignKey = (mac && mac !== "--") ? mac : null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
let counts = {};
|
||||||
|
let rows;
|
||||||
|
|
||||||
|
if (!foreignKey) {
|
||||||
|
// ---- FAST PATH: pre-computed static JSON ----
|
||||||
|
const stats = await fetchJson('table_plugins_stats.json');
|
||||||
|
rows = stats.data;
|
||||||
|
} else {
|
||||||
|
// ---- MAC-FILTERED PATH: single SQL via REST endpoint ----
|
||||||
|
const apiToken = getSetting("API_TOKEN");
|
||||||
|
const apiBase = getApiBase();
|
||||||
|
const response = await $.ajax({
|
||||||
|
method: "GET",
|
||||||
|
url: `${apiBase}/plugins/stats?foreignKey=${encodeURIComponent(foreignKey)}`,
|
||||||
|
headers: { "Authorization": `Bearer ${apiToken}` },
|
||||||
|
});
|
||||||
|
if (!response.success) {
|
||||||
|
console.error("[plugins] /plugins/stats error:", response.error);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
rows = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const row of rows) {
|
||||||
|
const p = row.tableName; // 'objects' | 'events' | 'history'
|
||||||
|
const plugin = row.plugin;
|
||||||
|
if (!counts[plugin]) counts[plugin] = { objects: 0, events: 0, history: 0 };
|
||||||
|
counts[plugin][p] = row.cnt;
|
||||||
|
}
|
||||||
|
return counts;
|
||||||
|
} catch (err) {
|
||||||
|
console.error('[plugins] fetchPluginCounts failed (fail-open):', err);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply pre-fetched counts to the DOM badges and hide empty tabs/sub-tabs.
|
||||||
|
function applyPluginBadges(counts, prefixes) {
|
||||||
|
// Update DOM badges
|
||||||
|
for (const [prefix, c] of Object.entries(counts)) {
|
||||||
|
$(`#badge_${prefix}`).text(c.objects);
|
||||||
|
$(`#objCount_${prefix}`).text(c.objects);
|
||||||
|
$(`#evtCount_${prefix}`).text(c.events);
|
||||||
|
$(`#histCount_${prefix}`).text(c.history);
|
||||||
|
}
|
||||||
|
// Zero out plugins with no rows in any table
|
||||||
|
prefixes.forEach(prefix => {
|
||||||
|
if (!counts[prefix]) {
|
||||||
|
$(`#badge_${prefix}`).text(0);
|
||||||
|
$(`#objCount_${prefix}`).text(0);
|
||||||
|
$(`#evtCount_${prefix}`).text(0);
|
||||||
|
$(`#histCount_${prefix}`).text(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Auto-hide sub-tabs with zero results (outer tabs already excluded during creation)
|
||||||
|
autoHideEmptyTabs(counts, prefixes);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Within visible plugins, hide inner sub-tabs (Objects/Events/History) whose count is 0.
|
||||||
|
// Outer plugin tabs with zero total are already excluded during tab creation.
|
||||||
|
function autoHideEmptyTabs(counts, prefixes) {
|
||||||
|
prefixes.forEach(prefix => {
|
||||||
|
const c = counts[prefix] || { objects: 0, events: 0, history: 0 };
|
||||||
|
const $pane = $(`#tabs-content-location > #${prefix}`);
|
||||||
|
|
||||||
|
// Hide inner sub-tabs with zero count
|
||||||
|
const subTabs = [
|
||||||
|
{ href: `#objectsTarget_${prefix}`, count: c.objects },
|
||||||
|
{ href: `#eventsTarget_${prefix}`, count: c.events },
|
||||||
|
{ href: `#historyTarget_${prefix}`, count: c.history },
|
||||||
|
];
|
||||||
|
|
||||||
|
let activeSubHidden = false;
|
||||||
|
subTabs.forEach(st => {
|
||||||
|
const $subLi = $pane.find(`ul.nav-tabs li:has(a[href="${st.href}"])`);
|
||||||
|
const $subPane = $pane.find(st.href);
|
||||||
|
if (st.count === 0) {
|
||||||
|
if ($subLi.hasClass('active')) activeSubHidden = true;
|
||||||
|
$subLi.hide();
|
||||||
|
$subPane.removeClass('active').css('display', '');
|
||||||
|
} else {
|
||||||
|
$subLi.show();
|
||||||
|
$subPane.css('display', '');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// If the active inner sub-tab was hidden, activate the first visible one
|
||||||
|
// via Bootstrap's tab lifecycle so shown.bs.tab fires for deferred DataTable init
|
||||||
|
if (activeSubHidden) {
|
||||||
|
const $firstVisibleSubA = $pane.find('ul.nav-tabs li:visible:first a');
|
||||||
|
if ($firstVisibleSubA.length) {
|
||||||
|
$firstVisibleSubA.tab('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function generateTabs() {
|
function generateTabs() {
|
||||||
|
|
||||||
@@ -315,18 +475,41 @@ function generateTabs() {
|
|||||||
// Sort pluginDefinitions by unique_prefix alphabetically
|
// Sort pluginDefinitions by unique_prefix alphabetically
|
||||||
pluginDefinitions.sort((a, b) => a.unique_prefix.localeCompare(b.unique_prefix));
|
pluginDefinitions.sort((a, b) => a.unique_prefix.localeCompare(b.unique_prefix));
|
||||||
|
|
||||||
assignActive = true;
|
let assignActive = true;
|
||||||
|
|
||||||
// Iterate over the sorted pluginDefinitions to create tab headers and content
|
// When counts are available, skip plugins with 0 total count (no flicker).
|
||||||
pluginDefinitions.forEach(pluginObj => {
|
// When counts are null (fetch failed), show all show_ui plugins (fail-open).
|
||||||
if (pluginObj.show_ui) {
|
const countsAvailable = pluginCounts !== null;
|
||||||
stats = createTabContent(pluginObj, assignActive); // Create the content for each tab
|
const visiblePlugins = pluginDefinitions.filter(pluginObj => {
|
||||||
|
if (!pluginObj.show_ui) return false;
|
||||||
|
if (!countsAvailable) return true; // fail-open: show all
|
||||||
|
const c = pluginCounts[pluginObj.unique_prefix] || { objects: 0, events: 0, history: 0 };
|
||||||
|
return (c.objects + c.events + c.history) > 0;
|
||||||
|
});
|
||||||
|
|
||||||
if(stats.objectDataCount > 0)
|
// Create tab DOM for visible plugins only
|
||||||
{
|
visiblePlugins.forEach(pluginObj => {
|
||||||
createTabHeader(pluginObj, stats, assignActive); // Create the header for each tab
|
const prefix = pluginObj.unique_prefix;
|
||||||
assignActive = false; // only mark first with content active
|
const c = countsAvailable ? (pluginCounts[prefix] || { objects: 0, events: 0, history: 0 }) : null;
|
||||||
}
|
createTabContent(pluginObj, assignActive, c);
|
||||||
|
createTabHeader(pluginObj, assignActive, c);
|
||||||
|
assignActive = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Now that ALL DOM elements exist (both <a> headers and tab panes),
|
||||||
|
// wire up DataTable initialization: immediate for the active tab,
|
||||||
|
// deferred via shown.bs.tab for the rest.
|
||||||
|
let firstVisible = true;
|
||||||
|
visiblePlugins.forEach(pluginObj => {
|
||||||
|
const prefix = pluginObj.unique_prefix;
|
||||||
|
const colDefinitions = getColumnDefinitions(pluginObj);
|
||||||
|
if (firstVisible) {
|
||||||
|
initializeDataTables(prefix, colDefinitions, pluginObj);
|
||||||
|
firstVisible = false;
|
||||||
|
} else {
|
||||||
|
$(`a[href="#${prefix}"]`).one('shown.bs.tab', function() {
|
||||||
|
initializeDataTables(prefix, colDefinitions, pluginObj);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -338,6 +521,12 @@ function generateTabs() {
|
|||||||
tabContainer: '#tabs-location'
|
tabContainer: '#tabs-location'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Apply badge counts to the DOM and hide empty inner sub-tabs (only if counts loaded)
|
||||||
|
if (countsAvailable) {
|
||||||
|
const prefixes = visiblePlugins.map(p => p.unique_prefix);
|
||||||
|
applyPluginBadges(pluginCounts, prefixes);
|
||||||
|
}
|
||||||
|
|
||||||
hideSpinner()
|
hideSpinner()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,20 +538,18 @@ function resetTabs() {
|
|||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
// left headers
|
// left headers
|
||||||
function createTabHeader(pluginObj, stats, assignActive) {
|
function createTabHeader(pluginObj, assignActive, counts) {
|
||||||
const prefix = pluginObj.unique_prefix; // Get the unique prefix for the plugin
|
const prefix = pluginObj.unique_prefix;
|
||||||
|
const activeClass = assignActive ? "active" : "";
|
||||||
|
const badgeText = counts ? counts.objects : '…';
|
||||||
|
|
||||||
// Determine the active class for the first tab
|
|
||||||
assignActive ? activeClass = "active" : activeClass = "";
|
|
||||||
|
|
||||||
// Append the tab header to the tabs location
|
|
||||||
$('#tabs-location').append(`
|
$('#tabs-location').append(`
|
||||||
<li class="left-nav ${activeClass} ">
|
<li class="left-nav ${activeClass} ">
|
||||||
<a class="col-sm-12 textOverflow" href="#${prefix}" data-plugin-prefix="${prefix}" id="${prefix}_id" data-toggle="tab">
|
<a class="col-sm-12 textOverflow" href="#${prefix}" data-plugin-prefix="${prefix}" id="${prefix}_id" data-toggle="tab">
|
||||||
${getString(`${prefix}_icon`)} ${getString(`${prefix}_display_name`)}
|
${getString(`${prefix}_icon`)} ${getString(`${prefix}_display_name`)}
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
${stats.objectDataCount > 0 ? `<div class="pluginBadgeWrap"><span title="" class="badge pluginBadge" >${stats.objectDataCount}</span></div>` : ""}
|
<div class="pluginBadgeWrap"><span title="" class="badge pluginBadge" id="badge_${prefix}">${badgeText}</span></div>
|
||||||
</li>
|
</li>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@@ -370,23 +557,17 @@ function createTabHeader(pluginObj, stats, assignActive) {
|
|||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
// Content of selected plugin (header)
|
// Content of selected plugin (header)
|
||||||
function createTabContent(pluginObj, assignActive) {
|
function createTabContent(pluginObj, assignActive, counts) {
|
||||||
const prefix = pluginObj.unique_prefix; // Get the unique prefix for the plugin
|
const prefix = pluginObj.unique_prefix;
|
||||||
const colDefinitions = getColumnDefinitions(pluginObj); // Get column definitions for DataTables
|
const colDefinitions = getColumnDefinitions(pluginObj);
|
||||||
|
|
||||||
// Get data for events, objects, and history related to the plugin
|
|
||||||
const objectData = getObjectData(prefix, colDefinitions, pluginObj);
|
|
||||||
const eventData = getEventData(prefix, colDefinitions, pluginObj);
|
|
||||||
const historyData = getHistoryData(prefix, colDefinitions, pluginObj);
|
|
||||||
|
|
||||||
// Append the content structure for the plugin's tab to the content location
|
|
||||||
$('#tabs-content-location').append(`
|
$('#tabs-content-location').append(`
|
||||||
<div id="${prefix}" class="tab-pane ${objectData.length > 0 && assignActive? 'active' : ''}">
|
<div id="${prefix}" class="tab-pane ${assignActive ? 'active' : ''}">
|
||||||
${generateTabNavigation(prefix, objectData.length, eventData.length, historyData.length)} <!-- Create tab navigation -->
|
${generateTabNavigation(prefix, counts)} <!-- Create tab navigation -->
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
${generateDataTable(prefix, 'Objects', objectData, colDefinitions)}
|
${generateDataTable(prefix, 'Objects', colDefinitions)}
|
||||||
${generateDataTable(prefix, 'Events', eventData, colDefinitions)}
|
${generateDataTable(prefix, 'Events', colDefinitions)}
|
||||||
${generateDataTable(prefix, 'History', historyData, colDefinitions)}
|
${generateDataTable(prefix, 'History', colDefinitions)}
|
||||||
</div>
|
</div>
|
||||||
<div class='plugins-description'>
|
<div class='plugins-description'>
|
||||||
${getString(`${prefix}_description`)} <!-- Display the plugin description -->
|
${getString(`${prefix}_description`)} <!-- Display the plugin description -->
|
||||||
@@ -395,14 +576,7 @@ function createTabContent(pluginObj, assignActive) {
|
|||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
// Initialize DataTables for the respective sections
|
// DataTable init is handled by generateTabs() after all DOM elements exist.
|
||||||
initializeDataTables(prefix, objectData, eventData, historyData, colDefinitions);
|
|
||||||
|
|
||||||
return {
|
|
||||||
"objectDataCount": objectData.length,
|
|
||||||
"eventDataCount": eventData.length,
|
|
||||||
"historyDataCount": historyData.length
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getColumnDefinitions(pluginObj) {
|
function getColumnDefinitions(pluginObj) {
|
||||||
@@ -410,53 +584,29 @@ function getColumnDefinitions(pluginObj) {
|
|||||||
return pluginObj["database_column_definitions"].filter(colDef => colDef.show);
|
return pluginObj["database_column_definitions"].filter(colDef => colDef.show);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEventData(prefix, colDefinitions, pluginObj) {
|
function generateTabNavigation(prefix, counts) {
|
||||||
// Extract event data specific to the plugin and format it for DataTables
|
const objCount = counts ? counts.objects : '…';
|
||||||
return pluginUnprocessedEvents
|
const evtCount = counts ? counts.events : '…';
|
||||||
.filter(event => event.Plugin === prefix && shouldBeShown(event, pluginObj)) // Filter events for the specific plugin
|
const histCount = counts ? counts.history : '…';
|
||||||
.map(event => colDefinitions.map(colDef => event[colDef.column] || '')); // Map to the defined columns
|
|
||||||
}
|
|
||||||
|
|
||||||
function getObjectData(prefix, colDefinitions, pluginObj) {
|
|
||||||
// Extract object data specific to the plugin and format it for DataTables
|
|
||||||
return pluginObjects
|
|
||||||
.filter(object => object.Plugin === prefix && shouldBeShown(object, pluginObj)) // Filter objects for the specific plugin
|
|
||||||
.map(object => colDefinitions.map(colDef => getFormControl(colDef, object[colDef.column], object["Index"], colDefinitions, object))); // Map to the defined columns
|
|
||||||
}
|
|
||||||
|
|
||||||
function getHistoryData(prefix, colDefinitions, pluginObj) {
|
|
||||||
|
|
||||||
return pluginHistory
|
|
||||||
.filter(history => history.Plugin === prefix && shouldBeShown(history, pluginObj)) // First, filter based on the plugin prefix
|
|
||||||
.sort((a, b) => b.Index - a.Index) // Then, sort by the Index field in descending order
|
|
||||||
.slice(0, 50) // Limit the result to the first 50 entries
|
|
||||||
.map(object =>
|
|
||||||
colDefinitions.map(colDef =>
|
|
||||||
getFormControl(colDef, object[colDef.column], object["Index"], colDefinitions, object)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function generateTabNavigation(prefix, objectCount, eventCount, historyCount) {
|
|
||||||
// Create navigation tabs for Objects, Unprocessed Events, and History
|
|
||||||
return `
|
return `
|
||||||
<div class="nav-tabs-custom" style="margin-bottom: 0px">
|
<div class="nav-tabs-custom" style="margin-bottom: 0px">
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="#objectsTarget_${prefix}" data-toggle="tab"><i class="fa fa-cube"></i> ${getString('Plugins_Objects')} (${objectCount})</a>
|
<a href="#objectsTarget_${prefix}" data-toggle="tab"><i class="fa fa-cube"></i> ${getString('Plugins_Objects')} (<span id="objCount_${prefix}">${objCount}</span>)</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#eventsTarget_${prefix}" data-toggle="tab"><i class="fa fa-bolt"></i> ${getString('Plugins_Unprocessed_Events')} (${eventCount})</a>
|
<a href="#eventsTarget_${prefix}" data-toggle="tab"><i class="fa fa-bolt"></i> ${getString('Plugins_Unprocessed_Events')} (<span id="evtCount_${prefix}">${evtCount}</span>)</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#historyTarget_${prefix}" data-toggle="tab"><i class="fa fa-clock"></i> ${getString('Plugins_History')} (${historyCount})</a>
|
<a href="#historyTarget_${prefix}" data-toggle="tab"><i class="fa fa-clock"></i> ${getString('Plugins_History')} (<span id="histCount_${prefix}">${histCount}</span>)</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateDataTable(prefix, tableType, data, colDefinitions) {
|
function generateDataTable(prefix, tableType, colDefinitions) {
|
||||||
// Generate HTML for a DataTable and associated buttons for a given table type
|
// Generate HTML for a DataTable and associated buttons for a given table type
|
||||||
const headersHtml = colDefinitions.map(colDef => `<th class="${colDef.css_classes}">${getString(`${prefix}_${colDef.column}_name`)}</th>`).join('');
|
const headersHtml = colDefinitions.map(colDef => `<th class="${colDef.css_classes}">${getString(`${prefix}_${colDef.column}_name`)}</th>`).join('');
|
||||||
|
|
||||||
@@ -473,34 +623,72 @@ function generateDataTable(prefix, tableType, data, colDefinitions) {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function initializeDataTables(prefix, objectData, eventData, historyData, colDefinitions) {
|
function initializeDataTables(prefix, colDefinitions, pluginObj) {
|
||||||
// Common settings for DataTables initialization
|
const mac = $("#txtMacFilter").val();
|
||||||
const commonDataTableSettings = {
|
const foreignKey = (mac && mac !== "--") ? mac : null;
|
||||||
orderable: false, // Disable ordering
|
|
||||||
createdRow: function(row, data) {
|
const tableConfigs = [
|
||||||
$(row).attr('data-my-index', data[0]); // Set data attribute for indexing
|
{ tableId: `objectsTable_${prefix}`, gqlField: 'pluginsObjects', countId: `objCount_${prefix}`, badgeId: `badge_${prefix}` },
|
||||||
|
{ tableId: `eventsTable_${prefix}`, gqlField: 'pluginsEvents', countId: `evtCount_${prefix}`, badgeId: null },
|
||||||
|
{ tableId: `historyTable_${prefix}`, gqlField: 'pluginsHistory', countId: `histCount_${prefix}`, badgeId: null },
|
||||||
|
];
|
||||||
|
|
||||||
|
function buildDT(tableId, gqlField, countId, badgeId) {
|
||||||
|
if ($.fn.DataTable.isDataTable(`#${tableId}`)) {
|
||||||
|
return; // already initialized
|
||||||
}
|
}
|
||||||
};
|
$(`#${tableId}`).DataTable({
|
||||||
|
processing: true,
|
||||||
|
serverSide: true,
|
||||||
|
paging: true,
|
||||||
|
searching: true,
|
||||||
|
ordering: false,
|
||||||
|
pageLength: 25,
|
||||||
|
lengthMenu: [[10, 25, 50, 100], [10, 25, 50, 100]],
|
||||||
|
createdRow: function(row, data) {
|
||||||
|
$(row).attr('data-my-index', data.index);
|
||||||
|
},
|
||||||
|
ajax: function(dtRequest, callback) {
|
||||||
|
postPluginGraphQL(gqlField, prefix, foreignKey, dtRequest, function(dtResponse, result) {
|
||||||
|
if (result) {
|
||||||
|
$(`#${countId}`).text(result.count);
|
||||||
|
if (badgeId) $(`#${badgeId}`).text(result.dbCount);
|
||||||
|
}
|
||||||
|
callback(dtResponse);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
columns: colDefinitions.map(colDef => ({
|
||||||
|
data: colDef.column,
|
||||||
|
title: getString(`${prefix}_${colDef.column}_name`),
|
||||||
|
className: colDef.css_classes || '',
|
||||||
|
createdCell: function(td, cellData, rowData) {
|
||||||
|
$(td).html(getFormControl(colDef, cellData, rowData.index));
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize DataTable for Objects
|
// Initialize the DataTable for whichever inner sub-tab is currently active
|
||||||
$(`#objectsTable_${prefix}`).DataTable({
|
// (may not be Objects if autoHideEmptyTabs switched it).
|
||||||
data: objectData,
|
// Defer the remaining sub-tabs until their shown.bs.tab fires.
|
||||||
columns: colDefinitions.map(colDef => ({ title: getString(`${prefix}_${colDef.column}_name`) })), // Column titles
|
const [objCfg, evtCfg, histCfg] = tableConfigs;
|
||||||
...commonDataTableSettings // Spread common settings
|
const allCfgs = [
|
||||||
});
|
{ cfg: objCfg, href: `#objectsTarget_${prefix}` },
|
||||||
|
{ cfg: evtCfg, href: `#eventsTarget_${prefix}` },
|
||||||
|
{ cfg: histCfg, href: `#historyTarget_${prefix}` },
|
||||||
|
];
|
||||||
|
|
||||||
// Initialize DataTable for Unprocessed Events
|
allCfgs.forEach(({ cfg, href }) => {
|
||||||
$(`#eventsTable_${prefix}`).DataTable({
|
const $subPane = $(href);
|
||||||
data: eventData,
|
if ($subPane.hasClass('active') && $subPane.is(':visible')) {
|
||||||
columns: colDefinitions.map(colDef => ({ title: getString(`${prefix}_${colDef.column}_name`) })), // Column titles
|
// This sub-tab is the currently active one — initialize immediately
|
||||||
...commonDataTableSettings // Spread common settings
|
buildDT(cfg.tableId, cfg.gqlField, cfg.countId, cfg.badgeId);
|
||||||
});
|
} else if ($subPane.closest('.tab-pane').length) {
|
||||||
|
// Defer until shown
|
||||||
// Initialize DataTable for History
|
$(`a[href="${href}"]`).one('shown.bs.tab', function() {
|
||||||
$(`#historyTable_${prefix}`).DataTable({
|
buildDT(cfg.tableId, cfg.gqlField, cfg.countId, cfg.badgeId);
|
||||||
data: historyData,
|
});
|
||||||
columns: colDefinitions.map(colDef => ({ title: getString(`${prefix}_${colDef.column}_name`) })), // Column titles
|
}
|
||||||
...commonDataTableSettings // Spread common settings
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,9 @@
|
|||||||
<?= lang('report_select_format') ;?>
|
<?= lang('report_select_format') ;?>
|
||||||
</label>
|
</label>
|
||||||
<select id="formatSelect" class="pointer">
|
<select id="formatSelect" class="pointer">
|
||||||
<option value="HTML">HTML</option>
|
<option value="html">HTML</option>
|
||||||
<option value="JSON">JSON</option>
|
<option value="json">JSON</option>
|
||||||
<option value="Text">Text</option>
|
<option value="text">Text</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -100,23 +100,23 @@
|
|||||||
|
|
||||||
// Display the selected format data and update timestamp
|
// Display the selected format data and update timestamp
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case 'HTML':
|
case 'html':
|
||||||
notificationData.innerHTML = formatData;
|
notificationData.innerHTML = formatData;
|
||||||
break;
|
break;
|
||||||
case 'JSON':
|
case 'json':
|
||||||
notificationData.innerHTML = `<pre class="logs" cols="70" rows="10" wrap="off" readonly="">
|
notificationData.innerHTML = `<pre class="logs" cols="70" rows="10" wrap="off" readonly="">
|
||||||
${jsonSyntaxHighlight(JSON.stringify(JSON.parse(formatData), undefined, 4))}
|
${jsonSyntaxHighlight(JSON.stringify(JSON.parse(formatData), undefined, 4))}
|
||||||
</pre>`;
|
</pre>`;
|
||||||
break;
|
break;
|
||||||
case 'Text':
|
case 'text':
|
||||||
notificationData.innerHTML = `<pre class="logs" cols="70" rows="10" wrap="off" readonly">${formatData}</pre>`;
|
notificationData.innerHTML = `<pre class="logs" cols="70" rows="10" wrap="off" readonly="">${formatData}</pre>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(notification)
|
// console.log(notification)
|
||||||
|
|
||||||
timestamp.textContent = localizeTimestamp(notification.DateTimeCreated);
|
timestamp.textContent = localizeTimestamp(notification.dateTimeCreated);
|
||||||
notiGuid.textContent = notification.GUID;
|
notiGuid.textContent = notification.guid;
|
||||||
currentIndex = index;
|
currentIndex = index;
|
||||||
|
|
||||||
$("#notificationOutOff").html(`${currentIndex + 1}/${data.data.length}`);
|
$("#notificationOutOff").html(`${currentIndex + 1}/${data.data.length}`);
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
|
|
||||||
// Function to find the index of a notification by GUID
|
// Function to find the index of a notification by GUID
|
||||||
function findIndexByGUID(data, guid) {
|
function findIndexByGUID(data, guid) {
|
||||||
return data.findIndex(notification => notification.GUID == guid);
|
return data.findIndex(notification => notification.guid == guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listen for format selection changes
|
// Listen for format selection changes
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Initial data load
|
// Initial data load
|
||||||
updateData('HTML', -1); // Default format to HTML and load the latest report
|
updateData('html', -1); // Default format to HTML and load the latest report
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@
|
|||||||
"title": "🔴 Down devices",
|
"title": "🔴 Down devices",
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"devName",
|
"devName",
|
||||||
"eve_MAC",
|
"eveMac",
|
||||||
"devVendor",
|
"devVendor",
|
||||||
"eve_IP",
|
"eveIp",
|
||||||
"eve_DateTime",
|
"eveDateTime",
|
||||||
"eve_EventType"
|
"eveEventType"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"down_devices": [],
|
"down_devices": [],
|
||||||
@@ -64,22 +64,22 @@
|
|||||||
"down_reconnected": [
|
"down_reconnected": [
|
||||||
{
|
{
|
||||||
"devName": "Phone - Moto 82",
|
"devName": "Phone - Moto 82",
|
||||||
"eve_MAC": "74:ac:74:ac:74:ac",
|
"eveMac": "74:ac:74:ac:74:ac",
|
||||||
"devVendor": "Motorola Mobility LLC, a Lenovo Company",
|
"devVendor": "Motorola Mobility LLC, a Lenovo Company",
|
||||||
"eve_IP": "192.168.1.167",
|
"eveIp": "192.168.1.167",
|
||||||
"eve_DateTime": "2025-01-11 10:05:01+11:00",
|
"eveDateTime": "2025-01-11 10:05:01+11:00",
|
||||||
"eve_EventType": "Down Reconnected"
|
"eveEventType": "Down Reconnected"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"down_reconnected_meta": {
|
"down_reconnected_meta": {
|
||||||
"title": "🔁 Reconnected down devices",
|
"title": "🔁 Reconnected down devices",
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"devName",
|
"devName",
|
||||||
"eve_MAC",
|
"eveMac",
|
||||||
"devVendor",
|
"devVendor",
|
||||||
"eve_IP",
|
"eveIp",
|
||||||
"eve_DateTime",
|
"eveDateTime",
|
||||||
"eve_EventType"
|
"eveEventType"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"events": [
|
"events": [
|
||||||
@@ -103,28 +103,28 @@
|
|||||||
"plugins_meta": {
|
"plugins_meta": {
|
||||||
"title": "🔌 Plugins",
|
"title": "🔌 Plugins",
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"Plugin",
|
"plugin",
|
||||||
"Object_PrimaryID",
|
"objectPrimaryId",
|
||||||
"Object_SecondaryID",
|
"objectSecondaryId",
|
||||||
"DateTimeChanged",
|
"dateTimeChanged",
|
||||||
"Watched_Value1",
|
"watchedValue1",
|
||||||
"Watched_Value2",
|
"watchedValue2",
|
||||||
"Watched_Value3",
|
"watchedValue3",
|
||||||
"Watched_Value4",
|
"watchedValue4",
|
||||||
"Status"
|
"status"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"Plugin": "ARPSCAN",
|
"plugin": "ARPSCAN",
|
||||||
"Object_PrimaryID": "74:ac:74:ac:74:ac",
|
"objectPrimaryId": "74:ac:74:ac:74:ac",
|
||||||
"Object_SecondaryID": "192.168.1.114",
|
"objectSecondaryId": "192.168.1.114",
|
||||||
"DateTimeChanged": "2025-01-11 12:21:00",
|
"dateTimeChanged": "2025-01-11 12:21:00",
|
||||||
"Watched_Value1": "192.168.1.114",
|
"watchedValue1": "192.168.1.114",
|
||||||
"Watched_Value2": "Microsoft Corporation",
|
"watchedValue2": "Microsoft Corporation",
|
||||||
"Watched_Value3": "192.168.1.0/24 --interface=eth1",
|
"watchedValue3": "192.168.1.0/24 --interface=eth1",
|
||||||
"Watched_Value4": "",
|
"watchedValue4": "",
|
||||||
"Status": "new"
|
"status": "new"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIICOjCCAcCgAwIBAgIUI0Tu7zsrBJACQIZgLMJobtbdNn4wCgYIKoZIzj0EAwIw
|
|
||||||
TDELMAkGA1UEBhMCSVQxDjAMBgNVBAgMBUl0YWx5MQ4wDAYDVQQKDAVJbGlhZDEd
|
|
||||||
MBsGA1UEAwwUSWxpYWRib3ggRUNDIFJvb3QgQ0EwHhcNMjAxMTI3MDkzODEzWhcN
|
|
||||||
NDAxMTIyMDkzODEzWjBMMQswCQYDVQQGEwJJVDEOMAwGA1UECAwFSXRhbHkxDjAM
|
|
||||||
BgNVBAoMBUlsaWFkMR0wGwYDVQQDDBRJbGlhZGJveCBFQ0MgUm9vdCBDQTB2MBAG
|
|
||||||
ByqGSM49AgEGBSuBBAAiA2IABMryJyb2loHNAioY8IztN5MI3UgbVHVP/vZwcnre
|
|
||||||
ZvJOyDvE4HJgIti5qmfswlnMzpNbwf/MkT+7HAU8jJoTorRm1wtAnQ9cWD3Ebv79
|
|
||||||
RPwtjjy3Bza3SgdVxmd6fWPUKaNjMGEwHQYDVR0OBBYEFDUij/4lpoJ+kOXRyrcM
|
|
||||||
jf2RPzOqMB8GA1UdIwQYMBaAFDUij/4lpoJ+kOXRyrcMjf2RPzOqMA8GA1UdEwEB
|
|
||||||
/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQC6eUV1
|
|
||||||
pFh4UpJOTc1JToztN4ttnQR6rIzxMZ6mNCe+nhjkohWp24pr7BpUYSbEizYCMAQ6
|
|
||||||
LCiBKV2j7QQGy7N1aBmdur17ZepYzR1YV0eI+Kd978aZggsmhjXENQYVTmm/XA==
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
@@ -24,4 +24,4 @@ librouteros
|
|||||||
yattag
|
yattag
|
||||||
zeroconf
|
zeroconf
|
||||||
psutil
|
psutil
|
||||||
git+https://github.com/foreign-sub/aiofreepybox.git
|
freebox-api
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ librouteros
|
|||||||
yattag
|
yattag
|
||||||
zeroconf
|
zeroconf
|
||||||
psutil
|
psutil
|
||||||
git+https://github.com/foreign-sub/aiofreepybox.git
|
freebox-api
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ nav:
|
|||||||
- Advanced guides:
|
- Advanced guides:
|
||||||
- Remote Networks: REMOTE_NETWORKS.md
|
- Remote Networks: REMOTE_NETWORKS.md
|
||||||
- Notifications Guide: NOTIFICATIONS.md
|
- Notifications Guide: NOTIFICATIONS.md
|
||||||
|
- Notification Text Templates: NOTIFICATION_TEMPLATES.md
|
||||||
- Custom PUID/GUID: PUID_PGID_SECURITY.md
|
- Custom PUID/GUID: PUID_PGID_SECURITY.md
|
||||||
- Name Resolution: NAME_RESOLUTION.md
|
- Name Resolution: NAME_RESOLUTION.md
|
||||||
- Authelia: AUTHELIA.md
|
- Authelia: AUTHELIA.md
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ six
|
|||||||
urllib3
|
urllib3
|
||||||
httplib2
|
httplib2
|
||||||
gunicorn
|
gunicorn
|
||||||
git+https://github.com/foreign-sub/aiofreepybox.git
|
freebox-api
|
||||||
mcp
|
mcp
|
||||||
psutil
|
psutil
|
||||||
pydantic>=2.0,<3.0
|
pydantic>=2.0,<3.0
|
||||||
|
|||||||
@@ -34,12 +34,12 @@ def check_and_clean_device():
|
|||||||
|
|
||||||
# Check all tables for MAC
|
# Check all tables for MAC
|
||||||
tables_checks = [
|
tables_checks = [
|
||||||
f"SELECT 'Events' as source, * FROM Events WHERE eve_MAC='{mac}'",
|
f"SELECT 'Events' as source, * FROM Events WHERE eveMac='{mac}'",
|
||||||
f"SELECT 'Devices' as source, * FROM Devices WHERE dev_MAC='{mac}'",
|
f"SELECT 'Devices' as source, * FROM Devices WHERE devMac='{mac}'",
|
||||||
f"SELECT 'CurrentScan' as source, * FROM CurrentScan WHERE scanMac='{mac}'",
|
f"SELECT 'CurrentScan' as source, * FROM CurrentScan WHERE scanMac='{mac}'",
|
||||||
f"SELECT 'Notifications' as source, * FROM Notifications WHERE JSON LIKE '%{mac}%'",
|
f"SELECT 'Notifications' as source, * FROM Notifications WHERE JSON LIKE '%{mac}%'",
|
||||||
f"SELECT 'AppEvents' as source, * FROM AppEvents WHERE ObjectPrimaryID LIKE '%{mac}%' OR ObjectSecondaryID LIKE '%{mac}%'",
|
f"SELECT 'AppEvents' as source, * FROM AppEvents WHERE objectPrimaryId LIKE '%{mac}%' OR objectSecondaryId LIKE '%{mac}%'",
|
||||||
f"SELECT 'Plugins_Objects' as source, * FROM Plugins_Objects WHERE Object_PrimaryID LIKE '%{mac}%'"
|
f"SELECT 'Plugins_Objects' as source, * FROM Plugins_Objects WHERE objectPrimaryId LIKE '%{mac}%'"
|
||||||
]
|
]
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
@@ -54,12 +54,12 @@ def check_and_clean_device():
|
|||||||
if confirm.lower() == 'y':
|
if confirm.lower() == 'y':
|
||||||
# Delete from all tables
|
# Delete from all tables
|
||||||
deletes = [
|
deletes = [
|
||||||
f"DELETE FROM Events WHERE eve_MAC='{mac}'",
|
f"DELETE FROM Events WHERE eveMac='{mac}'",
|
||||||
f"DELETE FROM Devices WHERE dev_MAC='{mac}'",
|
f"DELETE FROM Devices WHERE devMac='{mac}'",
|
||||||
f"DELETE FROM CurrentScan WHERE scanMac='{mac}'",
|
f"DELETE FROM CurrentScan WHERE scanMac='{mac}'",
|
||||||
f"DELETE FROM Notifications WHERE JSON LIKE '%{mac}%'",
|
f"DELETE FROM Notifications WHERE JSON LIKE '%{mac}%'",
|
||||||
f"DELETE FROM AppEvents WHERE ObjectPrimaryID LIKE '%{mac}%' OR ObjectSecondaryID LIKE '%{mac}%'",
|
f"DELETE FROM AppEvents WHERE objectPrimaryId LIKE '%{mac}%' OR objectSecondaryId LIKE '%{mac}%'",
|
||||||
f"DELETE FROM Plugins_Objects WHERE Object_PrimaryID LIKE '%{mac}%'"
|
f"DELETE FROM Plugins_Objects WHERE objectPrimaryId LIKE '%{mac}%'"
|
||||||
]
|
]
|
||||||
|
|
||||||
for delete in deletes:
|
for delete in deletes:
|
||||||
@@ -73,12 +73,12 @@ def check_and_clean_device():
|
|||||||
|
|
||||||
# Check all tables for IP
|
# Check all tables for IP
|
||||||
tables_checks = [
|
tables_checks = [
|
||||||
f"SELECT 'Events' as source, * FROM Events WHERE eve_IP='{ip}'",
|
f"SELECT 'Events' as source, * FROM Events WHERE eveIp='{ip}'",
|
||||||
f"SELECT 'Devices' as source, * FROM Devices WHERE dev_LastIP='{ip}'",
|
f"SELECT 'Devices' as source, * FROM Devices WHERE devLastIp='{ip}'",
|
||||||
f"SELECT 'CurrentScan' as source, * FROM CurrentScan WHERE scanLastIP='{ip}'",
|
f"SELECT 'CurrentScan' as source, * FROM CurrentScan WHERE scanLastIP='{ip}'",
|
||||||
f"SELECT 'Notifications' as source, * FROM Notifications WHERE JSON LIKE '%{ip}%'",
|
f"SELECT 'Notifications' as source, * FROM Notifications WHERE JSON LIKE '%{ip}%'",
|
||||||
f"SELECT 'AppEvents' as source, * FROM AppEvents WHERE ObjectSecondaryID LIKE '%{ip}%'",
|
f"SELECT 'AppEvents' as source, * FROM AppEvents WHERE objectSecondaryId LIKE '%{ip}%'",
|
||||||
f"SELECT 'Plugins_Objects' as source, * FROM Plugins_Objects WHERE Object_SecondaryID LIKE '%{ip}%'"
|
f"SELECT 'Plugins_Objects' as source, * FROM Plugins_Objects WHERE objectSecondaryId LIKE '%{ip}%'"
|
||||||
]
|
]
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
@@ -93,12 +93,12 @@ def check_and_clean_device():
|
|||||||
if confirm.lower() == 'y':
|
if confirm.lower() == 'y':
|
||||||
# Delete from all tables
|
# Delete from all tables
|
||||||
deletes = [
|
deletes = [
|
||||||
f"DELETE FROM Events WHERE eve_IP='{ip}'",
|
f"DELETE FROM Events WHERE eveIp='{ip}'",
|
||||||
f"DELETE FROM Devices WHERE dev_LastIP='{ip}'",
|
f"DELETE FROM Devices WHERE devLastIp='{ip}'",
|
||||||
f"DELETE FROM CurrentScan WHERE scanLastIP='{ip}'",
|
f"DELETE FROM CurrentScan WHERE scanLastIP='{ip}'",
|
||||||
f"DELETE FROM Notifications WHERE JSON LIKE '%{ip}%'",
|
f"DELETE FROM Notifications WHERE JSON LIKE '%{ip}%'",
|
||||||
f"DELETE FROM AppEvents WHERE ObjectSecondaryID LIKE '%{ip}%'",
|
f"DELETE FROM AppEvents WHERE objectSecondaryId LIKE '%{ip}%'",
|
||||||
f"DELETE FROM Plugins_Objects WHERE Object_SecondaryID LIKE '%{ip}%'"
|
f"DELETE FROM Plugins_Objects WHERE objectSecondaryId LIKE '%{ip}%'"
|
||||||
]
|
]
|
||||||
|
|
||||||
for delete in deletes:
|
for delete in deletes:
|
||||||
|
|||||||
@@ -10,17 +10,19 @@ from const import (
|
|||||||
apiPath,
|
apiPath,
|
||||||
sql_appevents,
|
sql_appevents,
|
||||||
sql_devices_all,
|
sql_devices_all,
|
||||||
|
sql_events_all,
|
||||||
sql_events_pending_alert,
|
sql_events_pending_alert,
|
||||||
sql_settings,
|
sql_settings,
|
||||||
sql_plugins_events,
|
sql_plugins_events,
|
||||||
sql_plugins_history,
|
sql_plugins_history,
|
||||||
sql_plugins_objects,
|
sql_plugins_objects,
|
||||||
|
sql_plugins_stats,
|
||||||
sql_language_strings,
|
sql_language_strings,
|
||||||
sql_notifications_all,
|
sql_notifications_all,
|
||||||
sql_online_history,
|
sql_online_history,
|
||||||
sql_devices_tiles,
|
|
||||||
sql_devices_filters,
|
sql_devices_filters,
|
||||||
)
|
)
|
||||||
|
from db.db_helper import get_sql_devices_tiles
|
||||||
from logger import mylog
|
from logger import mylog
|
||||||
from helper import write_file, get_setting_value
|
from helper import write_file, get_setting_value
|
||||||
from utils.datetime_utils import timeNowUTC
|
from utils.datetime_utils import timeNowUTC
|
||||||
@@ -59,19 +61,28 @@ def update_api(
|
|||||||
dataSourcesSQLs = [
|
dataSourcesSQLs = [
|
||||||
["appevents", sql_appevents],
|
["appevents", sql_appevents],
|
||||||
["devices", sql_devices_all],
|
["devices", sql_devices_all],
|
||||||
|
["events", sql_events_all],
|
||||||
["events_pending_alert", sql_events_pending_alert],
|
["events_pending_alert", sql_events_pending_alert],
|
||||||
["settings", sql_settings],
|
["settings", sql_settings],
|
||||||
["plugins_events", sql_plugins_events],
|
["plugins_events", sql_plugins_events],
|
||||||
["plugins_history", sql_plugins_history],
|
["plugins_history", sql_plugins_history],
|
||||||
["plugins_objects", sql_plugins_objects],
|
["plugins_objects", sql_plugins_objects],
|
||||||
|
["plugins_stats", sql_plugins_stats],
|
||||||
["plugins_language_strings", sql_language_strings],
|
["plugins_language_strings", sql_language_strings],
|
||||||
["notifications", sql_notifications_all],
|
["notifications", sql_notifications_all],
|
||||||
["online_history", sql_online_history],
|
["online_history", sql_online_history],
|
||||||
["devices_tiles", sql_devices_tiles],
|
["devices_tiles", get_sql_devices_tiles()],
|
||||||
["devices_filters", sql_devices_filters],
|
["devices_filters", sql_devices_filters],
|
||||||
["custom_endpoint", conf.API_CUSTOM_SQL],
|
["custom_endpoint", conf.API_CUSTOM_SQL],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# plugins_stats is derived from plugins_objects/events/history —
|
||||||
|
# ensure it is refreshed when any of its sources are partially updated.
|
||||||
|
_STATS_SOURCES = {"plugins_objects", "plugins_events", "plugins_history"}
|
||||||
|
if updateOnlyDataSources and _STATS_SOURCES & set(updateOnlyDataSources):
|
||||||
|
if "plugins_stats" not in updateOnlyDataSources:
|
||||||
|
updateOnlyDataSources = list(updateOnlyDataSources) + ["plugins_stats"]
|
||||||
|
|
||||||
# Save selected database tables
|
# Save selected database tables
|
||||||
for dsSQL in dataSourcesSQLs:
|
for dsSQL in dataSourcesSQLs:
|
||||||
if not updateOnlyDataSources or dsSQL[0] in updateOnlyDataSources:
|
if not updateOnlyDataSources or dsSQL[0] in updateOnlyDataSources:
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ from .sync_endpoint import handle_sync_post, handle_sync_get # noqa: E402 [flak
|
|||||||
from .logs_endpoint import clean_log # noqa: E402 [flake8 lint suppression]
|
from .logs_endpoint import clean_log # noqa: E402 [flake8 lint suppression]
|
||||||
from .health_endpoint import get_health_status # noqa: E402 [flake8 lint suppression]
|
from .health_endpoint import get_health_status # noqa: E402 [flake8 lint suppression]
|
||||||
from .languages_endpoint import get_languages # noqa: E402 [flake8 lint suppression]
|
from .languages_endpoint import get_languages # noqa: E402 [flake8 lint suppression]
|
||||||
|
from models.plugin_object_instance import PluginObjectInstance # noqa: E402 [flake8 lint suppression]
|
||||||
from models.user_events_queue_instance import UserEventsQueueInstance # noqa: E402 [flake8 lint suppression]
|
from models.user_events_queue_instance import UserEventsQueueInstance # noqa: E402 [flake8 lint suppression]
|
||||||
|
|
||||||
from models.event_instance import EventInstance # noqa: E402 [flake8 lint suppression]
|
from models.event_instance import EventInstance # noqa: E402 [flake8 lint suppression]
|
||||||
@@ -97,6 +98,7 @@ from .openapi.schemas import ( # noqa: E402 [flake8 lint suppression]
|
|||||||
AddToQueueRequest, GetSettingResponse,
|
AddToQueueRequest, GetSettingResponse,
|
||||||
RecentEventsRequest, SetDeviceAliasRequest,
|
RecentEventsRequest, SetDeviceAliasRequest,
|
||||||
LanguagesResponse,
|
LanguagesResponse,
|
||||||
|
PluginStatsResponse,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .sse_endpoint import ( # noqa: E402 [flake8 lint suppression]
|
from .sse_endpoint import ( # noqa: E402 [flake8 lint suppression]
|
||||||
@@ -1750,8 +1752,13 @@ def api_device_sessions(mac, payload=None):
|
|||||||
summary="Get Session Events",
|
summary="Get Session Events",
|
||||||
description="Retrieve events associated with sessions.",
|
description="Retrieve events associated with sessions.",
|
||||||
query_params=[
|
query_params=[
|
||||||
{"name": "type", "description": "Event type", "required": False, "schema": {"type": "string", "default": "all"}},
|
{"name": "type", "description": "Event type", "required": False, "schema": {"type": "string", "default": "all"}},
|
||||||
{"name": "period", "description": "Time period", "required": False, "schema": {"type": "string", "default": "7 days"}}
|
{"name": "period", "description": "Time period", "required": False, "schema": {"type": "string", "default": "7 days"}},
|
||||||
|
{"name": "page", "description": "Page number (1-based)", "required": False, "schema": {"type": "integer", "default": 1}},
|
||||||
|
{"name": "limit", "description": "Rows per page (max 1000)", "required": False, "schema": {"type": "integer", "default": 100}},
|
||||||
|
{"name": "search", "description": "Free-text search filter", "required": False, "schema": {"type": "string"}},
|
||||||
|
{"name": "sortCol", "description": "Column index to sort by (0-based)", "required": False, "schema": {"type": "integer", "default": 0}},
|
||||||
|
{"name": "sortDir", "description": "Sort direction: asc or desc", "required": False, "schema": {"type": "string", "default": "desc"}}
|
||||||
],
|
],
|
||||||
tags=["sessions"],
|
tags=["sessions"],
|
||||||
auth_callable=is_authorized
|
auth_callable=is_authorized
|
||||||
@@ -1759,7 +1766,12 @@ def api_device_sessions(mac, payload=None):
|
|||||||
def api_get_session_events(payload=None):
|
def api_get_session_events(payload=None):
|
||||||
session_event_type = request.args.get("type", "all")
|
session_event_type = request.args.get("type", "all")
|
||||||
period = get_date_from_period(request.args.get("period", "7 days"))
|
period = get_date_from_period(request.args.get("period", "7 days"))
|
||||||
return get_session_events(session_event_type, period)
|
page = request.args.get("page", 1, type=int)
|
||||||
|
limit = request.args.get("limit", 100, type=int)
|
||||||
|
search = request.args.get("search", None)
|
||||||
|
sort_col = request.args.get("sortCol", 0, type=int)
|
||||||
|
sort_dir = request.args.get("sortDir", "desc")
|
||||||
|
return get_session_events(session_event_type, period, page=page, limit=limit, search=search, sort_col=sort_col, sort_dir=sort_dir)
|
||||||
|
|
||||||
|
|
||||||
# --------------------------
|
# --------------------------
|
||||||
@@ -1992,6 +2004,33 @@ def list_languages(payload=None):
|
|||||||
}), 500
|
}), 500
|
||||||
|
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Plugin Stats endpoint
|
||||||
|
# --------------------------
|
||||||
|
@app.route("/plugins/stats", methods=["GET"])
|
||||||
|
@validate_request(
|
||||||
|
operation_id="get_plugin_stats",
|
||||||
|
summary="Get Plugin Row Counts",
|
||||||
|
description="Return per-plugin row counts across Objects, Events, and History tables. Optionally filter by foreignKey (MAC).",
|
||||||
|
response_model=PluginStatsResponse,
|
||||||
|
tags=["plugins"],
|
||||||
|
auth_callable=is_authorized,
|
||||||
|
query_params=[{
|
||||||
|
"name": "foreignKey",
|
||||||
|
"in": "query",
|
||||||
|
"required": False,
|
||||||
|
"description": "Filter counts to rows matching this foreignKey (typically a MAC address)",
|
||||||
|
"schema": {"type": "string"}
|
||||||
|
}]
|
||||||
|
)
|
||||||
|
def api_plugin_stats(payload=None):
|
||||||
|
"""Get per-plugin row counts, optionally filtered by foreignKey."""
|
||||||
|
foreign_key = request.args.get("foreignKey", None)
|
||||||
|
handler = PluginObjectInstance()
|
||||||
|
data = handler.getStats(foreign_key)
|
||||||
|
return jsonify({"success": True, "data": data})
|
||||||
|
|
||||||
|
|
||||||
# --------------------------
|
# --------------------------
|
||||||
# Background Server Start
|
# Background Server Start
|
||||||
# --------------------------
|
# --------------------------
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import graphene
|
import graphene
|
||||||
from graphene import (
|
from graphene import ObjectType, List, Field, Argument, String
|
||||||
ObjectType, String, Int, Boolean, List, Field, InputObjectType, Argument
|
|
||||||
)
|
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@@ -19,175 +17,30 @@ from helper import ( # noqa: E402 [flake8 lint suppression]
|
|||||||
get_setting_value,
|
get_setting_value,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Define a base URL with the user's home directory
|
from .graphql_types import ( # noqa: E402 [flake8 lint suppression]
|
||||||
|
FilterOptionsInput, PageQueryOptionsInput,
|
||||||
|
Device, DeviceResult,
|
||||||
|
Setting, SettingResult,
|
||||||
|
LangString, LangStringResult,
|
||||||
|
AppEvent, AppEventResult,
|
||||||
|
PluginQueryOptionsInput, PluginEntry,
|
||||||
|
PluginsObjectsResult, PluginsEventsResult, PluginsHistoryResult,
|
||||||
|
EventQueryOptionsInput, EventEntry, EventsResult,
|
||||||
|
)
|
||||||
|
from .graphql_helpers import ( # noqa: E402 [flake8 lint suppression]
|
||||||
|
mixed_type_sort_key,
|
||||||
|
apply_common_pagination,
|
||||||
|
apply_plugin_filters,
|
||||||
|
apply_events_filters,
|
||||||
|
)
|
||||||
|
|
||||||
folder = apiPath
|
folder = apiPath
|
||||||
|
|
||||||
|
|
||||||
# --- DEVICES ---
|
|
||||||
# Pagination and Sorting Input Types
|
|
||||||
class SortOptionsInput(InputObjectType):
|
|
||||||
field = String()
|
|
||||||
order = String()
|
|
||||||
|
|
||||||
|
|
||||||
class FilterOptionsInput(InputObjectType):
|
|
||||||
filterColumn = String()
|
|
||||||
filterValue = String()
|
|
||||||
|
|
||||||
|
|
||||||
class PageQueryOptionsInput(InputObjectType):
|
|
||||||
page = Int()
|
|
||||||
limit = Int()
|
|
||||||
sort = List(SortOptionsInput)
|
|
||||||
search = String()
|
|
||||||
status = String()
|
|
||||||
filters = List(FilterOptionsInput)
|
|
||||||
|
|
||||||
|
|
||||||
# Device ObjectType
|
|
||||||
class Device(ObjectType):
|
|
||||||
rowid = Int(description="Database row ID")
|
|
||||||
devMac = String(description="Device MAC address (e.g., 00:11:22:33:44:55)")
|
|
||||||
devName = String(description="Device display name/alias")
|
|
||||||
devOwner = String(description="Device owner")
|
|
||||||
devType = String(description="Device type classification")
|
|
||||||
devVendor = String(description="Hardware vendor from OUI lookup")
|
|
||||||
devFavorite = Int(description="Favorite flag (0 or 1)")
|
|
||||||
devGroup = String(description="Device group")
|
|
||||||
devComments = String(description="User comments")
|
|
||||||
devFirstConnection = String(description="Timestamp of first discovery")
|
|
||||||
devLastConnection = String(description="Timestamp of last connection")
|
|
||||||
devLastIP = String(description="Last known IP address")
|
|
||||||
devPrimaryIPv4 = String(description="Primary IPv4 address")
|
|
||||||
devPrimaryIPv6 = String(description="Primary IPv6 address")
|
|
||||||
devVlan = String(description="VLAN identifier")
|
|
||||||
devForceStatus = String(description="Force device status (online/offline/dont_force)")
|
|
||||||
devStaticIP = Int(description="Static IP flag (0 or 1)")
|
|
||||||
devScan = Int(description="Scan flag (0 or 1)")
|
|
||||||
devLogEvents = Int(description="Log events flag (0 or 1)")
|
|
||||||
devAlertEvents = Int(description="Alert events flag (0 or 1)")
|
|
||||||
devAlertDown = Int(description="Alert on down flag (0 or 1)")
|
|
||||||
devSkipRepeated = Int(description="Skip repeated alerts flag (0 or 1)")
|
|
||||||
devLastNotification = String(description="Timestamp of last notification")
|
|
||||||
devPresentLastScan = Int(description="Present in last scan flag (0 or 1)")
|
|
||||||
devIsNew = Int(description="Is new device flag (0 or 1)")
|
|
||||||
devLocation = String(description="Device location")
|
|
||||||
devIsArchived = Int(description="Is archived flag (0 or 1)")
|
|
||||||
devParentMAC = String(description="Parent device MAC address")
|
|
||||||
devParentPort = String(description="Parent device port")
|
|
||||||
devIcon = String(description="Base64-encoded HTML/SVG markup used to render the device icon")
|
|
||||||
devGUID = String(description="Unique device GUID")
|
|
||||||
devSite = String(description="Site name")
|
|
||||||
devSSID = String(description="SSID connected to")
|
|
||||||
devSyncHubNode = String(description="Sync hub node name")
|
|
||||||
devSourcePlugin = String(description="Plugin that discovered the device")
|
|
||||||
devCustomProps = String(description="Base64-encoded custom properties in JSON format")
|
|
||||||
devStatus = String(description="Online/Offline status")
|
|
||||||
devIsRandomMac = Int(description="Calculated: Is MAC address randomized?")
|
|
||||||
devParentChildrenCount = Int(description="Calculated: Number of children attached to this parent")
|
|
||||||
devIpLong = String(description="Calculated: IP address in long format (returned as string to support the full unsigned 32-bit range)")
|
|
||||||
devFilterStatus = String(description="Calculated: Device status for UI filtering")
|
|
||||||
devFQDN = String(description="Fully Qualified Domain Name")
|
|
||||||
devParentRelType = String(description="Relationship type to parent")
|
|
||||||
devReqNicsOnline = Int(description="Required NICs online flag")
|
|
||||||
devMacSource = String(description="Source tracking for devMac (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devNameSource = String(description="Source tracking for devName (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devFQDNSource = String(description="Source tracking for devFQDN (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devLastIPSource = String(description="Source tracking for devLastIP (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devVendorSource = String(description="Source tracking for devVendor (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devSSIDSource = String(description="Source tracking for devSSID (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devParentMACSource = String(description="Source tracking for devParentMAC (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devParentPortSource = String(description="Source tracking for devParentPort (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devParentRelTypeSource = String(description="Source tracking for devParentRelType (USER, LOCKED, NEWDEV, or plugin prefix)")
|
|
||||||
devVlanSource = String(description="Source tracking for devVlan")
|
|
||||||
devFlapping = Int(description="Indicates flapping device (device changing between online/offline states frequently)")
|
|
||||||
devCanSleep = Int(description="Can this device sleep? (0 or 1). When enabled, offline periods within NTFPRCS_sleep_time are reported as Sleeping instead of Down.")
|
|
||||||
devIsSleeping = Int(description="Computed: Is device currently in a sleep window? (0 or 1)")
|
|
||||||
|
|
||||||
|
|
||||||
class DeviceResult(ObjectType):
|
|
||||||
devices = List(Device)
|
|
||||||
count = Int()
|
|
||||||
db_count = Int(description="Total device count in the database, before any status/filter/search is applied")
|
|
||||||
|
|
||||||
|
|
||||||
# --- SETTINGS ---
|
|
||||||
|
|
||||||
|
|
||||||
# Setting ObjectType
|
|
||||||
class Setting(ObjectType):
|
|
||||||
setKey = String(description="Unique configuration key")
|
|
||||||
setName = String(description="Human-readable setting name")
|
|
||||||
setDescription = String(description="Detailed description of the setting")
|
|
||||||
setType = String(description="Config-driven type definition used to determine value type and UI rendering")
|
|
||||||
setOptions = String(description="JSON string of available options")
|
|
||||||
setGroup = String(description="UI group for categorization")
|
|
||||||
setValue = String(description="Current value")
|
|
||||||
setEvents = String(description="JSON string of events")
|
|
||||||
setOverriddenByEnv = Boolean(description="Whether the value is currently overridden by an environment variable")
|
|
||||||
|
|
||||||
|
|
||||||
class SettingResult(ObjectType):
|
|
||||||
settings = List(Setting, description="List of setting objects")
|
|
||||||
count = Int(description="Total count of settings")
|
|
||||||
|
|
||||||
# --- LANGSTRINGS ---
|
|
||||||
|
|
||||||
|
|
||||||
# In-memory cache for lang strings
|
# In-memory cache for lang strings
|
||||||
_langstrings_cache = {} # caches lists per file (core JSON or plugin)
|
_langstrings_cache = {} # caches lists per file (core JSON or plugin)
|
||||||
_langstrings_cache_mtime = {} # tracks last modified times
|
_langstrings_cache_mtime = {} # tracks last modified times
|
||||||
|
|
||||||
|
|
||||||
# LangString ObjectType
|
|
||||||
class LangString(ObjectType):
|
|
||||||
langCode = String(description="Language code (e.g., en_us, de_de)")
|
|
||||||
langStringKey = String(description="Unique translation key")
|
|
||||||
langStringText = String(description="Translated text content")
|
|
||||||
|
|
||||||
|
|
||||||
class LangStringResult(ObjectType):
|
|
||||||
langStrings = List(LangString, description="List of language string objects")
|
|
||||||
count = Int(description="Total count of strings")
|
|
||||||
|
|
||||||
|
|
||||||
# --- APP EVENTS ---
|
|
||||||
|
|
||||||
class AppEvent(ObjectType):
|
|
||||||
Index = Int(description="Internal index")
|
|
||||||
GUID = String(description="Unique event GUID")
|
|
||||||
AppEventProcessed = Int(description="Processing status (0 or 1)")
|
|
||||||
DateTimeCreated = String(description="Event creation timestamp")
|
|
||||||
|
|
||||||
ObjectType = String(description="Type of the related object (Device, Setting, etc.)")
|
|
||||||
ObjectGUID = String(description="GUID of the related object")
|
|
||||||
ObjectPlugin = String(description="Plugin associated with the object")
|
|
||||||
ObjectPrimaryID = String(description="Primary identifier of the object")
|
|
||||||
ObjectSecondaryID = String(description="Secondary identifier of the object")
|
|
||||||
ObjectForeignKey = String(description="Foreign key reference")
|
|
||||||
ObjectIndex = Int(description="Object index")
|
|
||||||
|
|
||||||
ObjectIsNew = Int(description="Is the object new? (0 or 1)")
|
|
||||||
ObjectIsArchived = Int(description="Is the object archived? (0 or 1)")
|
|
||||||
ObjectStatusColumn = String(description="Column used for status")
|
|
||||||
ObjectStatus = String(description="Object status value")
|
|
||||||
|
|
||||||
AppEventType = String(description="Type of application event")
|
|
||||||
|
|
||||||
Helper1 = String(description="Generic helper field 1")
|
|
||||||
Helper2 = String(description="Generic helper field 2")
|
|
||||||
Helper3 = String(description="Generic helper field 3")
|
|
||||||
Extra = String(description="Additional JSON data")
|
|
||||||
|
|
||||||
|
|
||||||
class AppEventResult(ObjectType):
|
|
||||||
appEvents = List(AppEvent, description="List of application events")
|
|
||||||
count = Int(description="Total count of events")
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Define Query Type with Pagination Support
|
|
||||||
class Query(ObjectType):
|
class Query(ObjectType):
|
||||||
# --- DEVICES ---
|
# --- DEVICES ---
|
||||||
devices = Field(DeviceResult, options=PageQueryOptionsInput())
|
devices = Field(DeviceResult, options=PageQueryOptionsInput())
|
||||||
@@ -499,18 +352,18 @@ class Query(ObjectType):
|
|||||||
search_term = options.search.lower()
|
search_term = options.search.lower()
|
||||||
|
|
||||||
searchable_fields = [
|
searchable_fields = [
|
||||||
"GUID",
|
"guid",
|
||||||
"ObjectType",
|
"objectType",
|
||||||
"ObjectGUID",
|
"objectGuid",
|
||||||
"ObjectPlugin",
|
"objectPlugin",
|
||||||
"ObjectPrimaryID",
|
"objectPrimaryId",
|
||||||
"ObjectSecondaryID",
|
"objectSecondaryId",
|
||||||
"ObjectStatus",
|
"objectStatus",
|
||||||
"AppEventType",
|
"appEventType",
|
||||||
"Helper1",
|
"helper1",
|
||||||
"Helper2",
|
"helper2",
|
||||||
"Helper3",
|
"helper3",
|
||||||
"Extra",
|
"extra",
|
||||||
]
|
]
|
||||||
|
|
||||||
events_data = [
|
events_data = [
|
||||||
@@ -616,9 +469,9 @@ class Query(ObjectType):
|
|||||||
plugin_data = json.load(f).get("data", [])
|
plugin_data = json.load(f).get("data", [])
|
||||||
plugin_list = [
|
plugin_list = [
|
||||||
LangString(
|
LangString(
|
||||||
langCode=entry.get("Language_Code"),
|
langCode=entry.get("languageCode"),
|
||||||
langStringKey=entry.get("String_Key"),
|
langStringKey=entry.get("stringKey"),
|
||||||
langStringText=entry.get("String_Value")
|
langStringText=entry.get("stringValue")
|
||||||
) for entry in plugin_data
|
) for entry in plugin_data
|
||||||
]
|
]
|
||||||
_langstrings_cache[cache_key] = plugin_list
|
_langstrings_cache[cache_key] = plugin_list
|
||||||
@@ -652,15 +505,75 @@ class Query(ObjectType):
|
|||||||
|
|
||||||
return LangStringResult(langStrings=langStrings, count=len(langStrings))
|
return LangStringResult(langStrings=langStrings, count=len(langStrings))
|
||||||
|
|
||||||
|
# --- PLUGINS_OBJECTS ---
|
||||||
|
pluginsObjects = Field(PluginsObjectsResult, options=PluginQueryOptionsInput())
|
||||||
|
|
||||||
# helps sorting inconsistent dataset mixed integers and strings
|
def resolve_pluginsObjects(self, info, options=None):
|
||||||
def mixed_type_sort_key(value):
|
return _resolve_plugin_table("table_plugins_objects.json", options, PluginsObjectsResult)
|
||||||
if value is None or value == "":
|
|
||||||
return (2, "") # Place None or empty strings last
|
# --- PLUGINS_EVENTS ---
|
||||||
|
pluginsEvents = Field(PluginsEventsResult, options=PluginQueryOptionsInput())
|
||||||
|
|
||||||
|
def resolve_pluginsEvents(self, info, options=None):
|
||||||
|
return _resolve_plugin_table("table_plugins_events.json", options, PluginsEventsResult)
|
||||||
|
|
||||||
|
# --- PLUGINS_HISTORY ---
|
||||||
|
pluginsHistory = Field(PluginsHistoryResult, options=PluginQueryOptionsInput())
|
||||||
|
|
||||||
|
def resolve_pluginsHistory(self, info, options=None):
|
||||||
|
return _resolve_plugin_table("table_plugins_history.json", options, PluginsHistoryResult)
|
||||||
|
|
||||||
|
# --- EVENTS ---
|
||||||
|
events = Field(EventsResult, options=EventQueryOptionsInput())
|
||||||
|
|
||||||
|
def resolve_events(self, info, options=None):
|
||||||
|
try:
|
||||||
|
with open(folder + "table_events.json", "r") as f:
|
||||||
|
data = json.load(f).get("data", [])
|
||||||
|
except (FileNotFoundError, json.JSONDecodeError) as e:
|
||||||
|
mylog("none", f"[graphql_schema] Error loading events data: {e}")
|
||||||
|
return EventsResult(entries=[], count=0, db_count=0)
|
||||||
|
|
||||||
|
db_count = len(data)
|
||||||
|
data = apply_events_filters(data, options)
|
||||||
|
data, total_count = apply_common_pagination(data, options)
|
||||||
|
return EventsResult(
|
||||||
|
entries=[EventEntry(**r) for r in data],
|
||||||
|
count=total_count,
|
||||||
|
db_count=db_count,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Private resolver helper — shared by all three plugin table resolvers
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def _resolve_plugin_table(json_file, options, ResultType):
|
||||||
try:
|
try:
|
||||||
return (0, int(value)) # Integers get priority
|
with open(folder + json_file, "r") as f:
|
||||||
except (ValueError, TypeError):
|
data = json.load(f).get("data", [])
|
||||||
return (1, str(value)) # Strings come next
|
except (FileNotFoundError, json.JSONDecodeError) as e:
|
||||||
|
mylog("none", f"[graphql_schema] Error loading {json_file}: {e}")
|
||||||
|
return ResultType(entries=[], count=0, db_count=0)
|
||||||
|
|
||||||
|
# Scope to the requested plugin + foreignKey FIRST so db_count
|
||||||
|
# reflects the total for THIS plugin, not the entire table.
|
||||||
|
if options:
|
||||||
|
if options.plugin:
|
||||||
|
pl = options.plugin.lower()
|
||||||
|
data = [r for r in data if str(r.get("plugin", "")).lower() == pl]
|
||||||
|
if options.foreignKey:
|
||||||
|
fk = options.foreignKey.lower()
|
||||||
|
data = [r for r in data if str(r.get("foreignKey", "")).lower() == fk]
|
||||||
|
|
||||||
|
db_count = len(data)
|
||||||
|
data = apply_plugin_filters(data, options)
|
||||||
|
data, total_count = apply_common_pagination(data, options)
|
||||||
|
return ResultType(
|
||||||
|
entries=[PluginEntry(**r) for r in data],
|
||||||
|
count=total_count,
|
||||||
|
db_count=db_count,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Schema Definition
|
# Schema Definition
|
||||||
|
|||||||
141
server/api_server/graphql_helpers.py
Normal file
141
server/api_server/graphql_helpers.py
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
"""
|
||||||
|
graphql_helpers.py — Shared utility functions for GraphQL resolvers.
|
||||||
|
"""
|
||||||
|
|
||||||
|
_MAX_LIMIT = 1000
|
||||||
|
_DEFAULT_LIMIT = 100
|
||||||
|
|
||||||
|
|
||||||
|
def mixed_type_sort_key(value):
|
||||||
|
"""Sort key that handles mixed int/string datasets without crashing.
|
||||||
|
|
||||||
|
Ordering priority:
|
||||||
|
0 — integers (sorted numerically)
|
||||||
|
1 — strings (sorted lexicographically)
|
||||||
|
2 — None / empty string (always last)
|
||||||
|
"""
|
||||||
|
if value is None or value == "":
|
||||||
|
return (2, "")
|
||||||
|
try:
|
||||||
|
return (0, int(value))
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
return (1, str(value))
|
||||||
|
|
||||||
|
|
||||||
|
def apply_common_pagination(data, options):
|
||||||
|
"""Apply sort + capture total_count + paginate.
|
||||||
|
|
||||||
|
Returns (paged_data, total_count).
|
||||||
|
Enforces a hard limit cap of _MAX_LIMIT — never returns unbounded results.
|
||||||
|
"""
|
||||||
|
if not options:
|
||||||
|
return data, len(data)
|
||||||
|
|
||||||
|
# --- SORT ---
|
||||||
|
if options.sort:
|
||||||
|
for sort_option in reversed(options.sort):
|
||||||
|
field = sort_option.field
|
||||||
|
reverse = (sort_option.order or "asc").lower() == "desc"
|
||||||
|
data = sorted(
|
||||||
|
data,
|
||||||
|
key=lambda x: mixed_type_sort_key(x.get(field)),
|
||||||
|
reverse=reverse,
|
||||||
|
)
|
||||||
|
|
||||||
|
total_count = len(data)
|
||||||
|
|
||||||
|
# --- PAGINATE ---
|
||||||
|
if options.page is not None and options.limit is not None:
|
||||||
|
effective_limit = min(options.limit, _MAX_LIMIT)
|
||||||
|
page = max(1, options.page)
|
||||||
|
start = (page - 1) * effective_limit
|
||||||
|
end = start + effective_limit
|
||||||
|
data = data[start:end]
|
||||||
|
|
||||||
|
return data, total_count
|
||||||
|
|
||||||
|
|
||||||
|
def apply_plugin_filters(data, options):
|
||||||
|
"""Filter a list of plugin table rows (Plugins_Objects/Events/History).
|
||||||
|
|
||||||
|
Handles: date range, column filters, free-text search.
|
||||||
|
NOTE: plugin prefix and foreignKey scoping is done in the resolver
|
||||||
|
BEFORE db_count is captured — do NOT duplicate here.
|
||||||
|
"""
|
||||||
|
if not options:
|
||||||
|
return data
|
||||||
|
|
||||||
|
# Date-range filter on dateTimeCreated
|
||||||
|
if options.dateFrom:
|
||||||
|
data = [r for r in data if str(r.get("dateTimeCreated", "")) >= options.dateFrom]
|
||||||
|
if options.dateTo:
|
||||||
|
data = [r for r in data if str(r.get("dateTimeCreated", "")) <= options.dateTo]
|
||||||
|
|
||||||
|
# Column-value exact-match filters
|
||||||
|
if options.filters:
|
||||||
|
for f in options.filters:
|
||||||
|
if f.filterColumn and f.filterValue is not None:
|
||||||
|
data = [
|
||||||
|
r for r in data
|
||||||
|
if str(r.get(f.filterColumn, "")).lower() == str(f.filterValue).lower()
|
||||||
|
]
|
||||||
|
|
||||||
|
# Free-text search
|
||||||
|
if options.search:
|
||||||
|
term = options.search.lower()
|
||||||
|
searchable = [
|
||||||
|
"plugin", "objectPrimaryId", "objectSecondaryId",
|
||||||
|
"watchedValue1", "watchedValue2", "watchedValue3", "watchedValue4",
|
||||||
|
"status", "extra", "foreignKey", "objectGuid", "userData",
|
||||||
|
]
|
||||||
|
data = [
|
||||||
|
r for r in data
|
||||||
|
if any(term in str(r.get(field, "")).lower() for field in searchable)
|
||||||
|
]
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
def apply_events_filters(data, options):
|
||||||
|
"""Filter a list of Events table rows.
|
||||||
|
|
||||||
|
Handles: eveMac, eventType, date range, column filters, free-text search.
|
||||||
|
"""
|
||||||
|
if not options:
|
||||||
|
return data
|
||||||
|
|
||||||
|
# MAC filter
|
||||||
|
if options.eveMac:
|
||||||
|
mac = options.eveMac.lower()
|
||||||
|
data = [r for r in data if str(r.get("eveMac", "")).lower() == mac]
|
||||||
|
|
||||||
|
# Event-type filter
|
||||||
|
if options.eventType:
|
||||||
|
et = options.eventType.lower()
|
||||||
|
data = [r for r in data if str(r.get("eveEventType", "")).lower() == et]
|
||||||
|
|
||||||
|
# Date-range filter on eveDateTime
|
||||||
|
if options.dateFrom:
|
||||||
|
data = [r for r in data if str(r.get("eveDateTime", "")) >= options.dateFrom]
|
||||||
|
if options.dateTo:
|
||||||
|
data = [r for r in data if str(r.get("eveDateTime", "")) <= options.dateTo]
|
||||||
|
|
||||||
|
# Column-value exact-match filters
|
||||||
|
if options.filters:
|
||||||
|
for f in options.filters:
|
||||||
|
if f.filterColumn and f.filterValue is not None:
|
||||||
|
data = [
|
||||||
|
r for r in data
|
||||||
|
if str(r.get(f.filterColumn, "")).lower() == str(f.filterValue).lower()
|
||||||
|
]
|
||||||
|
|
||||||
|
# Free-text search
|
||||||
|
if options.search:
|
||||||
|
term = options.search.lower()
|
||||||
|
searchable = ["eveMac", "eveIp", "eveEventType", "eveAdditionalInfo"]
|
||||||
|
data = [
|
||||||
|
r for r in data
|
||||||
|
if any(term in str(r.get(field, "")).lower() for field in searchable)
|
||||||
|
]
|
||||||
|
|
||||||
|
return data
|
||||||
261
server/api_server/graphql_types.py
Normal file
261
server/api_server/graphql_types.py
Normal file
@@ -0,0 +1,261 @@
|
|||||||
|
import graphene # noqa: F401 (re-exported for schema creation in graphql_endpoint.py)
|
||||||
|
from graphene import (
|
||||||
|
ObjectType, String, Int, Boolean, List, InputObjectType,
|
||||||
|
)
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Shared Input Types
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
class SortOptionsInput(InputObjectType):
|
||||||
|
field = String()
|
||||||
|
order = String()
|
||||||
|
|
||||||
|
|
||||||
|
class FilterOptionsInput(InputObjectType):
|
||||||
|
filterColumn = String()
|
||||||
|
filterValue = String()
|
||||||
|
|
||||||
|
|
||||||
|
class PageQueryOptionsInput(InputObjectType):
|
||||||
|
page = Int()
|
||||||
|
limit = Int()
|
||||||
|
sort = List(SortOptionsInput)
|
||||||
|
search = String()
|
||||||
|
status = String()
|
||||||
|
filters = List(FilterOptionsInput)
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Devices
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class Device(ObjectType):
|
||||||
|
rowid = Int(description="Database row ID")
|
||||||
|
devMac = String(description="Device MAC address (e.g., 00:11:22:33:44:55)")
|
||||||
|
devName = String(description="Device display name/alias")
|
||||||
|
devOwner = String(description="Device owner")
|
||||||
|
devType = String(description="Device type classification")
|
||||||
|
devVendor = String(description="Hardware vendor from OUI lookup")
|
||||||
|
devFavorite = Int(description="Favorite flag (0 or 1)")
|
||||||
|
devGroup = String(description="Device group")
|
||||||
|
devComments = String(description="User comments")
|
||||||
|
devFirstConnection = String(description="Timestamp of first discovery")
|
||||||
|
devLastConnection = String(description="Timestamp of last connection")
|
||||||
|
devLastIP = String(description="Last known IP address")
|
||||||
|
devPrimaryIPv4 = String(description="Primary IPv4 address")
|
||||||
|
devPrimaryIPv6 = String(description="Primary IPv6 address")
|
||||||
|
devVlan = String(description="VLAN identifier")
|
||||||
|
devForceStatus = String(description="Force device status (online/offline/dont_force)")
|
||||||
|
devStaticIP = Int(description="Static IP flag (0 or 1)")
|
||||||
|
devScan = Int(description="Scan flag (0 or 1)")
|
||||||
|
devLogEvents = Int(description="Log events flag (0 or 1)")
|
||||||
|
devAlertEvents = Int(description="Alert events flag (0 or 1)")
|
||||||
|
devAlertDown = Int(description="Alert on down flag (0 or 1)")
|
||||||
|
devSkipRepeated = Int(description="Skip repeated alerts flag (0 or 1)")
|
||||||
|
devLastNotification = String(description="Timestamp of last notification")
|
||||||
|
devPresentLastScan = Int(description="Present in last scan flag (0 or 1)")
|
||||||
|
devIsNew = Int(description="Is new device flag (0 or 1)")
|
||||||
|
devLocation = String(description="Device location")
|
||||||
|
devIsArchived = Int(description="Is archived flag (0 or 1)")
|
||||||
|
devParentMAC = String(description="Parent device MAC address")
|
||||||
|
devParentPort = String(description="Parent device port")
|
||||||
|
devIcon = String(description="Base64-encoded HTML/SVG markup used to render the device icon")
|
||||||
|
devGUID = String(description="Unique device GUID")
|
||||||
|
devSite = String(description="Site name")
|
||||||
|
devSSID = String(description="SSID connected to")
|
||||||
|
devSyncHubNode = String(description="Sync hub node name")
|
||||||
|
devSourcePlugin = String(description="Plugin that discovered the device")
|
||||||
|
devCustomProps = String(description="Base64-encoded custom properties in JSON format")
|
||||||
|
devStatus = String(description="Online/Offline status")
|
||||||
|
devIsRandomMac = Int(description="Calculated: Is MAC address randomized?")
|
||||||
|
devParentChildrenCount = Int(description="Calculated: Number of children attached to this parent")
|
||||||
|
devIpLong = String(description="Calculated: IP address in long format (returned as string to support the full unsigned 32-bit range)")
|
||||||
|
devFilterStatus = String(description="Calculated: Device status for UI filtering")
|
||||||
|
devFQDN = String(description="Fully Qualified Domain Name")
|
||||||
|
devParentRelType = String(description="Relationship type to parent")
|
||||||
|
devReqNicsOnline = Int(description="Required NICs online flag")
|
||||||
|
devMacSource = String(description="Source tracking for devMac (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devNameSource = String(description="Source tracking for devName (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devFQDNSource = String(description="Source tracking for devFQDN (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devLastIPSource = String(description="Source tracking for devLastIP (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devVendorSource = String(description="Source tracking for devVendor (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devSSIDSource = String(description="Source tracking for devSSID (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devParentMACSource = String(description="Source tracking for devParentMAC (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devParentPortSource = String(description="Source tracking for devParentPort (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devParentRelTypeSource = String(description="Source tracking for devParentRelType (USER, LOCKED, NEWDEV, or plugin prefix)")
|
||||||
|
devVlanSource = String(description="Source tracking for devVlan")
|
||||||
|
devFlapping = Int(description="Indicates flapping device (device changing between online/offline states frequently)")
|
||||||
|
devCanSleep = Int(description="Can this device sleep? (0 or 1). When enabled, offline periods within NTFPRCS_sleep_time are reported as Sleeping instead of Down.")
|
||||||
|
devIsSleeping = Int(description="Computed: Is device currently in a sleep window? (0 or 1)")
|
||||||
|
|
||||||
|
|
||||||
|
class DeviceResult(ObjectType):
|
||||||
|
devices = List(Device)
|
||||||
|
count = Int()
|
||||||
|
db_count = Int(description="Total device count in the database, before any status/filter/search is applied")
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Settings
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class Setting(ObjectType):
|
||||||
|
setKey = String(description="Unique configuration key")
|
||||||
|
setName = String(description="Human-readable setting name")
|
||||||
|
setDescription = String(description="Detailed description of the setting")
|
||||||
|
setType = String(description="Config-driven type definition used to determine value type and UI rendering")
|
||||||
|
setOptions = String(description="JSON string of available options")
|
||||||
|
setGroup = String(description="UI group for categorization")
|
||||||
|
setValue = String(description="Current value")
|
||||||
|
setEvents = String(description="JSON string of events")
|
||||||
|
setOverriddenByEnv = Boolean(description="Whether the value is currently overridden by an environment variable")
|
||||||
|
|
||||||
|
|
||||||
|
class SettingResult(ObjectType):
|
||||||
|
settings = List(Setting, description="List of setting objects")
|
||||||
|
count = Int(description="Total count of settings")
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Language Strings
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class LangString(ObjectType):
|
||||||
|
langCode = String(description="Language code (e.g., en_us, de_de)")
|
||||||
|
langStringKey = String(description="Unique translation key")
|
||||||
|
langStringText = String(description="Translated text content")
|
||||||
|
|
||||||
|
|
||||||
|
class LangStringResult(ObjectType):
|
||||||
|
langStrings = List(LangString, description="List of language string objects")
|
||||||
|
count = Int(description="Total count of strings")
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# App Events
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class AppEvent(ObjectType):
|
||||||
|
index = Int(description="Internal index")
|
||||||
|
guid = String(description="Unique event GUID")
|
||||||
|
appEventProcessed = Int(description="Processing status (0 or 1)")
|
||||||
|
dateTimeCreated = String(description="Event creation timestamp")
|
||||||
|
|
||||||
|
objectType = String(description="Type of the related object (Device, Setting, etc.)")
|
||||||
|
objectGuid = String(description="GUID of the related object")
|
||||||
|
objectPlugin = String(description="Plugin associated with the object")
|
||||||
|
objectPrimaryId = String(description="Primary identifier of the object")
|
||||||
|
objectSecondaryId = String(description="Secondary identifier of the object")
|
||||||
|
objectForeignKey = String(description="Foreign key reference")
|
||||||
|
objectIndex = Int(description="Object index")
|
||||||
|
|
||||||
|
objectIsNew = Int(description="Is the object new? (0 or 1)")
|
||||||
|
objectIsArchived = Int(description="Is the object archived? (0 or 1)")
|
||||||
|
objectStatusColumn = String(description="Column used for status")
|
||||||
|
objectStatus = String(description="Object status value")
|
||||||
|
|
||||||
|
appEventType = String(description="Type of application event")
|
||||||
|
|
||||||
|
helper1 = String(description="Generic helper field 1")
|
||||||
|
helper2 = String(description="Generic helper field 2")
|
||||||
|
helper3 = String(description="Generic helper field 3")
|
||||||
|
extra = String(description="Additional JSON data")
|
||||||
|
|
||||||
|
|
||||||
|
class AppEventResult(ObjectType):
|
||||||
|
appEvents = List(AppEvent, description="List of application events")
|
||||||
|
count = Int(description="Total count of events")
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Plugin tables (Plugins_Objects, Plugins_Events, Plugins_History)
|
||||||
|
# All three tables share the same schema — one ObjectType, three result wrappers.
|
||||||
|
# GraphQL requires distinct named types even when fields are identical.
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class PluginQueryOptionsInput(InputObjectType):
|
||||||
|
page = Int()
|
||||||
|
limit = Int()
|
||||||
|
sort = List(SortOptionsInput)
|
||||||
|
search = String()
|
||||||
|
filters = List(FilterOptionsInput)
|
||||||
|
plugin = String(description="Filter by plugin prefix (e.g. 'ARPSCAN')")
|
||||||
|
foreignKey = String(description="Filter by foreignKey (e.g. device MAC)")
|
||||||
|
dateFrom = String(description="dateTimeCreated >= dateFrom (ISO datetime string)")
|
||||||
|
dateTo = String(description="dateTimeCreated <= dateTo (ISO datetime string)")
|
||||||
|
|
||||||
|
|
||||||
|
class PluginEntry(ObjectType):
|
||||||
|
index = Int(description="Auto-increment primary key")
|
||||||
|
plugin = String(description="Plugin prefix identifier")
|
||||||
|
objectPrimaryId = String(description="Primary identifier (e.g. MAC, IP)")
|
||||||
|
objectSecondaryId = String(description="Secondary identifier")
|
||||||
|
dateTimeCreated = String(description="Record creation timestamp")
|
||||||
|
dateTimeChanged = String(description="Record last-changed timestamp")
|
||||||
|
watchedValue1 = String(description="Monitored value 1")
|
||||||
|
watchedValue2 = String(description="Monitored value 2")
|
||||||
|
watchedValue3 = String(description="Monitored value 3")
|
||||||
|
watchedValue4 = String(description="Monitored value 4")
|
||||||
|
status = String(description="Record status")
|
||||||
|
extra = String(description="Extra JSON payload")
|
||||||
|
userData = String(description="User-supplied data")
|
||||||
|
foreignKey = String(description="Foreign key (e.g. device MAC)")
|
||||||
|
syncHubNodeName = String(description="Sync hub node name")
|
||||||
|
helpVal1 = String(description="Helper value 1")
|
||||||
|
helpVal2 = String(description="Helper value 2")
|
||||||
|
helpVal3 = String(description="Helper value 3")
|
||||||
|
helpVal4 = String(description="Helper value 4")
|
||||||
|
objectGuid = String(description="Object GUID")
|
||||||
|
|
||||||
|
|
||||||
|
class PluginsObjectsResult(ObjectType):
|
||||||
|
entries = List(PluginEntry, description="Plugins_Objects rows")
|
||||||
|
count = Int(description="Filtered count (before pagination)")
|
||||||
|
db_count = Int(description="Total rows in table before any filter")
|
||||||
|
|
||||||
|
|
||||||
|
class PluginsEventsResult(ObjectType):
|
||||||
|
entries = List(PluginEntry, description="Plugins_Events rows")
|
||||||
|
count = Int(description="Filtered count (before pagination)")
|
||||||
|
db_count = Int(description="Total rows in table before any filter")
|
||||||
|
|
||||||
|
|
||||||
|
class PluginsHistoryResult(ObjectType):
|
||||||
|
entries = List(PluginEntry, description="Plugins_History rows")
|
||||||
|
count = Int(description="Filtered count (before pagination)")
|
||||||
|
db_count = Int(description="Total rows in table before any filter")
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Events table (device presence events)
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class EventQueryOptionsInput(InputObjectType):
|
||||||
|
page = Int()
|
||||||
|
limit = Int()
|
||||||
|
sort = List(SortOptionsInput)
|
||||||
|
search = String()
|
||||||
|
filters = List(FilterOptionsInput)
|
||||||
|
eveMac = String(description="Filter by device MAC address")
|
||||||
|
eventType = String(description="Filter by eveEventType (exact match)")
|
||||||
|
dateFrom = String(description="eveDateTime >= dateFrom (ISO datetime string)")
|
||||||
|
dateTo = String(description="eveDateTime <= dateTo (ISO datetime string)")
|
||||||
|
|
||||||
|
|
||||||
|
class EventEntry(ObjectType):
|
||||||
|
rowid = Int(description="SQLite rowid")
|
||||||
|
eveMac = String(description="Device MAC address")
|
||||||
|
eveIp = String(description="Device IP at event time")
|
||||||
|
eveDateTime = String(description="Event timestamp")
|
||||||
|
eveEventType = String(description="Event type (Connected, New Device, etc.)")
|
||||||
|
eveAdditionalInfo = String(description="Additional event info")
|
||||||
|
evePendingAlertEmail = Int(description="Pending alert flag (0 or 1)")
|
||||||
|
evePairEventRowid = Int(description="Paired event rowid (for session pairing)")
|
||||||
|
|
||||||
|
|
||||||
|
class EventsResult(ObjectType):
|
||||||
|
entries = List(EventEntry, description="Events table rows")
|
||||||
|
count = Int(description="Filtered count (before pagination)")
|
||||||
|
db_count = Int(description="Total rows in table before any filter")
|
||||||
@@ -1084,3 +1084,32 @@ class GraphQLRequest(BaseModel):
|
|||||||
"""Request payload for GraphQL queries."""
|
"""Request payload for GraphQL queries."""
|
||||||
query: str = Field(..., description="GraphQL query string", json_schema_extra={"examples": ["{ devices { devMac devName } }"]})
|
query: str = Field(..., description="GraphQL query string", json_schema_extra={"examples": ["{ devices { devMac devName } }"]})
|
||||||
variables: Optional[Dict[str, Any]] = Field(None, description="Variables for the GraphQL query")
|
variables: Optional[Dict[str, Any]] = Field(None, description="Variables for the GraphQL query")
|
||||||
|
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# PLUGIN SCHEMAS
|
||||||
|
# =============================================================================
|
||||||
|
class PluginStatsEntry(BaseModel):
|
||||||
|
"""Per-plugin row count for one table."""
|
||||||
|
tableName: str = Field(..., description="Table category: objects, events, or history")
|
||||||
|
plugin: str = Field(..., description="Plugin unique prefix")
|
||||||
|
cnt: int = Field(..., ge=0, description="Row count")
|
||||||
|
|
||||||
|
|
||||||
|
class PluginStatsResponse(BaseResponse):
|
||||||
|
"""Response for GET /plugins/stats — per-plugin row counts."""
|
||||||
|
model_config = ConfigDict(
|
||||||
|
extra="allow",
|
||||||
|
json_schema_extra={
|
||||||
|
"examples": [{
|
||||||
|
"success": True,
|
||||||
|
"data": [
|
||||||
|
{"tableName": "objects", "plugin": "ARPSCAN", "cnt": 42},
|
||||||
|
{"tableName": "events", "plugin": "ARPSCAN", "cnt": 5},
|
||||||
|
{"tableName": "history", "plugin": "ARPSCAN", "cnt": 100}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
data: List[PluginStatsEntry] = Field(default_factory=list, description="Per-plugin row counts")
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ def create_session(
|
|||||||
|
|
||||||
cur.execute(
|
cur.execute(
|
||||||
"""
|
"""
|
||||||
INSERT INTO Sessions (ses_MAC, ses_IP, ses_DateTimeConnection, ses_DateTimeDisconnection,
|
INSERT INTO Sessions (sesMac, sesIp, sesDateTimeConnection, sesDateTimeDisconnection,
|
||||||
ses_EventTypeConnection, ses_EventTypeDisconnection)
|
sesEventTypeConnection, sesEventTypeDisconnection)
|
||||||
VALUES (?, ?, ?, ?, ?, ?)
|
VALUES (?, ?, ?, ?, ?, ?)
|
||||||
""",
|
""",
|
||||||
(mac, ip, start_time, end_time, event_type_conn, event_type_disc),
|
(mac, ip, start_time, end_time, event_type_conn, event_type_disc),
|
||||||
@@ -52,7 +52,7 @@ def delete_session(mac):
|
|||||||
conn = get_temp_db_connection()
|
conn = get_temp_db_connection()
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
|
|
||||||
cur.execute("DELETE FROM Sessions WHERE ses_MAC = ?", (mac,))
|
cur.execute("DELETE FROM Sessions WHERE sesMac = ?", (mac,))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
@@ -69,13 +69,13 @@ def get_sessions(mac=None, start_date=None, end_date=None):
|
|||||||
params = []
|
params = []
|
||||||
|
|
||||||
if mac:
|
if mac:
|
||||||
sql += " AND ses_MAC = ?"
|
sql += " AND sesMac = ?"
|
||||||
params.append(mac)
|
params.append(mac)
|
||||||
if start_date:
|
if start_date:
|
||||||
sql += " AND ses_DateTimeConnection >= ?"
|
sql += " AND sesDateTimeConnection >= ?"
|
||||||
params.append(start_date)
|
params.append(start_date)
|
||||||
if end_date:
|
if end_date:
|
||||||
sql += " AND ses_DateTimeDisconnection <= ?"
|
sql += " AND sesDateTimeDisconnection <= ?"
|
||||||
params.append(end_date)
|
params.append(end_date)
|
||||||
|
|
||||||
cur.execute(sql, tuple(params))
|
cur.execute(sql, tuple(params))
|
||||||
@@ -106,49 +106,49 @@ def get_sessions_calendar(start_date, end_date, mac):
|
|||||||
|
|
||||||
sql = """
|
sql = """
|
||||||
SELECT
|
SELECT
|
||||||
SES1.ses_MAC,
|
SES1.sesMac,
|
||||||
SES1.ses_EventTypeConnection,
|
SES1.sesEventTypeConnection,
|
||||||
SES1.ses_DateTimeConnection,
|
SES1.sesDateTimeConnection,
|
||||||
SES1.ses_EventTypeDisconnection,
|
SES1.sesEventTypeDisconnection,
|
||||||
SES1.ses_DateTimeDisconnection,
|
SES1.sesDateTimeDisconnection,
|
||||||
SES1.ses_IP,
|
SES1.sesIp,
|
||||||
SES1.ses_AdditionalInfo,
|
SES1.sesAdditionalInfo,
|
||||||
SES1.ses_StillConnected,
|
SES1.sesStillConnected,
|
||||||
|
|
||||||
CASE
|
CASE
|
||||||
WHEN SES1.ses_EventTypeConnection = '<missing event>' THEN
|
WHEN SES1.sesEventTypeConnection = '<missing event>' THEN
|
||||||
IFNULL(
|
IFNULL(
|
||||||
(
|
(
|
||||||
SELECT MAX(SES2.ses_DateTimeDisconnection)
|
SELECT MAX(SES2.sesDateTimeDisconnection)
|
||||||
FROM Sessions AS SES2
|
FROM Sessions AS SES2
|
||||||
WHERE SES2.ses_MAC = SES1.ses_MAC
|
WHERE SES2.sesMac = SES1.sesMac
|
||||||
AND SES2.ses_DateTimeDisconnection < SES1.ses_DateTimeDisconnection
|
AND SES2.sesDateTimeDisconnection < SES1.sesDateTimeDisconnection
|
||||||
AND SES2.ses_DateTimeDisconnection BETWEEN Date(?) AND Date(?)
|
AND SES2.sesDateTimeDisconnection BETWEEN Date(?) AND Date(?)
|
||||||
),
|
),
|
||||||
DATETIME(SES1.ses_DateTimeDisconnection, '-1 hour')
|
DATETIME(SES1.sesDateTimeDisconnection, '-1 hour')
|
||||||
)
|
)
|
||||||
ELSE SES1.ses_DateTimeConnection
|
ELSE SES1.sesDateTimeConnection
|
||||||
END AS ses_DateTimeConnectionCorrected,
|
END AS sesDateTimeConnectionCorrected,
|
||||||
|
|
||||||
CASE
|
CASE
|
||||||
WHEN SES1.ses_EventTypeDisconnection = '<missing event>' THEN
|
WHEN SES1.sesEventTypeDisconnection = '<missing event>' THEN
|
||||||
(
|
(
|
||||||
SELECT MIN(SES2.ses_DateTimeConnection)
|
SELECT MIN(SES2.sesDateTimeConnection)
|
||||||
FROM Sessions AS SES2
|
FROM Sessions AS SES2
|
||||||
WHERE SES2.ses_MAC = SES1.ses_MAC
|
WHERE SES2.sesMac = SES1.sesMac
|
||||||
AND SES2.ses_DateTimeConnection > SES1.ses_DateTimeConnection
|
AND SES2.sesDateTimeConnection > SES1.sesDateTimeConnection
|
||||||
AND SES2.ses_DateTimeConnection BETWEEN Date(?) AND Date(?)
|
AND SES2.sesDateTimeConnection BETWEEN Date(?) AND Date(?)
|
||||||
)
|
)
|
||||||
ELSE SES1.ses_DateTimeDisconnection
|
ELSE SES1.sesDateTimeDisconnection
|
||||||
END AS ses_DateTimeDisconnectionCorrected
|
END AS sesDateTimeDisconnectionCorrected
|
||||||
|
|
||||||
FROM Sessions AS SES1
|
FROM Sessions AS SES1
|
||||||
WHERE (
|
WHERE (
|
||||||
(SES1.ses_DateTimeConnection BETWEEN Date(?) AND Date(?))
|
(SES1.sesDateTimeConnection BETWEEN Date(?) AND Date(?))
|
||||||
OR (SES1.ses_DateTimeDisconnection BETWEEN Date(?) AND Date(?))
|
OR (SES1.sesDateTimeDisconnection BETWEEN Date(?) AND Date(?))
|
||||||
OR SES1.ses_StillConnected = 1
|
OR SES1.sesStillConnected = 1
|
||||||
)
|
)
|
||||||
AND (? IS NULL OR SES1.ses_MAC = ?)
|
AND (? IS NULL OR SES1.sesMac = ?)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
cur.execute(
|
cur.execute(
|
||||||
@@ -173,31 +173,31 @@ def get_sessions_calendar(start_date, end_date, mac):
|
|||||||
|
|
||||||
# Color logic (unchanged from PHP)
|
# Color logic (unchanged from PHP)
|
||||||
if (
|
if (
|
||||||
row["ses_EventTypeConnection"] == "<missing event>" or row["ses_EventTypeDisconnection"] == "<missing event>"
|
row["sesEventTypeConnection"] == "<missing event>" or row["sesEventTypeDisconnection"] == "<missing event>"
|
||||||
):
|
):
|
||||||
color = "#f39c12"
|
color = "#f39c12"
|
||||||
elif row["ses_StillConnected"] == 1:
|
elif row["sesStillConnected"] == 1:
|
||||||
color = "#00a659"
|
color = "#00a659"
|
||||||
else:
|
else:
|
||||||
color = "#0073b7"
|
color = "#0073b7"
|
||||||
|
|
||||||
# --- IMPORTANT FIX ---
|
# --- IMPORTANT FIX ---
|
||||||
# FullCalendar v3 CANNOT handle end = null
|
# FullCalendar v3 CANNOT handle end = null
|
||||||
end_dt = row["ses_DateTimeDisconnectionCorrected"]
|
end_dt = row["sesDateTimeDisconnectionCorrected"]
|
||||||
if not end_dt and row["ses_StillConnected"] == 1:
|
if not end_dt and row["sesStillConnected"] == 1:
|
||||||
end_dt = now_iso
|
end_dt = now_iso
|
||||||
|
|
||||||
tooltip = (
|
tooltip = (
|
||||||
f"Connection: {format_event_date(row['ses_DateTimeConnection'], row['ses_EventTypeConnection'])}\n"
|
f"Connection: {format_event_date(row['sesDateTimeConnection'], row['sesEventTypeConnection'])}\n"
|
||||||
f"Disconnection: {format_event_date(row['ses_DateTimeDisconnection'], row['ses_EventTypeDisconnection'])}\n"
|
f"Disconnection: {format_event_date(row['sesDateTimeDisconnection'], row['sesEventTypeDisconnection'])}\n"
|
||||||
f"IP: {row['ses_IP']}"
|
f"IP: {row['sesIp']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
events.append(
|
events.append(
|
||||||
{
|
{
|
||||||
"resourceId": row["ses_MAC"],
|
"resourceId": row["sesMac"],
|
||||||
"title": "",
|
"title": "",
|
||||||
"start": format_date_iso(row["ses_DateTimeConnectionCorrected"]),
|
"start": format_date_iso(row["sesDateTimeConnectionCorrected"]),
|
||||||
"end": format_date_iso(end_dt),
|
"end": format_date_iso(end_dt),
|
||||||
"color": color,
|
"color": color,
|
||||||
"tooltip": tooltip,
|
"tooltip": tooltip,
|
||||||
@@ -219,20 +219,20 @@ def get_device_sessions(mac, period):
|
|||||||
|
|
||||||
sql = f"""
|
sql = f"""
|
||||||
SELECT
|
SELECT
|
||||||
IFNULL(ses_DateTimeConnection, ses_DateTimeDisconnection) AS ses_DateTimeOrder,
|
IFNULL(sesDateTimeConnection, sesDateTimeDisconnection) AS sesDateTimeOrder,
|
||||||
ses_EventTypeConnection,
|
sesEventTypeConnection,
|
||||||
ses_DateTimeConnection,
|
sesDateTimeConnection,
|
||||||
ses_EventTypeDisconnection,
|
sesEventTypeDisconnection,
|
||||||
ses_DateTimeDisconnection,
|
sesDateTimeDisconnection,
|
||||||
ses_StillConnected,
|
sesStillConnected,
|
||||||
ses_IP,
|
sesIp,
|
||||||
ses_AdditionalInfo
|
sesAdditionalInfo
|
||||||
FROM Sessions
|
FROM Sessions
|
||||||
WHERE ses_MAC = ?
|
WHERE sesMac = ?
|
||||||
AND (
|
AND (
|
||||||
ses_DateTimeConnection >= {period_date}
|
sesDateTimeConnection >= {period_date}
|
||||||
OR ses_DateTimeDisconnection >= {period_date}
|
OR sesDateTimeDisconnection >= {period_date}
|
||||||
OR ses_StillConnected = 1
|
OR sesStillConnected = 1
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -245,44 +245,44 @@ def get_device_sessions(mac, period):
|
|||||||
|
|
||||||
for row in rows:
|
for row in rows:
|
||||||
# Connection DateTime
|
# Connection DateTime
|
||||||
if row["ses_EventTypeConnection"] == "<missing event>":
|
if row["sesEventTypeConnection"] == "<missing event>":
|
||||||
ini = row["ses_EventTypeConnection"]
|
ini = row["sesEventTypeConnection"]
|
||||||
else:
|
else:
|
||||||
ini = format_date(row["ses_DateTimeConnection"])
|
ini = format_date(row["sesDateTimeConnection"])
|
||||||
|
|
||||||
# Disconnection DateTime
|
# Disconnection DateTime
|
||||||
if row["ses_StillConnected"]:
|
if row["sesStillConnected"]:
|
||||||
end = "..."
|
end = "..."
|
||||||
elif row["ses_EventTypeDisconnection"] == "<missing event>":
|
elif row["sesEventTypeDisconnection"] == "<missing event>":
|
||||||
end = row["ses_EventTypeDisconnection"]
|
end = row["sesEventTypeDisconnection"]
|
||||||
else:
|
else:
|
||||||
end = format_date(row["ses_DateTimeDisconnection"])
|
end = format_date(row["sesDateTimeDisconnection"])
|
||||||
|
|
||||||
# Duration
|
# Duration
|
||||||
if row["ses_EventTypeConnection"] in ("<missing event>", None) or row[
|
if row["sesEventTypeConnection"] in ("<missing event>", None) or row[
|
||||||
"ses_EventTypeDisconnection"
|
"sesEventTypeDisconnection"
|
||||||
] in ("<missing event>", None):
|
] in ("<missing event>", None):
|
||||||
dur = "..."
|
dur = "..."
|
||||||
elif row["ses_StillConnected"]:
|
elif row["sesStillConnected"]:
|
||||||
dur = format_date_diff(row["ses_DateTimeConnection"], None, tz_name)["text"]
|
dur = format_date_diff(row["sesDateTimeConnection"], None, tz_name)["text"]
|
||||||
else:
|
else:
|
||||||
dur = format_date_diff(row["ses_DateTimeConnection"], row["ses_DateTimeDisconnection"], tz_name)["text"]
|
dur = format_date_diff(row["sesDateTimeConnection"], row["sesDateTimeDisconnection"], tz_name)["text"]
|
||||||
|
|
||||||
# Additional Info
|
# Additional Info
|
||||||
info = row["ses_AdditionalInfo"]
|
info = row["sesAdditionalInfo"]
|
||||||
if row["ses_EventTypeConnection"] == "New Device":
|
if row["sesEventTypeConnection"] == "New Device":
|
||||||
info = f"{row['ses_EventTypeConnection']}: {info}"
|
info = f"{row['sesEventTypeConnection']}: {info}"
|
||||||
|
|
||||||
# Push row data
|
# Push row data
|
||||||
table_data["data"].append(
|
table_data["data"].append(
|
||||||
{
|
{
|
||||||
"ses_MAC": mac,
|
"sesMac": mac,
|
||||||
"ses_DateTimeOrder": row["ses_DateTimeOrder"],
|
"sesDateTimeOrder": row["sesDateTimeOrder"],
|
||||||
"ses_Connection": ini,
|
"sesConnection": ini,
|
||||||
"ses_Disconnection": end,
|
"sesDisconnection": end,
|
||||||
"ses_Duration": dur,
|
"sesDuration": dur,
|
||||||
"ses_IP": row["ses_IP"],
|
"sesIp": row["sesIp"],
|
||||||
"ses_Info": info,
|
"sesInfo": info,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -295,10 +295,16 @@ def get_device_sessions(mac, period):
|
|||||||
return jsonify({"success": True, "sessions": sessions})
|
return jsonify({"success": True, "sessions": sessions})
|
||||||
|
|
||||||
|
|
||||||
def get_session_events(event_type, period_date):
|
def get_session_events(event_type, period_date, page=1, limit=100, search=None, sort_col=0, sort_dir="desc"):
|
||||||
"""
|
"""
|
||||||
Fetch events or sessions based on type and period.
|
Fetch events or sessions based on type and period.
|
||||||
|
Supports server-side pagination (page/limit), free-text search, and sorting.
|
||||||
|
Returns { data, total, recordsFiltered } so callers can drive DataTables serverSide mode.
|
||||||
"""
|
"""
|
||||||
|
_MAX_LIMIT = 1000
|
||||||
|
limit = min(max(1, int(limit)), _MAX_LIMIT)
|
||||||
|
page = max(1, int(page))
|
||||||
|
|
||||||
conn = get_temp_db_connection()
|
conn = get_temp_db_connection()
|
||||||
conn.row_factory = sqlite3.Row
|
conn.row_factory = sqlite3.Row
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
@@ -307,42 +313,42 @@ def get_session_events(event_type, period_date):
|
|||||||
# Base SQLs
|
# Base SQLs
|
||||||
sql_events = f"""
|
sql_events = f"""
|
||||||
SELECT
|
SELECT
|
||||||
eve_DateTime AS eve_DateTimeOrder,
|
eveDateTime AS eveDateTimeOrder,
|
||||||
devName,
|
devName,
|
||||||
devOwner,
|
devOwner,
|
||||||
eve_DateTime,
|
eveDateTime,
|
||||||
eve_EventType,
|
eveEventType,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
eve_IP,
|
eveIp,
|
||||||
NULL,
|
NULL,
|
||||||
eve_AdditionalInfo,
|
eveAdditionalInfo,
|
||||||
NULL,
|
NULL,
|
||||||
devMac,
|
devMac,
|
||||||
eve_PendingAlertEmail
|
evePendingAlertEmail
|
||||||
FROM Events_Devices
|
FROM Events_Devices
|
||||||
WHERE eve_DateTime >= {period_date}
|
WHERE eveDateTime >= {period_date}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
sql_sessions = """
|
sql_sessions = """
|
||||||
SELECT
|
SELECT
|
||||||
IFNULL(ses_DateTimeConnection, ses_DateTimeDisconnection) AS ses_DateTimeOrder,
|
IFNULL(sesDateTimeConnection, sesDateTimeDisconnection) AS sesDateTimeOrder,
|
||||||
devName,
|
devName,
|
||||||
devOwner,
|
devOwner,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
ses_DateTimeConnection,
|
sesDateTimeConnection,
|
||||||
ses_DateTimeDisconnection,
|
sesDateTimeDisconnection,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
ses_IP,
|
sesIp,
|
||||||
NULL,
|
NULL,
|
||||||
ses_AdditionalInfo,
|
sesAdditionalInfo,
|
||||||
ses_StillConnected,
|
sesStillConnected,
|
||||||
devMac,
|
devMac,
|
||||||
0 AS ses_PendingAlertEmail
|
0 AS sesPendingAlertEmail
|
||||||
FROM Sessions_Devices
|
FROM Sessions_Devices
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -353,9 +359,9 @@ def get_session_events(event_type, period_date):
|
|||||||
sql = (
|
sql = (
|
||||||
sql_sessions + f"""
|
sql_sessions + f"""
|
||||||
WHERE (
|
WHERE (
|
||||||
ses_DateTimeConnection >= {period_date}
|
sesDateTimeConnection >= {period_date}
|
||||||
OR ses_DateTimeDisconnection >= {period_date}
|
OR sesDateTimeDisconnection >= {period_date}
|
||||||
OR ses_StillConnected = 1
|
OR sesStillConnected = 1
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
@@ -363,17 +369,17 @@ def get_session_events(event_type, period_date):
|
|||||||
sql = (
|
sql = (
|
||||||
sql_sessions + f"""
|
sql_sessions + f"""
|
||||||
WHERE (
|
WHERE (
|
||||||
(ses_DateTimeConnection IS NULL AND ses_DateTimeDisconnection >= {period_date})
|
(sesDateTimeConnection IS NULL AND sesDateTimeDisconnection >= {period_date})
|
||||||
OR (ses_DateTimeDisconnection IS NULL AND ses_StillConnected = 0 AND ses_DateTimeConnection >= {period_date})
|
OR (sesDateTimeDisconnection IS NULL AND sesStillConnected = 0 AND sesDateTimeConnection >= {period_date})
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
elif event_type == "voided":
|
elif event_type == "voided":
|
||||||
sql = sql_events + ' AND eve_EventType LIKE "VOIDED%"'
|
sql = sql_events + ' AND eveEventType LIKE "VOIDED%"'
|
||||||
elif event_type == "new":
|
elif event_type == "new":
|
||||||
sql = sql_events + ' AND eve_EventType = "New Device"'
|
sql = sql_events + ' AND eveEventType = "New Device"'
|
||||||
elif event_type == "down":
|
elif event_type == "down":
|
||||||
sql = sql_events + ' AND eve_EventType = "Device Down"'
|
sql = sql_events + ' AND eveEventType = "Device Down"'
|
||||||
else:
|
else:
|
||||||
sql = sql_events + " AND 1=0"
|
sql = sql_events + " AND 1=0"
|
||||||
|
|
||||||
@@ -420,4 +426,30 @@ def get_session_events(event_type, period_date):
|
|||||||
|
|
||||||
table_data["data"].append(row)
|
table_data["data"].append(row)
|
||||||
|
|
||||||
return jsonify(table_data)
|
all_rows = table_data["data"]
|
||||||
|
|
||||||
|
# --- Sorting ---
|
||||||
|
num_cols = len(all_rows[0]) if all_rows else 0
|
||||||
|
if 0 <= sort_col < num_cols:
|
||||||
|
reverse = sort_dir.lower() == "desc"
|
||||||
|
all_rows.sort(
|
||||||
|
key=lambda r: (r[sort_col] is None, r[sort_col] if r[sort_col] is not None else ""),
|
||||||
|
reverse=reverse,
|
||||||
|
)
|
||||||
|
|
||||||
|
total = len(all_rows)
|
||||||
|
|
||||||
|
# --- Free-text search (applied after formatting so display values are searchable) ---
|
||||||
|
if search:
|
||||||
|
search_lower = search.strip().lower()
|
||||||
|
|
||||||
|
def _row_matches(r):
|
||||||
|
return any(search_lower in str(v).lower() for v in r if v is not None)
|
||||||
|
all_rows = [r for r in all_rows if _row_matches(r)]
|
||||||
|
records_filtered = len(all_rows)
|
||||||
|
|
||||||
|
# --- Pagination ---
|
||||||
|
offset = (page - 1) * limit
|
||||||
|
paged_rows = all_rows[offset: offset + limit]
|
||||||
|
|
||||||
|
return jsonify({"data": paged_rows, "total": total, "recordsFiltered": records_filtered})
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user