When a redis key does not exist for a single-day summary, the
total_clones_per_day array has a length of 1 with a single value of 0.
This gets past an initial check of array length, but is then reduced to
a value of 0, which is then used as the denominator of an average
calculation. The result of this calculation is NaN and later causes
JSON.pretty_generate to raise an exception.
This also includes a check on the min_max_clone_times array, because
[].minmax returns [nil, nil].
This adds a :count key to both the overall and daily results. The
payload is now divided in to :duration and :count values for summary
data. The daily results do not include anything under :count except the
total number of VMs cloned for the day. The overall :count includes
total, including minimum, maximum, and average VMs cloned for the date
range requested.
This commit fixes the problem of lingering :timings that were renamed
to :duration. This should resolve a NilClass failure. This also converts
string results from redis to float so that future minmax calls will
treat them as numerics instead of strings.
These changes are to match the status endpoints JSON payload. This also
introduces both clone timings and information on total clones. The field
"day" is renamed to "date" to accomodate when from/to will include
times.
This PR includes the following changes:
- everything at the /dashboard/stats/vmpooler/numbers API endpoint has
been moved to /status, and stats-vmpooler-numbers.js is now looking to
/status for it's metrics
- added '.extra'-classed metrics to stats-vmpooler-numbers.js to pull
in daily clone totals, average clone time, etc.
- dashboard.css includes an @media query to display the extra metrics
if the dashboard's max-width exceeds 1500px
Add an endpoint that returns clone totals and average clone time for
the given time spans. The time spans are determined by the query
parameters "from" and "to", with the resulting range being inclusive of
both. If you want a single day, it should be both the "from" and the
"to" value.
This commit removes support for VMware 'resource pool' functionality
entirely, as VMware installations without the DRS feature enabled are
unable to configure or use resource pools.
Also, resource pools should have never been used for organization;
that's what folders are for.