Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-04-2018 13:39:50

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Backend table sorting, filtering, searches, etc, etc

Hi Nick

Have you ever considered using a jquery plugin to filter/sort all the backend tables shown via dboverview.php?? ( and probably rawdbover.php but haven't got there yet)

I have just installed a quick plugin, dataTables. A small JS file and a few lines of CSS.

In dboverview.php I have commented out the navigation as it is no longer required, and added a line of js_docready to activate the plugin for the table.

In core_selectcustom database I have added core.dboverview.count.6 with 100000 rows per page - Using this just to test, but this setting could be removed altogether eventually.

So far I have only tested with a table with around 2000 rows as it is only on my developer site, and I may need to revert to standard version for huge database tables, but the overall result is fantastic.

I can now sort by each column, search with instant results, adjust number of items per page instantly, plus lots more possibilities including adding/hiding columns and delayed loading.

This will save me loads of time searching for items in large tables.


Can you think of any problems that may arise or is there any reason you haven't used this type of plugin before??

https://www.robzanna.co.uk/skins/Flex/images/Capture.jpg


Rob

Offline

 

#2 03-04-2018 20:42:01

lgt
Member
Registered: 11-21-2010
Posts: 272
Website

Re: Backend table sorting, filtering, searches, etc, etc

First Walmart Mod!









Offline

 

#3 03-05-2018 08:52:05

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Backend table sorting, filtering, searches, etc, etc

Focus right now is on the development of modules like Walmart, which is being tested this week on lgt's site, and a few other extension modules for various clients. There's also another software update on the way.

The answer to your question is that pulling that much data into the browser window (enough to make something like this very useful) is only going to work on very fast connections using larger devices, and only up to the point where the dataset becomes unwieldy for the browser.  Once you approach a few thousand rows, degradation is going to be noticeable.  K9 is built to support around a million rows per table, so a solution like this isn't really feasible without a bunch of controls to automatically turn it off when certain conditions are met.

Take a look at how Ajax is used when managing relationships in product offers.  If I were thinking about data manipulation like you're doing on the db overview, I'd use Ajax to pull chunks in at a time (add rows) on demand.  And remove content (remove rows) from the window as it's not needed.


Nick Hendler

Offline

 

#4 03-06-2018 19:34:39

lgt
Member
Registered: 11-21-2010
Posts: 272
Website

Re: Backend table sorting, filtering, searches, etc, etc

First Walmart Mod!









Offline

 

#5 03-08-2018 11:58:55

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Backend table sorting, filtering, searches, etc, etc

Hi Nick
As expected, big tables don't work well, but I have just added a few controls so any table with over 2000 rows uses the default method.

Under 2000 and everything works instantly.

The 2000 limit is perfect for the pending orders and product tables, which are the most commonly used tables for me.


Rob

Offline

 

#6 03-20-2018 09:07:36

jj1987
Member
From: Orlando, FL
Registered: 07-14-2008
Posts: 502
Website

Re: Backend table sorting, filtering, searches, etc, etc

zanart wrote:

Hi Nick
As expected, big tables don't work well, but I have just added a few controls so any table with over 2000 rows uses the default method.

Under 2000 and everything works instantly.

The 2000 limit is perfect for the pending orders and product tables, which are the most commonly used tables for me.

Size of the data tables is only an issue if you're not using paging and calling a web service instead of embedding the data directly in the html.

At my full time job we use Kendo UI Grids.  They hold data sets of nearly 2M records, zero issues
https://demos.telerik.com/kendo-ui/grid … ta-binding



-James Garrett

Offline

 

#7 03-22-2018 07:39:28

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Backend table sorting, filtering, searches, etc, etc

Ok.  So this is a different concept - using an Ajax refresh on the whole data set and pulling back page 1 on a re-sort.  Right?


Nick Hendler

Offline

 

Board footer