Ticket #8230 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

[ICAT] Implement paging

Reported by: Jay Rainey Owned by: Jay Rainey
Priority: major Milestone: Release 3.1
Component: GUI Keywords: ICAT,ICAT4
Cc: Blocked By: #8322, #8401
Blocking: Tester: Alex Buts

Description

Implement paginating for search results within the ICAT GUI.

Change History

comment:1 Changed 7 years ago by Jay Rainey

  • Summary changed from ICAT Paging to [ICAT] Implement paging

comment:2 Changed 7 years ago by Jay Rainey

  • Blocked By 8322 added

comment:3 Changed 7 years ago by Jay Rainey

  • Blocking 8401 added

comment:4 Changed 7 years ago by Jay Rainey

  • Blocking 8401 removed
  • Blocked By 8401 added

comment:5 Changed 7 years ago by Jay Rainey

  • Blocked By

Added #8322 as blocker as query related fields were added/replaced.

comment:6 Changed 7 years ago by Jay Rainey

  • Status changed from new to inprogress

Added getNumberOfSearchResults() to interface. Refs #8230.

  • Added empty method signatures to related catalogs.

Changeset: 34a30d6e187e296d8baa7b7a832af6f5d106108f

comment:7 Changed 7 years ago by Jay Rainey

Added paging offset and limit to search interface. Refs #8230.

  • Updated catalog method signatures that make inherit this interface.

Changeset: 1532934842729e13946b70f6ed2b702137f05301

comment:8 Changed 7 years ago by Jay Rainey

Updated search query to make use of offset & limit. Refs #8230.

Changeset: 88d12c7ddd7a19e3e5367ca482b5d11821b4ef7d

comment:9 Changed 7 years ago by Jay Rainey

Added implementation for paging method. Refs #8230.

Changeset: 144b667b8343bc790a015e4e852b0a4508c75716

comment:10 Changed 7 years ago by Jay Rainey

Updated implementation in CatalogSearch algorithm. Refs #8230.

  • Added unused arg macro and return to new methods to prevent compiler warnings on build servers.

Changeset: 6f4cab54734e6b41df8798bfe4b13ce5072a80ec

comment:11 Changed 7 years ago by Jay Rainey

Show most recent results first. Refs #8230.

  • Also removed unnecessary logging information.

Changeset: f691bb5c5d1214a4aa8870ee0fdbf02c41128ee6

comment:12 Changed 7 years ago by Jay Rainey

Added logic for paging. Refs #8230.

  • Changed "Previous" and "Next" labels to buttons to allow user to click them.

Changeset: 7391af86c1f395d2fce26ae66a6f31894187e0f6

comment:13 Changed 7 years ago by Jay Rainey

Added implementation to paging SLOTS. Refs #8230.

Changeset: 43ce061eb87512c5ee83b2acfe8f529747b70156

comment:14 Changed 7 years ago by Jay Rainey

Updated helper method to understand algorithm interface. Refs #8230.

Changeset: c8d2da463800441ee0d66f0c7f15560a42d363c1

comment:15 Changed 7 years ago by Jay Rainey

Change long to int64 for paging methods. Refs #8230.

Changeset: 801376ffca678679417741aa6dfbba31d76f5cc0

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:16 Changed 7 years ago by Jay Rainey

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:17 Changed 7 years ago by Jay Rainey

Fix compiler warning. Refs #8230.

  • Moved CatalogHelper from MOC_FILES to seperate include list in cmakefile as it's not an interface class.

Changeset: 7f5a15d9c7a3e079683ee463a14a1bd92a880368

comment:18 Changed 7 years ago by Jay Rainey

Removed unused methods. Refs #8230.

Changeset: 0a355dd61e17f374d64a7180b8df8d9377bd61d7

comment:19 Changed 7 years ago by Jay Rainey

Added page input field functionality. Refs #8230.

Changeset: 36c4cf5811d259e6959b1223ea8f38bbca601db2

comment:20 Changed 7 years ago by Jay Rainey

Prevent invalid page number. Refs #8230.

Changeset: eb849221ac812dc4079a35c1d246207f9c925dad

comment:21 Changed 7 years ago by Jay Rainey

Make ICAT3 helper class a member variable. Refs #8230.

  • This allows the helper class member variables to be shared across the catalog methods.

Changeset: 75f4f75ee59108c8fe0b25de1d63312ef804a288

comment:22 Changed 7 years ago by Jay Rainey

Implement paging for ICAT3. Refs #8230.

Changeset: cce247ea9e249cc07305661645722944ed264929

