Commit Graph

2441 Commits

Author SHA1 Message Date
Chris Hill-Scott
fc55bdfcee Merge pull request #921 from alphagov/fix-ajax-probs
Fix problem with AJAX not updating scheduled jobs
2016-09-02 12:04:11 +01:00
Chris Hill-Scott
3a582b8251 Merge pull request #919 from alphagov/revert-918-catch-missing-statistics
Revert "Revert "Remove check for statistics not being on job""
2016-09-02 12:01:05 +01:00
Leo Hemsted
e60763a0f6 Merge pull request #920 from alphagov/junit-test-results
add junit xml reporting to pytest
2016-09-02 09:37:58 +01:00
Chris Hill-Scott
7108646afd Revert "Revert "Remove check for statistics not being on job"" 2016-09-01 13:43:15 +01:00
Chris Hill-Scott
be90cf2783 Make sure create job client can handle statistics
The create job endpoint returns the data about the job with a `data:`
wrapper. This commit makes sure that, when the client is trying to
process a job which has just been created, it looks inside the `data`
wrapper.
2016-09-01 13:43:15 +01:00
Chris Hill-Scott
b98b328d9b Upgrade diffDOM dependency
Features:

- Expose Diff object

Fixes:

- Reverse actions for modifyComment/Text
- Simplify diff on some text only diffs
- Simplify diff on single element removal
2016-09-01 11:22:52 +01:00
Chris Hill-Scott
8c8f321a11 Make sure partials always have a wrapping <div>
The diffDOM Javascript sometimes throws an error if it can’t calculate
a diff between the original content of the page and the updated HTML
delivered via AJAX. The problem seems to be when there’s not one,
consistent top-level element for it to base its calculations on.

This commit:
- makes sure that all AJAX-delivered partials have a wrapping `<div>`
- that this `<div>` has a consistent class name to make it clear why
  it’s there
2016-09-01 11:22:22 +01:00
Chris Hill-Scott
0967706aed Merge pull request #903 from alphagov/choose-time-to-schedule-job
Allow users to choose a time in the next 24 hours to send a file
2016-09-01 09:13:43 +01:00
Chris Hill-Scott
6921d8b59e Sort scheduled jobs so soonest is first
The scheduled job you probably care about the most is the soonest –
irrespective of when you scheduled it.
2016-08-31 16:59:24 +01:00
Chris Hill-Scott
72f92b5249 Use list comprehensions instead of filter
“filter's pretty oldschool” – @leohemsted
2016-08-31 16:59:16 +01:00
Chris Hill-Scott
661f5ba702 Don’t allow test messages to be scheduled
For two reasons:
- it’s extra stuff in tour that users dont yet need to know about
- test messages are hidden from the dashboard, so you’d have no
  visibility of when they were sending once you’d scheduled them
2016-08-31 16:59:04 +01:00
Chris Hill-Scott
31a032e678 Show message on job page if job is scheduled
If a job is scheduled then we can’t show the notifications yet, and the
progress report will stay at 0%.

In their place we should show what time a job will start.

Later on (when the API is ready) this area of the page should also show
a cancel button.
2016-08-31 16:58:52 +01:00
Chris Hill-Scott
4342b721f1 Show upcoming jobs on the dashboard
On the dashboard:
- adds a new ‘in the next 24 hours’ section to the dashboard which lists
  upcoming jobs
- tweaks some spacing on the dashboard so that it doesn’t look like too
  much of a mess
- don’t show scheduled jobs in the table of normal jobs

On the jobs page:
- don’t show scheduled jobs
2016-08-31 16:58:43 +01:00
Chris Hill-Scott
3d8d160d3e Always use 12h times
The GOV.UK content style guide says:

> - 5:30pm (not 1730hrs)
> - midnight (not 00:00)
> - midday (not 12 noon, noon or 12pm)

This commit changes all times to be 12h not 24h, and adds a special case
for when a time is exactly 12:00am or 12:00pm.
2016-08-31 16:58:34 +01:00
Chris Hill-Scott
c1415c0429 Make conftest use job_status not status
`status` will be deprecated at some point. `job_status` is what gets
set to `scheduled` to show that a job has been scheduled for some time
in the future.
2016-08-31 16:58:26 +01:00
Chris Hill-Scott
ec1e0debe6 Reduce unnecessary indentation 2016-08-31 16:58:18 +01:00
Chris Hill-Scott
225a61ddd3 Add a component for picking the time to send a job
Users need to pick a time in the next 24hrs, or send a file immediately.

Rationale for this is a bit lost in time-before-holiday, but generally:

‘Now’ and ‘later’ as the inital choices makes it really clear what
this feature is about conceptually.

The choice of times is absolute, eg ‘1pm’ not ‘in 3 hours’
2016-08-31 16:58:09 +01:00
Leo Hemsted
008c88e42c add junit xml reporting to pytest 2016-08-31 15:15:28 +01:00
Chris Hill-Scott
ee447ba6a4 Merge pull request #918 from alphagov/catch-missing-statistics
Revert "Remove check for statistics not being on job"
2016-08-31 12:04:54 +01:00
Chris Hill-Scott
d7a591836d Revert "Remove check for statistics not being on job"
This reverts commit 40e22d8258.

For some reason jobs don’t always have statistics.
2016-08-31 12:00:42 +01:00
Chris Hill-Scott
1d2b54ebc3 Merge pull request #916 from alphagov/readd-request-stat-to-job
Base ‘% complete’ on notifications requested
2016-08-31 11:40:03 +01:00
Chris Hill-Scott
6b426a603d Merge pull request #917 from alphagov/placeholder-any-type-size
Make placeholder highlighting align at all size
2016-08-31 11:23:44 +01:00
Chris Hill-Scott
40e22d8258 Remove check for statistics not being on job
A job will always have statistics.

