From patchwork Mon Aug 9 20:32:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 4625 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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Gk77g0XsKz3xGN for ; Mon, 9 Aug 2021 20:33:03 +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 ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Gk77d5dRxz6BY; Mon, 9 Aug 2021 20:33:01 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Gk77d4BDKz2xt5; Mon, 9 Aug 2021 20:33:01 +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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Gk77c3Kmfz2xK9 for ; Mon, 9 Aug 2021 20:33:00 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Gk77c0sgnz1FR; Mon, 9 Aug 2021 20:33:00 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1628541180; 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; bh=lrX8wGsG59EJl2U0DZk1a3STA07NRijpBAZ9r2gM0lE=; b=Sc9l6wTU/m+qWEzi6+JsSDvYQ2LyngUesdg7H0zfYyFx1txDFpjW2crpnz/YH1sJh2yW6F QApIceRz0WCkRFBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1628541180; 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; bh=lrX8wGsG59EJl2U0DZk1a3STA07NRijpBAZ9r2gM0lE=; b=MpVlDZzcPhZOhQrFkC0RimI/ZCswXkQtGBudyh8uHH3wq7hrIrsTCUOb3pKOkCyLRQ83vq m8mFP5e2c4Ces+8fINwW0+OE95Ha1eXMStZRhb12m7gbka2lbqRsaKNxIYZ93MOG/GgpdN Es7IoMVXFGykHkJlS5QvX9faFdPJVcUU440P8qWboTBh/9PiLf+1VMLcaOzu7GcALMOEVI A5g0yD89pLWStQaMHFjKnxll1R5jwU4eFQAs1QpZTFqIxsZdMrrRWhEAWKlCh4lfk5gtz7 Z9cJfouP9JE+cPmpslNhWCDMu+jnjCQFxBhBGnEYmIV/+K2HLsVLciYIx/zxQA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] updatexlrator.cgi: Fix Bug 10477 - Update Accelerator disk usage statistics are very cramped in 2.15 beta1 Date: Mon, 9 Aug 2021 22:32:53 +0200 Message-Id: <20210809203253.59446-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - This bug has been open for a long time and is still valid. The Cache statistics on the Update accelerator configuration page are jammed closely together making it not so easy to see what the numbers are. - Implemented similar approach as used on the Memory table section of the Memory information page. - Installed on vm testbed machine and confirmed to provide the desired layout. Tested-by Adolf Belka Signed-off-by: Adolf Belka Reviewed-by: Bernhard Bitsch Tested-by: Bernhard Bitsch Reviewed-by: Michael Tremer --- html/cgi-bin/updatexlrator.cgi | 58 +++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi index 9cfe08f4e..deead7d79 100644 --- a/html/cgi-bin/updatexlrator.cgi +++ b/html/cgi-bin/updatexlrator.cgi @@ -722,15 +722,18 @@ unless ($numfiles) { print "$Lang::tr{'updxlrtr empty repository'}\n
-$Lang::tr{'updxlrtr disk usage'} + +$Lang::tr{'updxlrtr disk usage'} + - +
- - - - - + + + + + + END ; @@ -745,17 +748,17 @@ my ($device,$size,$used,$free,$percent,$mount) = split(' ',$dfstr); print < - - - - - + + + + +
$Lang::tr{'updxlrtr cache dir'}$Lang::tr{'size'}$Lang::tr{'used'}$Lang::tr{'free'}$Lang::tr{'percentage'}$Lang::tr{'updxlrtr cache dir'}$Lang::tr{'size'}$Lang::tr{'used'}$Lang::tr{'free'}$Lang::tr{'percentage'}
[$repository]$size$used$free +[$repository]$size$used$free END ; &percentbar($percent); print < -$percent$percent
END @@ -1015,15 +1018,18 @@ unless (@repositoryfiles) { print "$Lang::tr{'updxlrtr empty repository'} print < -$Lang::tr{'updxlrtr disk usage'} + +$Lang::tr{'updxlrtr disk usage'} + - +
- - - - - + + + + + + END ; @@ -1038,17 +1044,17 @@ my ($device,$size,$used,$free,$percent,$mount) = split(' ',$dfstr); print < - - - - - + + + + +
$Lang::tr{'updxlrtr cache dir'}$Lang::tr{'size'}$Lang::tr{'used'}$Lang::tr{'free'}$Lang::tr{'percentage'}$Lang::tr{'updxlrtr cache dir'}$Lang::tr{'size'}$Lang::tr{'used'}$Lang::tr{'free'}$Lang::tr{'percentage'}
[$repository]$size$used$free +[$repository]$size$used$free END ; &percentbar($percent); print < -$percent$percent
END