This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 426374 - 3.8.1: Ajax Optimizations for Bug Query Pages
3.8.1: Ajax Optimizations for Bug Query Pages
Status: CLOSED NEXTRELEASE
Product: Bugzilla
Classification: Community
Component: User Interface (Show other bugs)
3.2
All Linux
high Severity medium (vote)
: ---
: ---
Assigned To: David Lawrence
4 hours
:
Depends On:
Blocks: RHBZ30UpgradeTracker 406181
  Show dependency treegraph
 
Reported: 2007-12-20 11:00 EST by David Lawrence
Modified: 2013-06-24 00:16 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-27 23:48:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch to optimize query.cgi using ajax to update component/version/milestone list (32.63 KB, patch)
2008-04-04 15:36 EDT, David Lawrence
no flags Details | Diff
Patch to optimize query.cgi using ajax to update component/version/milestone list (v2) (71.38 KB, patch)
2008-04-17 00:01 EDT, David Lawrence
nelhawar: review+
dkl: review? (kbaker)
Details | Diff

  None (edit)
Description David Lawrence 2007-12-20 11:00:55 EST
+++ This bug was initially created as a clone of Bug #406181 +++

Description:
On certain pages Ajax optimizations are used to speed up page loading time. Red
Hat has a high number of components for certain products. The component lists
cause a large amount of HTML having to be downloaded by the client browser. The
Ajax functions allow the UI to only show the components needed depending on
which products are selected.

Function Requirements:
When selecting products on query.cgi, the components, versions, milestones
fields are automatically updated.

Pretty much self contained on the backend in Bugzilla/Ajax.pm and ajax.cgi. A
lot of javascript though in js/*.js and the templates themselves.
Comment 1 David Lawrence 2007-12-20 14:00:31 EST
LOC Estimation:

js/product_query.js: 86
templates: 139
selenium tests to verify proper operation of component/version/milestone
filtering: 4 hours

LOC Total: 225
Comment 2 David Lawrence 2008-04-04 15:36:19 EDT
Created attachment 301328 [details]
Patch to optimize query.cgi using ajax to update component/version/milestone list

Attaching a patch that optimizes the query.cgi page by filtering the
component/version/target_milestone lists using ajax instead of loading the
entire structure fresh with each page load. 

Note:

1. Added js/query.js and js/rpc-min.js to support the javascript call
updateQuerySelects() that redraws the proper select forms when products are
selected.
2. Using get_selection() and restoreSelection() in js/util.js provided by
upstream.
3. Updated query.cgi to only load the component/version/target_milestones for
selected products (if any are selected) which helps speed things up
considerably. Before even if you only wanted to see RHEL products, it would
still initially load all components from all products which included Fedora
(5000+ components).

I have installed this on bugdev.devel.redhat.com/bugzilla for testing.

Please review
Dave
Comment 3 Kevin Baker 2008-04-16 13:27:56 EDT
Comment on attachment 301328 [details]
Patch to optimize query.cgi using ajax to update component/version/milestone list

query.cgi 

your code fell outside your REDHAT comment terminator
Comment 4 Kevin Baker 2008-04-16 14:01:21 EDT
I jumped over to bugdev and took it for a test drive.

First Page load of query.cgi?format=advanced

No Classification, Product, Component, Version are selected however they are 
all filled with values. My expectation was that on the virgin load it would 
only have the Classification filled. If I clicked a classification then it 
would show the products for that classification. If I clicked a product then 
it would then fill the components and versions for that product. Until then 
they would be empty. If no classification is selected how does the UI 
determine what products to list? All products? Likewise if no product is 
selected what components are chosen? IMHO they should be empty and only the 
Classification box should have values. An empty list would indicate that you 
are not searching on that field and hence searching all.

Am I making sense?
Comment 5 David Lawrence 2008-04-17 00:01:59 EDT
Created attachment 302696 [details]
Patch to optimize query.cgi using ajax to update component/version/milestone list (v2)

Kevin, I had different versions running today and you may have hit bugdev at a
bad time. 

Attaching a new version of the query.cgi patch. Took a much different approach
and  tied in more closely with the upstream javascript instead of writing most
new from scratch. This makes the patch much smaller. Also this is better in
that any subsequent loads of the same product data will not get it again from
the server and caches the data.

Please review
Dave
Comment 6 Noura El hawary 2008-04-17 08:01:38 EDT
Comment on attachment 302696 [details]
Patch to optimize query.cgi using ajax to update component/version/milestone list (v2)

looks good to me Dave.
Comment 7 David Lawrence 2008-04-17 14:35:39 EDT
Checked in to CVS. Worked 8 hours. 

Created a new bug separately for query.cgi to be optimized to only load
components/versions/milestones if certain classifications/products are already
selected to cut down on HTML sent initially.

https://bugzilla.redhat.com/show_bug.cgi?id=442939

Dave

Note You need to log in before you can comment on or make changes to this bug.