event log: simplify styles, prevent horizontal scrolling

sql logger: clip context length to 8kb
This commit is contained in:
Andrew Dolgov 2019-05-31 10:31:43 +03:00
parent 4a2836ea90
commit d36b64d8a7
10 changed files with 52 additions and 33 deletions

View File

@ -12,8 +12,8 @@ class Logger_SQL {
$owner_uid = $_SESSION["uid"] ? $_SESSION["uid"] : null; $owner_uid = $_SESSION["uid"] ? $_SESSION["uid"] : null;
if (DB_TYPE == "mysql") // limit context length, DOMDocument dumps entire XML in here sometimes, which may be huge
$context = substr($context, 0, 65534); $context = mb_substr($context, 0, 8192);
// passed error message may contain invalid unicode characters, failing to insert an error here // passed error message may contain invalid unicode characters, failing to insert an error here
// would break the execution entirely by generating an actual fatal error instead of a E_WARNING etc // would break the execution entirely by generating an actual fatal error instead of a E_WARNING etc

View File

@ -54,7 +54,7 @@ class Pref_System extends Handler_Protected {
</tr>"; </tr>";
while ($line = $res->fetch()) { while ($line = $res->fetch()) {
print "<tr class=\"errrow\">"; print "<tr>";
foreach ($line as $k => $v) { foreach ($line as $k => $v) {
$line[$k] = htmlspecialchars($v); $line[$k] = htmlspecialchars($v);

View File

@ -1513,17 +1513,20 @@ body.ttrss_prefs fieldset.plugin label.description {
body.ttrss_prefs fieldset.plugin label.description .dijitCheckBox { body.ttrss_prefs fieldset.plugin label.description .dijitCheckBox {
margin-right: 10px; margin-right: 10px;
} }
body.ttrss_prefs table.prefErrorLog tr.errrow td { body.ttrss_prefs .prefErrorLog tr td {
font-size: 10px; font-size: 10px;
} }
body.ttrss_prefs table.prefErrorLog tr.errrow td.errno { body.ttrss_prefs .prefErrorLog tr .errno {
font-style: italic; font-style: italic;
font-weight: bold; font-weight: bold;
white-space: nowrap; white-space: nowrap;
} }
body.ttrss_prefs table.prefErrorLog td.filename, body.ttrss_prefs .prefErrorLog tr .errstr {
body.ttrss_prefs table.prefErrorLog td.login, word-break: break-all;
body.ttrss_prefs table.prefErrorLog td.timestamp { }
body.ttrss_prefs .prefErrorLog tr .filename,
body.ttrss_prefs .prefErrorLog tr .login,
body.ttrss_prefs .prefErrorLog tr .timestamp {
color: #555; color: #555;
} }
body.ttrss_prefs hr { body.ttrss_prefs hr {
@ -1762,7 +1765,7 @@ body.ttrss_utility.share_popup .content {
} }
.flat .dijitTree .dijitTreeRow { .flat .dijitTree .dijitTreeRow {
overflow: hidden; overflow: hidden;
-moz-user-select: none; /* TODO: temporary workaround for bug: https://discourse.tt-rss.org/t/is-it-possible-to-create-a-hierarchy-of-categories/876/13 */ -moz-user-select: none;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.flat label.dijitButton { .flat label.dijitButton {

File diff suppressed because one or more lines are too long

View File

@ -132,7 +132,7 @@
.dijitTreeRow { .dijitTreeRow {
overflow: hidden; overflow: hidden;
-moz-user-select: none; /* TODO: temporary workaround for bug: https://discourse.tt-rss.org/t/is-it-possible-to-create-a-hierarchy-of-categories/876/13 */ -moz-user-select: none;
text-overflow: ellipsis; text-overflow: ellipsis;
} }

View File

@ -105,18 +105,26 @@ body.ttrss_prefs {
} }
} }
table.prefErrorLog tr.errrow td { .prefErrorLog {
font-size : 10px; tr {
} td {
font-size: 10px;
}
table.prefErrorLog tr.errrow td.errno { .errno {
font-style : italic; font-style : italic;
font-weight : bold; font-weight : bold;
white-space : nowrap; white-space : nowrap;
} }
table.prefErrorLog td.filename, table.prefErrorLog td.login, table.prefErrorLog td.timestamp { .errstr {
color : @default-text; word-break: break-all;
}
.filename, .login, .timestamp {
color : @default-text;
}
}
} }
hr { hr {

View File

@ -1514,17 +1514,20 @@ body.ttrss_prefs fieldset.plugin label.description {
body.ttrss_prefs fieldset.plugin label.description .dijitCheckBox { body.ttrss_prefs fieldset.plugin label.description .dijitCheckBox {
margin-right: 10px; margin-right: 10px;
} }
body.ttrss_prefs table.prefErrorLog tr.errrow td { body.ttrss_prefs .prefErrorLog tr td {
font-size: 10px; font-size: 10px;
} }
body.ttrss_prefs table.prefErrorLog tr.errrow td.errno { body.ttrss_prefs .prefErrorLog tr .errno {
font-style: italic; font-style: italic;
font-weight: bold; font-weight: bold;
white-space: nowrap; white-space: nowrap;
} }
body.ttrss_prefs table.prefErrorLog td.filename, body.ttrss_prefs .prefErrorLog tr .errstr {
body.ttrss_prefs table.prefErrorLog td.login, word-break: break-all;
body.ttrss_prefs table.prefErrorLog td.timestamp { }
body.ttrss_prefs .prefErrorLog tr .filename,
body.ttrss_prefs .prefErrorLog tr .login,
body.ttrss_prefs .prefErrorLog tr .timestamp {
color: #ccc; color: #ccc;
} }
body.ttrss_prefs hr { body.ttrss_prefs hr {
@ -1763,6 +1766,7 @@ body.ttrss_utility.share_popup .content {
} }
.flat .dijitTree .dijitTreeRow { .flat .dijitTree .dijitTreeRow {
overflow: hidden; overflow: hidden;
-moz-user-select: none;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.flat label.dijitButton { .flat label.dijitButton {

File diff suppressed because one or more lines are too long

View File

@ -1514,17 +1514,20 @@ body.ttrss_prefs fieldset.plugin label.description {
body.ttrss_prefs fieldset.plugin label.description .dijitCheckBox { body.ttrss_prefs fieldset.plugin label.description .dijitCheckBox {
margin-right: 10px; margin-right: 10px;
} }
body.ttrss_prefs table.prefErrorLog tr.errrow td { body.ttrss_prefs .prefErrorLog tr td {
font-size: 10px; font-size: 10px;
} }
body.ttrss_prefs table.prefErrorLog tr.errrow td.errno { body.ttrss_prefs .prefErrorLog tr .errno {
font-style: italic; font-style: italic;
font-weight: bold; font-weight: bold;
white-space: nowrap; white-space: nowrap;
} }
body.ttrss_prefs table.prefErrorLog td.filename, body.ttrss_prefs .prefErrorLog tr .errstr {
body.ttrss_prefs table.prefErrorLog td.login, word-break: break-all;
body.ttrss_prefs table.prefErrorLog td.timestamp { }
body.ttrss_prefs .prefErrorLog tr .filename,
body.ttrss_prefs .prefErrorLog tr .login,
body.ttrss_prefs .prefErrorLog tr .timestamp {
color: #ccc; color: #ccc;
} }
body.ttrss_prefs hr { body.ttrss_prefs hr {
@ -1763,6 +1766,7 @@ body.ttrss_utility.share_popup .content {
} }
.flat .dijitTree .dijitTreeRow { .flat .dijitTree .dijitTreeRow {
overflow: hidden; overflow: hidden;
-moz-user-select: none;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.flat label.dijitButton { .flat label.dijitButton {

File diff suppressed because one or more lines are too long