public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 0/3] fix #2435: lxc: show distro and privileged status in summary
@ 2023-05-03  9:50 Christoph Heiss
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 1/3] ui: clean up remnants of in-tree font-awesome files Christoph Heiss
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Christoph Heiss @ 2023-05-03  9:50 UTC (permalink / raw)
  To: pve-devel

This implements #2435 [0]. Show the unprivileged status in the summary
panel, the distro logo and name in the title of the summary panel.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=2435

pve-manager:

Christoph Heiss (3):
  ui: clean up remnants of in-tree font-awesome files
  ui: add 'font-logos' stylesheet and font files
  ui: GuestStatusView: add 'privileged' and 'ostype' fields

 www/css/Makefile                        |    3 +-
 www/css/font-awesome.css                | 2086 -----------------------
 www/css/font-logos.css                  |  224 +++
 www/css/fonts/FontAwesome.otf           |  Bin 109688 -> 0 bytes
 www/css/fonts/Makefile                  |    6 +-
 www/css/fonts/README                    |   11 -
 www/css/fonts/README.md                 |    5 +
 www/css/fonts/font-logos.ttf            |  Bin 0 -> 29116 bytes
 www/css/fonts/font-logos.woff           |  Bin 0 -> 74576 bytes
 www/css/fonts/font-logos.woff2          |  Bin 0 -> 15724 bytes
 www/css/fonts/fontawesome-webfont.eot   |  Bin 70807 -> 0 bytes
 www/css/fonts/fontawesome-webfont.svg   |  655 -------
 www/css/fonts/fontawesome-webfont.ttf   |  Bin 142072 -> 0 bytes
 www/css/fonts/fontawesome-webfont.woff  |  Bin 83588 -> 0 bytes
 www/css/fonts/fontawesome-webfont.woff2 |  Bin 66624 -> 0 bytes
 www/index.html.tpl                      |    1 +
 www/manager6/panel/GuestStatusView.js   |   51 +-
 17 files changed, 286 insertions(+), 2756 deletions(-)

--
2.39.2





^ permalink raw reply	[flat|nested] 8+ messages in thread

* [pve-devel] [PATCH manager 1/3] ui: clean up remnants of in-tree font-awesome files
  2023-05-03  9:50 [pve-devel] [PATCH manager 0/3] fix #2435: lxc: show distro and privileged status in summary Christoph Heiss
@ 2023-05-03  9:50 ` Christoph Heiss
  2023-06-07 10:15   ` [pve-devel] applied: " Thomas Lamprecht
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 2/3] ui: add 'font-logos' stylesheet and font files Christoph Heiss
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 3/3] ui: GuestStatusView: add 'privileged' and 'ostype' fields Christoph Heiss
  2 siblings, 1 reply; 8+ messages in thread
From: Christoph Heiss @ 2023-05-03  9:50 UTC (permalink / raw)
  To: pve-devel

Commit e97c2601 ("change to debian font-awesome") removed the usage of
the in-tree font-awesome files, replacing them with the Debian package.
Thus clear out these leftovers out, as they are completely usused.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Formatted the patch with `--irreversible-delete` for now to be more
suitable for review, as otherwise it would be pretty big (~400kB) for
the mailing list.

 www/css/font-awesome.css                | 2086 -----------------------
 www/css/fonts/FontAwesome.otf           |  Bin 109688 -> 0 bytes
 www/css/fonts/Makefile                  |   12 -
 www/css/fonts/README                    |   11 -
 www/css/fonts/fontawesome-webfont.eot   |  Bin 70807 -> 0 bytes
 www/css/fonts/fontawesome-webfont.svg   |  655 -------
 www/css/fonts/fontawesome-webfont.ttf   |  Bin 142072 -> 0 bytes
 www/css/fonts/fontawesome-webfont.woff  |  Bin 83588 -> 0 bytes
 www/css/fonts/fontawesome-webfont.woff2 |  Bin 66624 -> 0 bytes
 9 files changed, 2764 deletions(-)
 delete mode 100644 www/css/font-awesome.css
 delete mode 100644 www/css/fonts/FontAwesome.otf
 delete mode 100644 www/css/fonts/Makefile
 delete mode 100644 www/css/fonts/README
 delete mode 100644 www/css/fonts/fontawesome-webfont.eot
 delete mode 100644 www/css/fonts/fontawesome-webfont.svg
 delete mode 100644 www/css/fonts/fontawesome-webfont.ttf
 delete mode 100644 www/css/fonts/fontawesome-webfont.woff
 delete mode 100644 www/css/fonts/fontawesome-webfont.woff2

