update Fr 10. Jul 13:31:01 CEST 2020
This commit is contained in:
parent
f7fbf50096
commit
052567c28d
@ -150,6 +150,8 @@ module.exports = function (app, sql, uuidv4, app_cfg, passport, auth, udp, saver
|
|||||||
title: 'Alarmmonitor',
|
title: 'Alarmmonitor',
|
||||||
wachen_id: parmeter_id,
|
wachen_id: parmeter_id,
|
||||||
data_wache: wache.name,
|
data_wache: wache.name,
|
||||||
|
map_tile: app_cfg.public.map_tile,
|
||||||
|
map_attribution: app_cfg.public.map_attribution,
|
||||||
app_id: app_cfg.global.app_id,
|
app_id: app_cfg.global.app_id,
|
||||||
user: req.user
|
user: req.user
|
||||||
});
|
});
|
||||||
@ -183,6 +185,8 @@ module.exports = function (app, sql, uuidv4, app_cfg, passport, auth, udp, saver
|
|||||||
res.render('overviews/overview_dbrd', {
|
res.render('overviews/overview_dbrd', {
|
||||||
public: app_cfg.public,
|
public: app_cfg.public,
|
||||||
title: 'Dashboard',
|
title: 'Dashboard',
|
||||||
|
map_tile: app_cfg.public.map_tile,
|
||||||
|
map_attribution: app_cfg.public.map_attribution,
|
||||||
user: req.user,
|
user: req.user,
|
||||||
dataSet: data
|
dataSet: data
|
||||||
});
|
});
|
||||||
@ -199,6 +203,8 @@ module.exports = function (app, sql, uuidv4, app_cfg, passport, auth, udp, saver
|
|||||||
public: app_cfg.public,
|
public: app_cfg.public,
|
||||||
title: 'Dashboard',
|
title: 'Dashboard',
|
||||||
dbrd_uuid: dbrd_uuid,
|
dbrd_uuid: dbrd_uuid,
|
||||||
|
map_tile: app_cfg.public.map_tile,
|
||||||
|
map_attribution: app_cfg.public.map_attribution,
|
||||||
app_id: app_cfg.global.app_id,
|
app_id: app_cfg.global.app_id,
|
||||||
user: req.user
|
user: req.user
|
||||||
});
|
});
|
||||||
|
|||||||
@ -11,5 +11,7 @@ block content
|
|||||||
script(src='/js/leaflet.js')
|
script(src='/js/leaflet.js')
|
||||||
script.
|
script.
|
||||||
dbrd_uuid="#{dbrd_uuid}"
|
dbrd_uuid="#{dbrd_uuid}"
|
||||||
|
map_tile="#{map_tile}"
|
||||||
|
map_attribution="#{map_attribution}"
|
||||||
client_id="#{app_id}"
|
client_id="#{app_id}"
|
||||||
script(src='/js/client_dbrd.js')
|
script(src='/js/client_dbrd.js')
|
||||||
@ -10,7 +10,7 @@ block content
|
|||||||
.col-12.p-3
|
.col-12.p-3
|
||||||
.card.bg-dark
|
.card.bg-dark
|
||||||
.card-body.text-center.text-muted
|
.card-body.text-center.text-muted
|
||||||
h3 - wählen Sie ein Dashboard -
|
h3 - Dashboard- -
|
||||||
each val, index in dataSet
|
each val, index in dataSet
|
||||||
.col-12.col-xl-6.d-flex.align-self-stretch.p-3
|
.col-12.col-xl-6.d-flex.align-self-stretch.p-3
|
||||||
.card.w-100
|
.card.w-100
|
||||||
@ -37,9 +37,8 @@ block content
|
|||||||
|
|
||||||
script(src='/js/leaflet.js')
|
script(src='/js/leaflet.js')
|
||||||
script.
|
script.
|
||||||
// TODO: internen Kartendienst nutzen
|
var map_tile="#{map_tile}"
|
||||||
// TODO: Kartendienst-Credit anzeigen
|
var map_attribution="#{map_attribution}"
|
||||||
// var map_tile = !{JSON.stringify(public.map_tile).replace(/<\//g, '<\\/')}
|
|
||||||
var data = !{JSON.stringify(dataSet).replace(/<\//g, '<\\/')}
|
var data = !{JSON.stringify(dataSet).replace(/<\//g, '<\\/')}
|
||||||
for (var i in data) {
|
for (var i in data) {
|
||||||
// Karte definieren
|
// Karte definieren
|
||||||
@ -48,8 +47,9 @@ block content
|
|||||||
});
|
});
|
||||||
// Layer der Karte
|
// Layer der Karte
|
||||||
mapLink = L.tileLayer(
|
mapLink = L.tileLayer(
|
||||||
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
map_tile, {
|
||||||
maxZoom: 12
|
maxZoom: 12,
|
||||||
|
attribution: map_attribution
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
// Karte setzen
|
// Karte setzen
|
||||||
var geojson = L.geoJSON(JSON.parse(data[i].wgs84_area)).addTo(map);
|
var geojson = L.geoJSON(JSON.parse(data[i].wgs84_area)).addTo(map);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user