LP#1482400: when activating a PO, provide better progress updates
authorGalen Charlton <gmc@esilibrary.com>
Thu, 6 Aug 2015 22:15:54 +0000 (22:15 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 6 Aug 2015 22:21:55 +0000 (22:21 +0000)
commitb64503db82efe38f16705b8d54ab51f344545a23
tree59abaee3999c000f2e71d49247812cbf2dca6a8a
parentb4ae273594927d04d1b1c4ef91ea0f42a4244c5e
LP#1482400: when activating a PO, provide better progress updates

This patch improves how progress is reported during the activation
of a purchase order that has a large number of assets (bibs and
copies) to create.  Specifically, it:

[1] Shows a progress bar during the asset creation phase.
[2] Calculates a linear throttle for updating the record counts
    widget. The value is based on the maximum number of bibs and
    items that could be created during the activation, divided by 20
    (which is an empirically derived number of streaming responses
    that can be sent back before the XUL client starts having
    difficulty).
[3] Adds a title to the progress bar that's displayed during the
    second phase of order activation.

To test, after applying the patch:

[1] Create a purchase order that has a large number of
    brief bibs and copies to create during activation.  For
    example, 30 line items and 60 copies.
[2] Activate the purchase order.  You should see the following
    after entering the record import queue and submitting:

    (a) Progress bar whose title is "Creating bib, call number,
        and copy records.."
    (b) The record update counts should be updated at a regular
        frequency.
    (c) When the asset creation phase is done, the progress bar's
        title should change to "Activating purchase order..."

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
Open-ILS/web/js/dojo/openils/acq/nls/acq.js
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/js/ui/default/acq/po/view_po.js