From c909ace083d6db7a3119f399aeb48ac1d39c3b48 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Sat, 28 Mar 2020 21:48:26 -0600 Subject: [PATCH] Clean up the metrics page a bit. --- Wabbajack.BuildServer/public/metrics.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Wabbajack.BuildServer/public/metrics.html b/Wabbajack.BuildServer/public/metrics.html index 27e5b11c..261c1891 100644 --- a/Wabbajack.BuildServer/public/metrics.html +++ b/Wabbajack.BuildServer/public/metrics.html @@ -45,14 +45,14 @@ var result = metrics({type: group}) .then(function (data) { - var data = data.dailyUniqueMetrics; - var labels = _.uniq(_.flatten(_.map(data, series => series.labels))).sort(); - var datasets = _.map(data, series => { + var data = _.filter(data.dailyUniqueMetrics, series => _.some(series.values, v => v > 2)); + var labels = _.last(_.uniq(_.flatten(_.map(data, series => series.labels))), 30); + var datasets = _.last(_.map(data, series => { return { label: series.seriesName, fill: false, data: series.values - }}); + }}), 30); var ctx = document.getElementById(ele).getContext('2d'); var chart = new Chart(ctx, { // The type of chart we want to create