Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
1b7e4227
Commit
1b7e4227
authored
May 28, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed error page to display logout route in case of unconfigured
parent
b0f48b7f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
459 additions
and
1976 deletions
+459
-1976
error_handler.py
cps/error_handler.py
+2
-0
http_error.html
cps/templates/http_error.html
+10
-5
Calibre-Web TestSummary_Linux.html
test/Calibre-Web TestSummary_Linux.html
+447
-1971
No files found.
cps/error_handler.py
View file @
1b7e4227
...
@@ -35,6 +35,7 @@ def error_http(error):
...
@@ -35,6 +35,7 @@ def error_http(error):
error_code
=
"Error {0}"
.
format
(
error
.
code
),
error_code
=
"Error {0}"
.
format
(
error
.
code
),
error_name
=
error
.
name
,
error_name
=
error
.
name
,
issue
=
False
,
issue
=
False
,
unconfigured
=
not
config
.
db_configured
,
instance
=
config
.
config_calibre_web_title
instance
=
config
.
config_calibre_web_title
),
error
.
code
),
error
.
code
...
@@ -44,6 +45,7 @@ def internal_error(error):
...
@@ -44,6 +45,7 @@ def internal_error(error):
error_code
=
"Internal Server Error"
,
error_code
=
"Internal Server Error"
,
error_name
=
str
(
error
),
error_name
=
str
(
error
),
issue
=
True
,
issue
=
True
,
unconfigured
=
False
,
error_stack
=
traceback
.
format_exc
()
.
split
(
"
\n
"
),
error_stack
=
traceback
.
format_exc
()
.
split
(
"
\n
"
),
instance
=
config
.
config_calibre_web_title
instance
=
config
.
config_calibre_web_title
),
500
),
500
...
...
cps/templates/http_error.html
View file @
1b7e4227
...
@@ -27,6 +27,9 @@
...
@@ -27,6 +27,9 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-offset-4 text-left"
>
<div
class=
"col-md-offset-4 text-left"
>
{% if unconfigured %}
<div>
{{_('Calibre-Web Instance is unconfigured, please contact your administrator')}}
</div>
{% endif %}
{% for element in error_stack %}
{% for element in error_stack %}
<div>
{{ element }}
</div>
<div>
{{ element }}
</div>
{% endfor %}
{% endfor %}
...
@@ -39,13 +42,15 @@
...
@@ -39,13 +42,15 @@
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
<div
class=
"row"
>
<div
class=
"row
"
>
<div
class=
"col errorlink
"
>
<div
class=
"col errorlink"
>
{% if not unconfigured %}
<a
href=
"{{url_for('web.index')}}"
title=
"{{ _('Return to Home') }}"
>
{{_('Return to Home')}}
</a>
<a
href=
"{{url_for('web.index')}}"
title=
"{{ _('Return to Home') }}"
>
{{_('Return to Home')}}
</a>
{% else %}
<a
href=
"{{url_for('web.logout')}}"
title=
"{{ _('Logout User') }}"
>
{{ _('Logout User') }}
</a>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</body>
</html>
</html>
test/Calibre-Web TestSummary_Linux.html
View file @
1b7e4227
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment