From: David ‘Bombe’ Roden Date: Sun, 28 Jul 2019 11:17:42 +0000 (+0200) Subject: ✨ Only show metrics page if debug flag is set X-Git-Tag: v81^2~172 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d10c5a45303f4d128f482ff0d26eb08770a247d8;p=Sone.git ✨ Only show metrics page if debug flag is set --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index a6dc8ff..a439e4b 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -616,7 +616,9 @@ public class WebInterface implements SessionProvider { pageToadletRegistry.addPage(new EmptyImageTitlePage(this, loaders, templateRenderer)); pageToadletRegistry.addPage(new EmptyAlbumTitlePage(this, loaders, templateRenderer)); pageToadletRegistry.addPage(new DismissNotificationPage(this, loaders, templateRenderer)); - pageToadletRegistry.addPage(new MetricsPage(this, loaders, templateRenderer, metricRegistry)); + if (getCore().getDebugInformation().getShowMetrics()) { + pageToadletRegistry.addPage(new MetricsPage(this, loaders, templateRenderer, metricRegistry)); + } pageToadletRegistry.addPage(loaders.loadStaticPage("css/", "/static/css/", "text/css")); pageToadletRegistry.addPage(loaders.loadStaticPage("javascript/", "/static/javascript/", "text/javascript")); pageToadletRegistry.addPage(loaders.loadStaticPage("images/", "/static/images/", "image/png"));