]> git.ipfire.org Git - ipfire.org.git/commitdiff
fireinfo: Rename profile template
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Oct 2018 10:14:58 +0000 (10:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Oct 2018 10:14:58 +0000 (10:14 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/fireinfo/profile.html [moved from src/templates/fireinfo/profile-detail.html with 100% similarity]
src/web/__init__.py
src/web/fireinfo.py

index 211cc0003e621684013baac618f8fe51f2179cfc..08308d8f4b2002d2761f9f2c024932d3fa2facbf 100644 (file)
@@ -142,7 +142,7 @@ templates_fireinfo_DATA = \
        src/templates/fireinfo/index.html \
        src/templates/fireinfo/i-use-1.png \
        src/templates/fireinfo/model-detail.html \
-       src/templates/fireinfo/profile-detail.html \
+       src/templates/fireinfo/profile.html \
        src/templates/fireinfo/profile-notfound.html \
        src/templates/fireinfo/stats-admin.html \
        src/templates/fireinfo/stats-cpus-detail.html \
index 6097c470d7a113610b6868c3852a919675d6a4af..087d2202c2efa7a4684e319db794a46ebe57ea88 100644 (file)
@@ -192,7 +192,7 @@ class Application(tornado.web.Application):
 
                        # Show profiles
                        (r"/profile/random", fireinfo.RandomProfileHandler),
-                       (r"/profile/([a-z0-9]{40})", fireinfo.ProfileDetailHandler),
+                       (r"/profile/([a-z0-9]{40})", fireinfo.ProfileHandler),
 
                        # Send profiles.
                        (r"/send/([a-z0-9]+)", fireinfo.ProfileSendHandler),
index 7d81e08d99b4979e4c2201fc2a24088a40e4a8f1..cbecde8ffa09b0ffd26b6207563f0a79e9258d5a 100644 (file)
@@ -157,15 +157,14 @@ class IndexHandler(BaseHandler):
                self.render("fireinfo/index.html")
 
 
-class ProfileDetailHandler(BaseHandler):
+class ProfileHandler(BaseHandler):
        def get(self, profile_id):
                profile = self.fireinfo.get_profile(profile_id, when=self.when)
 
                if not profile or not profile.is_showable():
-                       self._profile_not_found(profile_id)
-                       return
+                       raise tornado.web.HTTPError(404)
 
-               self.render("fireinfo/profile-detail.html", profile=profile)
+               self.render("fireinfo/profile.html", profile=profile)
 
 
 class RandomProfileHandler(BaseHandler):