Add items-imported to VL queue summary
authorberick <berick@esilibrary.com>
Fri, 20 May 2011 21:13:13 +0000 (17:13 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 6 Jul 2011 18:50:53 +0000 (14:50 -0400)
Added total_items_imported value to queue summary API call.  Displaying
value in vandelay queue summary area.

Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm
Open-ILS/web/js/ui/default/vandelay/vandelay.js
Open-ILS/web/templates/default/vandelay/inc/queue.tt2

index 0647c88..d88e3a4 100644 (file)
@@ -1400,6 +1400,9 @@ sub retrieve_queue_summary {
         $summary->{total_items} = $e->json_query($query)->[0]->{count};
         $query->{where}->{import_error} = {'!=' => undef};
         $summary->{item_import_errors} = $e->json_query($query)->[0]->{count};
+        delete $query->{where}->{import_error};
+        $query->{where}->{import_time} = {'!=' => undef};
+        $summary->{total_items_imported} = $e->json_query($query)->[0]->{count};
     }
 
     return $summary;
index 1c03486..d9a26a1 100644 (file)
@@ -1010,6 +1010,7 @@ var handleRetrieveRecords = function() {
             dojo.byId('vl-queue-summary-total-count').innerHTML = summary.total +'';
             dojo.byId('vl-queue-summary-import-count').innerHTML = summary.imported + '';
             dojo.byId('vl-queue-summary-import-item-count').innerHTML = summary.total_items + '';
+            dojo.byId('vl-queue-summary-import-item-imported-count').innerHTML = summary.total_items_imported + '';
             dojo.byId('vl-queue-summary-rec-error-count').innerHTML = summary.rec_import_errors + '';
             dojo.byId('vl-queue-summary-item-error-count').innerHTML = summary.item_import_errors + '';
         }
index c34c57f..783ffa5 100644 (file)
@@ -28,6 +28,7 @@
                                 <tr><td>&vandelay.queue.imported;</td><td> <span style='font-weight:bold;' id='vl-queue-summary-import-count'/></td></tr>
                                 <tr><td>Record Import Failures</td><td> <span style='font-weight:bold;' id='vl-queue-summary-rec-error-count'/></td></tr>
                                 <tr><td>Items in Queue</td><td> <span style='font-weight:bold;' id='vl-queue-summary-import-item-count'/></td></tr>
+                                <tr><td>Items Imported</td><td> <span style='font-weight:bold;' id='vl-queue-summary-import-item-imported-count'/></td></tr>
                                 <tr><td>Item Import Failures</td><td> <span style='font-weight:bold;' id='vl-queue-summary-item-error-count'/></td></tr>
                             </tbody>
                         </table>