aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2023-11-29 10:07:00 +0000
committerTibor Frank <tifrank@cisco.com>2023-11-29 10:07:00 +0000
commit116d2ca5c78bb943b01b0e5b1d93c962fd425303 (patch)
tree831f6e6e1616c58e3c3714cc09ec66380a111098 /csit.infra.dash
parent607fa0c71af07ba02785b8990a256725efccb983 (diff)
C-Dash: Iterative: Move buttons to control panel
Change-Id: I57d6da2dd31447d402eca9efda62e83bc3209b2d Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'csit.infra.dash')
-rw-r--r--csit.infra.dash/app/cdash/report/layout.py111
-rw-r--r--csit.infra.dash/app/cdash/report/layout.yaml6
2 files changed, 51 insertions, 66 deletions
diff --git a/csit.infra.dash/app/cdash/report/layout.py b/csit.infra.dash/app/cdash/report/layout.py
index cbcc6e88b1..08a430bc3b 100644
--- a/csit.infra.dash/app/cdash/report/layout.py
+++ b/csit.infra.dash/app/cdash/report/layout.py
@@ -710,29 +710,44 @@ class Layout:
)
]
),
- dbc.Row(
+ dbc.Stack(
id="row-btns-sel-tests",
class_name="g-0 p-1",
style=C.STYLE_DISABLED,
+ gap=2,
children=[
- dbc.ButtonGroup(
- children=[
- dbc.Button(
- id={"type": "ctrl-btn", "index": "rm-test"},
- children="Remove Selected",
- class_name="w-100",
- color="info",
- disabled=False
- ),
- dbc.Button(
- id={"type": "ctrl-btn", "index": "rm-test-all"},
- children="Remove All",
- class_name="w-100",
- color="info",
- disabled=False
- )
- ]
- )
+ dbc.ButtonGroup(children=[
+ dbc.Button(
+ id={"type": "ctrl-btn", "index": "rm-test"},
+ children="Remove Selected",
+ class_name="w-100",
+ color="info",
+ disabled=False
+ ),
+ dbc.Button(
+ id={"type": "ctrl-btn", "index": "rm-test-all"},
+ children="Remove All",
+ class_name="w-100",
+ color="info",
+ disabled=False
+ )
+ ]),
+ dbc.ButtonGroup(children=[
+ dbc.Button(
+ id="plot-btn-url",
+ children="Show URL",
+ class_name="w-100",
+ color="info",
+ disabled=False
+ ),
+ dbc.Button(
+ id="plot-btn-download",
+ children="Download Data",
+ class_name="w-100",
+ color="info",
+ disabled=False
+ )
+ ])
]
)
]
@@ -808,48 +823,17 @@ class Layout:
),
class_name="g-0 p-0"
),
- dbc.Row(
+ dbc.Modal(
[
- dbc.Col([html.Div(
- [
- dbc.Button(
- id="plot-btn-url",
- children="Show URL",
- class_name="me-1",
- color="info",
- style={
- "text-transform": "none",
- "padding": "0rem 1rem"
- }
- ),
- dbc.Modal(
- [
- dbc.ModalHeader(dbc.ModalTitle("URL")),
- dbc.ModalBody(url)
- ],
- id="plot-mod-url",
- size="xl",
- is_open=False,
- scrollable=True
- ),
- dbc.Button(
- id="plot-btn-download",
- children="Download Data",
- class_name="me-1",
- color="info",
- style={
- "text-transform": "none",
- "padding": "0rem 1rem"
- }
- ),
- dcc.Download(id="download-iterative-data")
- ],
- className=\
- "d-grid gap-0 d-md-flex justify-content-md-end"
- )])
+ dbc.ModalHeader(dbc.ModalTitle("URL")),
+ dbc.ModalBody(url)
],
- class_name="g-0 p-0"
- )
+ id="plot-mod-url",
+ size="xl",
+ is_open=False,
+ scrollable=True
+ ),
+ dcc.Download(id="download-iterative-data")
]
def callbacks(self, app):
@@ -1322,15 +1306,16 @@ class Layout:
@app.callback(
Output("plot-mod-url", "is_open"),
- [Input("plot-btn-url", "n_clicks")],
- [State("plot-mod-url", "is_open")],
+ Output("plot-btn-url", "n_clicks"),
+ Input("plot-btn-url", "n_clicks"),
+ State("plot-mod-url", "is_open")
)
def toggle_plot_mod_url(n, is_open):
"""Toggle the modal window with url.
"""
if n:
- return not is_open
- return is_open
+ return not is_open, 0
+ return is_open, 0
@app.callback(
Output("download-iterative-data", "data"),
diff --git a/csit.infra.dash/app/cdash/report/layout.yaml b/csit.infra.dash/app/cdash/report/layout.yaml
index 9e30642111..dea50144c2 100644
--- a/csit.infra.dash/app/cdash/report/layout.yaml
+++ b/csit.infra.dash/app/cdash/report/layout.yaml
@@ -32,7 +32,7 @@ plot-throughput:
l: 80
r: 20
showlegend: False
- height: 800
+ height: 850
paper_bgcolor: "#fff"
plot_bgcolor: "#fff"
hoverlabel:
@@ -72,7 +72,7 @@ plot-bandwidth:
l: 80
r: 20
showlegend: False
- height: 800
+ height: 850
paper_bgcolor: "#fff"
plot_bgcolor: "#fff"
hoverlabel:
@@ -112,7 +112,7 @@ plot-latency:
l: 80
r: 20
showlegend: False
- height: 800
+ height: 850
paper_bgcolor: "#fff"
plot_bgcolor: "#fff"
hoverlabel: