ansible-ffibk/roles/service-nginx-meshviewer/templates/config.js.j2

120 lines
5.2 KiB
Text
Raw Normal View History

2018-09-11 14:30:00 +02:00
module.exports = function () {
return {
// Variables are NODE_ID and NODE_NAME (only a-z0-9\- other chars are replaced with _)
'nodeInfos': [
{
'name': 'Clients',
'href': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/dashboard/db/freifunk-mwu-knoten?var-NODE_ID={NODE_ID}&from=now-1d',
2018-09-11 14:30:00 +02:00
'image': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/render/dashboard-solo/db/freifunk-mwu-knoten?panelId=1&var-NODE_ID={NODE_ID}&from=now-1d&theme=light&width=650&height=350',
'title': 'Knoten {NODE_ID} - weitere Statistiken'
},
{
'name': 'Traffic',
'href': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/dashboard/db/freifunk-mwu-knoten?var-NODE_ID={NODE_ID}&from=now-1d',
2018-09-11 14:30:00 +02:00
'image': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/render/dashboard-solo/db/freifunk-mwu-knoten?panelId=2&var-NODE_ID={NODE_ID}&from=now-1d&theme=light&width=650&height=350',
'title': 'Knoten {NODE_ID} - weitere Statistiken'
},
{
'name': 'Load',
'href': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/dashboard/db/freifunk-mwu-knoten?var-NODE_ID={NODE_ID}&from=now-1d',
2018-09-11 14:30:00 +02:00
'image': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/render/dashboard-solo/db/freifunk-mwu-knoten?panelId=3&var-NODE_ID={NODE_ID}&from=now-1d&theme=light&width=650&height=350',
'title': 'Knoten {NODE_ID} - weitere Statistiken'
},
{
'name': 'Airtime',
'href': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/dashboard/db/freifunk-mwu-knoten?var-NODE_ID={NODE_ID}&from=now-1d',
2018-09-11 14:30:00 +02:00
'image': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/render/dashboard-solo/db/freifunk-mwu-knoten?panelId=8&var-NODE_ID={NODE_ID}&from=now-1d&theme=light&width=650&height=350',
'title': 'Knoten {NODE_ID} - weitere Statistiken'
}
],
'linkInfos': [
{
'name': 'Übertragungsqualität 24h',
'href': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/dashboard/db/freifunk-mwu-links?orgId=1&var-NODE1={SOURCE_ID}&var-NODE2={TARGET_ID}',
'image': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/render/d-solo/oQ2PVD2mk/freifunk-mwu-links?orgId=1&var-NODE1={SOURCE_ID}&var-NODE2={TARGET_ID}&panelId=2&from=now-1d&theme=light&width=650&height=350',
'title': 'Link {SOURCE_ID} <-> {TARGET_ID} - weitere Statistiken'
}
],
2018-09-11 14:30:00 +02:00
'globalInfos': [
{
'name': 'Statistik - letzter Monat',
'href': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/d/000000001/freifunk-mwu-global?panelId=1&orgId=1&from=now-30d&to=now&var-INTERVAL=1d&fullscreen',
'image': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/render/d-solo/000000001/freifunk-mwu-global?panelId=1&orgId=1&from=now-30d&to=now&var-INTERVAL=1d&theme=light&width=650&height=350',
2018-09-11 14:30:00 +02:00
'title': 'Statistik - letzter Monat'
},
{
'name': 'Statistik - 6 Monate',
'href': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/d/000000001/freifunk-mwu-global?panelId=1&orgId=1&from=now-6M&to=now&var-INTERVAL=7d&fullscreen',
'image': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/render/d-solo/000000001/freifunk-mwu-global?panelId=1&orgId=1&from=now-6M&to=now&var-INTERVAL=7d&theme=light&width=650&height=350',
2018-09-11 14:30:00 +02:00
'title': 'Statistik - 6 Monate'
},
{
'name': 'Statistik - 1 Jahr',
'href': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/d/000000001/freifunk-mwu-global?panelId=1&orgId=1&from=now-1y&to=now&var-INTERVAL=14d&fullscreen',
'image': 'https://{{ http_grafana_prefix }}.{{ http_domain_external }}/render/d-solo/000000001/freifunk-mwu-global?panelId=1&orgId=1&from=now-1y&to=now&var-INTERVAL=14d&theme=light&width=650&height=350',
2018-09-11 14:30:00 +02:00
'title': 'Statistik - 1 Jahr'
}
],
// String or array of data provider are supported
'dataPath': [
'/data/'
],
'siteName': 'Freifunk in Mainz, Wiesbaden und Umgebung',
'mapLayers': [
{% for layer in map_layers %}
{
'name': '{{ layer.name }}',
'url': '{{ layer.url }}',
'config': {
'maxZoom': {{ layer.max_zoom }},
'attribution': '{{ layer.attribution }}'
}
},
{% endfor %}
],
// Set a visible frame
'fixedCenter': [
// Northwest
[
50.165024,
8.528137
],
// Southeast
[
49.895961,
7.609406
]
],
'domainNames': [
2018-09-11 14:30:00 +02:00
{% for mesh in meshes %}
{
'domain': '{{ mesh.site_code }}',
2018-09-11 14:30:00 +02:00
'name': '{{ mesh.site_name }}'
},
{% if mesh.sites_virtual is defined %}
{% for site, name in mesh.sites_virtual.items() %}
{
'domain': '{{ site }}',
2018-09-11 14:30:00 +02:00
'name': '{{ name }}'
},
{% endfor %}
{% endif %}
{% endfor %}
],
'linkList': [
{
'title': 'Statistiken',
'href': 'https://stats.freifunk-mwu.de'
},
{
'title': 'Impressum',
'href': 'https://www.freifunk-mainz.de/#impressum'
},
{
'title': 'Datenschutz',
'href': 'https://www.freifunk-mainz.de/#datenschutz'
}
2018-09-11 14:30:00 +02:00
]
};
};