diff --git a/www/css/font-awesome.css b/www/css/font-awesome.css
deleted file mode 100644
index ec52e7f8..00000000
diff --git a/www/css/fonts/FontAwesome.otf b/www/css/fonts/FontAwesome.otf
deleted file mode 100644
index 3ed7f8b4..00000000
diff --git a/www/css/fonts/Makefile b/www/css/fonts/Makefile
deleted file mode 100644
index d957edce..00000000
diff --git a/www/css/fonts/README b/www/css/fonts/README
deleted file mode 100644
index be0de942..00000000
diff --git a/www/css/fonts/fontawesome-webfont.eot b/www/css/fonts/fontawesome-webfont.eot
deleted file mode 100644
index 9b6afaed..00000000
diff --git a/www/css/fonts/fontawesome-webfont.svg b/www/css/fonts/fontawesome-webfont.svg
deleted file mode 100644
index d05688e9..00000000
diff --git a/www/css/fonts/fontawesome-webfont.ttf b/www/css/fonts/fontawesome-webfont.ttf
deleted file mode 100644
index 26dea795..00000000
diff --git a/www/css/fonts/fontawesome-webfont.woff b/www/css/fonts/fontawesome-webfont.woff
deleted file mode 100644
index dc35ce3c..00000000
diff --git a/www/css/fonts/fontawesome-webfont.woff2 b/www/css/fonts/fontawesome-webfont.woff2
deleted file mode 100644
index 500e5172..00000000
--
2.39.2





^ permalink raw reply	[flat|nested] 8+ messages in thread

* [pve-devel] [PATCH manager 2/3] ui: add 'font-logos' stylesheet and font files
  2023-05-03  9:50 [pve-devel] [PATCH manager 0/3] fix #2435: lxc: show distro and privileged status in summary Christoph Heiss
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 1/3] ui: clean up remnants of in-tree font-awesome files Christoph Heiss
@ 2023-05-03  9:50 ` Christoph Heiss
  2023-06-07 10:59   ` Thomas Lamprecht
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 3/3] ui: GuestStatusView: add 'privileged' and 'ostype' fields Christoph Heiss
  2 siblings, 1 reply; 8+ messages in thread
From: Christoph Heiss @ 2023-05-03  9:50 UTC (permalink / raw)
  To: pve-devel

From [0]. As they are licensed under the "Unlicence" license, including
them here and re-distributing them should bear no problems [1].

[0] https://github.com/Lukas-W/font-logos
[1] https://choosealicense.com/licenses/unlicense/

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Formatted the patch with `--no-binary` for now to ease reviewing, as it
otherwise would be pretty big for the mailing list, due to the binary
files. For testing, either download the latest release [2] and copy
`assets/font-logs.{ttf,woff,woff2}` from the extraced folder to
`www/css/fonts/`, or drop me a line and I can send the full patch
off-list.

There's also the possibility to build a customized version of the font
from source, to reduce it down to just the logos needed for the ten
distributions currently supported/recogized. The file sizes are reduced
to about 10-20% of their original files, so might be worth to do that -
for example, the .woff goes from 73kB to 9.2kB.

It's fairly easy, basically just throwing out all unneeded entries in
the `icons.tsv` file in the repo. If that would be preferred, I happily
do that; adding some instructions too on how to replicate/rebuild the
font as needed.

[2] https://github.com/lukas-w/font-logos/releases/download/v1.0.1/font-logos-1.0.1.zip

 www/css/Makefile               |   3 +-
 www/css/font-logos.css         | 224 +++++++++++++++++++++++++++++++++
 www/css/fonts/Makefile         |  14 +++
 www/css/fonts/README.md        |   5 +
 www/css/fonts/font-logos.ttf   | Bin 0 -> 29116 bytes
 www/css/fonts/font-logos.woff  | Bin 0 -> 74576 bytes
 www/css/fonts/font-logos.woff2 | Bin 0 -> 15724 bytes
 www/index.html.tpl             |   1 +
 8 files changed, 246 insertions(+), 1 deletion(-)
 create mode 100644 www/css/font-logos.css
 create mode 100644 www/css/fonts/Makefile
 create mode 100644 www/css/fonts/README.md
 create mode 100644 www/css/fonts/font-logos.ttf
 create mode 100644 www/css/fonts/font-logos.woff
 create mode 100644 www/css/fonts/font-logos.woff2

diff --git a/www/css/Makefile b/www/css/Makefile
index 3960292c..7d7e9d77 100644
--- a/www/css/Makefile
+++ b/www/css/Makefile
@@ -3,7 +3,8 @@ include ../../defines.mk
 all:

 .PHONY: install
-install: ext6-pve.css
+install: ext6-pve.css font-logos.css
+	${MAKE} -C fonts $@
 	install -d ${WWWCSSDIR}
 	install -m 0644 $? ${WWWCSSDIR}

