From 276fc35e2dc3d59d2ad81703a4bbfd3c97320d7e Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Wed, 16 Oct 2024 13:52:33 +0100 Subject: [PATCH] Fit Dashboard worker table to page width (#8897) --- distributed/dashboard/components/scheduler.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/distributed/dashboard/components/scheduler.py b/distributed/dashboard/components/scheduler.py index 3605945abd..7824319908 100644 --- a/distributed/dashboard/components/scheduler.py +++ b/distributed/dashboard/components/scheduler.py @@ -4045,7 +4045,7 @@ class WorkerTable(DashboardComponent): "spilled_bytes", } - def __init__(self, scheduler, width=800, **kwargs): + def __init__(self, scheduler, **kwargs): self.scheduler = scheduler self.names = [ "name", @@ -4138,7 +4138,7 @@ def __init__(self, scheduler, width=800, **kwargs): columns=[columns[n] for n in table_names], reorderable=True, sortable=True, - width=width, + width_policy="max", index_position=None, **_DATATABLE_STYLESHEETS_KWARGS, ) @@ -4158,7 +4158,7 @@ def __init__(self, scheduler, width=800, **kwargs): columns=[extra_columns[n] for n in extra_names], reorderable=True, sortable=True, - width=width, + width_policy="max", index_position=None, **_DATATABLE_STYLESHEETS_KWARGS, ) @@ -4185,7 +4185,6 @@ def __init__(self, scheduler, width=800, **kwargs): x_range=(0, 1), y_range=(-0.1, 0.1), height=60, - width=width, tools="", min_border_right=0, **kwargs, @@ -4215,7 +4214,6 @@ def __init__(self, scheduler, width=800, **kwargs): x_range=(0, 1), y_range=(-0.1, 0.1), height=60, - width=width, tools="", min_border_right=0, **kwargs, @@ -4626,7 +4624,7 @@ def exceptions_doc(scheduler, extra, doc): @log_errors def workers_doc(scheduler, extra, doc): - table = WorkerTable(scheduler) + table = WorkerTable(scheduler, sizing_mode="stretch_width") table.update() add_periodic_callback(doc, table, 500) doc.title = "Dask: Workers"