Skip to content

Commit

Permalink
Fit Dashboard worker table to page width (#8897)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson authored Oct 16, 2024
1 parent c3482ee commit 276fc35
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions distributed/dashboard/components/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
)
Expand All @@ -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,
)
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 276fc35

Please sign in to comment.