great-ai/great_ai/deploy/routes/dashboard/get_traces_table.py
Andras Schmelczer 8faee98ec6
Some checks failed
Publish documentation / publish (push) Successful in 58s
Check / Lint, format & type checks (push) Failing after 1m2s
Check / Test on Python 3.10 (push) Successful in 1m9s
Check / Test on Python 3.9 (push) Successful in 50s
Modernise
2026-06-06 21:39:06 +01:00

33 lines
929 B
Python

from typing import Any
from dash import dash_table
from ....context import get_context
def get_traces_table() -> Any:
return dash_table.DataTable( # type: ignore[attr-defined]
page_current=0,
page_size=get_context().dashboard_table_size,
page_action="custom",
filter_action="custom",
sort_action="custom",
sort_mode="multi",
sort_by=[
{"column_id": "created", "direction": "desc"},
],
style_data={
"white-space": "normal",
"height": "auto",
"max-height": "300px",
"max-width": "500px",
"overflow": "hidden",
},
style_cell={"padding": "5px"},
style_header={
"background-color": "white",
"font-weight": "bold",
},
merge_duplicate_headers=True,
style_table={"overflow": "auto", "max-height": "80vh"},
)