Source code distributed/dashboard/worker.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from .components.worker import (
    status_doc,
    crossfilter_doc,
    systemmonitor_doc,
    counters_doc,
    profile_doc,
    profile_server_doc,
)
from .core import BokehApplication
from tornado.ioloop import IOLoop


template_variables = {
    "pages": ["status", "system", "profile", "crossfilter", "profile-server"]
}


def connect(application, http_server, worker, prefix=""):
    bokeh_app = BokehApplication(
        applications, worker, prefix=prefix, template_variables=template_variables
    )
    application.add_application(bokeh_app)
    bokeh_app.initialize(IOLoop.current())


applications = {
    "/status": status_doc,
    "/counters": counters_doc,
    "/crossfilter": crossfilter_doc,
    "/system": systemmonitor_doc,
    "/profile": profile_doc,
    "/profile-server": profile_server_doc,
}