comment:23 Changed 7 years ago by Jay Rainey

  • Status changed from inprogress to verify
  • Resolution set to fixed

Prevent user entering invalid page. Refs #8230.

Changeset: 532c19babe1e78c9c24285f76febce68f6a269d6

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:24 Changed 7 years ago by Jay Rainey

This ticket deals with the implementation of paging within the catalog interface. This prevents the user from performing queries that could return thousands of results, and as a result speeding up the response of the queries performed.

This ticket involved making changes to the catalog interface (ICatalog), including adding an additional method. As a result, all related catalogs (ICat4Catalog & ICat3Catalog) changed, as well as the searching algorithm (CatalogSearch), which can now be used to obtain the COUNT of results returned.

To test

  1. Open Mantid & log into the catalog.
  2. Perform a search that would return lots of results. For example, select ALF and click Search.
  3. The new paging functionality should now be visible. Try selecting next, previous, and entering your desired page.
  4. Try to break it.

Note: as we still support ICAT3 I have modified ICat3Catalog to support paging functionality. This should also be tested.

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:25 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:26 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:27 Changed 7 years ago by Martyn Gigg

There are some things about the implementation within ICat4Catalog that we can improve.

At the moment you must call getSearchQuery before getNumberOfResults since the only way to give input is to call getSearchQuery. The methods need to be disentangled and have a clearer structure. I think getSearchQuery should be split up to have two methods: createCountQuery & createSearchQuery so that it is clear what is being built when they are called. The methods will have common code so a private helper should be created containing the common code.

The getNumberOfSearchResults method should not rely on the other methods being called and should also accept as input the parameters for the search. It will simply use those and return the number of results that query would return. This I think then means that you wont need the m_countQuery member variable.

Last edited 7 years ago by Martyn Gigg (previous) (diff)

comment:28 Changed 7 years ago by Jay Rainey

  • Status changed from reopened to inprogress

Modified interface parameters. Refs #8230.

  • Renamed getSearchQuery to buildSearchQuery.

Changeset: 9e0dfcd9372aac0a32b31522fefd7782d8547359

comment:29 Changed 7 years ago by Jay Rainey

Modified query implementation. Refs #8230.

Changeset: 2b716013a0ce858103a37b3f525cdbcc55ba6357

comment:30 Changed 7 years ago by Jay Rainey

Updated related query dependencies. Refs #8230.

  • Updated catalog search algorithm to perform count query if property set, otherwise perform normal paging search.
  • Use static_cast instead of old C style casting in GUI class.

Changeset: 29b4a7c6e7fd07b0dcd3f62db3c3f2ec4e348c0d

comment:31 Changed 7 years ago by Jay Rainey

Updated related query dependencies. Refs #8230.

  • Added setSearchProperties for re-usability between searching methods (general search & paging search).
  • Removed unnecessary member variable.
  • Removed constructor from helper class as it is no longer needed.

Changeset: 25544f3d89d6098ae11fd92a068bcca1efb12669

comment:32 Changed 7 years ago by Jay Rainey

Updated ICAT3 to use paging. Refs #8230.

Changeset: 6ba44df375c9a64771d160e20ce4d4ad3abb3ce4

comment:33 Changed 7 years ago by Jay Rainey

  • Status changed from inprogress to verify
  • Resolution set to fixed

To test

  1. Perform a code review ensuring the paging functionality does not directly depend on the searching functionality. That is, you can perform a search without having to perform a COUNT query, and vise versa.
  2. To test the GUI aspect read comment:24.

comment:34 Changed 7 years ago by Alex Buts

  • Status changed from verify to verifying
  • Tester changed from Martyn Gigg to Alex Buts

comment:35 Changed 7 years ago by Alex Buts

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Minor change to ICat virtual interface needed but otherwise looks fine to me

comment:36 Changed 7 years ago by Jay Rainey

  • Status changed from reopened to inprogress

Removed value from virtual method parameter. Refs #8230.

Changeset: 1162a224b12b27582b790be91dd52257a8f92ce9

comment:37 Changed 7 years ago by Jay Rainey

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:38 Changed 7 years ago by Alex Buts

  • Status changed from verify to verifying

comment:39 Changed 7 years ago by Alex Buts

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8230_icat_paging'

Full changeset: ea6f581994fbbd0a01cd7afe40e70590d7778d7f

comment:40 Changed 7 years ago by Jay Rainey

Change long to int64 for paging methods. Refs #8230.

Changeset: 03e5ac998bb8a4ae3928210b620f87f9c024f97d

comment:41 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9075

Note: See TracTickets for help on using tickets.