enabe true
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user