diff --git a/www/css/font-logos.css b/www/css/font-logos.css
new file mode 100644
index 00000000..f5d45e49
--- /dev/null
+++ b/www/css/font-logos.css
@@ -0,0 +1,224 @@
+
+@font-face {
+  font-display: auto;
+  font-family: "font-logos";
+  font-style: normal;
+  font-weight: normal;
+  src: url("fonts/font-logos.woff?v=1.0.1") format("woff"),
+    url("fonts/font-logos.woff2?v=1.0.1") format("woff2"),
+    url("fonts/font-logos.ttf?v=1.0.1") format("truetype")
+}
+
+.fl-alpine::before,
+.fl-aosc::before,
+.fl-apple::before,
+.fl-archlinux::before,
+.fl-centos::before,
+.fl-coreos::before,
+.fl-debian::before,
+.fl-devuan::before,
+.fl-docker::before,
+.fl-elementary::before,
+.fl-fedora::before,
+.fl-fedora-inverse::before,
+.fl-freebsd::before,
+.fl-gentoo::before,
+.fl-linuxmint::before,
+.fl-linuxmint-inverse::before,
+.fl-mageia::before,
+.fl-mandriva::before,
+.fl-manjaro::before,
+.fl-nixos::before,
+.fl-opensuse::before,
+.fl-raspberry-pi::before,
+.fl-redhat::before,
+.fl-sabayon::before,
+.fl-slackware::before,
+.fl-slackware-inverse::before,
+.fl-tux::before,
+.fl-ubuntu::before,
+.fl-ubuntu-inverse::before,
+.fl-almalinux::before,
+.fl-archlabs::before,
+.fl-artix::before,
+.fl-budgie::before,
+.fl-deepin::before,
+.fl-endeavour::before,
+.fl-ferris::before,
+.fl-flathub::before,
+.fl-gnu-guix::before,
+.fl-illumos::before,
+.fl-kali-linux::before,
+.fl-openbsd::before,
+.fl-parrot::before,
+.fl-pop-os::before,
+.fl-rocky-linux::before,
+.fl-snappy::before,
+.fl-solus::before,
+.fl-void::before,
+.fl-zorin::before
+ {
+  display: inline-block;
+  font-family: "font-logos";
+  font-style: normal;
+  font-weight: normal;
+  font-variant: normal;
+  text-rendering: auto;
+  line-height: 1;
+  -moz-osx-font-smoothing: grayscale;
+  -webkit-font-smoothing: antialiased;
+  font-smoothing: antialiased;
+}
+
+.fl-fw {
+  text-align: center;
+  width: 1em;
+}
+.fl-alpine::before {
+  content: "\f300";
+}
+.fl-aosc::before {
+  content: "\f301";
+}
+.fl-apple::before {
+  content: "\f302";
+}
+.fl-archlinux::before {
+  content: "\f303";
+}
+.fl-centos::before {
+  content: "\f304";
+}
+.fl-coreos::before {
+  content: "\f305";
+}
+.fl-debian::before {
+  content: "\f306";
+}
+.fl-devuan::before {
+  content: "\f307";
+}
+.fl-docker::before {
+  content: "\f308";
+}
+.fl-elementary::before {
+  content: "\f309";
+}
+.fl-fedora::before {
+  content: "\f30a";
+}
+.fl-fedora-inverse::before {
+  content: "\f30b";
+}
+.fl-freebsd::before {
+  content: "\f30c";
+}
+.fl-gentoo::before {
+  content: "\f30d";
+}
+.fl-linuxmint::before {
+  content: "\f30e";
+}
+.fl-linuxmint-inverse::before {
+  content: "\f30f";
+}
+.fl-mageia::before {
+  content: "\f310";
+}
+.fl-mandriva::before {
+  content: "\f311";
+}
+.fl-manjaro::before {
+  content: "\f312";
+}
+.fl-nixos::before {
+  content: "\f313";
+}
+.fl-opensuse::before {
+  content: "\f314";
+}
+.fl-raspberry-pi::before {
+  content: "\f315";
+}
+.fl-redhat::before {
+  content: "\f316";
+}
+.fl-sabayon::before {
+  content: "\f317";
+}
+.fl-slackware::before {
+  content: "\f318";
+}
+.fl-slackware-inverse::before {
+  content: "\f319";
+}
+.fl-tux::before {
+  content: "\f31a";
+}
+.fl-ubuntu::before {
+  content: "\f31b";
+}
+.fl-ubuntu-inverse::before {
+  content: "\f31c";
+}
+.fl-almalinux::before {
+  content: "\f31d";
+}
+.fl-archlabs::before {
+  content: "\f31e";
+}
+.fl-artix::before {
+  content: "\f31f";
+}
+.fl-budgie::before {
+  content: "\f320";
+}
+.fl-deepin::before {
+  content: "\f321";
+}
+.fl-endeavour::before {
+  content: "\f322";
+}
+.fl-ferris::before {
+  content: "\f323";
+}
+.fl-flathub::before {
+  content: "\f324";
+}
+.fl-gnu-guix::before {
+  content: "\f325";
+}
+.fl-illumos::before {
+  content: "\f326";
+}
+.fl-kali-linux::before {
+  content: "\f327";
+}
+.fl-fw.fl-kali-linux::before {
+  font-size: 0.7496339677891655em;
+  line-height: 1.333984375em;
+}
+.fl-openbsd::before {
+  content: "\f328";
+}
+.fl-parrot::before {
+  content: "\f329";
+}
+.fl-pop-os::before {
+  content: "\f32a";
+}
+.fl-rocky-linux::before {
+  content: "\f32b";
+}
+.fl-snappy::before {
+  content: "\f32c";
+}
+.fl-solus::before {
+  content: "\f32d";
+}
+.fl-void::before {
+  content: "\f32e";
+}
+.fl-zorin::before {
+  content: "\f32f";
+}
diff --git a/www/css/fonts/Makefile b/www/css/fonts/Makefile
new file mode 100644
index 00000000..24894aae
--- /dev/null
+++ b/www/css/fonts/Makefile
@@ -0,0 +1,14 @@
+include ../../../defines.mk
+
+FONT_LOGOS_FONTS := font-logos.ttf font-logos.woff font-logos.woff2
+
+all:
+
+.PHONY: install
+install: README.md ${FONT_LOGOS_FONTS}
+	install -d ${WWWFONTSDIR}
+	install -m 0644 $? ${WWWFONTSDIR}
+
+.PHONY: clean
+clean:
+	rm -rf *~
diff --git a/www/css/fonts/README.md b/www/css/fonts/README.md
new file mode 100644
index 00000000..e339f415
--- /dev/null
+++ b/www/css/fonts/README.md
@@ -0,0 +1,5 @@
+# font-logos
+
+https://github.com/lukas-w/font-logos, release v1.0.1
+
+The artwork is licensed under the ["Unlicense" license](https://github.com/lukas-w/font-logos/blob/master/LICENSE)
diff --git a/www/css/fonts/font-logos.ttf b/www/css/fonts/font-logos.ttf
new file mode 100644
index 00000000..e8cea1c3
Binary files /dev/null and b/www/css/fonts/font-logos.ttf differ
diff --git a/www/css/fonts/font-logos.woff b/www/css/fonts/font-logos.woff
new file mode 100644
index 00000000..448da3a9
Binary files /dev/null and b/www/css/fonts/font-logos.woff differ
diff --git a/www/css/fonts/font-logos.woff2 b/www/css/fonts/font-logos.woff2
new file mode 100644
index 00000000..f031c2a6
Binary files /dev/null and b/www/css/fonts/font-logos.woff2 differ
diff --git a/www/index.html.tpl b/www/index.html.tpl
index b07ce5f1..3630b970 100644
--- a/www/index.html.tpl
+++ b/www/index.html.tpl
@@ -10,6 +10,7 @@
     <link rel="stylesheet" type="text/css" href="/pve2/ext6/theme-crisp/resources/theme-crisp-all.css?ver=7.0.0" />
     <link rel="stylesheet" type="text/css" href="/pve2/ext6/crisp/resources/charts-all.css?ver=7.0.0" />
     <link rel="stylesheet" type="text/css" href="/pve2/fa/css/font-awesome.css" />
+    <link rel="stylesheet" type="text/css" href="/pve2/css/font-logos.css" />
     <link rel="stylesheet" type="text/css" href="/pve2/css/ext6-pve.css?ver=[% version %]" />
     <link rel="stylesheet" type="text/css" href="/pwt/css/ext6-pmx.css?ver=[% wtversion %]" />
     [%- IF theme != 'crisp' %]
--
2.39.2





^ permalink raw reply	[flat|nested] 8+ messages in thread

* [pve-devel] [PATCH manager 3/3] ui: GuestStatusView: add 'privileged' and 'ostype' fields
  2023-05-03  9:50 [pve-devel] [PATCH manager 0/3] fix #2435: lxc: show distro and privileged status in summary Christoph Heiss
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 1/3] ui: clean up remnants of in-tree font-awesome files Christoph Heiss
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 2/3] ui: add 'font-logos' stylesheet and font files Christoph Heiss
@ 2023-05-03  9:50 ` Christoph Heiss
  2023-06-07 11:49   ` Thomas Lamprecht
  2 siblings, 1 reply; 8+ messages in thread
