42 Commits

Author SHA1 Message Date
James Brooks
986f6c56b2 Fixes #2414 2018-07-02 22:38:45 +01:00
James Brooks
2793d74d99 Remove unused imports 2018-07-02 22:03:53 +01:00
Jordy van Dortmont
190d951c51 Fix trailing default metric points #2539 2018-03-27 18:25:45 +02:00
Jordy van Dortmont
7e00b6fb88 Fix superfluous metric point 2018-03-27 15:29:04 +02:00
Jordy van Dortmont
be93436d49 Fix SQLite metric points retrieval datetime 2018-03-25 00:19:39 +01:00
James Brooks
4274395a40
Apply fixes from StyleCI (#2879)
[ci skip] [skip ci]
2018-01-21 20:46:11 +00:00
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
d8208be179 Prevents to select metric points in future.
The metrics had problem with the points, if I post/save a metric point
that is created in the future, it was selected.

Example:
It is 10:00 am, I post or save a metric point and it's 'created at'
10:30 am. Using the "Last 12 hours" the metric point would be selected.

This update is applied on all the SQL queries, on minutes, hours, days.

Related to CachetHQ/Cachet#2848
2018-01-15 11:13:57 +01:00
James Brooks
e95fc790fe Last hour only needs 60 points... 2017-12-03 11:41:37 +00:00
Luis Henrique Mulinari
968bc6a3ce Code clean up. Remove some duplicate keys; Remove some unused parameters; Fix some FQCN; 2017-10-11 21:19:07 +02:00
James Brooks
f223e264c1 Switch back to jenseggers/date 2017-03-09 19:42:35 +00:00
James Brooks
0b35002c62 Apply fixes from StyleCI
[ci skip] [skip ci]
2017-01-30 13:31:07 +00:00
James Brooks
27847b6814 Move DateFactory into Services namespace 2017-01-30 13:30:45 +00:00
James Brooks
2b75eca7d0 Remove jenssegers/date and solely use Carbon 2017-01-02 16:11:15 +00:00
Mike Willbanks
4e2c6bce0d Metrics: Calculation set to average always sums
This commit is two part:

1. getActiveValueAttribute should always return the active attribute
without providing an average since the active is the current value.
2. The query to create the average was incorrect and was taking the
count value * the value which we are really looking for the average of
the value.
2016-12-07 15:59:01 -06:00
James Brooks
e23a9358e7 Fix metrics when using table prefixes 2016-11-14 18:43:18 +00:00
James Brooks
915e190a31 Use system getTablePrefix 2016-11-14 18:38:14 +00:00
James Brooks
1c00dec364 Always use dynamic table names 2016-10-30 17:35:57 +00:00
James Brooks
a8bdc5bf52 Applied fixes from StyleCI
[ci skip] [skip ci]
2016-10-30 17:32:41 +00:00
James Brooks
74c646e2f4 Rewrite the Metric repository implementation. Fixes #1900 2016-10-30 17:32:44 +00:00
James Brooks
1fdda03199 Metric repository now knows prefixes. Fixes #1938 2016-07-06 18:42:31 +01:00
James Brooks
712b1078f2 Fixes metrics repository in PGSQL. Closes #1741 2016-05-05 17:59:30 +01:00
James Brooks
f9bc46b460 Refactored the way we store metrics 2016-04-25 20:42:00 +01:00
James Brooks
58f755d136 Fix Last hour metric points. Closes #1482 2016-02-20 19:39:07 +00:00
Graham Campbell
921116a198 More fixes 2016-02-02 20:46:46 +00:00
Graham Campbell
ff6d26cc59 Removed old code 2016-02-02 20:06:16 +00:00
Joseph Cohen
47bba0b927 Remove converting timezone for fetching 2016-02-02 11:15:47 -06:00
Graham Campbell
1b24cdb1c5 Improved the config system 2016-01-29 23:05:31 +00:00
James Brooks
6d97c2e3ee Fixes #1354 Postgres Last Hour Metrics 2016-01-20 09:26:02 +00:00
James Brooks
3a0c052f8b Last hour of metric points 2015-12-24 11:27:22 +00:00
Hereward Mills
d176cb9b8f Fully qualify class names. 2015-12-22 12:17:21 +00:00
Hereward Mills
a78a5ddb04 Fix some PHP docs. 2015-12-22 08:41:03 +00:00
James Brooks
cc3f08260e Metrics should include the current hour. Fixes #1113 2015-11-15 16:13:20 +00:00
James Brooks
02d59e3424 Finish the PgSqlRepository for metrics. Closes #1035 2015-10-14 20:59:11 +01:00
James Brooks
7136457b49 Improved metric repository for per-db methods. Closes #921 2015-08-30 22:36:19 +01:00
James Brooks
106c1a034a Remove repositories from the API and switch cipher to rijndael-256 2015-06-09 10:57:45 +01:00
Graham Campbell
3988753b99 Updated copyright headers 2015-05-25 17:59:08 +01:00
Graham Campbell
b06167f5e9 Updated joe's email address 2015-05-25 17:53:06 +01:00
Graham Campbell
91e4dafca9 Updated my email address 2015-05-23 14:48:33 +01:00
James Brooks
0928251673 Add Joseph Cohem and Graham Campbell to the copyright headers. 2015-05-19 10:45:38 +01:00
James Brooks
80e3d9167d Closes #568, adds copyright information. 2015-04-19 08:52:39 +01:00
Joseph Cohen
b4ac66d727 Cachet is now a Laravel 5 app 2015-03-20 18:30:45 -06:00