dCache / dcache-view

A Web application that provide an easy to use User Interface for dCache System.
Other
1 stars 5 forks source link

dcache-view: fix off-by-one indexing error in pool plots* #265

Closed alrossi closed 2 years ago

alrossi commented 2 years ago

Motivation:

https://rb.dcache.org/r/10665 5f16b9113150c325b7fef01f74a758eb7d5bf26a

introduced the pool plots view components. The original code included a method for preprocessing data such that an excessive number of data points was pruned down to something manageable by the Google Charts library (otherwise, rendering becomes extremely slow).

That code, however, contained a bug which has up to now gone unnoticed. There is an off-by-one iteration bound error which prevents the last data series, the queued restores, from being included in the plot.

Modification:

Fix the boundary condition.

Result:

Queued restores are now visible (see attached).

Target: master Request: 2.0 Request: 1.6 Requires-notes: yes Requires-book: no Patch: https://rb.dcache.org/r/13436/ Closes: #263 Acked-by: Dmitry

See here for how to summit a pull request and the sample template for the commit message.