diff --git a/static/dev.html b/static/dev.html index 145da64..729dbc4 100644 --- a/static/dev.html +++ b/static/dev.html @@ -28,6 +28,7 @@ .l3-proto-label input[type=checkbox] { width: auto; } + .
@@ -87,13 +88,24 @@ - + @@ -120,7 +132,10 @@ maxAgeMs: 0 } }, - logfileContent: "", + logsTable: { + headers: [], + rows: [] + }, settingFetchComplete: false } @@ -173,7 +188,16 @@ this.submitStatus.logView = true fetch(`/dev/logs.csv`, {method: 'GET', credentials: 'same-origin' }) - .then(async (resp) => { this.logfileContent = await resp.text() }) + .then(async (resp) => { + let logfileContent = await resp.text() + const lines = logfileContent.split(/\r\n|\n/) + + // Первая строка содержит заголовки + this.logsTable.headers = lines.shift().split('\t') + + // Остальные строки содержат данные + this.logsTable.rows = lines.map(line => line.split('\t')) + }) .catch((reason) => { alert(`Ошибка при чтении логов: ${reason}`) }) .finally(() => { this.submitStatus.logView = false }) }, diff --git a/static/fields.css b/static/fields.css index e9cb9d5..c2beaf8 100644 --- a/static/fields.css +++ b/static/fields.css @@ -84,15 +84,14 @@ padding: 1em; } -.settings-set-container th { +.statistics-container th { text-align: left; font-weight: normal; - padding: 0.2em 1em 0.2em 0.2em; -} -.settings-set-container td { - min-width: 10em; - padding: 0.2em; } +th { padding: 0.2em 1em 0.2em 0.2em; } +.statistics-container td { min-width: 10em; } +td { padding: 0.2em; } + .tabs-item-flex-container h2 { margin-top: 0; }