]>
git.ipfire.org Git - ipfire.org.git/blob - www/webapp/handlers_stasy.py
7 from handlers_base
import *
9 class StasyBaseHandler(BaseHandler
):
12 return backend
.Stasy()
15 class StasyIndexHandler(StasyBaseHandler
):
17 profiles
= self
.stasy
.get_profiles()
19 self
.render("stasy-index.html", profiles
=profiles
)
22 class StasyProfileHandler(StasyBaseHandler
):
23 def get(self
, profile_id
):
24 profile
= self
.stasy
.get_profile(profile_id
)
26 raise tornado
.web
.HTTPError(404, "Profile not found: %s" % profile_id
)
28 self
.render("stasy-profile.html", profile
=profile
)
31 class StasyStatsCPUHandler(StasyBaseHandler
):
33 return self
.render("stasy-stats-cpus.html",
34 cpu_vendors
= self
.stasy
.cpu_map
)
37 class StasyStatsVirtualHandler(StasyBaseHandler
):
39 return self
.render("stasy-stats-virtual.html",
40 hypervisor_vendors
= self
.stasy
.hypervisor_map
,
41 is_virtual
= self
.stasy
.virtual_map
)