Re: [Toaster] [PATCH] toaster: Added dataTables library to include sorting and pagination for table element

Richard Purdie <[email protected]> Wed, 13 Dec 2023 13:11:06 +0000
Newsgroups org.yoctoproject.lists.toaster,org.openembedded.lists.bitbake-devel
Message-ID <a4075d7dacd13a9c974c227c987ac112093204d7.camel@linuxfoundation.org>
On Tue, 2023-12-12 at 16:57 -0500, Marlon Rodriguez Garcia wrote:
> Added jquery.dataTables to customize table rendering in section
> "Import eventlogs".
> This library includes the following: sorting, pagination, search and
> CSS styles.

Thanks, this looks good. I noticed that there are a couple of static
images missing:

http://localhost:8000/static/images/sort_asc.png
http://localhost:8000/static/images/sort_both.png

I also wondered about something like this:

diff --git a/bitbake/lib/toaster/toastergui/templates/command_line_builds.h=
tml b/bitbake/lib/toaster/toastergui/templates/command_line_builds.html
index 25a5e8062fb..c9fefef01a2 100644
--- a/bitbake/lib/toaster/toastergui/templates/command_line_builds.html
+++ b/bitbake/lib/toaster/toastergui/templates/command_line_builds.html
@@ -197,7 +197,7 @@ $( "#form_file").on( "submit", function( event ) {
 });
=20
 $(document).ready( function () {
-    $('#eventlog-table').DataTable();
+    $('#eventlog-table').DataTable({order: [[0, 'desc']], "pageLength": 50=
})
 });
=20
 </script>

to set the default sort and show a few more file entries per page. Not
sure if I have that in the right place!

I did also realise the issue I was trying to explain yesterday.

If you start an import of a commandline build, then try and import a
second one whilst the first is still running, it crashes. Is there
something we can do about that so they queue?

Cheers,

Richard