Repository: dask/distributed

Issue:
Drop down tile to reveal "secret" dashboards
We're accumulating a lot of _secret_ dashboard pages https://github.com/dask/distributed/blob/c2557938e6c4175534031cba5ca5ac9d2cdc95f7/distributed/dashboard/scheduler.py#L82-L119
although most are not easily accessible from the UI. Most of the pages are not useful for the ordinary user and are only relevant for specific edge cases or debugging. hence, it makes sense that they are not promoted as a top-level dashboard page.

However, at least for debugging purposes, I would really appreciate if these pages were a bit easier to navigate. In particular I'm looking for a way which doesn't require me to know the exact endpoint for an individual plot and requires me to type it into my browser.

I would propose to add a drop down menu / button which can be used to browse all _hidden_ dashboard pages.

Disclaimer: I can't implement this. I barely know what bokeh is.


Discussion:
I agree that a dropdown menu would be a good way to solve this.  

> Disclaimer: I can't implement this. I barely know what bokeh is.

cc @jacobtomlinson, although I think that he's on vacation

Resolving patch:
diff --git a/distributed/dashboard/scheduler.py b/distributed/dashboard/scheduler.py
--- a/distributed/dashboard/scheduler.py
+++ b/distributed/dashboard/scheduler.py
@@ -43,42 +43,6 @@
 from .core import BokehApplication
 from .worker import counters_doc
 
-template_variables = {
-    "pages": [
-        "status",
-        "workers",
-        "tasks",
-        "system",
-        "profile",
-        "graph",
-        "groups",
-        "info",
-    ]
-}
-
-if NVML_ENABLED:
-    template_variables["pages"].insert(4, "gpu")
-
-
-def connect(application, http_server, scheduler, prefix=""):
-    bokeh_app = BokehApplication(
-        applications, scheduler, prefix=prefix, template_variables=template_variables
-    )
-    application.add_application(bokeh_app)
-    bokeh_app.initialize(IOLoop.current())
-
-    bokeh_app.add_handlers(
-        r".*",
-        [
-            (
-                r"/",
-                web.RedirectHandler,
-                {"url": urljoin((prefix or "").strip("/") + "/", r"status")},
-            )
-        ],
-    )
-
-
 applications = {
     "/system": systemmonitor_doc,
     "/stealing": stealing_doc,
@@ -117,3 +81,40 @@ def connect(application, http_server, scheduler, prefix=""):
     "/individual-gpu-memory": gpu_memory_doc,
     "/individual-gpu-utilization": gpu_utilization_doc,
 }
+
+
+template_variables = {
+    "pages": [
+        "status",
+        "workers",
+        "tasks",
+        "system",
+        "profile",
+        "graph",
+        "groups",
+        "info",
+    ],
+    "plots": [x.replace("/", "") for x in applications if "individual" in x],
+}
+
+if NVML_ENABLED:
+    template_variables["pages"].insert(4, "gpu")
+
+
+def connect(application, http_server, scheduler, prefix=""):
+    bokeh_app = BokehApplication(
+        applications, scheduler, prefix=prefix, template_variables=template_variables
+    )
+    application.add_application(bokeh_app)
+    bokeh_app.initialize(IOLoop.current())
+
+    bokeh_app.add_handlers(
+        r".*",
+        [
+            (
+                r"/",
+                web.RedirectHandler,
+                {"url": urljoin((prefix or "").strip("/") + "/", r"status")},
+            )
+        ],
+    )


Test patch: