diff --git a/TODO.md b/TODO.md index 7f7129e..bd15137 100644 --- a/TODO.md +++ b/TODO.md @@ -8,6 +8,8 @@ - Buttons für Sounds werden fehlerhaft dargestellt - Uhrzeit in der Datenbank (und im Log) ist auf UTC, sollte aber lokale Zeit sein - Absturz bei unbekannter/falscher Wachennummer in Alarmmonitor-URL +- openstreetmap credit +- name, leitstelle, version immer mitgeben ## 2. Priorität (notwendige Anpassungen) diff --git a/public/js/rueckmeldung_client.js b/public/js/rueckmeldung_client.js new file mode 100755 index 0000000..5eaf12a --- /dev/null +++ b/public/js/rueckmeldung_client.js @@ -0,0 +1,30 @@ +/* ########################### */ +/* ######### LEAFLET ######### */ +/* ########################### */ + +// Karte definieren +var map = L.map('map', { + zoomControl: false + }).setView([51.733005, 14.338048], 13); + + // Layer der Karte + mapLink = L.tileLayer( + 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + //map_tile, { + maxZoom: 18 + }).addTo(map); + + // Icon der Karte zuordnen + var redIcon = new L.Icon({ + iconUrl: '/media/marker-icon-2x-red.png', + shadowUrl: '/media/marker-shadow.png', + iconSize: [25, 41], + iconAnchor: [12, 41], + popupAnchor: [1, -34], + shadowSize: [41, 41] + }); + + // Icon setzen + var marker = L.marker(new L.LatLng(0, 0), { + icon: redIcon + }).addTo(map); \ No newline at end of file diff --git a/server/app_cfg.js b/server/app_cfg.js index 3b83278..6d2f45a 100644 --- a/server/app_cfg.js +++ b/server/app_cfg.js @@ -4,7 +4,7 @@ app_cfg.global = { http_port: 3000, https_port: 3443, udpport: 60233, - remoteapi: "http://localhost:8078/api", + remoteapi: 'http://localhost:8078/api', database: './database.sqlite3', soundpath: '/public/media/', mediapath: '/media/', @@ -20,4 +20,9 @@ app_cfg.global = { map_tile: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' }; +app_cfg.dev = { + app_name: 'Wachalarm IP-Web', + version: '1.2' +}; + module.exports = app_cfg; diff --git a/server/routing.js b/server/routing.js index 5ba8d1a..08cbc66 100644 --- a/server/routing.js +++ b/server/routing.js @@ -95,6 +95,7 @@ module.exports = function(app, sql, app_cfg, passport, auth, udp) { app.get('/test_tableau', function(req, res) { res.render('test_wachalarm', { title: 'Test Wachalarm', + map_tile: app_cfg.global.map_tile, user: req.user }); }); @@ -103,6 +104,7 @@ module.exports = function(app, sql, app_cfg, passport, auth, udp) { app.get('/test_rueckmeldung', function(req, res) { res.render('test_rueckmeldung', { title: 'Test Einsatz-Rückmeldung', + map_tile: app_cfg.global.map_tile, user: req.user }); }); diff --git a/views/includes/rueckmeldung.pug b/views/includes/rueckmeldung.pug index c1f70c5..513c76e 100755 --- a/views/includes/rueckmeldung.pug +++ b/views/includes/rueckmeldung.pug @@ -1,36 +1,40 @@ .row.no-gutters .col-10 #einsatz_art.align-items-center.font-weight-bold.rounded.bg-light.p-3.mr-1 - #einsatz_stichwort.ion-md-apps -Stichwort- + #einsatz_stichwort.ion-md-apps -Stichwort- .col-2 .align-items-center.justify-content-center.rounded.bg-light.text-info.p-3 #sondersignal.ion-md-apps.text-center -.row - .col-12.col-5_ls.h-35.h-70_ls.pt-3_pt.ptr-3_ls - #map.h-100.rounded - .col-12.col-7_ls.h-40.h-70_ls - .row.no-gutters.h-100.pt-3 - .col-12.h-10.h-100.w-100 - #rueckmeldung.list-group.list-group-horizontal.text-center.h-100.w-100 - a.list-group-item.flex-fill.list-group-item-action.text-secondary.tf_singleline - .ion-md-paper-plane - .col-6.h-65.d-flex.align-items-end.justify-content-start.tf_multiline - #ortsdaten.flex-fill -Objekt- - br - | -Ort- - br - | -Ortsteil- - br - | -Straße Hsnr- - .col-6.h-65.d-flex.align-items-end.justify-content-end.tf_multiline - ul#em_alarmiert.list-group - li.list-group-item.d-flex.justify-content-between.align-items-center -Einsatzmittel 1- - li.list-group-item.d-flex.justify-content-between.align-items-center -Einsatzmittel 2- - li.list-group-item.d-flex.justify-content-between.align-items-center -Einsatzmittel n- - // TODO: Status mit anzeigen (als .badge.badge-pill) - .col-12.h-5.d-flex.align-items-end.justify-content-center.text-dark.tf_singleline - #em_weitere -weiteres Einsatzmittel 1-, -weiteres Einsatzmittel 2-, -weiteres Einsatzmittel n- - .col-12.h-20.d-flex.align-items-center.rounded.bg-light.font-weight-bold.text-info.tf_singleline + .col-12 + //.pt-3_pt.ptr-3_ls.h-50 + #map.rounded.my-1 + br + br + br + br + br + br + br + br + br + + .col-6.h-65.d-flex.align-items-end.justify-content-start.tf_multiline + #ortsdaten.flex-fill -Objekt- + br + | -Ort- + br + | -Ortsteil- + br + | -Straße Hsnr- + .col-6.h-65.d-flex.align-items-end.justify-content-end.tf_multiline + ul#em_alarmiert.list-group + li.list-group-item.d-flex.justify-content-between.align-items-center -Einsatzmittel 1- + li.list-group-item.d-flex.justify-content-between.align-items-center -Einsatzmittel 2- + li.list-group-item.d-flex.justify-content-between.align-items-center -Einsatzmittel n- + // TODO: Status mit anzeigen (als .badge.badge-pill) + .col-12.h-5.d-flex.align-items-end.justify-content-center.text-dark.tf_singleline + #em_weitere -weiteres Einsatzmittel 1-, -weiteres Einsatzmittel 2-, -weiteres Einsatzmittel n- + .col-12.h-20.d-flex.align-items-center.rounded.bg-light.font-weight-bold.text-info.tf_singleline #besonderheiten -Besonderheiten- .col-12.h-5.d-flex.align-items-end.justify-content-center.pt-3 .progress(style='height: 100%;').flex-fill diff --git a/views/test_rueckmeldung.pug b/views/test_rueckmeldung.pug index ef92c10..65dffcc 100755 --- a/views/test_rueckmeldung.pug +++ b/views/test_rueckmeldung.pug @@ -11,5 +11,5 @@ block content include includes/rueckmeldung script(src='/js/leaflet.js') // script(src='/js/textFit.min.js') - // script(src='/js/waip_client.js') + script(src='/js/rueckmeldung_client.js')