From: Christoph Heiss @ 2023-05-03  9:50 UTC (permalink / raw)
  To: pve-devel

The privileged status is displayed by adding a new row to the status
panel, while the distribution logo and name are displayed on the right
side of the title bar of the status panel. The latter fits neatly there,
is rather unintrusive and yet still visible at first sight.

This also solves the problem of having to create a bigger row, so that
the icon is still easily recognisable. At the default font-size of
13pt, this really wasn't the case.

I verified that each supported distro is present in the font and the
name matches up and tested through all supported distros (including
'unmanaged').

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 www/manager6/panel/GuestStatusView.js | 51 ++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)

diff --git a/www/manager6/panel/GuestStatusView.js b/www/manager6/panel/GuestStatusView.js
index 8db1f492..c773f252 100644
--- a/www/manager6/panel/GuestStatusView.js
+++ b/www/manager6/panel/GuestStatusView.js
@@ -11,6 +11,30 @@ Ext.define('PVE.panel.GuestStatusView', {
 	};
     },

+    controller: {
+	xclass: 'Ext.app.ViewController',
+
+	init: view => {
+	    if (view.pveSelNode.data.type !== 'lxc') {
+		return;
+	    }
+
+	    const nodename = view.pveSelNode.data.node;
+	    const vmid = view.pveSelNode.data.vmid;
+
+	    Proxmox.Utils.API2Request({
+		url: `/api2/extjs/nodes/${nodename}/lxc/${vmid}/config`,
+		waitMsgTargetView: view,
+		method: 'GET',
+		success: ({ result }) => {
+		    view.down('#unprivileged').updateValue(
+			Proxmox.Utils.format_boolean(result.data.unprivileged));
+		    view.ostype = result.data.ostype;
+		},
+	    });
+	},
+    },
+
     layout: {
 	type: 'vbox',
 	align: 'stretch',
@@ -58,6 +82,15 @@ Ext.define('PVE.panel.GuestStatusView', {
 	    },
 	    printBar: false,
 	},
+	{
+	    itemId: 'unprivileged',
+	    iconCls: 'fa fa-lock fa-fw',
+	    title: gettext('Unprivileged'),
+	    printBar: false,
+	    cbind: {
+		hidden: '{isQemu}',
+	    },
+	},
 	{
 	    xtype: 'box',
 	    height: 15,
@@ -134,6 +167,22 @@ Ext.define('PVE.panel.GuestStatusView', {
 		+ ')';
 	}

-	me.setTitle(me.getRecordValue('name') + text);
+	let title = `<div class="left-aligned">${me.getRecordValue('name') + text}</div>`;
+
+	if (me.pveSelNode.data.type === 'lxc' && me.ostype && me.ostype !== 'unmanaged') {
+	    // Manual mappings for distros with special casing
+	    const namemap = {
+		'archlinux': 'Arch Linux',
+		'nixos': 'NixOS',
+		'opensuse': 'openSUSE',
+		'centos': 'CentOS',
+	    };
+
+	    const distro = namemap[me.ostype] ?? Ext.String.capitalize(me.ostype);
+	    title += `<div class="right-aligned">
+		<i class="fl-${me.ostype} fl-fw"></i>&nbsp;${distro}</div>`;
+	}
+
+	me.setTitle(title);
     },
 });
