asd
This commit is contained in:
@@ -58,6 +58,10 @@
|
||||
const loadList = async () => {
|
||||
try {
|
||||
const res = await fetch('/debug?list=1', { cache: 'no-store' });
|
||||
if (!res.ok) {
|
||||
listEl.innerHTML = `<li class=\"muted\">Fehler: ${res.status}</li>`;
|
||||
return;
|
||||
}
|
||||
const files = await res.json();
|
||||
listEl.innerHTML = '';
|
||||
files.forEach((f) => {
|
||||
@@ -75,16 +79,24 @@
|
||||
if (files.includes('oidc_login.log')) {
|
||||
loadFile('oidc_login.log');
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
listEl.innerHTML = '<li class=\"muted\">Fehler beim Laden der Logs.</li>';
|
||||
}
|
||||
};
|
||||
|
||||
const loadFile = async (name) => {
|
||||
activeFile = name;
|
||||
try {
|
||||
const res = await fetch(`/debug?raw=1&file=${encodeURIComponent(name)}&tail=200`, { cache: 'no-store' });
|
||||
if (!res.ok) {
|
||||
contentEl.textContent = `Fehler: ${res.status}`;
|
||||
return;
|
||||
}
|
||||
const text = await res.text();
|
||||
contentEl.textContent = formatLog(text);
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
contentEl.textContent = 'Fehler beim Laden der Datei.';
|
||||
}
|
||||
};
|
||||
|
||||
const formatLog = (text) => {
|
||||
|
||||
Reference in New Issue
Block a user