aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/pal/stats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2022-10-03 15:11:02 +0200
committerTibor Frank <tifrank@cisco.com>2022-10-03 15:14:24 +0200
commitc6bfe865e4a62dda2c5e635df53083e909a6558b (patch)
treeaaca7069ba8c77b6e47de56f1e00b239efdd9f56 /csit.infra.dash/app/pal/stats
parent3b57cc60251300ad79b42ec52cc2f6cc1e950165 (diff)
CDash: Improvements in layout
Signed-off-by: Tibor Frank <tifrank@cisco.com> Change-Id: I28697efb31a7c661547872bedb696317197b5c7f
Diffstat (limited to 'csit.infra.dash/app/pal/stats')
-rw-r--r--csit.infra.dash/app/pal/stats/layout.py173
1 files changed, 79 insertions, 94 deletions
diff --git a/csit.infra.dash/app/pal/stats/layout.py b/csit.infra.dash/app/pal/stats/layout.py
index fa1da90a00..2f1b344613 100644
--- a/csit.infra.dash/app/pal/stats/layout.py
+++ b/csit.infra.dash/app/pal/stats/layout.py
@@ -308,7 +308,7 @@ class Layout:
)
)
],
- brand="Dashboard",
+ brand=C.BRAND,
brand_href="/",
brand_external_link=True,
class_name="p-2",
@@ -321,12 +321,12 @@ class Layout:
:returns: Column with the control panel.
:rtype: dbc.Col
"""
- return dbc.Col(
- id="col-controls",
- children=[
- self._add_ctrl_panel(),
- ],
- )
+ return dbc.Col([
+ html.Div(
+ children=self._add_ctrl_panel(),
+ className="sticky-top"
+ )
+ ])
def _add_plotting_col(self) -> dbc.Col:
"""Add column with plots and tables. It is placed on the right side.
@@ -418,93 +418,78 @@ class Layout:
:returns: Control panel.
:rtype: dbc.Row
"""
- return dbc.Row(
- id="row-ctrl-panel",
- class_name="g-0",
- children=[
- dbc.Row(
- class_name="g-0 p-2",
- children=[
- dbc.Row(
- class_name="gy-1",
- children=[
- dbc.Label(
- class_name="p-0",
- children=show_tooltip(self._tooltips,
- "help-dut", "Device under Test")
- ),
- dbc.Row(
- dbc.RadioItems(
- id="ri-duts",
- inline=True,
- value=self.default["dut"],
- options=self.default["duts"]
- )
- )
- ]
- ),
- dbc.Row(
- class_name="gy-1",
- children=[
- dbc.Label(
- class_name="p-0",
- children=show_tooltip(self._tooltips,
- "help-ttype", "Test Type"),
- ),
- dbc.RadioItems(
- id="ri-ttypes",
- inline=True,
- value=self.default["ttype"],
- options=self.default["ttypes"]
- )
- ]
- ),
- dbc.Row(
- class_name="gy-1",
- children=[
- dbc.Label(
- class_name="p-0",
- children=show_tooltip(self._tooltips,
- "help-cadence", "Cadence"),
- ),
- dbc.RadioItems(
- id="ri-cadences",
- inline=True,
- value=self.default["cadence"],
- options=self.default["cadences"]
- )
- ]
- ),
- dbc.Row(
- class_name="gy-1",
- children=[
- dbc.Label(
- class_name="p-0",
- children=show_tooltip(self._tooltips,
- "help-tbed", "Test Bed"),
- ),
- dbc.Select(
- id="dd-tbeds",
- placeholder="Select a test bed...",
- value=self.default["tbed"],
- options=self.default["tbeds"]
- )
- ]
- ),
- dbc.Row(
- class_name="gy-1",
- children=[
- dbc.Alert(
- id="al-job",
- color="info",
- children=self.default["job"]
- )
- ]
- )
- ]
- ),
- ]
- )
+ return [
+ dbc.Row(
+ class_name="g-0 p-1",
+ children=[
+ dbc.Label(
+ children=show_tooltip(self._tooltips,
+ "help-dut", "Device under Test")
+ ),
+ dbc.RadioItems(
+ id="ri-duts",
+ inline=True,
+ value=self.default["dut"],
+ options=self.default["duts"]
+ )
+ ]
+ ),
+ dbc.Row(
+ class_name="g-0 p-1",
+ children=[
+ dbc.Label(
+ children=show_tooltip(self._tooltips,
+ "help-ttype", "Test Type"),
+ ),
+ dbc.RadioItems(
+ id="ri-ttypes",
+ inline=True,
+ value=self.default["ttype"],
+ options=self.default["ttypes"]
+ )
+ ]
+ ),
+ dbc.Row(
+ class_name="g-0 p-1",
+ children=[
+ dbc.Label(
+ children=show_tooltip(self._tooltips,
+ "help-cadence", "Cadence"),
+ ),
+ dbc.RadioItems(
+ id="ri-cadences",
+ inline=True,
+ value=self.default["cadence"],
+ options=self.default["cadences"]
+ )
+ ]
+ ),
+ dbc.Row(
+ class_name="g-0 p-1",
+ children=[
+ dbc.Label(
+ children=show_tooltip(self._tooltips,
+ "help-tbed", "Test Bed"),
+ ),
+ dbc.Select(
+ id="dd-tbeds",
+ placeholder="Select a test bed...",
+ value=self.default["tbed"],
+ options=self.default["tbeds"]
+ )
+ ]
+ ),
+ dbc.Row(
+ class_name="g-0 p-1",
+ children=[
+ dbc.Alert(
+ id="al-job",
+ color="info",
+ children=self.default["job"]
+ )
+ ]
+ )
+ ]
class ControlPanel:
"""A class representing the control panel.