Commit Graph

236 Commits

Author SHA1 Message Date
Adam Shimali
4ea50499c3 List and individual job pages now fetch data from api.
Few bug fixes around job uuid.
2016-01-29 15:35:35 +00:00
NIcholas Staples
0dc6f7be1a Merge pull request #124 from alphagov/create-job
Uploading csv creates job via api
2016-01-29 11:27:26 +00:00
Rebecca Law
867ef7ad99 Default service name if service name is not set on the session.
Pop service name off the session on sign out.
2016-01-29 10:40:55 +00:00
Adam Shimali
0995cd2e3c Uploading csv creates job via api 2016-01-29 10:30:02 +00:00
Rebecca Law
0dd20abbb3 Replace Current service with chosen service name. 2016-01-28 17:20:34 +00:00
Rebecca Law
20e3d1952f Add import for banner 2016-01-27 15:22:47 +00:00
NIcholas Staples
68891d8eb8 Merge pull request #112 from alphagov/post-hack-day
Show all links in side navigation again
2016-01-27 12:25:00 +00:00
NIcholas Staples
8ff5ee9ffb Merge pull request #113 from alphagov/real-templates
Use real templates when sending text messages
2016-01-27 12:24:52 +00:00
Chris Hill-Scott
3a864ad132 Use real templates when sending text messages
Sets the value of `template` to the ID of the chosen template when submitting
the form.
2016-01-26 17:17:46 +00:00
Chris Hill-Scott
a6d19ff45b Show correct default state on service settings page
By default a service should be active (ie keys not suspended). For some reason
the API is returning the opposite.

This commit reverses the logic to make it look right for hack day.
2016-01-26 17:16:24 +00:00
Chris Hill-Scott
e03813ceef Make 'API key was revoked' banner green 2016-01-26 16:26:08 +00:00
Chris Hill-Scott
4e158e203c Update styleguide 2016-01-26 16:20:57 +00:00
Chris Hill-Scott
86bdd0ad86 Show all links in side navigation again
These were temporarily hidden for hack day, to not distract participants.
2016-01-26 15:50:55 +00:00
Martyn Inglis
6e95e4dd3b Updated the link to the API code 2016-01-24 21:04:24 +00:00
Martyn Inglis
f040d85a94 Updated documentation for api keys and for the developer documentation page. 2016-01-24 21:03:00 +00:00
Martyn Inglis
e279d8f98c Removed dodgy symbols from link text 2016-01-22 23:21:15 +00:00
Chris Hill-Scott
396f8415c6 SKIRMISH MODE 2016-01-22 14:51:01 +00:00
Chris Hill-Scott
cd38d54be7 Make ‘template type’ radio buttons not <select>
Because burn your select tags[1]

This commit hard codes the markup for the time being until I can work out how
to get WTForms outputting the markup I want.

1. https://www.youtube.com/watch?v=CUkMCQR4TpY
2016-01-22 14:51:00 +00:00
Chris Hill-Scott
9ee8610da0 Rename content to template content
WTForms sets the `id` of a `textarea` element to the variable name to which the
form control is assigned.

This conflicts with the page container, which is styled by targeting `#content`.
2016-01-22 14:51:00 +00:00
Chris Hill-Scott
48c0ae0140 Fix banner copy 2016-01-22 13:14:50 +00:00
Chris Hill-Scott
b00f9d5821 Fix spcing on empty table 2016-01-22 13:14:50 +00:00
Martyn Inglis
fb3b6510c4 Added template ID to template page, to allow users to identity required data for API calls. 2016-01-22 12:44:19 +00:00
Nicholas Staples
f34d744425 Merge with master. 2016-01-22 11:38:16 +00:00
Nicholas Staples
ac433835f0 Fixed viewing templates. 2016-01-22 11:20:39 +00:00
Nicholas Staples
bb853ee95a Added fixes, displaying templates still needs to be fixed. 2016-01-22 11:14:56 +00:00
Chris Hill-Scott
6f1f514b2b Add restricted mode warning
For the hack day, we should only let developers use the platform in restricted
mode. This commit adds a banner telling them this.

Can’t get the app running locally, so fingers crossed it actually looks how
I imagine it’s going to look…
2016-01-22 11:00:44 +00:00
Martyn Inglis
79c21388bb Content changes for switching services 2016-01-22 10:38:29 +00:00
Martyn Inglis
860f8e192c Removed side nav links for things we don't need on the hack day. 2016-01-22 10:31:34 +00:00
Martyn Inglis
3b19c9b853 Updated sidebar links 2016-01-22 10:25:17 +00:00
Chris Hill-Scott
a66dd52ca8 Better words 2016-01-21 15:43:31 +00:00
Rebecca Law
8737edfad1 Merge branch 'master' of github.com:alphagov/notifications-admin into api-keys-flow
Conflicts:
	tests/app/main/views/test_api_keys.py