--
2.39.2





^ permalink raw reply	[flat|nested] 8+ messages in thread

* [pve-devel] applied: [PATCH manager 1/3] ui: clean up remnants of in-tree font-awesome files
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 1/3] ui: clean up remnants of in-tree font-awesome files Christoph Heiss
@ 2023-06-07 10:15   ` Thomas Lamprecht
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Lamprecht @ 2023-06-07 10:15 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 03/05/2023 um 11:50 schrieb Christoph Heiss:
> Commit e97c2601 ("change to debian font-awesome") removed the usage of
> the in-tree font-awesome files, replacing them with the Debian package.
> Thus clear out these leftovers out, as they are completely usused.
> 
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
> Formatted the patch with `--irreversible-delete` for now to be more
> suitable for review, as otherwise it would be pretty big (~400kB) for
> the mailing list.
> 
>  www/css/font-awesome.css                | 2086 -----------------------
>  www/css/fonts/FontAwesome.otf           |  Bin 109688 -> 0 bytes
>  www/css/fonts/Makefile                  |   12 -
>  www/css/fonts/README                    |   11 -
>  www/css/fonts/fontawesome-webfont.eot   |  Bin 70807 -> 0 bytes
>  www/css/fonts/fontawesome-webfont.svg   |  655 -------
>  www/css/fonts/fontawesome-webfont.ttf   |  Bin 142072 -> 0 bytes
>  www/css/fonts/fontawesome-webfont.woff  |  Bin 83588 -> 0 bytes
>  www/css/fonts/fontawesome-webfont.woff2 |  Bin 66624 -> 0 bytes
>  9 files changed, 2764 deletions(-)
>  delete mode 100644 www/css/font-awesome.css
>  delete mode 100644 www/css/fonts/FontAwesome.otf
>  delete mode 100644 www/css/fonts/Makefile
>  delete mode 100644 www/css/fonts/README
>  delete mode 100644 www/css/fonts/fontawesome-webfont.eot
>  delete mode 100644 www/css/fonts/fontawesome-webfont.svg
>  delete mode 100644 www/css/fonts/fontawesome-webfont.ttf
>  delete mode 100644 www/css/fonts/fontawesome-webfont.woff
>  delete mode 100644 www/css/fonts/fontawesome-webfont.woff2
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [pve-devel] [PATCH manager 2/3] ui: add 'font-logos' stylesheet and font files
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 2/3] ui: add 'font-logos' stylesheet and font files Christoph Heiss
@ 2023-06-07 10:59   ` Thomas Lamprecht
  2023-06-09  9:28     ` Christoph Heiss
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Lamprecht @ 2023-06-07 10:59 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 03/05/2023 um 11:50 schrieb Christoph Heiss:
> From [0]. As they are licensed under the "Unlicence" license, including
> them here and re-distributing them should bear no problems [1].
> 
> [0] https://github.com/Lukas-W/font-logos
> [1] https://choosealicense.com/licenses/unlicense/
> 
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
> Formatted the patch with `--no-binary` for now to ease reviewing, as it
> otherwise would be pretty big for the mailing list, due to the binary
> files. For testing, either download the latest release [2] and copy
> `assets/font-logs.{ttf,woff,woff2}` from the extraced folder to
> `www/css/fonts/`, or drop me a line and I can send the full patch
> off-list.
> 
> There's also the possibility to build a customized version of the font
> from source, to reduce it down to just the logos needed for the ten
> distributions currently supported/recogized. The file sizes are reduced
> to about 10-20% of their original files, so might be worth to do that -
> for example, the .woff goes from 73kB to 9.2kB.
> 
> It's fairly easy, basically just throwing out all unneeded entries in
> the `icons.tsv` file in the repo. If that would be preferred, I happily
> do that; adding some instructions too on how to replicate/rebuild the
> font as needed.
> 
> [2] https://github.com/lukas-w/font-logos/releases/download/v1.0.1/font-logos-1.0.1.zip
> 
>  www/css/Makefile               |   3 +-
>  www/css/font-logos.css         | 224 +++++++++++++++++++++++++++++++++
>  www/css/fonts/Makefile         |  14 +++
>  www/css/fonts/README.md        |   5 +
>  www/css/fonts/font-logos.ttf   | Bin 0 -> 29116 bytes
>  www/css/fonts/font-logos.woff  | Bin 0 -> 74576 bytes
>  www/css/fonts/font-logos.woff2 | Bin 0 -> 15724 bytes
>  www/index.html.tpl             |   1 +
>  8 files changed, 246 insertions(+), 1 deletion(-)
>  create mode 100644 www/css/font-logos.css
>  create mode 100644 www/css/fonts/Makefile
>  create mode 100644 www/css/fonts/README.md
>  create mode 100644 www/css/fonts/font-logos.ttf
>  create mode 100644 www/css/fonts/font-logos.woff
>  create mode 100644 www/css/fonts/font-logos.woff2


Please, let's not repeat the mistake again and pull in some binary artefacts in
manager even if they don't are directly related to it.

Lets set up a separate package, that way we can also give proper attribution
(even if the license used wouldn't necessarily require it).

I created:
https://git.proxmox.com/?p=fonts-font-logos.git;a=summary

It contains a trivial packaging, the build fonts and the CSS file, but with the
web-font path adopted to use ../fonts/ to load them, just like Font Awesome does.

That way we can add it to pveproxy in a similar manner, please test if that works
out for you.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [pve-devel] [PATCH manager 3/3] ui: GuestStatusView: add 'privileged' and 'ostype' fields
  2023-05-03  9:50 ` [pve-devel] [PATCH manager 3/3] ui: GuestStatusView: add 'privileged' and 'ostype' fields Christoph Heiss
