From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id AFF9D1FF165
	for <inbox@lore.proxmox.com>; Thu,  5 Jun 2025 10:07:17 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 9115E12DF5;
	Thu,  5 Jun 2025 10:07:35 +0200 (CEST)
Message-ID: <000f65b4-14db-4ef0-9ee2-c06cebf3b0b1@proxmox.com>
Date: Thu, 5 Jun 2025 10:07:32 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird Beta
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20250603130426.2575764-1-d.csapak@proxmox.com>
 <20250603130426.2575764-3-d.csapak@proxmox.com>
 <2c80e7ef-28d9-4cb0-b7e4-5f2735a312c4@proxmox.com>
Content-Language: en-US
From: Dominik Csapak <d.csapak@proxmox.com>
In-Reply-To: <2c80e7ef-28d9-4cb0-b7e4-5f2735a312c4@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.228 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [bootstrap.pm, anyevent.pm, html.pm]
Subject: Re: [pve-devel] [PATCH http-server 3/3] formatter: html: update to
 bootstrap 5
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

On 6/4/25 19:33, Thomas Lamprecht wrote:
> Am 03.06.25 um 15:04 schrieb Dominik Csapak:
>> this makes a few changes necessary, but not too much:
>> * include the different directory for bootstrap5
>> * use different navbar markup
>> * different classes for navbar container + items
>> * add classes to pre tag since it's not styled anymore in newer
>>    bootstrap versions
>> * add 'form-label' to labels
>> * use containers with 'mb-3' for form + buttons
>> * use 'd-grid' container for button instead of 'btn-block'
>> * add 'breadcrumb-item' where necessary
>>
>> Since bootstrap 5 does not depend on jQuery anymore, use that chance to
>> remove it here as dependency too. For that remove the 'button'
>> and 'add_js' subs that were never actually used.
>>
>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>> ---
>>   debian/control                           |   3 +-
>>   src/PVE/APIServer/AnyEvent.pm            |   3 +
>>   src/PVE/APIServer/Formatter/Bootstrap.pm |  37 +------
>>   src/PVE/APIServer/Formatter/HTML.pm      | 132 +++++++++++++----------
>>   4 files changed, 84 insertions(+), 91 deletions(-)
>>
>> diff --git a/debian/control b/debian/control
>> index 0d0161e..4ce0368 100644
>> --- a/debian/control
>> +++ b/debian/control
>> @@ -15,8 +15,7 @@ Depends: libanyevent-http-perl,
>>            libhttp-date-perl,
>>            libhttp-message-perl,
>>            libio-socket-ssl-perl,
>> -         libjs-bootstrap,
>> -         libjs-jquery,
>> +         libjs-bootstrap5,
>>            libjson-perl,
>>            libnet-ip-perl,
>>            libpve-common-perl (>= 8.0.2),
>> diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm
>> index b71a9a5..9aeae2f 100644
>> --- a/src/PVE/APIServer/AnyEvent.pm
>> +++ b/src/PVE/APIServer/AnyEvent.pm
>> @@ -2032,6 +2032,9 @@ sub new {
> 
> expanding the context a bit here:
> 
>   # add default dirs which includes jquery and bootstrap
>   my $jsbase = '/usr/share/javascript';
>   add_dirs($self->{dirs}, '/js/' => "$jsbase/");
> 
> The jquery part would be wrong, and with the new location of the bootstrap file
> we could evaluate if it's really required to expose all of /usr/share/javascript.
> I mean, it does not really hurt, we disallow symlinks anyway and there is nothing
> secretive in there nor do we interpret any files directly as code on the server,
> so there is probably no big reason, but if we touch this it might be still worth
> a quick evaluation.
> 
>>       my $glyphicons = '/usr/share/fonts/truetype/glyphicons/';
>>       add_dirs($self->{dirs}, '/js/bootstrap/fonts/' => "$glyphicons");
> 
> but that font file and directory is provided by the fonts-glyphicons-halflings package,
> the old libjs-bootstrap depends on that, the newer does not and thus quite likely
> doesn't use it anymore. Can we drop it here? As on a fresh installation with this
> patch applied it won't be reachable anyway.
> 
> 
> besides that it look OK, albeit I only skimmed the remaining changes.

yes you're right, we probably can drop more folders here that I missed.
I'll check which ones we can drop and update the comments if necessary in the v2

> 
>>   
>> +    # libjs-bootstrap5 uses a different dir with symlinks
>> +    add_dirs($self->{dirs}, '/js/bootstrap5/' => "/usr/share/bootstrap-html");
>> +
>>       # init inotify
>>       PVE::INotify::inotify_init();
>>   



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel