Skip to content

Commit

Permalink
Added {NODE_CUSTOM} replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
MyIgel committed Jan 14, 2023
1 parent 6af43f5 commit b3a0073
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,31 @@
"nodeInfos": [
{
"name": "Clientstatistik",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_NAME}&from=now-7d&to=now",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_CUSTOM}&from=now-7d&to=now",
"image": "https://freifunk.fail/render/dashboard-solo/db/node-details-for-map?panelId=7&var-id={NODE_ID}&from=now-7d&to=now&width=600&height=300&theme=light&_t={TIME}",
"title": "Knoten {NODE_ID} ({NODE_NAME})"
},
{
"name": "Traffic",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_NAME}&from=now-7d&to=now",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_CUSTOM}&from=now-7d&to=now",
"image": "https://freifunk.fail/render/dashboard-solo/db/node-details-for-map?panelId=1&var-id={NODE_ID}&from=now-7d&to=now&width=600&height=300&theme=light&_t={TIME}",
"title": "Knoten {NODE_ID} ({NODE_NAME})"
},
{
"name": "Uptime",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_NAME}&from=now-7d&to=now",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_CUSTOM}&from=now-7d&to=now",
"image": "https://freifunk.fail/render/dashboard-solo/db/node-details-for-map?panelId=5&var-id={NODE_ID}&from=now-7d&to=now&width=600&height=300&theme=light&_t={TIME}",
"title": "Knoten {NODE_ID} ({NODE_NAME})"
},
{
"name": "CPU Auslastung",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_NAME}&from=now-7d&to=now",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_CUSTOM}&from=now-7d&to=now",
"image": "https://freifunk.fail/render/dashboard-solo/db/node-details-for-map?panelId=2&var-id={NODE_ID}&from=now-7d&to=now&width=600&height=300&theme=light&_t={TIME}",
"title": "Knoten {NODE_ID} ({NODE_NAME})"
},
{
"name": "Neighbours",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_NAME}&from=now-7d&to=now",
"href": "https://freifunk.fail/dashboard/db/nodes?var-name={NODE_CUSTOM}&from=now-7d&to=now",
"image": "https://freifunk.fail/render/dashboard-solo/db/node-details-for-map?panelId=4&var-id={NODE_ID}&from=now-7d&to=now&width=600&height=300&theme=light&_t={TIME}",
"title": "Knoten {NODE_ID} ({NODE_NAME})"
}
Expand All @@ -74,6 +74,7 @@
"title": "Bild der Wochenstatistik"
}
],
"node_custom": "/[^a-z0-9\\-\\.]/ig",
"deprecation_text": "Hier kann ein eigener Text für die Deprecation Warning (inkl. HTML) stehen!",
"deprecation_enabled": true
}
1 change: 1 addition & 0 deletions lib/infobox/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ define(['sorttable', 'snabbdom', 'd3-interpolate', 'helper', 'utils/node'],
var subst = {
'{NODE_ID}': d.node_id,
'{NODE_NAME}': d.hostname.replace(/[^a-z0-9\-]/ig, '_'),
'{NODE_CUSTOM}': d.hostname.replace(config.node_custom, '_'),
'{TIME}': d.lastseen.format('DDMMYYYYHmmss'),
'{LOCALE}': _.locale()
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meshviewer",
"version": "12.2.0",
"version": "12.2.1",
"license": "AGPL-3.0",
"repository": {
"type": "git",
Expand Down

0 comments on commit b3a0073

Please sign in to comment.