It’s always assigned:
bcfa83de79/app/job/rest.py (L48)

And the structure should always be the same, even if the counts are
zero because they’re generated from this query:
668e6c9716/app/dao/jobs_dao.py (L11-L22)

This line suggests that it’s a hangover from the aggregate tables:
8c159da3ea (diff-9886486bf41b0680d23588b190c252eaL24)

Since it’s no long necessary this commit removes it.
2016-08-31 10:46:43 +01:00
Chris Hill-Scott
45c4b24d9a Make placeholder highlighting align at all size
Because the placeholder highlighting was defined in pixels it got
slightly out of line when it was used at larger type sizes, eg inside a
heading.

By using `em`s it will scale with the size of the type.
2016-08-30 15:34:12 +01:00
Chris Hill-Scott
bf872ab342 Base ‘% complete’ on notifications requested
The job is complete when all notifications are delivered or failed.

The report is complete once we have all notifications are in the
database.

This commit changes the meaning of the percentage from the former to the
latter. This is how it was before we removed the aggregate stats for
jobs.
2016-08-30 15:16:36 +01:00
Chris Hill-Scott
37a1eb22b0 Use default dict for default job stats
This is just some refactoring.

`defaultdict` is a data structure which won’t raise a `KeyError` if you
try to access a key that doesn’t exist.

By passing `int` as the first argument, trying to access the value of
any key that doesn’t exists will return the value of `int()`, ie `0`
2016-08-30 14:59:23 +01:00
Chris Hill-Scott
7324b30dbc Re-add a 'requested' stat to a job
It’s useful to know how many notifications we’ve handed off to our
providers. This is a measure of how complete the processing of the job
is.

This is important, because once the job processing is complete then you
can accurately reconcile the report with the CSV file that you’ve
uploaded.
2016-08-30 14:57:28 +01:00
Andras Ferencz-Szabo
3dad024fae Merge pull request #915 from alphagov/jenkins_coveralls
Finish coveralls task
2016-08-30 14:45:40 +01:00
bandesz
69180b2d47 Finish coveralls task 2016-08-30 12:06:21 +01:00
minglis
1651c72b3d Merge pull request #912 from alphagov/fix-dashboard-page
Fix dashboard page
2016-08-30 11:00:29 +01:00
minglis
69df08e0d0 Merge pull request #913 from alphagov/remove-travis
Removed travis build
2016-08-26 15:58:32 +01:00
Chris Hill-Scott
8ff70f0814 Merge pull request #904 from alphagov/make-settings-page-a-table
Make settings page a table and do a better job of explaining the reply to address/text message sender
2016-08-26 15:49:49 +01:00
Martyn Inglis
9a97da93ba Removed travis build 2016-08-26 15:34:45 +01:00
Martyn Inglis
fc3af8b56e Extra test for the zero stats case 2016-08-26 15:27:04 +01:00
Chris Hill-Scott
8d8f6bd794 Merge pull request #911 from alphagov/sms-sender-job-page
Optionally prefix text message on job page
2016-08-26 15:26:15 +01:00
Martyn Inglis
8c159da3ea Fix for admin app to show job data on dashboard page
- uses the new stats block in the API to build the stats expected by the dashboard page
- all work done in client
2016-08-26 15:21:10 +01:00
Chris Hill-Scott
e6fd8faa02 Optionally prefix text message on job page
Missed this as part of #905
2016-08-26 15:20:06 +01:00
Chris Hill-Scott
01ac70f6a0 Merge pull request #905 from alphagov/sms-sender-no-prefix
Don’t prefix text messages is sender name is set
2016-08-26 15:10:34 +01:00
Chris Hill-Scott
c745422578 Don’t prefix text messages is sender name is set
Implements:
- [x] alphagov/notifications-utils#66
2016-08-26 14:45:26 +01:00
Leo Hemsted
4fbd23d5e9 Merge pull request #907 from alphagov/plat-admin
Platform admin stats rework
2016-08-26 13:51:36 +01:00
bandesz
cf34aff673 Travis cleanup: remove deploy + functest trigger 2016-08-25 16:20:17 +01:00
minglis
9a60cf49a4 Merge pull request #899 from alphagov/handle-new-jobs-api
Handle new jobs api
2016-08-25 09:56:30 +01:00
Martyn Inglis
c61199d17d Rewrote some slighlt over complicated logic 2016-08-25 09:15:55 +01:00
Leo Hemsted
6ad7b019ea added tests for reworked platform admin page 2016-08-24 17:39:20 +01:00
Leo Hemsted
b983f020ff remove old statistics_api_client
now unused - replaced mock fn with detailed_services too
2016-08-24 16:26:08 +01:00
Andras Ferencz-Szabo
ae3c4fe1fc Merge pull request #906 from alphagov/env_rename
Rename development env to preview
2016-08-24 15:59:42 +01:00
bandesz
ca8ad56be9 Rename development env to preview 2016-08-24 15:55:54 +01:00
Chris Hill-Scott
82b5cc6fc6 Remove 3/4 width column on settings pages
The mesaure on these pages was too short, making them awkward to read.

Also varies the size of text boxes to make them appropriate to the
expected size of content that they will contain.
2016-08-24 15:31:49 +01:00
Chris Hill-Scott
09d4ff44bb Make back button text consistent 2016-08-24 15:26:04 +01:00
Chris Hill-Scott
58b2a8a825 Make email branding settings a table
So that it matches the other settings on this page
2016-08-24 15:26:04 +01:00