update Fr 10. Jul 14:31:01 CEST 2020

This commit is contained in:
Robert Richter 2020-07-10 14:31:01 +02:00
parent 3ba3812ee6
commit 5afd846af1
10 changed files with 29 additions and 116 deletions

View File

@ -23,9 +23,9 @@ var map = L.map('map', {
// Layer der Karte // Layer der Karte
mapLink = L.tileLayer( mapLink = L.tileLayer(
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { map_tile, {
//map_tile, { maxZoom: 18,
maxZoom: 18 attribution: map_attribution
}).addTo(map); }).addTo(map);
// Icon der Karte zuordnen // Icon der Karte zuordnen
@ -445,103 +445,6 @@ socket.on('io.Einsatz', function (data) {
// Einsatzmittel hinzuefuegen // Einsatzmittel hinzuefuegen
document.getElementById(wachen_idstr).appendChild(flex_div_em); document.getElementById(wachen_idstr).appendChild(flex_div_em);
//var newText2 = document.createTextNode(data.einsatzmittel[i].einsatzmittel);
//newCell2.appendChild(newText2);
//table_em.rows[wache_zeile].cells[1].appendChild(newText2);
//table_em.rows[wache_zeile].cells[1].setAttribute('pr-2');
/* if (wache_vorhanden) {
var flex_div = document.createElement('div');
flex_div.className = 'd-flex flex-wrap justify-content-between align-items-center';
var flex_under_div = document.createElement('div');
flex_under_div.className = 'flex-fill rounded bg-secondary p-2 m-1';
var justify_div = document.createElement('div');
justify_div.className = 'd-flex justify-content-between';
var em_div = document.createElement('div');
em_div.className = 'pr-2';
em_div.innerHTML = data.einsatzmittel[i].einsatzmittel;
var status_div = document.createElement('div');
status_div.className = 'p-2 badge badge-dark';
status_div.innerHTML = data.einsatzmittel[i].status;
flex_div.appendChild(flex_under_div);
flex_under_div.appendChild(justify_div);
justify_div.appendChild(em_div);
justify_div.appendChild(status_div);
table_em.rows[wache_zeile].cells[1].appendChild(flex_div);
//var newText2 = document.createTextNode(data.einsatzmittel[i].einsatzmittel);
//newCell2.appendChild(newText2);
//table_em.rows[wache_zeile].cells[1].appendChild(newText2);
//table_em.rows[wache_zeile].cells[1].setAttribute('pr-2');
} else {
var flex_div = document.createElement('div');
flex_div.className = 'd-flex flex-wrap justify-content-between align-items-center';
var flex_under_div = document.createElement('div');
flex_under_div.className = 'flex-fill rounded bg-secondary p-2 m-1';
var justify_div = document.createElement('div');
justify_div.className = 'd-flex justify-content-between';
var em_div = document.createElement('div');
em_div.className = 'pr-2';
em_div.innerHTML = data.einsatzmittel[i].einsatzmittel;
var status_div = document.createElement('div');
status_div.className = 'p-2 badge badge-dark';
status_div.innerHTML = data.einsatzmittel[i].status;
flex_div.appendChild(flex_under_div);
flex_under_div.appendChild(justify_div);
justify_div.appendChild(em_div);
justify_div.appendChild(status_div);
table_em.rows[wache_zeile].cells[1].appendChild(flex_div);
var newCell2 = newRow.insertCell(1);
var newText2 = document.createTextNode(data.einsatzmittel[i].einsatzmittel);
newCell2.appendChild(flex_div);
};/*
/*
th(scope='row') CB FW Cottbus 1
td
div
div.flex-fill.rounded.bg-secondary.p-2.m-1
div.d-flex.justify-content-between
div.pr-2 FL CB 01/42-01
div.p-2.badge.badge-success 2
div.flex-fill.rounded.bg-secondary.p-2.m-1
div.d-flex.justify-content-between
div.pr-2 FL CB 01/82-01
div.p-2.badge.badge-warning 3
*/
}; };
// Karte leeren // Karte leeren
map.removeLayer(marker); map.removeLayer(marker);
@ -570,10 +473,6 @@ th(scope='row') CB FW Cottbus 1
timeline.customTimes[timeline.customTimes.length - 1].hammer.off("panstart panmove panend"); timeline.customTimes[timeline.customTimes.length - 1].hammer.off("panstart panmove panend");
timeline.setCustomTimeMarker(markerText, alarm_zeit, false); timeline.setCustomTimeMarker(markerText, alarm_zeit, false);
// Configuration for the Timeline
//var options2 = {};
// Create a Timeline
//var timeline2 = new vis.Timeline(container2, items2, options2);
// TODO Ablaufzeit setzen // TODO Ablaufzeit setzen
}); });

View File

@ -10,9 +10,9 @@ var map = L.map('map', {
// Layer der Karte // Layer der Karte
// TODO: internen Kartendienst setzten // TODO: internen Kartendienst setzten
mapLink = L.tileLayer( mapLink = L.tileLayer(
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { map_tile, {
//map_tile, { maxZoom: 18,
maxZoom: 18 attribution: map_attribution
}).addTo(map); }).addTo(map);
// Icon der Karte zuordnen // Icon der Karte zuordnen

View File

@ -236,7 +236,8 @@ var map = L.map('map', {
// Layer der Karte // Layer der Karte
mapLink = L.tileLayer( mapLink = L.tileLayer(
map_tile, { map_tile, {
maxZoom: 18 maxZoom: 18,
attribution: map_attribution
}).addTo(map); }).addTo(map);
// Icon der Karte zuordnen // Icon der Karte zuordnen

View File

@ -20,6 +20,7 @@ const { v4: uuidv4 } = require('uuid');
// Basis-Konfiguration laden und generische App-UUID erzeugen // Basis-Konfiguration laden und generische App-UUID erzeugen
var app_cfg = require('./server/app_cfg.js'); var app_cfg = require('./server/app_cfg.js');
app_cfg.global.app_id = uuidv4(); app_cfg.global.app_id = uuidv4();
app_cfg.public.version = 'Version 1.2.1';
// Remote-Api aktivieren // Remote-Api aktivieren
var remote_api; var remote_api;

View File

@ -25,7 +25,6 @@ app_cfg.public = {
url: 'https://wachalarm.mooo.com', url: 'https://wachalarm.mooo.com',
app_name: 'Wachalarm IP-Web', app_name: 'Wachalarm IP-Web',
company: 'Leitstelle Lausitz', company: 'Leitstelle Lausitz',
version: 'Version 1.2.1',
map_tile: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', map_tile: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
map_attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', map_attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
ext_imprint: false, ext_imprint: false,

View File

@ -252,6 +252,8 @@ module.exports = function (app, sql, uuidv4, app_cfg, passport, auth, udp, saver
title: 'Einsatz-Rückmeldung', title: 'Einsatz-Rückmeldung',
user: req.user, user: req.user,
einsatzdaten: einsatzdaten, einsatzdaten: einsatzdaten,
map_tile: app_cfg.public.map_tile,
map_attribution: app_cfg.public.map_attribution,
error: req.flash("errorMessage"), error: req.flash("errorMessage"),
success: req.flash("successMessage") success: req.flash("successMessage")
}); });

View File

@ -10,8 +10,8 @@ block content
script(src='/socket.io/socket.io.js') script(src='/socket.io/socket.io.js')
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_tile='#{map_tile}'
map_attribution="#{map_attribution}" map_attribution='!{map_attribution}'
client_id="#{app_id}" client_id="#{app_id}"
script(src='/js/client_dbrd.js') script(src='/js/client_dbrd.js')

View File

@ -11,6 +11,9 @@ block content
.card.bg-dark .card.bg-dark
.card-body.text-muted.text-center .card-body.text-muted.text-center
h3 Dashboard-Übersicht h3 Dashboard-Übersicht
.col-12
div.border-top.m-3
.row
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
@ -35,7 +38,12 @@ block content
.card-footer.text-right .card-footer.text-right
a.btn.btn-primary.mx-2.ion-md-arrow-round-forward(href='/dbrd/' + val.uuid, role='button') Dashboard aufrufen a.btn.btn-primary.mx-2.ion-md-arrow-round-forward(href='/dbrd/' + val.uuid, role='button') Dashboard aufrufen
else else
li There are no values .col-12.p-3
.card.bg-danger.w-100
.card-header
h5 Achtung
.card-body
div Aktuell sind keine Einsätze verfügbar. Bitte versuchen Sie es später erneut.
script(src='/js/leaflet.js') script(src='/js/leaflet.js')
script. script.

View File

@ -9,6 +9,8 @@ block content
.container-fluid .container-fluid
include includes/master_rueckmeldung include includes/master_rueckmeldung
script. script.
map_tile='#{map_tile}'
map_attribution='!{map_attribution}'
var einsatzdaten_obj = !{JSON.stringify(einsatzdaten).replace(/<\//g, '<\\/')} var einsatzdaten_obj = !{JSON.stringify(einsatzdaten).replace(/<\//g, '<\\/')}
script(src='/js/leaflet.js') script(src='/js/leaflet.js')
script(src='/js/client_rmld.js') script(src='/js/client_rmld.js')

View File

@ -13,8 +13,9 @@ block content
include includes/master_wachalarm include includes/master_wachalarm
script. script.
var map_tile = !{JSON.stringify(public.map_tile).replace(/<\//g, '<\\/')} map_tile='#{map_tile}'
var client_id = !{JSON.stringify(app_id).replace(/<\//g, '<\\/')} map_attribution='!{map_attribution}'
client_id="#{app_id}"
script(src='/js/leaflet.js') script(src='/js/leaflet.js')
script(src='/js/textFit.min.js') script(src='/js/textFit.min.js')
script(src='/socket.io/socket.io.js') script(src='/socket.io/socket.io.js')