Commit Graph

5 Commits

Author SHA1 Message Date
A
fc2e6f4062 Improves sorting of metric's labels.
When selecting the time of metric's points only the time was selected,
not the date. The issue with this is mainly in the view "Last 12 hours".
Example:
It's 11:10 am and I choose the "Last 12 hours" view, the metrics points
will be from 23:00 yesterday to 11:00 am today.
When giving all these datas and labels to ChartJS, it sorts the points
by label from lower to highter. It means 23:00 (from yesterday) will be
after the datas of today, it doesn't have sense.

To fix it, I've added in the repositories the date in addition to the
time. So it's no longer 11:00 that is selected but 2018-01-15 11:00.
I've updated the Metric vue in order to cut the label when displaying so
it doesn't change the displaying.
Because there are metric views that are based on date but not time,
there is a condition in the Metric vue to cut the string only if the
time is present.

Related to CachetHQ/Cachet#2848
2018-01-15 11:28:41 +01:00
A
0f6512fbf1 Display the metric's suffix in tooltip.
When we mouseovered on a point on a metric, the value was shown but the
suffix wasn't.
It was due to a curly bracket issue, the "tooltip" option wasn't given
as an "option" sub-object, but as a third argument of the Chart
constructor. A curly bracket was closed to early.
This is fixed and the suffix is now displayed.

Related to CachetHQ/Cachet#2848
2018-01-15 13:00:56 +01:00
James Brooks
8746412467 Update language files 2017-12-03 17:47:45 +00:00
James Brooks
3ea1e959f9 Fix metrics not displaying. Closes #2737 2017-09-30 11:29:12 +01:00
James Brooks
d807770ff6 Resource changes 2017-09-15 07:39:40 +01:00