Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths
  2022-07-28 23:23 [Buildroot] [PATCH 1/3] support/scripts/pkg-stats: make cells with many CVEs collapsible Sen Hastings
@ 2022-07-28 23:23 ` Sen Hastings
  2022-08-01 17:04   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Sen Hastings @ 2022-07-28 23:23 UTC (permalink / raw)
  To: buildroot; +Cc: Sen Hastings

This adjusts the column widths, mostly for asthetics/legibility.

It is primarily for chrome based browsers, which like to
linebreak on explicit hyphens, meaning every CVE takes multiple lines.

see: https://github.com/w3c/csswg-drafts/issues/3434

Signed-off-by: Sen Hastings <sen@phobosdpl.com>
---
 support/scripts/pkg-stats | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 8ce4e3f260..4b396d3217 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -853,7 +853,7 @@ function expandField(fieldId){
 #package-grid, #results-grid {
   display: grid;
   grid-gap: 2px;
-  grid-template-columns: 1fr repeat(12, min-content);
+  grid-template-columns: max-content repeat(5, min-content) 20ch repeat(3, max-content) repeat(2, 20ch) auto;
 }
 #results-grid {
   grid-template-columns: 3fr 1fr;
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths
  2022-07-28 23:23 ` [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths Sen Hastings
@ 2022-08-01 17:04   ` Thomas Petazzoni via buildroot
  2022-08-01 18:11     ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-01 17:04 UTC (permalink / raw)
  To: Sen Hastings; +Cc: buildroot

On Thu, 28 Jul 2022 18:23:56 -0500
Sen Hastings <sen@phobosdpl.com> wrote:

> This adjusts the column widths, mostly for asthetics/legibility.
> 
> It is primarily for chrome based browsers, which like to
> linebreak on explicit hyphens, meaning every CVE takes multiple lines.
> 
> see: https://github.com/w3c/csswg-drafts/issues/3434
> 
> Signed-off-by: Sen Hastings <sen@phobosdpl.com>

This doesn't behave extremely well here as it prevents wrapping of the
package .mk file path in the first column, making this first column
larger than it was. I guess wrapping on "/" would be ideally for this
first column.

Here the table continues to exceed the width of my large browser window
(with or without this patch), which is not very nice :-/

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths
  2022-08-01 17:04   ` Thomas Petazzoni via buildroot
@ 2022-08-01 18:11     ` Arnout Vandecappelle
  2022-08-02 20:30       ` Sen Hastings
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2022-08-01 18:11 UTC (permalink / raw)
  To: Thomas Petazzoni, Sen Hastings; +Cc: buildroot

  Hi Sen,

On 01/08/2022 19:04, Thomas Petazzoni via buildroot wrote:
> On Thu, 28 Jul 2022 18:23:56 -0500
> Sen Hastings <sen@phobosdpl.com> wrote:
> 
>> This adjusts the column widths, mostly for asthetics/legibility.
>>
>> It is primarily for chrome based browsers, which like to
>> linebreak on explicit hyphens, meaning every CVE takes multiple lines.
>>
>> see: https://github.com/w3c/csswg-drafts/issues/3434
>>
>> Signed-off-by: Sen Hastings <sen@phobosdpl.com>
> 
> This doesn't behave extremely well here as it prevents wrapping of the
> package .mk file path in the first column, making this first column
> larger than it was. I guess wrapping on "/" would be ideally for this
> first column.
> 
> Here the table continues to exceed the width of my large browser window
> (with or without this patch), which is not very nice :-/

  Since pkg-stats takes a pretty long time to run, it would be nice if you could 
publish the output of pkg-stats (with no .config) somewhere so we can look at it 
directly and notice these things easier.

  Regards,
  Arnout

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths
       [not found] <76c8fcd6-d477-7cbe-dcc5-b382d65f3498@phobosdpl.com>
@ 2022-08-02 19:47 ` Sen Hastings
  2022-08-02 21:18   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Sen Hastings @ 2022-08-02 19:47 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

On 8/1/22 12:04, Thomas Petazzoni wrote:
> On Thu, 28 Jul 2022 18:23:56 -0500
> Sen Hastings <sen@phobosdpl.com> wrote:
> 
>> This adjusts the column widths, mostly for asthetics/legibility.
>>
>> It is primarily for chrome based browsers, which like to
>> linebreak on explicit hyphens, meaning every CVE takes multiple lines.
>>
>> see: https://github.com/w3c/csswg-drafts/issues/3434
>>
>> Signed-off-by: Sen Hastings <sen@phobosdpl.com>
> 
> This doesn't behave extremely well here as it prevents wrapping of the
> package .mk file path in the first column, making this first column
> larger than it was. I guess wrapping on "/" would be ideally for this
> first column.
> 
> Here the table continues to exceed the width of my large browser window
> (with or without this patch), which is not very nice :-/
> 
Yeah, I noticed that even with the older sortable based versions of
pkg-stats.html. It appears to be caused by the extremely long formatted
string binding WFN for ssdp-responder:

"cpe:2.3:a:simple_service_discovery_protocol_responder_project:simple_service_discovery_protocol_responder:1.8:*:*:*:*:*:*:*"

In order to get that cell narrower we would need to either do line
wrapping or horizontal scrolling. As an example for line wrapping,
the <wbr> element could be inserted between vendor and product.

something like:
<code>cpe:2.3:part:vendor<wbr>product:version:update:edition:language:sw_edition:target_sw:target_hw:other</code>


The good news is that this does not actually introduce any new
characters (newline or otherwise) into the rendered text.

Any thoughts?

Sen H.
> Thomas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths
  2022-08-01 18:11     ` Arnout Vandecappelle
@ 2022-08-02 20:30       ` Sen Hastings
  2022-08-02 22:04         ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Sen Hastings @ 2022-08-02 20:30 UTC (permalink / raw)
  To: Arnout Vandecappelle, Thomas Petazzoni; +Cc: buildroot

On 8/1/22 13:11, Arnout Vandecappelle wrote:
>  Hi Sen,
> 
> On 01/08/2022 19:04, Thomas Petazzoni via buildroot wrote:
>> On Thu, 28 Jul 2022 18:23:56 -0500
>> Sen Hastings <sen@phobosdpl.com> wrote:
>>
>>> This adjusts the column widths, mostly for asthetics/legibility.
>>>
>>> It is primarily for chrome based browsers, which like to
>>> linebreak on explicit hyphens, meaning every CVE takes multiple lines.
>>>
>>> see: https://github.com/w3c/csswg-drafts/issues/3434
>>>
>>> Signed-off-by: Sen Hastings <sen@phobosdpl.com>
>>
>> This doesn't behave extremely well here as it prevents wrapping of the
>> package .mk file path in the first column, making this first column
>> larger than it was. I guess wrapping on "/" would be ideally for this
>> first column.
>>
>> Here the table continues to exceed the width of my large browser window
>> (with or without this patch), which is not very nice :-/
> 
>  Since pkg-stats takes a pretty long time to run, it would be nice if
> you could publish the output of pkg-stats (with no .config) somewhere so
> we can look at it directly and notice these things easier.>
Yeah, these weird edge cases only crop up when you build all the
packages... which requires building all the packages.
My usual dev cycle is to pull master.html, edit the js in situ and then
move it back into the pkg-stats script. I usually only run pkg-stats
against a fairly simple defconfig like pc_x86_64_efi or my own personal
project. I guess I should do a full build of master weekly, and perhaps
a nightly run of pkg-stats, then host the html somewhere. And perhaps I
should look into parsing the json output into html...

Sincerely,
Sen H.

>  Regards,
>  Arnout
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths
  2022-08-02 19:47 ` [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths Sen Hastings
@ 2022-08-02 21:18   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-02 21:18 UTC (permalink / raw)
  To: Sen Hastings; +Cc: buildroot

On Tue, 2 Aug 2022 14:47:08 -0500
Sen Hastings <sen@phobosdpl.com> wrote:

> Yeah, I noticed that even with the older sortable based versions of
> pkg-stats.html. It appears to be caused by the extremely long formatted
> string binding WFN for ssdp-responder:
> 
> "cpe:2.3:a:simple_service_discovery_protocol_responder_project:simple_service_discovery_protocol_responder:1.8:*:*:*:*:*:*:*"
> 
> In order to get that cell narrower we would need to either do line
> wrapping or horizontal scrolling. As an example for line wrapping,
> the <wbr> element could be inserted between vendor and product.
> 
> something like:
> <code>cpe:2.3:part:vendor<wbr>product:version:update:edition:language:sw_edition:target_sw:target_hw:other</code>
> 
> The good news is that this does not actually introduce any new
> characters (newline or otherwise) into the rendered text.

Wow, I didn't know about <wbr>. Seems like the right thing to do,
indeed!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths
  2022-08-02 20:30       ` Sen Hastings
@ 2022-08-02 22:04         ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-02 22:04 UTC (permalink / raw)
  To: Sen Hastings; +Cc: buildroot

On Tue, 2 Aug 2022 15:30:06 -0500
Sen Hastings <sen@phobosdpl.com> wrote:

> >  Since pkg-stats takes a pretty long time to run, it would be nice if
> > you could publish the output of pkg-stats (with no .config) somewhere so
> > we can look at it directly and notice these things easier.>  
> Yeah, these weird edge cases only crop up when you build all the
> packages... which requires building all the packages.

No, you don't. Just run it manually:

./support/scripts/pkg-stats --html foo.html --nvd-path ~/path/to/somewhere/

This will use pkg-stats without the -c option, and therefore pkg-stats
will handle all packages rather than just the ones selected in your
configuration.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-08-02 22:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <76c8fcd6-d477-7cbe-dcc5-b382d65f3498@phobosdpl.com>
2022-08-02 19:47 ` [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths Sen Hastings
2022-08-02 21:18   ` Thomas Petazzoni via buildroot
2022-07-28 23:23 [Buildroot] [PATCH 1/3] support/scripts/pkg-stats: make cells with many CVEs collapsible Sen Hastings
2022-07-28 23:23 ` [Buildroot] [PATCH 2/3] support/scripts/pkg-stats: adjust column widths Sen Hastings
2022-08-01 17:04   ` Thomas Petazzoni via buildroot
2022-08-01 18:11     ` Arnout Vandecappelle
2022-08-02 20:30       ` Sen Hastings
2022-08-02 22:04         ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox