We were providing 2 data series with different number of elements and this was
causing problems when the chart was rendered.
Fixes: https://tracker.ceph.com/issues/42296
Signed-off-by: Tiago Melo <tmelo@suse.com>
(cherry picked from commit
daedc7516e34a6a1082ff4cfcc4a6b13de56345b)
it('completed the chart', () => {
const lhs = component.chart.datasets[0].data;
- expect(lhs.length).toBe(4);
+ expect(lhs.length).toBe(3);
expect(lhs).toEqual([
- {
- x: 0,
- y: 15
- },
{
x: 5000,
y: 15
y: dp[1]
});
});
+
+ /**
+ * MDS performance counters chart is expecting the same number of items
+ * from each data series. Since in deltaTimeSeries we are ignoring the first
+ * element, we will do the same here.
+ */
+ data.shift();
+
return data;
}