From: Dominik Csapak <d.csapak@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH http-server 3/3] formatter: html: update to bootstrap 5
Date: Thu, 5 Jun 2025 10:07:32 +0200 [thread overview]
Message-ID: <000f65b4-14db-4ef0-9ee2-c06cebf3b0b1@proxmox.com> (raw)
In-Reply-To: <2c80e7ef-28d9-4cb0-b7e4-5f2735a312c4@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
next prev parent reply other threads:[~2025-06-05 8:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 13:04 [pve-devel] [PATCH http-server 1/3] formatter: html: remove unused code Dominik Csapak
2025-06-03 13:04 ` [pve-devel] [PATCH http-server 2/3] formatter: html: fix logout button Dominik Csapak
2025-06-03 13:04 ` [pve-devel] [PATCH http-server 3/3] formatter: html: update to bootstrap 5 Dominik Csapak
2025-06-04 17:33 ` Thomas Lamprecht
2025-06-05 8:07 ` Dominik Csapak [this message]
2025-06-04 17:26 ` [pve-devel] partially-applied: [PATCH http-server 1/3] formatter: html: remove unused code Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=000f65b4-14db-4ef0-9ee2-c06cebf3b0b1@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal