Simplify UI labels for vehicle and bus selectors

This commit is contained in:
2026-07-23 00:38:33 +02:00
parent 7da427dd09
commit 9dbf50d1c5
+6 -6
View File
@@ -135,7 +135,7 @@ app.layout = dbc.Container([
]),
dbc.Tab(label="Vehicles", tab_id="vehicles", children=[
dbc.Row([
dbc.Col(html.Label("Select Vehicle:", className="mt-2"), width="auto"),
dbc.Col(html.Label("Vehicle:", className="mt-2"), width="auto"),
dbc.Col(dcc.Dropdown(
id='vehicles-vehicle-selector',
options=[{'label': v, 'value': v} for v in DATA.keys()],
@@ -147,14 +147,14 @@ app.layout = dbc.Container([
]),
dbc.Tab(label="Logs", tab_id="logs", children=[
dbc.Row([
dbc.Col(html.Label("Select Vehicle:", className="mt-2"), width="auto"),
dbc.Col(html.Label("Vehicle:", className="mt-2"), width="auto"),
dbc.Col(dcc.Dropdown(
id='logs-vehicle-selector',
options=[{'label': v, 'value': v} for v in DATA.keys()],
value=list(DATA.keys())[0] if DATA else None,
clearable=False
), width=3, className="me-4"),
dbc.Col(html.Label("Select Bus:", className="mt-2"), width="auto"),
dbc.Col(html.Label("Bus:", className="mt-2"), width="auto"),
dbc.Col(dcc.Dropdown(
id='logs-bus-selector',
options=[{'label': 'Bus 1', 'value': 'Bus 1'}, {'label': 'Bus 2', 'value': 'Bus 2'}],
@@ -166,14 +166,14 @@ app.layout = dbc.Container([
]),
dbc.Tab(label="Statistics", tab_id="statistics", children=[
dbc.Row([
dbc.Col(html.Label("Select Vehicle:", className="mt-2"), width="auto"),
dbc.Col(html.Label("Vehicle:", className="mt-2"), width="auto"),
dbc.Col(dcc.Dropdown(
id='vehicle-selector',
options=[{'label': v, 'value': v} for v in DATA.keys()],
value=list(DATA.keys())[0] if DATA else None,
clearable=False
), width=3, className="me-4"),
dbc.Col(html.Label("Select Bus:", className="mt-2"), width="auto"),
dbc.Col(html.Label("Bus:", className="mt-2"), width="auto"),
dbc.Col(dcc.Dropdown(
id='bus-selector',
options=[{'label': 'Bus 1', 'value': 'Bus 1'}, {'label': 'Bus 2', 'value': 'Bus 2'}],
@@ -321,7 +321,7 @@ def render_content(tab, vehicle, bus):
elif tab == 'id_viewer':
ids = sorted(DATA_BY_ID.get((vehicle, bus), {}).keys())
return html.Div([
html.Label("Select CAN ID:"),
html.Label("CAN ID:"),
dcc.Dropdown(
id='id-selector',
options=[{'label': i, 'value': i} for i in ids],