update Di 28. Apr 10:31:01 CEST 2020
This commit is contained in:
parent
e1db3e615f
commit
29ec56e113
@ -148,6 +148,22 @@ module.exports = function(app, sql, uuidv4, app_cfg, passport, auth, waip, udp)
|
||||
});
|
||||
});
|
||||
|
||||
/* ######################## */
|
||||
/* ###### Dashboard ####### */
|
||||
/* ######################## */
|
||||
|
||||
// Dasboard-Uebersicht
|
||||
app.get('/dbrd', function(req, res, next) {
|
||||
sql.db_get_active_waips(function(data) {
|
||||
res.render('overview', {
|
||||
public: app_cfg.public,
|
||||
title: 'Einsatzübersicht',
|
||||
user: req.user,
|
||||
dataSet: data
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/* ######################## */
|
||||
/* ##### Rueckmeldung ##### */
|
||||
/* ######################## */
|
||||
|
||||
@ -10,12 +10,7 @@ module.exports = function (io, sql, tw, async, app_cfg) {
|
||||
if (socket_rooms) {
|
||||
socket_rooms.forEach(function (rooms) {
|
||||
// fuer jede Wache(rooms.room) die verbundenen Sockets(Clients) ermitteln und den Einsatz verteilen
|
||||
//io.to(rooms.room).emit('io.response', rmld);
|
||||
var room_sockets = io.sockets.adapter.rooms[rooms.room];
|
||||
//console.log(row);
|
||||
//console.log(row.room);
|
||||
//console.log(room_sockets);
|
||||
//console.log(io.sockets.adapter);
|
||||
if (typeof room_sockets !== 'undefined') {
|
||||
//Object.keys(room_sockets.sockets).forEach(function (socketId) {
|
||||
Object.keys(room_sockets).forEach(function (socket) {
|
||||
|
||||
27
views/overview.pug
Executable file
27
views/overview.pug
Executable file
@ -0,0 +1,27 @@
|
||||
extends layout
|
||||
|
||||
block content
|
||||
main(role='main')
|
||||
.container
|
||||
.row
|
||||
each val in dataSet
|
||||
.col-12.d-flex.align-self-stretch
|
||||
.card.border-dark.mb-3.w-100
|
||||
.card-header
|
||||
case val.einsatzart
|
||||
when 'Brandeinsatz'
|
||||
h5.font-weight-bold.text-danger.ion-md-flame= ' ' + val.einsatzart + ' - ' + val.stichwort
|
||||
when 'Hilfeleistungseinsatz'
|
||||
h5.font-weight-bold.text-info.ion-md-construct= ' ' + val.einsatzart + ' - ' + val.stichwort
|
||||
when 'Rettungseinsatz'
|
||||
h5.font-weight-bold.text-warning.ion-md-midikit= ' ' + val.einsatzart + ' - ' + val.stichwort
|
||||
when 'Krankentransport'
|
||||
h5.font-weight-bold.text-success.ion-md-medical= ' ' + val.einsatzart + ' - ' + val.stichwort
|
||||
default
|
||||
h5.font-weight-bold.ion-md-information-circle= ' ' + val.einsatzart + ' - ' + val.stichwort
|
||||
.card-body.d-flex.justify-content-between
|
||||
if val.ortsteil
|
||||
p= val.ort + ', ' + val.ortsteil
|
||||
else
|
||||
p= val.ort
|
||||
p.btn.btn-primary.mx-2.ion-md-arrow-round-forward(href='/dbrd/' + val.uuid, role='button') Dashboard aufrufen
|
||||
Loading…
Reference in New Issue
Block a user