@ 2023-06-07 11:49   ` Thomas Lamprecht
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Lamprecht @ 2023-06-07 11:49 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 03/05/2023 um 11:50 schrieb Christoph Heiss:
> The privileged status is displayed by adding a new row to the status
> panel, while the distribution logo and name are displayed on the right
> side of the title bar of the status panel. The latter fits neatly there,
> is rather unintrusive and yet still visible at first sight.
> 
> This also solves the problem of having to create a bigger row, so that
> the icon is still easily recognisable. At the default font-size of
> 13pt, this really wasn't the case.
> 
> I verified that each supported distro is present in the font and the
> name matches up and tested through all supported distros (including
> 'unmanaged').
> 
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
>  www/manager6/panel/GuestStatusView.js | 51 ++++++++++++++++++++++++++-
>  1 file changed, 50 insertions(+), 1 deletion(-)
> 

please split this patch up, this is adding two relatively unrelated things.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [pve-devel] [PATCH manager 2/3] ui: add 'font-logos' stylesheet and font files
  2023-06-07 10:59   ` Thomas Lamprecht
@ 2023-06-09  9:28     ` Christoph Heiss
  0 siblings, 0 replies; 8+ messages in thread
From: Christoph Heiss @ 2023-06-09  9:28 UTC (permalink / raw)
  To: Thomas Lamprecht; +Cc: Proxmox VE development discussion

On Wed, Jun 07, 2023 at 12:59:23PM +0200, Thomas Lamprecht wrote:
> Am 03/05/2023 um 11:50 schrieb Christoph Heiss:
> > [..]
>
> Please, let's not repeat the mistake again and pull in some binary artefacts in
> manager even if they don't are directly related to it.
>
> Lets set up a separate package, that way we can also give proper attribution
> (even if the license used wouldn't necessarily require it).
>
> I created:
> https://git.proxmox.com/?p=fonts-font-logos.git;a=summary
Thanks, that's great! I will rework the series to use the new package.

>
> It contains a trivial packaging, the build fonts and the CSS file, but with the
> web-font path adopted to use ../fonts/ to load them, just like Font Awesome does.
>
> That way we can add it to pveproxy in a similar manner, please test if that works
> out for you.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-09  9:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-03  9:50 [pve-devel] [PATCH manager 0/3] fix #2435: lxc: show distro and privileged status in summary Christoph Heiss
2023-05-03  9:50 ` [pve-devel] [PATCH manager 1/3] ui: clean up remnants of in-tree font-awesome files Christoph Heiss
2023-06-07 10:15   ` [pve-devel] applied: " Thomas Lamprecht
2023-05-03  9:50 ` [pve-devel] [PATCH manager 2/3] ui: add 'font-logos' stylesheet and font files Christoph Heiss
2023-06-07 10:59   ` Thomas Lamprecht
2023-06-09  9:28     ` Christoph Heiss
2023-05-03  9:50 ` [pve-devel] [PATCH manager 3/3] ui: GuestStatusView: add 'privileged' and 'ostype' fields Christoph Heiss
2023-06-07 11:49   ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal