1 package net.pterodactylus.sone.web.pages
3 import com.codahale.metrics.*
4 import net.pterodactylus.sone.main.*
5 import net.pterodactylus.sone.web.*
6 import net.pterodactylus.sone.web.page.*
7 import net.pterodactylus.util.template.*
11 @TemplatePath("/templates/metrics.html")
12 @ToadletPath("metrics.html")
13 class MetricsPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer, private val metricsRegistry: MetricRegistry) : SoneTemplatePage(webInterface, loaders, templateRenderer, "Page.Metrics.Title") {
15 override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) {
16 templateContext["histograms"] = metricsRegistry.histograms