Browse Source

event log: simplify styles, prevent horizontal scrolling
sql logger: clip context length to 8kb

Andrew Dolgov 1 year ago
parent
commit
d36b64d8a7

+ 2 - 2
classes/logger/sql.php

@@ -12,8 +12,8 @@ class Logger_SQL {
 
 			$owner_uid = $_SESSION["uid"] ? $_SESSION["uid"] : null;
 
-			if (DB_TYPE == "mysql")
-				$context = substr($context, 0, 65534);
+			// limit context length, DOMDocument dumps entire XML in here sometimes, which may be huge
+			$context = mb_substr($context, 0, 8192);
 
 			// 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

+ 1 - 1
classes/pref/system.php

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

+ 9 - 6
css/default.css

@@ -1513,17 +1513,20 @@ body.ttrss_prefs fieldset.plugin label.description {
 body.ttrss_prefs fieldset.plugin label.description .dijitCheckBox {
   margin-right: 10px;
 }
-body.ttrss_prefs table.prefErrorLog tr.errrow td {
+body.ttrss_prefs .prefErrorLog tr td {
   font-size: 10px;
 }
-body.ttrss_prefs table.prefErrorLog tr.errrow td.errno {
+body.ttrss_prefs .prefErrorLog tr .errno {
   font-style: italic;
   font-weight: bold;
   white-space: nowrap;
 }
-body.ttrss_prefs table.prefErrorLog td.filename,
-body.ttrss_prefs table.prefErrorLog td.login,
-body.ttrss_prefs table.prefErrorLog td.timestamp {
+body.ttrss_prefs .prefErrorLog tr .errstr {
+  word-break: break-all;
+}
+body.ttrss_prefs .prefErrorLog tr .filename,
+body.ttrss_prefs .prefErrorLog tr .login,
+body.ttrss_prefs .prefErrorLog tr .timestamp {
   color: #555;
 }
 body.ttrss_prefs hr {
@@ -1762,7 +1765,7 @@ body.ttrss_utility.share_popup .content {
 }
 .flat .dijitTree .dijitTreeRow {
   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;
 }
 .flat label.dijitButton {

File diff suppressed because it is too large
+ 0 - 0
css/default.css.map


+ 1 - 1
css/dijit_basic.less

@@ -132,7 +132,7 @@
 
 		.dijitTreeRow {
 			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;
 		}
 

+ 18 - 10
css/prefs.less

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

+ 9 - 5
themes/night.css

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

File diff suppressed because it is too large
+ 0 - 0
themes/night.css.map


+ 9 - 5
themes/night_blue.css

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

File diff suppressed because it is too large
+ 0 - 0
themes/night_blue.css.map


Some files were not shown because too many files changed in this diff