Lage-Auswahl im Header + dynamischer Monitor-Feed
Dropdown in der Top-Leiste zeigt alle oeffentlichen Lagen. [L] = Live-Monitoring, [R] = Recherche. Immer nur eine Lage aktiv. Bei Auswahl: - OSINT Monitor Layer zeigt nur Daten dieser Lage - Klick auf Katastrophen zeigt Summary dieser Lage - Sidebar zeigt Punkte dieser Lage Ohne Auswahl: kein Monitor-Overlay.
Dieser Commit ist enthalten in:
@@ -120,13 +120,34 @@ const MonitorLayer = {
|
||||
});
|
||||
},
|
||||
|
||||
_fetchForLage(lageId) {
|
||||
var self = this;
|
||||
var loadEl = document.getElementById('loading-monitor');
|
||||
var statusEl = document.getElementById('status-monitor');
|
||||
if (loadEl) loadEl.classList.add('active');
|
||||
if (statusEl) { statusEl.textContent = 'Lade Lage-Daten...'; statusEl.classList.add('active'); }
|
||||
fetch('/api/monitor-feed?incident_id=' + lageId)
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(data) {
|
||||
self._data = data.features || [];
|
||||
self._incidents = data.incidents || [];
|
||||
self._count = self._data.length;
|
||||
self._render();
|
||||
var title = self._incidents.length ? self._incidents[0].title : '';
|
||||
if (statusEl) statusEl.textContent = self._count + ' Orte' + (title ? ' (' + title + ')' : '');
|
||||
})
|
||||
.catch(function(e) { console.warn('Monitor error:', e); if (statusEl) statusEl.textContent = 'Fehler'; })
|
||||
.finally(function() { if (loadEl) loadEl.classList.remove('active'); setTimeout(function() { if (statusEl) statusEl.classList.remove('active'); }, 8000); });
|
||||
},
|
||||
|
||||
_fetch() {
|
||||
var self = this;
|
||||
var loadEl = document.getElementById('loading-monitor');
|
||||
var statusEl = document.getElementById('status-monitor');
|
||||
if (loadEl) loadEl.classList.add('active');
|
||||
if (statusEl) { statusEl.textContent = 'Lade Monitor-Daten...'; statusEl.classList.add('active'); }
|
||||
fetch('/api/monitor-feed')
|
||||
var lageId = (typeof Globe !== 'undefined' && Globe._currentLageId) ? Globe._currentLageId : '';
|
||||
fetch('/api/monitor-feed' + (lageId ? '?incident_id=' + lageId : ''))
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(data) {
|
||||
self._data = data.features || [];
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren