Add auto-reload, evaluation endpoint, show docs
This commit is contained in:
parent
04404f2fc4
commit
a7e3dc11fd
1 changed files with 389 additions and 100 deletions
|
|
@ -1,27 +1,36 @@
|
|||
from dash import dcc, html
|
||||
|
||||
from ..helper import snake_case_to_text
|
||||
from ..helper import snake_case_to_text, strip_lines
|
||||
|
||||
|
||||
def get_description(function_name: str, accent_color: str) -> html.Div:
|
||||
markdown_text = f"""
|
||||
View the live data of your deployments here.
|
||||
|
||||
## Using the API
|
||||
|
||||
You can find the available endpoints at [/docs](/docs).
|
||||
|
||||
## Metrics
|
||||
|
||||
Recent traces and aggregated metrics are presented below. Try filtering the table.
|
||||
"""
|
||||
|
||||
def get_description(
|
||||
function_name: str, function_docs: str, accent_color: str
|
||||
) -> html.Div:
|
||||
return html.Div(
|
||||
[
|
||||
html.H1(
|
||||
f"{snake_case_to_text(function_name)} - metrics",
|
||||
style={"color": accent_color},
|
||||
),
|
||||
dcc.Markdown(markdown_text, className="description"),
|
||||
dcc.Markdown(
|
||||
strip_lines(
|
||||
f"""
|
||||
> View the live data of your deployments here.
|
||||
|
||||
## Using the API
|
||||
|
||||
You can find the available endpoints at [/docs](/docs).
|
||||
|
||||
### Details
|
||||
|
||||
{function_docs}
|
||||
|
||||
## Metrics
|
||||
|
||||
Recent traces and aggregated metrics are presented below. Try filtering the table.
|
||||
"""
|
||||
),
|
||||
className="description",
|
||||
),
|
||||
]
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue