diff -uNr a/logotron/MANIFEST.TXT b/logotron/MANIFEST.TXT --- a/logotron/MANIFEST.TXT 5840d3419c171f8ce22cf0061e01d0557cc08ef11af683061a9874d17b5f1cccbd13f7a14af8090c2fc0f978b5eb0f7a20de6e04f61fdc50c9b1bf4e70e45b9b +++ b/logotron/MANIFEST.TXT 380662cf4ac222385ae33ab3b24e03218195c2c02f22fe83f3fe87ddcb64031eda6f8907ce1fe7d0cfc7d29f73d93722d71fe823dcbd79f82a3957f66daa99c1 @@ -27,3 +27,4 @@ 700821 fix_multiln_hlite billymg "Fix bug from 684804 where the highlighting of multiple selected log lines is not rendered properly." 719633 fix_bot_recursion billymg "Prevent bots from speaking to each other. Also add a flag for handling pest log lines." 719639 add_pg_reconnect billymg "Ping postgres db before inserting lines and auto reconnect if the connection has been lost." +719674 minor_reader_tweaks billymg "Fix target='_blank' attr on links, reduce last active timestamp resolution, hide pest hearsay annotations, fix highlight bug in classic.css" diff -uNr a/logotron/reader.py b/logotron/reader.py --- a/logotron/reader.py 3b02f186daaee1b4fe93a53324fbd3c09924538f15d607c01cdb1381434ed9155671d5f239065ed431630ce3c6585c14dfcd8f3443a56189300a10d6f6288ee3 +++ b/logotron/reader.py 3447a168ff1b14190b284952a9f4cd7619cae304f1a61169463bf677db6f3898d4a354fd8154b46ba59cb8adea177d97108f9e96d83eda33c48fa27ac9623b13 @@ -185,9 +185,9 @@ if days != 0: last_time_txt += '%dd ' % days - if hours != 0: + if hours != 0 and days < 100: last_time_txt += '%dh ' % hours - if minutes != 0: + if minutes != 0 and days == 0: last_time_txt += '%dm' % minutes last_time_url = "{0}{1}{2}/{3}#{4}".format( @@ -265,11 +265,11 @@ # Format ordinary links: payload = re.sub(stdlinks_re, - r'\1', payload) + r'\1', payload) # Now also format [link][text] links : payload = re.sub(boxlinks_re, - r'\2', payload) + r'\2', payload) # For ancient logs strictly: substitute orig. link with our logger : if l['era'] < 3: @@ -300,26 +300,30 @@ speaker = l['speaker'] separator = ":" + # temporary hack to remove pest hearsay annotations + speaker_short = re.split('\\[.*?\\]', speaker)[0] + if showchan: - speaker = '(' + l['chan'] + ') ' + speaker + speaker_short = '(' + l['chan'] + ') ' + speaker_short # If 'action', annotate: if l['self']: separator = "" payload = "" + payload + "" - speaker = "" + speaker + "" + speaker_short = "" + speaker_short + "" # HTMLize the given line : s = ("
" - "{1}{7} {4}
").format(l['idx'], + "{8}{7} {4}").format(l['idx'], speaker, l['t'], line_url(l), payload, bot, dclass, - separator) + separator, + speaker_short) return s # Make above callable from inside htm templater: diff -uNr a/logotron/release_notes.txt b/logotron/release_notes.txt --- a/logotron/release_notes.txt 235668848e5a9cf7f4ede3e62892bc72f2d521526cbc4ba3fa2c6db2ad37e7b523940250af2f91eabc8a12941e8f1e03792d48249c7c83381376336e1bdf74db +++ b/logotron/release_notes.txt 9794b5833c366dc89fab0dc2648286f4e0377dc794661673cc74d57f92b31c2119bb26153b6eec75bde11ebcbaac729365145d946e151c5507b8950e1d3d2354 @@ -1,6 +1,18 @@ ################### 2022 Jan 20 Update: ################### +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +719674 minor_reader_tweaks billymg "Fix target='_blank' attr on links, reduce last active timestamp resolution, hide pest hearsay annotations, fix highlight bug in classic.css" +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +(1) Hyperlinks were rendered target="\'_blank\'" instead of target="_blank", resulting in links opening in the same new tab rather than each in its own new tab. +(2) Chans last active more than a day ago won't show minutes and chans last active > 100 days ago won't show hours. E.g. "1d 5h ago" instead of "1d 5h 24m ago" and "100d ago" instead of "100d 12h 14m ago". +(3) Hearsay annotations are hidden in the normal view but can still be seen on hover in the "title" text. +(4) Fix a bug in classic.css, introduced in 700821, which broke searm term highlighting in the search results page. + + +################### +2022 Jan 20 Update: +################### --------------------------------------------------------------------------------------------------------------------------------- 719639 add_pg_reconnect billymg "Ping postgres db before inserting lines and auto reconnect if the connection has been lost." --------------------------------------------------------------------------------------------------------------------------------- diff -uNr a/logotron/static/classic.css b/logotron/static/classic.css --- a/logotron/static/classic.css 15af7c20d831947a9333ceb510fa80acb38d983601c8d05c7cb21d5d06829a3ef7feaac18821b614c7fca148651f4849c98dd50455cafa30313a79e697975893 +++ b/logotron/static/classic.css 091c56349c022f5616f0b9b6e95d6e7bf4420ef4e40b10587756ffc342d580ef8684104c7fb69347fd4e07e8ca37d541e5ac7841219fa8856ceaa7246f422a73 @@ -98,6 +98,7 @@ float:right; } -.loglines div.highlight { +.loglines div.highlight, +.loglines span.highlight { background: yellow; }