From patchwork Sat Aug 3 22:36:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Cuka X-Patchwork-Id: 7936 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4WbyJ302wHz3wwH for ; Sat, 3 Aug 2024 22:37:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4WbyHz470gz1DR; Sat, 3 Aug 2024 22:37:19 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4WbyHz2CcMz344v; Sat, 3 Aug 2024 22:37:19 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4WbyHw5kw2z344v for ; Sat, 3 Aug 2024 22:37:16 +0000 (UTC) Received: from resqmta-c2p-570503.sys.comcast.net (resqmta-c2p-570503.sys.comcast.net [IPv6:2001:558:fd00:56::5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4WbyHt6L9Tz1DR for ; Sat, 3 Aug 2024 22:37:14 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=comcastmailservice.net header.s=20211018a header.b=LZRgHAKt; dmarc=none; spf=none (mail01.ipfire.org: domain of stephen@firemypi.org has no SPF policy when checking 2001:558:fd00:56::5) smtp.mailfrom=stephen@firemypi.org ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1722724636; a=rsa-sha256; cv=none; b=CmSww3o/x8+7s6nqEU7d6RMMDVGDSzx3vwPFBQw5ol3wwrPqNrestN6Sk+d2xCBAGx6ZdY EORjp10k9S/zR0PaBvHoIT4JGcWm8sEgqxQtKyHju1MQ+SYOotNoaD8tFl9eTCwQn/g2OC GqvPhddInW7H8LwqPYjiTYd3hds3R+4Vv9KmZdmE7gvXxg+qn5SHBD0glHNh7PGn0i/YFm 7MBr207EkGBtZdTrIM8kTrZ8vS5yM4AM5+3wnBLmGd8KEDTxw3rnFRPPgza30p4v0Aa6Ki 0iTlwVLtBI3L5h783lX4nU71wm5CfG7kkGlOCQ2b91btBD8jk48tsliQxTzmQA== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=comcastmailservice.net header.s=20211018a header.b=LZRgHAKt; dmarc=none; spf=none (mail01.ipfire.org: domain of stephen@firemypi.org has no SPF policy when checking 2001:558:fd00:56::5) smtp.mailfrom=stephen@firemypi.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1722724636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=cUax9LKln0i+BwJMinqABls46gT73SyO0kXQAgC5alw=; b=WhkVDB+aSWHwPSfCd0JRYyo5eq9nwj9+6G5UjlL3AwF2irsrnl0AdksjmcqxVj+gZxZClg 9W27cG/th82xNb7GFgnZnBxSDApAzlMgjL81AReIl5Vnqn/sqBQzkp88kLiqa2dLl0TS+B R9KfjCvhPKrSSCjvb+I+7lhIEk1Xzy4vYYGUMs6K4zTAgJlam6JGgI47gGDVV8+CiYfTSR YbOEVnZaH3lQvK/WN5F03jqoTuoxg+BiLQalLEeFvCdVK9BTig4dIxwlgDb/Banm7a1bC3 L1+FBA9CdqCzlGPkXNl9T5MSE6806BD3BXSqMUNZPm33+5KQq863IIM6g67m6A== Received: from resomta-c2p-555661.sys.comcast.net ([96.102.18.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resqmta-c2p-570503.sys.comcast.net with ESMTPS id aLRRsndjCmPvHaNN7sR4Dj; Sat, 03 Aug 2024 22:37:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20211018a; t=1722724630; bh=cUax9LKln0i+BwJMinqABls46gT73SyO0kXQAgC5alw=; h=Received:Received:From:To:Subject:Date:Message-Id:MIME-Version: Xfinity-Spam-Result; b=LZRgHAKtexkQpQ5FaTO3AbqNtwhhW0sN6yH/FiEbee8O3cq4CQXc2eBCUwKDvKXfS SentUC3wPefVUNcP81CJ5h2RDsXm/UoFs5NEsB0vPaZ9W6AvbVZRM80lpS2UbLpItp V/RC7M6p9lwdDzobrfjilPTMUVQubaT4XrtEGL42jIC7Xa3hxMAzfeKqN0GnL6D67W NHTeKk7a9qV2+Wep62jW+rcIMpz1HCayXugjqy34JPpsMIK19hbFrNdUtpV8KrYgUP ms/xPdBSiPdtD4nxO3Y5zdo8WlS1R1VVEK9O7gt4cJRNUUDdVnP/RzVHhVTyMoJ4Y/ nQroEGvIrFQ+Q== Received: from localhost.localdomain ([75.70.122.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resomta-c2p-555661.sys.comcast.net with ESMTPSA id aNMlsxRpgdWKEaNMlsDKJM; Sat, 03 Aug 2024 22:36:48 +0000 From: Stephen Cuka To: development@lists.ipfire.org Subject: [PATCH] Remove space after every 80 characters in WebGUI "Logs/System Logs". Date: Sat, 3 Aug 2024 16:36:27 -0600 Message-Id: <20240803223627.123287-1-stephen@firemypi.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CMAE-Envelope: MS4xfOgiwENb4A6MZWQyz9NkJtFnwOJmprutdle74ZwHWXgw4BNy0VrrWzenjc3n/DddxmvPeYUMmhfxA+rqClmOiMaMO5eZ/XvL9+1CGuvvmnUvnJy2PaB9 vvJ/81jw1zJY1/owoObLH4izmrxu9CmXeMboxoCDBaU57WjIxApY65UpUoXZ3qTcKeGI1ellZUB0nX20GQfmphZF7cfH6TAXXO4h4b6N9HFLjB92+38oChP6 2vSK9Rs3VC8d1FzONyqZng== X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4WbyHt6L9Tz1DR X-Spamd-Result: default: False [0.11 / 11.00]; HFILTER_HELO_5(3.00)[resqmta-c2p-570503.sys.comcast.net]; BAYES_HAM(-2.78)[99.06%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; IP_REPUTATION_HAM(-0.30)[asn: 7922(-0.29), country: US(-0.01), ip: 2001:558:fd00:56::(0.00)]; R_DKIM_ALLOW(-0.20)[comcastmailservice.net:s=20211018a]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DMARC_NA(0.00)[firemypi.org]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RECEIVED_SPAMHAUS_PBL(0.00)[75.70.122.243:received]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_REPUTATION(0.00)[0]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ASN(0.00)[asn:7922, ipnet:2001:558::/29, country:US]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[comcastmailservice.net:+]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; R_SPF_NA(0.00)[no SPF record] X-Rspamd-Action: no action Message-ID-Hash: TB7NWVOIIEX5US2OW7XC646VDQH5S4TZ X-Message-ID-Hash: TB7NWVOIIEX5US2OW7XC646VDQH5S4TZ X-MailFrom: stephen@firemypi.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Stephen Cuka X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Stephen Cuka Reviewed-by: Bernhard Bitsch Tested-by: Bernhard Bitsch Reviewed-by: Adolf Belka --- This patch addresses an issue with the IPFire WebGUI adding a space after every 80 characters in the display of long log entries on the "Logs/System Logs" page. (Bug 13735) The patch removes the "very basic breaking of lines..." code and replaces it with a direct copy of the log entry $data to the display output variable $d. html/cgi-bin/logs.cgi/log.dat | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 01c382a0d..ce7de0178 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -412,11 +412,12 @@ foreach $_ (@log) $sec = 'kernel'; $data = $2.': '.$data; } - my $d = substr ($data,0,80); - while (length($data)>80){ #very basic breaking of lines... - $data = substr ($data,80); #permit correct display in table cell - $d .= ' ' . substr ($data,0,80); - } + #my $d = substr ($data,0,80); + #while (length($data)>80){ #very basic breaking of lines... + # $data = substr ($data,80); #permit correct display in table cell + # $d .= ' ' . substr ($data,0,80); + #} + my $d = $data; #don't break lines for display my $col=""; if ($lines % 2) {