MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / loadLogs

Function loadLogs

static/js/logs.js:113–130  ·  view source on GitHub ↗
(silent = false)

Source from the content-addressed store, hash-verified

111}
112
113async function loadLogs(silent = false) {
114 if (!silent) {
115 loading.show(el.refreshBtn, "加载中...");
116 }
117 try {
118 const query = buildLogParams();
119 const data = await api.get(`/logs?${query}`);
120 logsState.total = Number(data.total || 0);
121 renderLogs(data.logs || []);
122 setLogsSummary();
123 } catch (error) {
124 toast.error(`加载日志失败: ${error?.message || error}`);
125 } finally {
126 if (!silent) {
127 loading.hide(el.refreshBtn);
128 }
129 }
130}
131
132function applyCleanupDefaults(data) {
133 if (logsState.cleanupDefaultsHydrated) {

Callers 6

resetFiltersFunction · 0.85
cleanupLogsFunction · 0.85
clearAllLogsFunction · 0.85
restartAutoRefreshFunction · 0.85
bindEventsFunction · 0.85
logs.jsFile · 0.85

Calls 7

buildLogParamsFunction · 0.85
renderLogsFunction · 0.85
setLogsSummaryFunction · 0.85
errorMethod · 0.80
hideMethod · 0.80
showMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected