├── public ├── favicon.ico ├── fonts │ ├── ionicons.eot │ ├── ionicons.ttf │ ├── ionicons.woff │ ├── ionicons.woff2 │ ├── lato-v14-latin-regular.eot │ ├── lato-v14-latin-regular.ttf │ ├── lato-v14-latin-regular.woff │ └── lato-v14-latin-regular.woff2 ├── media │ ├── bell_long.mp3 │ ├── bell_short.mp3 │ ├── bell_message.mp3 │ ├── marker-shadow.png │ └── marker-icon-2x-red.png ├── js │ ├── datatables_german.json │ ├── dataTables.bootstrap4.min.js │ ├── client_rmld.js │ └── textFit.min.js └── css │ ├── cookieconsent.min.css │ ├── waip.css │ ├── datatables.min.css │ └── leaflet.css ├── .foreverignore ├── views ├── includes │ ├── footer.pug │ ├── master_clock.pug │ ├── modal_info.pug │ ├── header.pug │ ├── modal_rmld.pug │ ├── master_rueckmeldung.pug │ ├── master_wachalarm.pug │ └── master_dashboard.pug ├── tests │ ├── test_clock.pug │ ├── test_dashboard.pug │ ├── test_rueckmeldung.pug │ └── test_wachalarm.pug ├── error.pug ├── dbrd.pug ├── rmld.pug ├── waip.pug ├── about.pug ├── admin │ ├── adm_show_missions.pug │ ├── adm_show_log.pug │ ├── adm_run_alert.pug │ ├── adm_show_clients.pug │ └── adm_edit_users.pug ├── user │ └── user_config.pug ├── layout.pug ├── login.pug ├── overviews │ ├── overview_dbrd.pug │ └── overview_waip.pug ├── imprint.pug ├── home.pug └── privacy.pug ├── server ├── udp.js ├── app_cfg.js ├── socket.js ├── api.js ├── broker.js ├── auth.js ├── saver.js └── routing.js ├── package.json ├── misc ├── server.cert └── server.key ├── .gitignore ├── server.js ├── README.md └── LICENSE.md /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/fonts/ionicons.eot -------------------------------------------------------------------------------- /public/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/fonts/ionicons.ttf -------------------------------------------------------------------------------- /public/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/fonts/ionicons.woff -------------------------------------------------------------------------------- /public/fonts/ionicons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/fonts/ionicons.woff2 -------------------------------------------------------------------------------- /public/media/bell_long.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/media/bell_long.mp3 -------------------------------------------------------------------------------- /public/media/bell_short.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/media/bell_short.mp3 -------------------------------------------------------------------------------- /public/media/bell_message.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/media/bell_message.mp3 -------------------------------------------------------------------------------- /public/media/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/media/marker-shadow.png -------------------------------------------------------------------------------- /public/media/marker-icon-2x-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/media/marker-icon-2x-red.png -------------------------------------------------------------------------------- /public/fonts/lato-v14-latin-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/fonts/lato-v14-latin-regular.eot -------------------------------------------------------------------------------- /public/fonts/lato-v14-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/fonts/lato-v14-latin-regular.ttf -------------------------------------------------------------------------------- /public/fonts/lato-v14-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/fonts/lato-v14-latin-regular.woff -------------------------------------------------------------------------------- /public/fonts/lato-v14-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-112/Wachalarm-IP-Web/HEAD/public/fonts/lato-v14-latin-regular.woff2 -------------------------------------------------------------------------------- /.foreverignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | public/* 3 | views/* 4 | misc/* 5 | *.html 6 | *.jpeg 7 | *.png 8 | *.mp3 9 | *.wav 10 | *.md 11 | *.sqlite3 12 | *-journal 13 | sessions -------------------------------------------------------------------------------- /views/includes/footer.pug: -------------------------------------------------------------------------------- 1 | footer.footer 2 | .container-fluid 3 | .d-flex.justify-content-between 4 | .span.text-muted.text-left © #{public.company} - #{new Date().getFullYear()} 5 | .span.text-muted.text-right= public.version 6 | -------------------------------------------------------------------------------- /views/tests/test_clock.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/waip.css') 5 | 6 | block content 7 | .container-fluid 8 | include includes/clock 9 | 10 | script(src='/js/textFit.min.js') 11 | script(src='/js/waip_client.js') 12 | 13 | -------------------------------------------------------------------------------- /views/tests/test_dashboard.pug: -------------------------------------------------------------------------------- 1 | extends /layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/leaflet.css') 5 | 6 | block content 7 | //include includes/modal_response 8 | .container-fluid 9 | include /includes/master_dashboard 10 | script(src='/js/leaflet.js') 11 | script(src='/js/client_dbrd.js') 12 | 13 | -------------------------------------------------------------------------------- /views/tests/test_rueckmeldung.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/leaflet.css') 5 | 6 | block content 7 | include includes/modal_rmld 8 | .container-fluid 9 | include includes/master_rueckmeldung 10 | script(src='/js/leaflet.js') 11 | script(src='/js/rueckmeldung_client.js') 12 | 13 | -------------------------------------------------------------------------------- /views/error.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | main(role='main') 5 | .container 6 | .row 7 | .col 8 | .jumbotron.text-center 9 | h1.display-1.font-weight-bold= error.status 10 | p.text-muted Es ist ein Fehler aufgetreten 11 | hr.my-4 12 | .lead 13 | h4.text-danger= message 14 | .display-4.text-muted.ion-ios-bug 15 | -------------------------------------------------------------------------------- /views/tests/test_wachalarm.pug: -------------------------------------------------------------------------------- 1 | extends ../layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/ionicons.min.css') 5 | link(rel='stylesheet', href='/css/leaflet.css') 6 | link(rel='stylesheet', href='/css/waip.css') 7 | 8 | block content 9 | .container-fluid 10 | include ../includes/master_wachalarm 11 | script(src='/js/leaflet.js') 12 | script(src='/js/textFit.min.js') 13 | script(src='/js/client_waip.js') 14 | 15 | -------------------------------------------------------------------------------- /views/includes/master_clock.pug: -------------------------------------------------------------------------------- 1 | #waipclock.fullheight 2 | .h-95 3 | .h-75.w-75.clock_y 4 | .h-100.clock_x 5 | #time.h-70.d-flex.align-items-end.text-muted.font-weight-bold.tf_clock -Uhrzeit- 6 | #day.h-30.d-flex.align-items-start.text-muted.tf_clock -Datum- 7 | .h-5 8 | .h-100.w-25.client_wache.text-center.text-secondary.tf_clock 9 | #wachenname.h-100.ion-md-business=data_wache || ' -Wachenname-' 10 | 11 | -------------------------------------------------------------------------------- /views/dbrd.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/leaflet.css') 5 | 6 | block content 7 | include includes/modal_info 8 | .container-fluid 9 | include includes/master_dashboard 10 | script(src='/socket.io/socket.io.js') 11 | script(src='/js/leaflet.js') 12 | script. 13 | dbrd_uuid='#{dbrd_uuid}' 14 | map_tile='#{map_tile}' 15 | map_attribution='!{map_attribution}' 16 | client_id="#{app_id}" 17 | script(src='/js/client_dbrd.js') -------------------------------------------------------------------------------- /views/rmld.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/leaflet.css') 5 | 6 | block content 7 | include includes/modal_info 8 | include includes/modal_rmld 9 | .container-fluid 10 | include includes/master_rueckmeldung 11 | script. 12 | map_tile='#{map_tile}' 13 | map_attribution='!{map_attribution}' 14 | var einsatzdaten_obj = !{JSON.stringify(einsatzdaten).replace(/<\//g, '<\\/')} 15 | script(src='/js/leaflet.js') 16 | script(src='/js/client_rmld.js') -------------------------------------------------------------------------------- /views/includes/modal_info.pug: -------------------------------------------------------------------------------- 1 | // Modal 2 | #waipModal.modal.fade(tabindex='-1', role='dialog', aria-hidden='true') 3 | .modal-dialog.modal-dialog-centered(role='document') 4 | .modal-content 5 | .modal-header 6 | h5#waipModalTitle.modal-title Modal Titel 7 | button.close(type='button', data-dismiss='modal', aria-label='Close') 8 | span(aria-hidden='true') × 9 | #waipModalBody.modal-body 10 | | ... 11 | .modal-footer 12 | button.btn.btn-secondary(type='button', data-dismiss='modal') Schließen 13 | -------------------------------------------------------------------------------- /views/waip.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/leaflet.css') 5 | 6 | block content 7 | include includes/modal_info 8 | //include includes/modal_rmld 9 | .container-fluid 10 | #waipclock.d-none 11 | include includes/master_clock 12 | #waiptableau.d-none 13 | include includes/master_wachalarm 14 | 15 | script. 16 | map_tile='#{map_tile}' 17 | map_attribution='!{map_attribution}' 18 | client_id="#{app_id}" 19 | script(src='/js/leaflet.js') 20 | script(src='/js/textFit.min.js') 21 | script(src='/socket.io/socket.io.js') 22 | script. 23 | wachen_id="#{wachen_id}" 24 | waip_id=null 25 | script(src='/js/client_waip.js') 26 | -------------------------------------------------------------------------------- /views/about.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | main(role='main') 5 | .container 6 | .row 7 | .col 8 | .jumbotron.text-center 9 | h1.display-1.text-danger.font-weight-bold.d-none.d-lg-block= public.app_name 10 | h1.text-danger.font-weight-bold.d-lg-none= public.app_name 11 | hr.my-4 12 | .lead 13 | h4.text-info Entwickelt von Robert Richter 14 | p Alle Rechte vorbehalten 15 | br 16 | p.text-muted 17 | | mehr Informationen unter 18 | a(href="https://github.com/Robert-112/Wachalarm-IP-Web") https://github.com/Robert-112/Wachalarm-IP-Web 19 | .display-4.text-muted.ion-logo-github -------------------------------------------------------------------------------- /public/js/datatables_german.json: -------------------------------------------------------------------------------- 1 | 2 | 3 | { 4 | "sEmptyTable": "Keine Daten in der Tabelle vorhanden", 5 | "sInfo": "_START_ bis _END_ von _TOTAL_ Einträgen", 6 | "sInfoEmpty": "0 bis 0 von 0 Einträgen", 7 | "sInfoFiltered": "(gefiltert von _MAX_ Einträgen)", 8 | "sInfoPostFix": "", 9 | "sInfoThousands": ".", 10 | "sLengthMenu": "_MENU_ Einträge anzeigen", 11 | "sLoadingRecords": "Wird geladen...", 12 | "sProcessing": "Bitte warten...", 13 | "sSearch": "Suchen", 14 | "sZeroRecords": "Keine Einträge vorhanden.", 15 | "oPaginate": { 16 | "sFirst": "Erste", 17 | "sPrevious": "Zurück", 18 | "sNext": "Nächste", 19 | "sLast": "Letzte" 20 | }, 21 | "oAria": { 22 | "sSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren", 23 | "sSortDescending": ": aktivieren, um Spalte absteigend zu sortieren" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /server/udp.js: -------------------------------------------------------------------------------- 1 | module.exports = function (app_cfg, sql, saver) { 2 | 3 | // Module laden 4 | var dgram = require('dgram'); 5 | var udp_server = dgram.createSocket('udp4'); 6 | 7 | // UDP-Server für Schnittstelle starten 8 | udp_server.bind(app_cfg.global.udpport); 9 | udp_server.on('listening', function () { 10 | var address = udp_server.address(); 11 | sql.db_log('Anwendung', 'UDP Server auf ' + address.address + ':' + address.port + ' gestartet.'); 12 | }); 13 | 14 | // Warten auf Einsatzdaten 15 | udp_server.on('message', function (message, remote) { 16 | saver.save_new_waip(message.toString('utf8'), remote.address + ':' + remote.port, 'udp') 17 | }); 18 | 19 | // UDP-Daten senden 20 | function send_message(message) { 21 | udp_server.send(message, 0, message.length, app_cfg.global.udpport, 'localhost', function (err, bytes) { 22 | if (err) throw err; 23 | sql.db_log('WAIP', 'UDP-Testalarm an localhost:' + app_cfg.global.udpport + ' gesendet.'); 24 | }); 25 | }; 26 | 27 | return { 28 | send_message: send_message 29 | }; 30 | }; -------------------------------------------------------------------------------- /views/admin/adm_show_missions.pug: -------------------------------------------------------------------------------- 1 | extends ../layout 2 | 3 | block content 4 | main(role='main') 5 | .container 6 | .row 7 | .col-12 8 | h3 Einsätze sortiert nach Art und Ort 9 | .col-12 10 | ol 11 | each val in dataSet 12 | li= val.einsatzart + ', ' + val.stichwort + ', ' + val.ort + ' ' + val.ortsteil 13 | a(href="/rmld/" + val.uuid)= val.uuid 14 | ul 15 | if val.a 16 | each val_a in (val.a).split(",") 17 | li 18 | a(href="/waip/" + val_a)= val_a 19 | ul 20 | each val_b in (val.b).split(",") 21 | if val_b.includes(val_a) 22 | li 23 | a(href="/waip/" + val_b)= val_b 24 | ul 25 | each val_c in (val.c).split(",") 26 | if val_c.includes(val_b) 27 | li 28 | a(href="/waip/" + val_c)= val_c 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "waip-web", 3 | "version": "0.1.2", 4 | "description": "Web-Version des Wachalarm-IP", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/Robert-112/Wachalarm-IP-Web.git" 8 | }, 9 | "license": "Creative Commons Attribution Share Alike 4.0 International", 10 | "scripts": { 11 | "start": "node server.js" 12 | }, 13 | "dependencies": { 14 | "@turf/turf": "^5.1.6", 15 | "async": "^3.2.0", 16 | "bcrypt": "^5.0.0", 17 | "body-parser": "^1.19.0", 18 | "compression": "^1.7.4", 19 | "connect-sqlite3": "^0.9.11", 20 | "cookie-parser": "^1.4.5", 21 | "express": "^4.17.1", 22 | "express-session": "^1.17.1", 23 | "json2csv": "^5.0.1", 24 | "nodemailer": "^6.4.11", 25 | "npm": "^6.14.7", 26 | "passport": "^0.4.1", 27 | "passport-ip": "^0.1.2", 28 | "passport-local": "^1.0.0", 29 | "passport.socketio": "^3.7.0", 30 | "pug": "^3.0.0", 31 | "req-flash": "0.0.3", 32 | "serve-favicon": "^2.5.0", 33 | "socket.io": "^2.3.0", 34 | "socket.io-client": "^2.3.0", 35 | "sqlite3": "^5.0.0", 36 | "twit": "^2.2.11", 37 | "uuid": "^8.3.0" 38 | }, 39 | "devDependencies": {}, 40 | "engines": { 41 | "node": "6.1.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /views/user/user_config.pug: -------------------------------------------------------------------------------- 1 | extends ../layout 2 | 3 | block content 4 | main(role='main') 5 | .container 6 | .row 7 | .col-12.d-flex.align-self-stretch 8 | .card.border-dark.mb-3.w-100 9 | .card-header Einstellungen 10 | .card-body.text-dark 11 | .row 12 | .col-8 13 | p Anzeigezeit für Wachalarme 14 | p.text-muted (Wachalarme werden nach Ablauf der hier gesetzten Zeit automatisch ausgeblendet) 15 | .col-4 16 | form(action="/config", method="POST") 17 | .form-group 18 | label(for='ResetCounterSelect') Zeit in Minuten 19 | select#ResetCounterSelect.form-control(name='set_reset_counter', onchange='this.form.submit()') 20 | option= 'Standard' 21 | each _, i in Array(60) 22 | if(i+1 == reset_counter) 23 | option(selected)= i+1 24 | else 25 | option= i+1 26 | // TODO: anpassen der Durchsage je Benutzer, durch eigene Ersetzung und Reihenfolge 27 | // TODO: Ausnahmen festlegen können, wann keine Musik abgespielt wird 28 | -------------------------------------------------------------------------------- /views/admin/adm_show_log.pug: -------------------------------------------------------------------------------- 1 | extends ../layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/datatables.min.css') 5 | script(src='/js/datatables.min.js') 6 | script(src='/js/dataTables.bootstrap4.min.js') 7 | 8 | block content 9 | main(role='main') 10 | .container-fluid 11 | .row 12 | .col-12 13 | h3 Es werden die letzten 5.000 Einträge der Log-Datei angezeigt 14 | .col-12 15 | table#table_log.table-striped.table-bordered.table-hover.display.table-sm.table-responsive.w-100.table-dark 16 | thead 17 | tr 18 | th ID 19 | th Zeitstempel 20 | th Typ 21 | th Protokolltext 22 | 23 | script. 24 | var datasets = !{JSON.stringify(dataSet).replace(/<\//g, '<\\/')} 25 | $(document).ready(function() { 26 | $('#table_log').DataTable( { 27 | "data": datasets, 28 | "language": { 29 | "url": "/js/datatables_german.json" 30 | }, 31 | "order": [ 32 | [ 0, "desc" ] 33 | ], 34 | "iDisplayLength": 25, 35 | "columns": [ 36 | { "data": "id" }, 37 | { "data": "log_time" }, 38 | { "data": "log_typ" }, 39 | { "data": "log_text" } 40 | ] 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /misc/server.cert: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDijCCAnKgAwIBAgIJAPpdIiQTpeJBMA0GCSqGSIb3DQEBCwUAMFoxCzAJBgNV 3 | BAYTAkRFMRQwEgYDVQQIDAtCcmFuZGVuYnVyZzEhMB8GA1UECgwYSW50ZXJuZXQg 4 | V2lkZ2l0cyBQdHkgTHRkMRIwEAYDVQQDDAl3YWNoYWxhcm0wHhcNMTkwMzEwMDg0 5 | OTEyWhcNMTkwNDA5MDg0OTEyWjBaMQswCQYDVQQGEwJERTEUMBIGA1UECAwLQnJh 6 | bmRlbmJ1cmcxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDESMBAG 7 | A1UEAwwJd2FjaGFsYXJtMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA 8 | x5+he7Tc2EohQKIOcOf1tbXvXViXjZcQpbrYdAKJKmw/zzUibk5DONBoxXLwSN87 9 | 0LdYf6cLN0xYgioskx1msG9J33or6wpPvzkJUWlt9N459ee0wXEuaBR+kC6gWpmx 10 | EUcj0lqKyrJfFWYNbmp8KAUYQ4+n0Qy1GfG/cWFrDhSZJp7QxniaDljN2OEJjiie 11 | eBX6DWGB6IAJg6NMbN/GQjNXvkm6yUMe4x99LFhcToA9I8o/qXdOAyb7CMazwTTp 12 | UuTC7vuGdLSPBYVTmmVDl3r4uMtY/XVhwkSNiDP/X3SCKSKD8atPS663EcpIFSKP 13 | 3S1CK1O4hTkUm5m7q4P5kwIDAQABo1MwUTAdBgNVHQ4EFgQUstEYNGaYQsWixKyR 14 | 1NVAaLDqRYIwHwYDVR0jBBgwFoAUstEYNGaYQsWixKyR1NVAaLDqRYIwDwYDVR0T 15 | AQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEACuc9c8RRJ1cgc2dEFv6a6HZp 16 | X2eXt9XUosSTzXmQlfJYaIzvcSRJoIh3UNQVD79TYNa0NHpJlvyL2T9Lcm2r16+b 17 | E90RIc4gWMi5EhiVz9B+rT87HCTfpFLjhQDV8ujZQeENgrORiE124a48BQpOy6KM 18 | L/WXO+IFKn++FFCZWddr/AiVup19uGIf8THbuHsIq56gRS4JmdNoKcQmCVBAaOJe 19 | 5X71PJkvncx4seE5dMKFQquU4dCzrSP77RsSI3iYykaOVO0sKOXlfSBbzHz5sX0T 20 | 9dr1qzyuLgOLMAJAKdARG7I1meVo/RN1qu5SNQnULruC018wTZvRRWTxoEM97Q== 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /views/layout.pug: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | block head 5 | meta(charset='utf-8') 6 | meta(http-equiv='x-ua-compatible', content='ie=edge') 7 | meta(name='viewport', content='width=device-width, initial-scale=1') 8 | title= title 9 | link(rel='stylesheet', href='/css/bootstrap.css') 10 | link(rel='stylesheet', href='/css/waip.css') 11 | link(rel='stylesheet', href='/css/cookieconsent.min.css') 12 | link(rel='stylesheet', href='/css/ionicons.min.css') 13 | script(src='/js/jquery.min.js') 14 | script(src='/js/bootstrap.bundle.min.js') 15 | script(src='/js/cookieconsent.min.js') 16 | body 17 | include includes/header 18 | block content 19 | include includes/footer 20 | 21 | script. 22 | window.addEventListener("load", function(){ 23 | window.cookieconsent.initialise({ 24 | "palette": { 25 | "popup": { 26 | "background": "#3c404d", 27 | "text": "#d6d6d6" 28 | }, 29 | "button": { 30 | "background": "#8bed4f" 31 | } 32 | }, 33 | "content": { 34 | "message": "Wachalarm-IP-Web verwendet Cookies. \nBeim Aufruf des Alarmmonitors wird die aktuelle Verbindungs-ID (Socket-ID) gespeichert.\nBeim Login wird die Sitzung (Session-ID) gepseichert.", 35 | "dismiss": "Verstanden" 36 | }, 37 | "showLink": false 38 | }) 39 | }); 40 | -------------------------------------------------------------------------------- /views/admin/adm_run_alert.pug: -------------------------------------------------------------------------------- 1 | extends ../layout 2 | 3 | block content 4 | main(role='main') 5 | .container 6 | .row 7 | .col-12 8 | h3 Versendung von Test-Alarmen 9 | br 10 | h4.text-danger.font-weight-bold ACHTUNG: 11 | ul.text-warning.font-weight-normal 12 | li Prüfen Sie die Alarme vor dem versenden. 13 | li Fehler im Alarm-Text können diese Anwendung zum absturz bringen! 14 | br 15 | .col-12.d-flex.align-self-stretch 16 | .card.border-dark.mb-3.w-100 17 | .card-header Test-Alarm 18 | .card-body.text-dark 19 | form#test_alert1(action="/adm_run_alert", method="POST") 20 | .form-group 21 | label(for='text_test_alert1') Alarmtext 22 | textarea#text_test_alert1.form-control(rows='5' type='text', name='test_alert') {"einsatzdaten":{"nummer":"0815","alarmzeit":"01.01.19&01:00","art":"Sonstiges","stichwort":"S:Testeinsatz","sondersignal":1,"besonderheiten":"DEMO Wachalarm-IP-Web - Testeinsatz","patient":""},"ortsdaten":{"ort":"Elsterwerda","ortsteil":"Biehla","strasse":"Haidaer Str. 47A","objekt":"","objektnr":"-1","objektart":"","wachfolge":"611302","wgs84_x":"52.471244","wgs84_y":"13.502943"},"alarmdaten":[{"typ":"ALARM","netzadresse":"","wachenname":"EE FW Elsterwerda","einsatzmittel":"FL EE 02/14-01","zeit_a":"18:41","zeit_b":"","zeit_c":""}]} 23 | .card-footer.text-right 24 | button.btn.btn-danger.mx-2.ion-md-warning(type='submit', form="test_alert1", value='submit') ALARM SENDEN 25 | -------------------------------------------------------------------------------- /views/admin/adm_show_clients.pug: -------------------------------------------------------------------------------- 1 | extends ../layout 2 | 3 | append head 4 | link(rel='stylesheet', href='/css/datatables.min.css') 5 | script(src='/js/datatables.min.js') 6 | script(src='/js/dataTables.bootstrap4.min.js') 7 | 8 | // TODO: Seite mit aktiven Clients anpassen: 9 | //  - nicht zwingend als Tabelle, sondern eher als .col mit Buttons um Aktionen an Clients zu senden 10 | //  - einzelnen Client über Verwaltungsoberfläche neu laden lassen 11 | 12 | block content 13 | main(role='main') 14 | .container 15 | .row 16 | .col-12 17 | h3 Zeigt alle jetzt verbundenen Clients und deren Status an 18 | .col-12 19 | table#table_active_user.table-striped.table-bordered.table-hover.display.table-sm.table-responsive.w-100.table-dark 20 | thead 21 | tr 22 | th ID 23 | th Verbunden seit 24 | th Socket-ID 25 | th Client-IP 26 | th aufgerufener Wachalarm 27 | th Client-Status (Einsazt-ID) 28 | 29 | script. 30 | var datasets = !{JSON.stringify(dataSet).replace(/<\//g, '<\\/')} 31 | $(document).ready(function() { 32 | $('#table_active_user').DataTable( { 33 | "data": datasets, 34 | "language": 35 | { "url": "/js/datatables_german.json" }, 36 | "columns": [ 37 | { "data": "id" }, 38 | { "data": "connect_time" }, 39 | { "data": "socket_id" }, 40 | { "data": "client_ip" }, 41 | { "data": "room_name" }, 42 | { "data": "client_status" } 43 | ] 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /misc/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDHn6F7tNzYSiFA 3 | og5w5/W1te9dWJeNlxCluth0AokqbD/PNSJuTkM40GjFcvBI3zvQt1h/pws3TFiC 4 | KiyTHWawb0nfeivrCk+/OQlRaW303jn157TBcS5oFH6QLqBambERRyPSWorKsl8V 5 | Zg1uanwoBRhDj6fRDLUZ8b9xYWsOFJkmntDGeJoOWM3Y4QmOKJ54FfoNYYHogAmD 6 | o0xs38ZCM1e+SbrJQx7jH30sWFxOgD0jyj+pd04DJvsIxrPBNOlS5MLu+4Z0tI8F 7 | hVOaZUOXevi4y1j9dWHCRI2IM/9fdIIpIoPxq09LrrcRykgVIo/dLUIrU7iFORSb 8 | mburg/mTAgMBAAECggEADmLXrWWcYM3+1XyYU9SzpXPGG1EOIvsXDQqJHNst7Wu9 9 | sX4fzBlByO9kDY65+FZ2JhWAgDqWmVacLk1BxxxgUSjEByHz1k1478v5eu+BKBt3 10 | y9v179brRD7t3BAwKDdZRmh9EWTLCc6PAajIIQP1jKDJXd0VeABVcNg2NsKRh4Md 11 | w8G8jz0js6hwzKghMpCtgxYZmgH0RyZe4EI8VJfHioGroHTHUZfDcjxmfOKSa8Oj 12 | X/H5nQxksExVfSBTF45+ABjIpsyOMi+HINHWmwAwffGNjnSCTRecDzq/jB/VZbD9 13 | g4FycvdTg3iu5Ero6loHQdb5CYlotb5L24mqJKDQ0QKBgQD5tymUjobwd2G/II+o 14 | LVLxgWYbtTLlCjgzOYUQN/E6mE8F5KsVZhHDCCbmkNUUjcQmjkD6+kaf5KnhSGN+ 15 | TPLEIYb6zVBeJfFXBUCFI5u8XqoHDoMjGbHAEHBf5DKcoHKnlUIj910DjKTdb2YL 16 | pCCUaZKFVe7Im+ANGcmljI6kCwKBgQDMpb31UpLrS2YKRSQFP/6YN3r7xVEEHnnP 17 | iMVBoudGbl2eUsuXp24CeZOtdzGUfGG5fHm8askqv4Yp/MeUpAibGzWFz1LAvXWx 18 | EkQULXY+9lxvXHF42hEUScURWoo4OP8vz9Oxo5fueWCOE6+s2Azl8LEvLIc78yh8 19 | NvwP7QotmQKBgQDrbkCJiwa12BgT9kL6sCCvCOyX2vIs9sGdqfFGJTgNomN+juSt 20 | vBmq4xip8Iq0YiQ4pY2mEihbv15aw8Dp5upK98Em3EOVP/iVrqHx5GyD4Ew1cv04 21 | LpVjGxyXi7Ib8TmnvhUpi6HqIsOc8dYny4nb4tz9UNNb13oZX+K5bhddmQKBgBxV 22 | rnFzF2iArgYqAIzBiYyl0d9eOJNrbM4xT66A0ajMyyWKrSm4QuEQ2EOiRzkZ56X4 23 | +BoAZw4GKptRpoiMFaz0HXsDc5/AG7WCo+5vRPn+vlmk4QksmETI2gJHGPAj5CFI 24 | kzT7Q6P/JkFFtIMn/tEvfDjd33OLfUWFj2zdExWxAoGBANmGkkJLjpGzs8aBv+Gg 25 | 2e1C4gvsWDx8QeNfXzbP0I9lo3j0Zoa0HuTyCpVtHBEgspm2J6e3cgVpHSSRz4eV 26 | F4RWRKe4rUUp05CKim+XgrYdK7wgp5/y92GwpX0V1QDCQL5uGnGtEYo/Zr10xOQL 27 | VvEpchqI1h1n+3WcnMr9bDtg 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # parcel-bundler cache (https://parceljs.org/) 61 | .cache 62 | 63 | # next.js build output 64 | .next 65 | 66 | # nuxt.js build output 67 | .nuxt 68 | 69 | # vuepress build output 70 | .vuepress/dist 71 | 72 | # Serverless directories 73 | .serverless 74 | 75 | # FuseBox cache 76 | .fusebox/ 77 | 78 | # old Scripts 79 | _old/ 80 | 81 | # db 82 | *.sqlite3 83 | *.db 84 | sessions 85 | 86 | # ssl 87 | .crt 88 | .key 89 | .pem 90 | 91 | # media-files 92 | public/media/* 93 | !public/media/marker-icon-2x-red.png 94 | !public/media/marker-shadow.png 95 | !public/media/bell_long.mp3 96 | !public/media/bell_short.mp3 97 | !public/media/bell_message.mp3 98 | *.bak 99 | *.save 100 | 101 | # backup-files 102 | misc/* 103 | !misc/server.cert 104 | !misc/server.key -------------------------------------------------------------------------------- /public/js/dataTables.bootstrap4.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 4 integration 3 | ©2011-2017 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", 6 | renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault(); 7 | !b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l", 8 | {"class":t.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('