From c3f3632230f40c86f422a72cd080e5eb1b56bbf1 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 2 Oct 2016 10:34:21 +0000 Subject: Error screen improvements with animated gifs --- .../wqflask/static/gif/error/Wild-Type-Mouse.gif | Bin 0 -> 37328 bytes .../static/gif/error/animated-gifs-aliens-29.gif | Bin 0 -> 14088 bytes .../static/gif/error/animated-gifs-angels-04.gif | Bin 0 -> 12155 bytes .../static/gif/error/animated-gifs-cats-016.gif | Bin 0 -> 10388 bytes .../static/gif/error/animated-gifs-cats-031.gif | Bin 0 -> 6937 bytes .../gif/error/animated-gifs-cell-phones-03.gif | Bin 0 -> 14902 bytes .../gif/error/animated-gifs-cell-phones-16.gif | Bin 0 -> 7307 bytes .../gif/error/animated-gifs-computers-13.gif | Bin 0 -> 7616 bytes .../gif/error/animated-gifs-computers-28.gif | Bin 0 -> 7566 bytes .../gif/error/animated-gifs-computers-32.gif | Bin 0 -> 2970 bytes .../gif/error/animated-gifs-computers-42.gif | Bin 0 -> 9391 bytes .../gif/error/animated-gifs-computers-60.gif | Bin 0 -> 35873 bytes .../gif/error/animated-gifs-computers-64.gif | Bin 0 -> 20728 bytes .../gif/error/animated-gifs-computers-65.gif | Bin 0 -> 26358 bytes .../gif/error/animated-gifs-computers-72.gif | Bin 0 -> 16361 bytes .../gif/error/animated-gifs-computers-74.gif | Bin 0 -> 21087 bytes .../gif/error/animated-gifs-computers-75.gif | Bin 0 -> 98317 bytes .../error/animated-gifs-construction-sites-038.gif | Bin 0 -> 949 bytes .../static/gif/error/animated-gifs-dogs-04.gif | Bin 0 -> 9450 bytes .../static/gif/error/animated-gifs-dogs-14.gif | Bin 0 -> 2532 bytes .../static/gif/error/animated-gifs-dogs-18.gif | Bin 0 -> 3596 bytes .../static/gif/error/animated-gifs-dogs-47.gif | Bin 0 -> 13920 bytes .../static/gif/error/animated-gifs-dogs-50.gif | Bin 0 -> 7297 bytes .../gif/error/animated-gifs-lava-lamps-01.gif | Bin 0 -> 27122 bytes .../static/gif/error/animated-gifs-mice-02.gif | Bin 0 -> 73345 bytes .../static/gif/error/animated-gifs-mice-09.gif | Bin 0 -> 27822 bytes .../static/gif/error/animated-gifs-mice-24.gif | Bin 0 -> 10566 bytes .../static/gif/error/animated-gifs-smileys-063.gif | Bin 0 -> 2230 bytes .../static/gif/error/animated-gifs-smileys-068.gif | Bin 0 -> 11751 bytes .../static/gif/error/animated-gifs-smileys-134.gif | Bin 0 -> 21431 bytes .../static/gif/error/animated-gifs-smileys-211.gif | Bin 0 -> 11209 bytes .../static/gif/error/animated-gifs-smileys-234.gif | Bin 0 -> 8677 bytes .../gif/error/animated-gifs-stickmen-001.gif | Bin 0 -> 6897 bytes .../gif/error/animated-gifs-stickmen-002.gif | Bin 0 -> 14098 bytes .../gif/error/animated-gifs-stickmen-005.gif | Bin 0 -> 13264 bytes .../gif/error/animated-gifs-stickmen-012.gif | Bin 0 -> 12141 bytes .../gif/error/animated-gifs-stickmen-056.gif | Bin 0 -> 5946 bytes .../gif/error/animated-gifs-stickmen-059.gif | Bin 0 -> 16427 bytes .../gif/error/animated-gifs-stickmen-060.gif | Bin 0 -> 14434 bytes .../gif/error/animated-gifs-stickmen-069.gif | Bin 0 -> 7668 bytes wqflask/wqflask/templates/error.html | 58 +++++++++++++++++++++ wqflask/wqflask/views.py | 26 +++++++++ 42 files changed, 84 insertions(+) create mode 100644 wqflask/wqflask/static/gif/error/Wild-Type-Mouse.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-aliens-29.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-angels-04.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-cats-016.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-cats-031.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-cell-phones-03.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-cell-phones-16.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-13.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-28.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-32.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-42.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-60.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-64.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-65.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-72.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-74.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-computers-75.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-construction-sites-038.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-dogs-04.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-dogs-14.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-dogs-18.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-dogs-47.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-dogs-50.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-lava-lamps-01.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-mice-02.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-mice-09.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-mice-24.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-smileys-063.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-smileys-068.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-smileys-134.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-smileys-211.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-smileys-234.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-stickmen-001.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-stickmen-002.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-stickmen-005.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-stickmen-012.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-stickmen-056.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-stickmen-059.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-stickmen-060.gif create mode 100644 wqflask/wqflask/static/gif/error/animated-gifs-stickmen-069.gif create mode 100644 wqflask/wqflask/templates/error.html diff --git a/wqflask/wqflask/static/gif/error/Wild-Type-Mouse.gif b/wqflask/wqflask/static/gif/error/Wild-Type-Mouse.gif new file mode 100644 index 00000000..2c68b5ee Binary files /dev/null and b/wqflask/wqflask/static/gif/error/Wild-Type-Mouse.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-aliens-29.gif b/wqflask/wqflask/static/gif/error/animated-gifs-aliens-29.gif new file mode 100644 index 00000000..e9d38277 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-aliens-29.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-angels-04.gif b/wqflask/wqflask/static/gif/error/animated-gifs-angels-04.gif new file mode 100644 index 00000000..94e11847 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-angels-04.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-cats-016.gif b/wqflask/wqflask/static/gif/error/animated-gifs-cats-016.gif new file mode 100644 index 00000000..7e6ec9a3 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-cats-016.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-cats-031.gif b/wqflask/wqflask/static/gif/error/animated-gifs-cats-031.gif new file mode 100644 index 00000000..af7ef655 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-cats-031.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-cell-phones-03.gif b/wqflask/wqflask/static/gif/error/animated-gifs-cell-phones-03.gif new file mode 100644 index 00000000..89c79ddf Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-cell-phones-03.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-cell-phones-16.gif b/wqflask/wqflask/static/gif/error/animated-gifs-cell-phones-16.gif new file mode 100644 index 00000000..7530d180 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-cell-phones-16.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-13.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-13.gif new file mode 100644 index 00000000..afb05c62 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-13.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-28.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-28.gif new file mode 100644 index 00000000..f5b4a563 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-28.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-32.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-32.gif new file mode 100644 index 00000000..7258e594 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-32.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-42.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-42.gif new file mode 100644 index 00000000..ed1f8722 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-42.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-60.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-60.gif new file mode 100644 index 00000000..f58d69f1 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-60.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-64.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-64.gif new file mode 100644 index 00000000..5d5b4fdf Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-64.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-65.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-65.gif new file mode 100644 index 00000000..b4b10845 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-65.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-72.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-72.gif new file mode 100644 index 00000000..e60cb4fe Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-72.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-74.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-74.gif new file mode 100644 index 00000000..bd7b72f3 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-74.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-computers-75.gif b/wqflask/wqflask/static/gif/error/animated-gifs-computers-75.gif new file mode 100644 index 00000000..916d6b33 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-computers-75.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-construction-sites-038.gif b/wqflask/wqflask/static/gif/error/animated-gifs-construction-sites-038.gif new file mode 100644 index 00000000..0ec782c4 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-construction-sites-038.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-dogs-04.gif b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-04.gif new file mode 100644 index 00000000..9515c18a Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-04.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-dogs-14.gif b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-14.gif new file mode 100644 index 00000000..f1e2e1f5 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-14.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-dogs-18.gif b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-18.gif new file mode 100644 index 00000000..572849d5 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-18.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-dogs-47.gif b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-47.gif new file mode 100644 index 00000000..d808c9ee Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-47.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-dogs-50.gif b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-50.gif new file mode 100644 index 00000000..9865ee45 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-dogs-50.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-lava-lamps-01.gif b/wqflask/wqflask/static/gif/error/animated-gifs-lava-lamps-01.gif new file mode 100644 index 00000000..ee9c113d Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-lava-lamps-01.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-mice-02.gif b/wqflask/wqflask/static/gif/error/animated-gifs-mice-02.gif new file mode 100644 index 00000000..5ca2ee5c Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-mice-02.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-mice-09.gif b/wqflask/wqflask/static/gif/error/animated-gifs-mice-09.gif new file mode 100644 index 00000000..7cb361e4 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-mice-09.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-mice-24.gif b/wqflask/wqflask/static/gif/error/animated-gifs-mice-24.gif new file mode 100644 index 00000000..96a26450 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-mice-24.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-smileys-063.gif b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-063.gif new file mode 100644 index 00000000..62de166c Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-063.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-smileys-068.gif b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-068.gif new file mode 100644 index 00000000..3550e978 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-068.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-smileys-134.gif b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-134.gif new file mode 100644 index 00000000..954ab614 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-134.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-smileys-211.gif b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-211.gif new file mode 100644 index 00000000..596174d7 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-211.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-smileys-234.gif b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-234.gif new file mode 100644 index 00000000..5aba636b Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-smileys-234.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-001.gif b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-001.gif new file mode 100644 index 00000000..7896ff1f Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-001.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-002.gif b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-002.gif new file mode 100644 index 00000000..89da6441 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-002.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-005.gif b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-005.gif new file mode 100644 index 00000000..b7887630 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-005.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-012.gif b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-012.gif new file mode 100644 index 00000000..f6697d02 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-012.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-056.gif b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-056.gif new file mode 100644 index 00000000..2b2496a4 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-056.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-059.gif b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-059.gif new file mode 100644 index 00000000..f2188656 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-059.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-060.gif b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-060.gif new file mode 100644 index 00000000..aa8f7bd3 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-060.gif differ diff --git a/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-069.gif b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-069.gif new file mode 100644 index 00000000..473212e4 Binary files /dev/null and b/wqflask/wqflask/static/gif/error/animated-gifs-stickmen-069.gif differ diff --git a/wqflask/wqflask/templates/error.html b/wqflask/wqflask/templates/error.html new file mode 100644 index 00000000..a2eaad5c --- /dev/null +++ b/wqflask/wqflask/templates/error.html @@ -0,0 +1,58 @@ +{% extends "base.html" %} +{% block title %}Error: {{message}}{% endblock %} +{% block content %} + + +
+
+
+ + + +

