mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-08-28 05:14:12 +00:00
Update JSON placeholders in feeds.html and mesh.html for improved readability
- Changed single quotes to HTML entities in JSON placeholders within the feeds.html file to ensure proper rendering. - Updated the assignment of PREFIX_HEX_CHARS in mesh.html to parse the value as an integer, enhancing type safety and clarity. These changes enhance the user interface and code maintainability in the web viewer templates.
This commit is contained in:
@@ -201,20 +201,20 @@
|
||||
</h2>
|
||||
<div id="apiConfigCollapse" class="accordion-collapse collapse" data-bs-parent="#advancedOptions">
|
||||
<div class="accordion-body">
|
||||
<textarea class="form-control font-monospace" id="apiConfig" name="api_config" rows="8" placeholder='{
|
||||
"method": "GET",
|
||||
"headers": {},
|
||||
"params": {
|
||||
"AccessCode": "YOUR_ACCESS_CODE"
|
||||
<textarea class="form-control font-monospace" id="apiConfig" name="api_config" rows="8" placeholder="{
|
||||
"method": "GET",
|
||||
"headers": {},
|
||||
"params": {
|
||||
"AccessCode": "YOUR_ACCESS_CODE"
|
||||
},
|
||||
"response_parser": {
|
||||
"items_path": "",
|
||||
"id_field": "AlertID",
|
||||
"title_field": "HeadlineDescription",
|
||||
"description_field": "ExtendedDescription",
|
||||
"timestamp_field": "LastUpdatedTime"
|
||||
"response_parser": {
|
||||
"items_path": "",
|
||||
"id_field": "AlertID",
|
||||
"title_field": "HeadlineDescription",
|
||||
"description_field": "ExtendedDescription",
|
||||
"timestamp_field": "LastUpdatedTime"
|
||||
}
|
||||
}'></textarea>
|
||||
}"></textarea>
|
||||
<small class="form-text text-muted mt-2 d-block">
|
||||
Configure API request and parsing. Use <code>params</code> for query parameters (e.g., AccessCode for WSDOT) or <code>headers</code> for HTTP headers.
|
||||
</small>
|
||||
@@ -230,21 +230,21 @@
|
||||
</h2>
|
||||
<div id="filterConfigCollapse" class="accordion-collapse collapse" data-bs-parent="#advancedOptions">
|
||||
<div class="accordion-body">
|
||||
<textarea class="form-control font-monospace" id="filterConfig" name="filter_config" rows="8" placeholder='{
|
||||
"conditions": [
|
||||
<textarea class="form-control font-monospace" id="filterConfig" name="filter_config" rows="8" placeholder="{
|
||||
"conditions": [
|
||||
{
|
||||
"field": "raw.Priority",
|
||||
"operator": "in",
|
||||
"values": ["highest", "high"]
|
||||
"field": "raw.Priority",
|
||||
"operator": "in",
|
||||
"values": ["highest", "high"]
|
||||
},
|
||||
{
|
||||
"field": "raw.EventStatus",
|
||||
"operator": "equals",
|
||||
"value": "open"
|
||||
"field": "raw.EventStatus",
|
||||
"operator": "equals",
|
||||
"value": "open"
|
||||
}
|
||||
],
|
||||
"logic": "AND"
|
||||
}'></textarea>
|
||||
"logic": "AND"
|
||||
}"></textarea>
|
||||
<small class="form-text text-muted mt-2 d-block">
|
||||
Only send items that match these conditions. Leave empty to send all items.<br>
|
||||
<strong>Operators:</strong> equals, not_equals, in, not_in, matches (regex), not_matches, contains, not_contains, within_days, within_weeks (see docs/FEEDS.md)<br>
|
||||
@@ -263,10 +263,10 @@
|
||||
</h2>
|
||||
<div id="sortConfigCollapse" class="accordion-collapse collapse" data-bs-parent="#advancedOptions">
|
||||
<div class="accordion-body">
|
||||
<textarea class="form-control font-monospace" id="sortConfig" name="sort_config" rows="4" placeholder='{
|
||||
"field": "raw.LastUpdatedTime",
|
||||
"order": "desc"
|
||||
}'></textarea>
|
||||
<textarea class="form-control font-monospace" id="sortConfig" name="sort_config" rows="4" placeholder="{
|
||||
"field": "raw.LastUpdatedTime",
|
||||
"order": "desc"
|
||||
}"></textarea>
|
||||
<small class="form-text text-muted mt-2 d-block">
|
||||
Sort items before processing. Leave empty to use default order (oldest first).<br>
|
||||
<strong>Field:</strong> Field path to sort by (e.g., raw.LastUpdatedTime, raw.Priority, published)<br>
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
let highlightedPath = null; // Currently highlighted path data
|
||||
let pathHighlightTimeout = null; // Debounce timer for path resolution
|
||||
|
||||
const PREFIX_HEX_CHARS = {{ prefix_hex_chars|default(2) }};
|
||||
const PREFIX_HEX_CHARS = parseInt('{{ prefix_hex_chars|default(2) }}', 10);
|
||||
// Graph prefix length from edges API (2, 4, or 6 hex chars); used for node prefix display and node fetch.
|
||||
let graphPrefixHexChars = PREFIX_HEX_CHARS;
|
||||
// Format prefix for display: add byte count when multi-byte (2 or 3 bytes)
|
||||
|
||||
Reference in New Issue
Block a user