Merge lp:~deadlight/canonical-identity-provider/notifications-and-errors into lp:~deadlight/canonical-identity-provider/vanilla

Proposed by Karl Williams
Status: Merged
Merged at revision: 1717
Proposed branch: lp:~deadlight/canonical-identity-provider/notifications-and-errors
Merge into: lp:~deadlight/canonical-identity-provider/vanilla
Diff against target: 336 lines (+107/-103)
7 files modified
src/webui/templates/403-csrf.html (+26/-27)
src/webui/templates/404-no-token.html (+12/-12)
src/webui/templates/404.html (+8/-10)
src/webui/templates/500.html (+28/-22)
src/webui/templates/cookies.html (+5/-5)
src/webui/templates/limitexceeded.html (+13/-13)
src/webui/templates/readonly.html (+15/-14)
To merge this branch: bzr merge lp:~deadlight/canonical-identity-provider/notifications-and-errors
Reviewer Review Type Date Requested Status
Anthony Dillon (community) Approve
Review via email: mp+372065@code.launchpad.net

Description of the change

Converted a selection of small templates to Vanilla styling

QA:
- npm i
- ./node_modules/gulp/bin/gulp.js sass
- source env/bin/activate
- make start-db
- make run
- Change line 19 of settings_devel.py to "DEBUG = False"
- Visit http://[CONTAINER IP]:8000/NOT-A-REAL-PAGE and see the 404 message

Others are harder to view in development but use a similar template

To post a comment you must log in.
Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :

Few comments in the code.

review: Needs Fixing
1717. By Karl Williams

HTML updates for error pages

Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :

LGTM +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/webui/templates/403-csrf.html'
--- src/webui/templates/403-csrf.html 2014-12-09 21:32:43 +0000
+++ src/webui/templates/403-csrf.html 2019-09-02 07:49:30 +0000
@@ -1,41 +1,40 @@
1{% extends "base.html" %}1{% extends "vanilla/base.html" %}
2{% load i18n %}2{% load i18n %}
33
4{% comment %}4{% comment %}
5Copyright 2010-2013 Canonical Ltd. This software is licensed under the5Copyright 2010-2019 Canonical Ltd. This software is licensed under the
6GNU Affero General Public License version 3 (see the file LICENSE).6GNU Affero General Public License version 3 (see the file LICENSE).
7{% endcomment %}7{% endcomment %}
88
9{% block title %}9{% block title %}
10 {% comment %}Translators: This is the title of a page only displayed when the browser request was old (ie. had an incorrect csrf token).{% endcomment %}10 {% comment %}Translators: This is the title of a page only displayed when the browser request was old (ie. had an incorrect csrf token).{% endcomment %}
11 {% trans "Stale request" %}11 {% trans "Stale request" %}
12{% endblock %}12{% endblock %}
1313
14{% block text_title %}14{% block text_title %}
15 {% comment %}Translators: This is the heading of a page only displayed when the browser request was old (ie. had an incorrect csrf token).{% endcomment %}15 {% comment %}Translators: This is the heading of a page only displayed when the browser request was old (ie. had an incorrect csrf token).{% endcomment %}
16 <h1 class="main">{% trans "Your page was stale." %}</h1>16 <h1>{% trans "Your page was stale." %}</h1>
17{% endblock %}17{% endblock %}
1818
19{% block content %}19{% block content %}
20 <div>20 <div class="row">
21 <p>21 <p>
22 {% comment %}Translators: This is the text of a page only displayed when the browser request was old (ie. had an incorrect csrf token).{% endcomment %}22 {% comment %}Translators: This is the text of a page only displayed when the browser request was old (ie. had an incorrect csrf token).{% endcomment %}
23 {% blocktrans %}Apologies, the page you came from was a little old. Perhaps you navigated here from a browser window other than the one you used to login. If so, try using the other browser window. Or, try your action again, starting from our home page.{% endblocktrans %}23 {% blocktrans %}Apologies, the page you came from was a little old. Perhaps you navigated here from a browser window other than the one you used to login. If so, try using the other browser window. Or, try your action again, starting from our home page.{% endblocktrans %}
24 </p>24 </p>
2525
26 <h3>{% trans "The most common reasons for seeing this page are:" %}</h3>26 <h3>{% trans "The most common reasons for seeing this page are:" %}</h3>
27 <dl class="u1-list">27 <dl>
28 <dt>{% trans "Cookies have been disabled either globally or selectively." %}</dt>28 <dt>{% trans "Cookies have been disabled either globally or selectively." %}</dt>
29 <dd>{% blocktrans %}Ubuntu One requires cookies for delivering the best experience. Please make sure cookies are allowed for Ubuntu One.{% endblocktrans %}</dd>29 <dd>{% blocktrans %}Ubuntu One requires cookies for delivering the best experience. Please make sure cookies are allowed for Ubuntu One.{% endblocktrans %}</dd>
3030 <dt>{% trans "HTTP Referer header is disabled." %}</dt>
31 <dt>{% trans "HTTP Referer header is disabled." %}</dt>31 <dd>{% blocktrans %}Ubuntu One requires the HTTP Referer header to be present in the request. Please make sure this header isn't being blocked by any browser extensions.{% endblocktrans %}</dd>
32 <dd>{% blocktrans %}Ubuntu One requires the HTTP Referer header to be present in the request. Please make sure this header isn't being blocked by any browser extensions.{% endblocktrans %}</dd>32 </dl>
33 </dl>33
3434 <p>{% blocktrans %}If neither of these solve the issue, please try accessing Ubuntu One from a completely fresh, unconfigured browser. This will help us better diagnose the problem in case it's still happening. If the issue is solved by using a clean browser session, try to verify your browser settings and extensions.{% endblocktrans %}</p>
35 <p>{% blocktrans %}If neither of these solve the issue, please try accessing Ubuntu One from a completely fresh, unconfigured browser. This will help us better diagnose the problem in case it's still happening. If the issue is solved by using a clean browser session, try to verify your browser settings and extensions.{% endblocktrans %}</p>35
3636 {% include "static/_contact_support_snippet.html" %}
37 {% include "static/_contact_support_snippet.html" %}37
3838 <a href="/">{% trans "Go to our home page" %}</a>
39 <a class="btn" href="/"><span><span>{% trans "Go to our home page" %}</span></span></a>39 </div>
40 </div>
41{% endblock %}40{% endblock %}
4241
=== modified file 'src/webui/templates/404-no-token.html'
--- src/webui/templates/404-no-token.html 2019-05-10 19:47:22 +0000
+++ src/webui/templates/404-no-token.html 2019-09-02 07:49:30 +0000
@@ -1,4 +1,4 @@
1{% extends "base.html" %}1{% extends "vanilla/base.html" %}
2{% load i18n %}2{% load i18n %}
33
4{% comment %}4{% comment %}
@@ -7,21 +7,21 @@
7{% endcomment %}7{% endcomment %}
88
9{% block title %}9{% block title %}
10 {% trans "Not found" %}10 {% trans "Not found" %}
11{% endblock %}11{% endblock %}
1212
13{% block text_title %}13{% block text_title %}
14 <h1 class="main">Invalid address validation link</h1>14 <h1>Invalid address validation link</h1>
15{% endblock %}15{% endblock %}
1616
17{% block content %}17{% block content %}
18 <div>18 <div class="row">
19 <p>{% blocktrans %}You clicked on an e-mail address validation link from Ubuntu One SSO; however, the information from the link seems to be invalid or stale.{% endblocktrans %}</p>19 <p>{% blocktrans %}You clicked on an e-mail address validation link from Ubuntu One SSO; however, the information from the link seems to be invalid or stale.{% endblocktrans %}</p>
20 <p>{% blocktrans %}This could be for one of the following reasons:{% endblocktrans %}</p>20 <p>{% blocktrans %}This could be for one of the following reasons:{% endblocktrans %}</p>
21 <ol class="u1-list">21 <ol class="p-list">
22 <li>{% blocktrans %}The link has already been used. You don't need to validate your address again. {% endblocktrans %}</li>22 <li class="p-list__item">{% blocktrans %}The link has already been used. You don't need to validate your address again. {% endblocktrans %}</li>
23 <li>{% blocktrans %}You created your Ubuntu One SSO account while starting a session on another site. You must click the validation link on the same browser where you started your session on the other site.{% endblocktrans %}</li>23 <li class="p-list__item">{% blocktrans %}You created your Ubuntu One SSO account while starting a session on another site. You must click the validation link on the same browser where you started your session on the other site.{% endblocktrans %}</li>
24 </ol>24 </ol>
25 <p>{% blocktrans %}You can also go to <a href="{{email_url}}">Your account's e-mail page</a> and click on "Verify" next to the e-mail address you want to verify. This is the best solution if you are unable to click the link on the same browser where you started your session on the other site.{% endblocktrans %}</p>25 <p>{% blocktrans %}You can also go to <a href="{{email_url}}">Your account's e-mail page</a> and click on "Verify" next to the e-mail address you want to verify. This is the best solution if you are unable to click the link on the same browser where you started your session on the other site.{% endblocktrans %}</p>
26 </div>26 </div>
27{% endblock %}27{% endblock %}
2828
=== modified file 'src/webui/templates/404.html'
--- src/webui/templates/404.html 2014-12-09 21:32:43 +0000
+++ src/webui/templates/404.html 2019-09-02 07:49:30 +0000
@@ -1,24 +1,22 @@
1{% extends "base.html" %}1{% extends "vanilla/base.html" %}
2{% load i18n %}2{% load i18n %}
33
4{% comment %}4{% comment %}
5Copyright 2010 Canonical Ltd. This software is licensed under the5Copyright 2019 Canonical Ltd. This software is licensed under the
6GNU Affero General Public License version 3 (see the file LICENSE).6GNU Affero General Public License version 3 (see the file LICENSE).
7{% endcomment %}7{% endcomment %}
88
9{% block title %}9{% block title %}
10 {% trans "Not found" %}10 {% trans "Not found" %}
11{% endblock %}11{% endblock %}
1212
13{% block text_title %}13{% block text_title %}
14 <h1 class="main">Lost something?</h1>14 <h1>Lost something?</h1>
15{% endblock %}15{% endblock %}
1616
17{% block content %}17{% block content %}
18 <div>18 <p>{% blocktrans %}There's no page with this address in the Ubuntu One service. Check that you entered the address correctly and try again.{% endblocktrans %}</p>
19 <p>{% blocktrans %}There's no page with this address in the Ubuntu One service. Check that you entered the address correctly and try again.{% endblocktrans %}</p>19 {% if oopsid %}
20 <p>20 <p>{% blocktrans %}(Error <abbr>ID</abbr>: {{oopsid}}){% endblocktrans %}</p>
21 {% blocktrans %}(Error <abbr>ID</abbr>: {{oopsid}}){% endblocktrans %}21 {% endif %}
22 </p>
23 </div>
24{% endblock %}22{% endblock %}
2523
=== modified file 'src/webui/templates/500.html'
--- src/webui/templates/500.html 2015-09-30 19:30:01 +0000
+++ src/webui/templates/500.html 2019-09-02 07:49:30 +0000
@@ -1,36 +1,42 @@
1{% extends "base.html" %}1{% extends "vanilla/base.html" %}
2{% load i18n %}2{% load i18n %}
33
4{% comment %}4{% comment %}
5Copyright 2010 Canonical Ltd. This software is licensed under the5Copyright 2019 Canonical Ltd. This software is licensed under the
6GNU Affero General Public License version 3 (see the file LICENSE).6GNU Affero General Public License version 3 (see the file LICENSE).
7{% endcomment %}7{% endcomment %}
88
9{% block title %}9{% block title %}
10 {% trans "Oops!" %}10 {% trans "Oops!" %}
11{% endblock %}11{% endblock %}
1212
13{% block text_title %}13{% block text_title %}
14 <h1 class="main">Oops!</h1>14 <h1>Oops!</h1>
15{% endblock %}15{% endblock %}
1616
17{% block content %}17{% block content %}
18 <div>18 <div class="row">
19 <h3>19 <h3>
20 {% blocktrans %}Sorry, something just went wrong in Ubuntu One.{% endblocktrans %}20 {% blocktrans %}Sorry, something just went wrong in Ubuntu One.{% endblocktrans %}
21 </h3>21 </h3>
22 {% if errormsg %}<p>{{ errormsg }}</p>{% endif %}22 {% if errormsg %}
23 <p>23 <div class="p-notification--negative">
24 {% blocktrans %}We&#8217;ve recorded what happened, and we&#8217;ll fix it as soon as possible. Apologies for the inconvenience.{% endblocktrans %}24 <p class="p-notification__response">
25 </p>25 <span class="p-notification__status">Error: </span>{{ errormsg }}
26 <p>26 </p>
27 OOPS <abbr>ID</abbr>: {{ oopsid }}27 </div>
28 </p>28 {% endif %}
29 {% if request.sentry.id %}29 <p>
30 <p>Sentry <abbr>ID</abbr>: {{ request.sentry.id }}</p>30 {% blocktrans %}We&#8217;ve recorded what happened, and we&#8217;ll fix it as soon as possible. Apologies for the inconvenience.{% endblocktrans %}
31 {% endif %}31 </p>
32 <pre style="overflow:auto">32 <p>
33{{traceback}}33 OOPS <abbr>ID</abbr>: {{ oopsid }}
34 </pre>34 </p>
35 </div>35 {% if request.sentry.id %}
36 <p>Sentry <abbr>ID</abbr>: {{ request.sentry.id }}</p>
37 {% endif %}
38 <pre style="overflow:auto">
39 {{traceback}}
40 </pre>
41 </div>
36{% endblock %}42{% endblock %}
3743
=== modified file 'src/webui/templates/cookies.html'
--- src/webui/templates/cookies.html 2012-12-04 18:51:42 +0000
+++ src/webui/templates/cookies.html 2019-09-02 07:49:30 +0000
@@ -9,13 +9,13 @@
9{% block title %}{% trans "Cookies required" %}{% endblock %}9{% block title %}{% trans "Cookies required" %}{% endblock %}
1010
11{% block text_title %}11{% block text_title %}
12 <h1 class="main">{% trans "Cookies required" %}</h1>12 <h1>{% trans "Cookies required" %}</h1>
13{% endblock %}13{% endblock %}
1414
15{% block content %}15{% block content %}
16<div>16<div class="row">
17 <p>17 <p>
18 {% blocktrans %}Cookies are required to use this service. Please enable cookies in your browser.{% endblocktrans %}18 {% blocktrans %}Cookies are required to use this service. Please enable cookies in your browser.{% endblocktrans %}
19 </p>19 </p>
20</div>20</div>
21{% endblock %}21{% endblock %}
2222
=== modified file 'src/webui/templates/limitexceeded.html'
--- src/webui/templates/limitexceeded.html 2014-12-09 21:32:43 +0000
+++ src/webui/templates/limitexceeded.html 2019-09-02 07:49:30 +0000
@@ -1,27 +1,27 @@
1{% extends "base.html" %}1{% extends "vanilla/base.html" %}
2{% load i18n %}2{% load i18n %}
33
4{% comment %}4{% comment %}
5Copyright 2010 Canonical Ltd. This software is licensed under the5Copyright 2019 Canonical Ltd. This software is licensed under the
6GNU Affero General Public License version 3 (see the file LICENSE).6GNU Affero General Public License version 3 (see the file LICENSE).
7{% endcomment %}7{% endcomment %}
88
9{% block title %}9{% block title %}
10 {% trans "Rate limit exceeded" %}10 {% trans "Rate limit exceeded" %}
11{% endblock %}11{% endblock %}
1212
13{% block text_title %}13{% block text_title %}
14 <h1 class="main">{% trans "Rate limit exceeded" %}</h1>14 <h1>{% trans "Rate limit exceeded" %}</h1>
15{% endblock %}15{% endblock %}
1616
17{% block content %}17{% block content %}
18 <div>18 <div class="row">
19 <p>19 <p>
20 {% blocktrans %}You have made too many failed requests to the Ubuntu One authentication server over a short period of time.{% endblocktrans %}20 {% blocktrans %}You have made too many failed requests to the Ubuntu One authentication server over a short period of time.{% endblocktrans %}
21 </p>21 </p>
22 <p>22 <p>
23 {% blocktrans %}Please try again in a while.{% endblocktrans %}23 {% blocktrans %}Please try again in a while.{% endblocktrans %}
24 </p>24 </p>
25 <a class="btn" href="/"><span><span>{% trans "Try again" %}</span></span></a>25 <a href="/">{% trans "Try again" %}</a>
26 </div>26 </div>
27{% endblock %}27{% endblock %}
2828
=== modified file 'src/webui/templates/readonly.html'
--- src/webui/templates/readonly.html 2012-12-04 18:51:42 +0000
+++ src/webui/templates/readonly.html 2019-09-02 07:49:30 +0000
@@ -1,28 +1,29 @@
1{% extends "base.html" %}1{% extends "vanilla/base.html" %}
2{% load i18n %}2{% load i18n %}
33
4{% comment %}4{% comment %}
5Copyright 2010 Canonical Ltd. This software is licensed under the5Copyright 2019 Canonical Ltd. This software is licensed under the
6GNU Affero General Public License version 3 (see the file LICENSE).6GNU Affero General Public License version 3 (see the file LICENSE).
7{% endcomment %}7{% endcomment %}
88
9{% block title %}9{% block title %}
10 {% trans "Read-only mode" %}10 {% trans "Read-only mode" %}
11{% endblock %}11{% endblock %}
1212
13{% block text_title %}13{% block text_title %}
14 <h1 class="main">{% trans "We're currently in read-only mode." %}</h1>14 <h1>{% trans "We're currently in read-only mode." %}</h1>
15{% endblock %}15{% endblock %}
1616
17{% block content %}17{% block content %}
18 <div>18 <div class="row">
19 <p>19 <p>
20 {% blocktrans %}Apologies, the page you're requesting isn't accessible at the moment, as we're running with a minimum set of features. Hopefully we will have the full service up and running again in no time.{% endblocktrans %}20 {% blocktrans %}Apologies, the page you're requesting isn't accessible at the moment, as we're running with a minimum set of features. Hopefully we will have the full service up and running again in no time.{% endblocktrans %}
21 </p>21 </p>
22 <p>22 <p>
23 {% blocktrans %}Please try again in a while.{% endblocktrans %}23 {% blocktrans %}Please try again in a while.{% endblocktrans %}
24 </p>24 </p>
25 <a class="btn" href=""><span><span>{% trans "Try again" %}</span></span></a> {% trans "or" %}25 <p>
26 <a class="btn alt" href="/"><span><span>{% trans "Go to our home page" %}</span></span></a>26 <a href=""><span><span>{% trans "Try again" %}</span></span></a> {% trans "or" %}
27 </div>27 <a href="/"><span><span>{% trans "go to our home page" %}</span></span></a>
28 </div>
28{% endblock %}29{% endblock %}

Subscribers

People subscribed via source and target branches

to all changes: