enabe true

This commit is contained in:
larssand
2026-06-23 20:11:06 +02:00
parent 5708f5a053
commit e39fa04bb4

View File

@@ -215,7 +215,7 @@ async function loadSettings() {
async function loadStreams() { async function loadStreams() {
const response = await fetch('/api/graylog/streams'); const response = await fetch('/api/graylog/streams');
const payload = await response.json(); const payload = await response.json();
const selected = new Set((payload.selected || []).map(item => item.id)); const selected = new Set((payload.selected || []).filter(item => item.enabled).map(item => item.id));
document.getElementById('streamPicker').innerHTML = (payload.streams || []).map(stream => `<label><input type="checkbox" class="graylog-stream" data-id="${esc(stream.id)}" data-title="${esc(stream.title)}" ${selected.has(stream.id) ? 'checked' : ''}> ${esc(stream.title)}</label><br>`).join('') || esc(payload.error || 'No streams found.'); document.getElementById('streamPicker').innerHTML = (payload.streams || []).map(stream => `<label><input type="checkbox" class="graylog-stream" data-id="${esc(stream.id)}" data-title="${esc(stream.title)}" ${selected.has(stream.id) ? 'checked' : ''}> ${esc(stream.title)}</label><br>`).join('') || esc(payload.error || 'No streams found.');
} }
document.getElementById('loadStreams').addEventListener('click', loadStreams); document.getElementById('loadStreams').addEventListener('click', loadStreams);