From: Michael Tremer Date: Tue, 30 Oct 2018 10:10:04 +0000 (+0000) Subject: fireinfo: Redesign index page X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38d161c7b8cc125ef9a0e26ff2a50a6b17366756;p=ipfire.org.git fireinfo: Redesign index page Signed-off-by: Michael Tremer --- diff --git a/src/templates/fireinfo/index.html b/src/templates/fireinfo/index.html index 619582c4..86376d9a 100644 --- a/src/templates/fireinfo/index.html +++ b/src/templates/fireinfo/index.html @@ -1,44 +1,30 @@ {% extends "../base.html" %} -{% block title %}Fireinfo{% end block %} +{% block title %}{{ _("Fireinfo") }}{% end block %} -{% block body %} -
-
-

{{ _("Fireinfo") }}

+{% block container %} +
+
+
+
+

{{ _("Fireinfo") }}

-

- Fireinfo is a tool that anonymously collects statistical - data from IPFire systems. -

- -

- These data should help the developers to learn - which hardware is used most often to run an IPFire system, but is also - handy when it comes to debugging hardware problems. -

- -
-
-

- Please enter the profile ID of your system, which can be found - on the fireinfo page on the web interface, to see your profile: -

+

+ Fireinfo is a tool that anonymously collects statistical + data from IPFire systems +

+
-
-
-
- - - -
- {% raw xsrf_form_html() %} -
+
+
-

{{ _("Random profile") }}

+
-
+ {% end block %} diff --git a/src/web/fireinfo.py b/src/web/fireinfo.py index 19f001ca..7d81e08d 100644 --- a/src/web/fireinfo.py +++ b/src/web/fireinfo.py @@ -153,24 +153,9 @@ class ProfileSendHandler(BaseHandler): class IndexHandler(BaseHandler): - def _profile_not_found(self, profile_id): - self.set_status(404) - self.render("fireinfo/profile-notfound.html", profile_id=profile_id) - def get(self): self.render("fireinfo/index.html") - def post(self): - profile_id = self.get_argument("profile_id", None) - if not profile_id: - raise tornado.web.HTTPError(400, "No profile ID was given.") - - if not self.fireinfo.profile_exists(profile_id): - self._profile_not_found(profile_id) - return - - self.redirect("/profile/%s" % profile_id) - class ProfileDetailHandler(BaseHandler): def get(self, profile_id):