2016-01-21 12:31:28 +00:00
Rebecca Law
90fca93308 Implementation of api key pages.
Revoke page will show the correct key name
Show api keys shows a well formatted expiry date
Fix tests for api key endpoints.
2016-01-21 12:28:05 +00:00
Rebecca Law
41c775cd68 Created api_key_api_client.
Implementation of create, revoke and show api keys for service.
These calls work, however we still need to fix the tests.
2016-01-20 17:32:55 +00:00
Chris Hill-Scott
9784a9936c Add pages for create/view/revoke API keys
Copying what they’ve done on GOV.UK Pay, we should let users:
- generate as many keys as they want
- only see the key at time of creation
- give keys a name
- revoke any key at any time (this should be a one way operation)

And based on discussions with @minglis and @servingUpAces, the keys should be
used in conjunction with some kind of service ID, which gets encrypted with the
key. In other words the secret itself never gets sent over the wire.

This commit adds the UI (but not the underlying API integration) for doing the
above.
2016-01-20 16:22:23 +00:00
Chris Hill-Scott
9c8dca4487 Add example of template picker to styleguide 2016-01-20 13:19:28 +00:00
Chris Hill-Scott
a20b52b12b Remove ‘create template’ link
Again, because the users of this page are probably not the same ones responsible
for creating templates, and we shouldn’t be encouraging users to create new
templates for each job (defeats the object of having templates).
2016-01-20 13:12:20 +00:00
Chris Hill-Scott
482abb97d5 Put message previews on ‘Send SMS’ page
A previous commit removed these to differentiate between this page and the
manage templates page. It turns out that we do want previews on this page
because:
- the users for the two pages might be different—they might only be allowed to
  do one or the other depending what permissions they have
- it’s useful to see what the placeholders in the message are before uploading
  a CSV, to make sure the CSV has the correct column headings

This commit re-adds the message preview with a simpler UI. Discussed with
@antimega and we both agreed that the speech bubble tails on the messages should
go.
2016-01-20 13:12:20 +00:00
Nicholas Staples
f6f4fe15b2 Merge with master. 2016-01-19 16:35:52 +00:00
Rebecca Law
762ab8e394 Merge pull request #85 from alphagov/remove-placeholder-data
Remove placeholder logs of notifications sent
2016-01-19 16:05:40 +00:00
Nicholas Staples
cfb3f96b01 Mapped template actions to the api and mocked tests. 2016-01-19 15:54:12 +00:00
NIcholas Staples
6c46d92dd4 Merge pull request #86 from alphagov/use-html5-details-for-switcher
Use HTML5 details element for the service switcher
2016-01-19 12:09:42 +00:00
Chris Hill-Scott
ba0c9ac6c1 Remove placeholder logs of notifications sent
From the:
- dashboard
- activity page

This info will be confusing for users at the hack day, because it will say
they’ve already sent messages when they first sign up.

This involved changing the table macro to have a nice ‘no rows’ message.
2016-01-19 12:04:18 +00:00
Chris Hill-Scott
a08089a47d Use HTML5 details element for the service switcher
The previous service switcher was built purely in Javascript, which meant that,
for the purposes of progressive enhancement, it had to load in the open state.
Setting it to the closed state with Javascript happened a fraction of a second
after page load. This caused an unpleasant flicker as the whole page shifted up
and down as it loaded.

This commit changes the switcher to use the native HTML5 `details` and
`summary` elements[1].

This commit adds a polyfill from GOV.UK Elements for browsers which don’t
support `details`/`summary`.

1. http://html5doctor.com/the-details-and-summary-elements/
2016-01-19 11:45:18 +00:00
Nicholas Staples
a9fead0d82 Merge with master. 2016-01-19 09:49:01 +00:00
Nicholas Staples
609f5f0a8d Working service integration. 2016-01-18 17:35:28 +00:00
Nicholas Staples
6e19dd7c9c Added choose_service using services_dao. 2016-01-18 16:01:04 +00:00
Nicholas Staples
a09ac6cbf5 Added choose_service using services_dao. 2016-01-18 11:15:14 +00:00
Chris Hill-Scott
81d4230b61 Page for adding a new service
This page is exactly the same as the page for adding your first service, save
the heading text.

So all this commit does is:
- set up two routes (`/add-service`, `/add-service/first`) for each of the two
  journeys and change the existing journeys to use the `/add-service/first`
  route
- add logic to show different heading text depending on the journey
- add a link to the new (`/add-service`) route in the service chooser dropdown
2016-01-18 11:03:25 +00:00
Chris Hill-Scott
0df399f11c Remove parts of the page that aren’t in the story
https://www.pivotaltracker.com/story/show/111614524

Not clear if we are going to have code examples on this page, or if the
documentation will be hosted somewhere else.

It seems unecessary to put documentation behind a log in, so I’d lean towards
this page just being links.
2016-01-17 09:40:05 +00:00
Chris Hill-Scott
e5585512c8 Integrate API key pattern into existing page 2016-01-17 09:40:05 +00:00