Skip to content

Commit 276fc35

Browse files
Fit Dashboard worker table to page width (#8897)
1 parent c3482ee commit 276fc35

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

distributed/dashboard/components/scheduler.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4045,7 +4045,7 @@ class WorkerTable(DashboardComponent):
40454045
"spilled_bytes",
40464046
}
40474047

4048-
def __init__(self, scheduler, width=800, **kwargs):
4048+
def __init__(self, scheduler, **kwargs):
40494049
self.scheduler = scheduler
40504050
self.names = [
40514051
"name",
@@ -4138,7 +4138,7 @@ def __init__(self, scheduler, width=800, **kwargs):
41384138
columns=[columns[n] for n in table_names],
41394139
reorderable=True,
41404140
sortable=True,
4141-
width=width,
4141+
width_policy="max",
41424142
index_position=None,
41434143
**_DATATABLE_STYLESHEETS_KWARGS,
41444144
)
@@ -4158,7 +4158,7 @@ def __init__(self, scheduler, width=800, **kwargs):
41584158
columns=[extra_columns[n] for n in extra_names],
41594159
reorderable=True,
41604160
sortable=True,
4161-
width=width,
4161+
width_policy="max",
41624162
index_position=None,
41634163
**_DATATABLE_STYLESHEETS_KWARGS,
41644164
)
@@ -4185,7 +4185,6 @@ def __init__(self, scheduler, width=800, **kwargs):
41854185
x_range=(0, 1),
41864186
y_range=(-0.1, 0.1),
41874187
height=60,
4188-
width=width,
41894188
tools="",
41904189
min_border_right=0,
41914190
**kwargs,
@@ -4215,7 +4214,6 @@ def __init__(self, scheduler, width=800, **kwargs):
42154214
x_range=(0, 1),
42164215
y_range=(-0.1, 0.1),
42174216
height=60,
4218-
width=width,
42194217
tools="",
42204218
min_border_right=0,
42214219
**kwargs,
@@ -4626,7 +4624,7 @@ def exceptions_doc(scheduler, extra, doc):
46264624

46274625
@log_errors
46284626
def workers_doc(scheduler, extra, doc):
4629-
table = WorkerTable(scheduler)
4627+
table = WorkerTable(scheduler, sizing_mode="stretch_width")
46304628
table.update()
46314629
add_periodic_callback(doc, table, 500)
46324630
doc.title = "Dask: Workers"

0 commit comments

Comments
 (0)