ERROR

+ +

+ This error is not what we wanted to see. Unfortunately errors + are part of all software systems and we need to resolve this + together. +

+

+ It is important to report this so we + can fix it. +

+ +

+ Report to the GeneNetwork team by recording the steps you take + to reproduce this error. Next to those steps, copy-paste below + stack trace, either as + a new + issue (GeneNetwork error: {{message}}) or E-mail this full page to one of the developers + directly. +

+
+ +
+    {{ message }} (error)
+    {{ stack[-3] }}
+    {{ stack[-2] }}
+  
+ +

+ To check if this already a known issue, search the + issue + tracker. +

+ + Toggle full stack trace +
+
+      {% for line in stack %}
+        {{ line }}
+      {% endfor %}
+    
+
+
+
+ + +{% endblock %} diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 7061e0f1..c01056a8 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -4,6 +4,9 @@ from __future__ import absolute_import, division, print_function +import traceback # for error page +import os # for error gifs +import random # for random error gif import sys import csv import xlsxwriter @@ -58,6 +61,8 @@ from wqflask import user_manager from wqflask import collect from wqflask.database import db_session +import werkzeug + import utility.logger logger = utility.logger.getLogger(__name__ ) @@ -82,6 +87,26 @@ def shutdown_session(exception=None): # from wqflask import tracer # tracer.turn_on() +@app.errorhandler(Exception) +def handle_bad_request(e): + logger.error(str(e)) + exc_type, exc_value, exc_traceback = sys.exc_info() + # print "*** format_exc, first and last line:" + # logger.error(formatted_lines[0]) + # logger.error(formatted_lines[-3]) + # logger.error(formatted_lines[-2]) + # logger.error(formatted_lines[-1]) + logger.error(traceback.format_exc()) + formatted_lines = traceback.format_exc().splitlines() + + # for file in os.listdir("./wqflask/static/gif/error"): + # if file.endswith(".gif"): + # print(file) + + list = [fn for fn in os.listdir("./wqflask/static/gif/error") if fn.endswith(".gif") ] + # print(list) + return render_template("error.html",message=str(e),stack=formatted_lines,error_image=random.choice(list)) + @app.route("/") def index_page(): logger.info("Sending index_page") @@ -394,6 +419,7 @@ def mapping_results_container_page(): @app.route("/marker_regression", methods=('POST',)) def marker_regression_page(): + raise Exception("Just an error") initial_start_vars = request.form logger.debug("Marker regression called with initial_start_vars:", initial_start_vars.items()) temp_uuid = initial_start_vars['temp_uuid'] -- cgit v1.2.3