plesna/dashboard/pages/schema.py

29 lines
879 B
Python
Raw Normal View History

2024-08-07 09:39:33 +00:00
from dash import dcc, html
2024-07-27 17:19:36 +00:00
2024-08-07 09:39:33 +00:00
from ..libs.repository.repository import AbstractRepository
2024-07-27 17:19:36 +00:00
2024-07-28 10:29:14 +00:00
2024-08-07 09:39:33 +00:00
def layout_factory(repositories: dict[str, AbstractRepository]):
def layout(repository_name: str = "", schema_name: str = ""):
repository = repositories[repository_name]
return html.Div(
[
html.H2(
[
dcc.Link(
f"{repository.name}",
href=f"/repository/{repository.name}",
className="hover:underline",
),
html.Span(" > "),
html.Span(
f"{schema_name}",
),
],
className="text-2xl p-4 py-2",
),
]
)
2024-07-27 17:19:36 +00:00
2024-08-07 09:39:33 +00:00
return layout