From 9c70fb32610562760bde2d1bf680bfd27c5d853d Mon Sep 17 00:00:00 2001 From: Mike Duff Date: Mon, 3 Feb 2014 16:57:03 -0600 Subject: [PATCH] Issue #2745 - Don't display fulfilled or cancelled allocations Former-commit-id: c9b98868d21ec8e2ac37a149d21df2f01698d9d8 [formerly f81772f4bee0df153140d3704e8f931e51bc579d [formerly 7b7f294622e886d7457d7abe0451d3e819568677]] Former-commit-id: f81772f4bee0df153140d3704e8f931e51bc579d Former-commit-id: 4d529f50518f0ec303d3f728e7d79d104fd8e006 --- .../bandwidth/BandwidthGraphDataAdapter.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthGraphDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthGraphDataAdapter.java index bd981a9e8e..e2c62469dc 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthGraphDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthGraphDataAdapter.java @@ -44,6 +44,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthSubscription; import com.raytheon.uf.edex.datadelivery.bandwidth.dao.SubscriptionRetrieval; import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager; import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalPlan; +import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus; /** * Adapts the {@link BandwidthManager} formatted data into a GUI usable graphing @@ -64,6 +65,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalPlan; * Dec 11, 2013 2566 bgonzale handle case when there are no reservations. * Dec 17, 2013 2636 bgonzale Refactored bucket fill in edex. * Jan 23, 2014 2636 mpduff Changed download window generation. + * Feb 03, 2014 2745 mpduff Don't display fulfilled or cancelled allocations. * * * @@ -125,11 +127,15 @@ class BandwidthGraphDataAdapter { for (BandwidthAllocation allocation : allocationList) { if (allocation instanceof SubscriptionRetrieval) { - final SubscriptionRetrieval subRetrieval = (SubscriptionRetrieval) allocation; - String subName = subRetrieval.getBandwidthSubscription() - .getName(); - subAllocationMapping.addAllocationForSubscription(subName, - allocation); + // Don't display fulfilled or cancelled allocations + if (allocation.getStatus() != RetrievalStatus.FULFILLED + && allocation.getStatus() != RetrievalStatus.CANCELLED) { + final SubscriptionRetrieval subRetrieval = (SubscriptionRetrieval) allocation; + String subName = subRetrieval + .getBandwidthSubscription().getName(); + subAllocationMapping.addAllocationForSubscription( + subName, allocation); + } } } }