Commit Graph

6 Commits

Author SHA1 Message Date
Leo Hemsted
3ffd6c744c separate detailed and normal service_api_client.get_service
to make it easier to mock and control return values
2016-07-20 14:12:22 +01:00
Leo Hemsted
3e6eedd079 use new detailed service endpoint for dashboard totals
we don't want to use the old statistics endpoints any more
also a couple of quality of life changes
* moves some logic out of the _totals.html template
* tidies up statistics_utils
2016-07-20 14:12:22 +01:00
Chris Hill-Scott
c544e1a830 Fix unpacking syntax for Python 3.4
Python 3.5 introduced the ability to do unpacking before keyword
arguments, eg
```
my_method(**dictionary, foo=bar)
```

This was introduced in https://www.python.org/dev/peps/pep-0448/

This is not valid syntax in Python 3.4, which is what’s running on our
boxes.

This commit changes an instance of this syntax which was introduced in
56d9c29e91
2016-06-16 10:10:36 +01:00
Chris Hill-Scott
56d9c29e91 Highlight failing jobs on the dashboard
> When we have jobs that have over 3% failure rates we should highlight
> those so that peoples attention is drawn to deal with the failure.
>
> They would then go to the job view to see what the details are where
> they could filter by failure, but that's a different story...
>
> This is just about calculating and highlighting those that need their
> attention.

— https://www.pivotaltracker.com/story/show/121206123

This commit:

- calculates the failure rate for each job
- makes jobs with a failure rate of > 3% go red on the dashboard
2016-06-15 10:25:48 +01:00
Chris Hill-Scott
e7e0b2f227 Put counts into the notification filters
We can filter notifications on the activity page by state.

This commit adds counts to those filters.

This is mainly so that we can consistently do the same thing on the job
page later on.
2016-06-14 11:00:56 +01:00
Leo Hemsted
83b151982e add stats boxes to platform admin page
moved a couple of stats summary functions from dashboard to a shared statistics_utils file
2016-05-31 12:17:06 +01:00