tst_params["core"].append(core.upper())
if framesize.upper() not in tst_params["frame-size"]:
tst_params["frame-size"].append(framesize.upper())
- if row["test_type"] == "mrr":
- if "MRR" not in tst_params["test-type"]:
- tst_params["test-type"].append("MRR")
- elif row["test_type"] == "ndrpdr":
+ if row["test_type"] == "ndrpdr":
if "NDR" not in tst_params["test-type"]:
tst_params["test-type"].extend(("NDR", "PDR", ))
elif row["test_type"] == "hoststack" and \
elif row["test_type"] == "hoststack" and row["tg_type"] == "ab":
if "CPS" not in tst_params["test-type"]:
tst_params["test-type"].extend(("CPS", "RPS"))
+ else: # MRR, SOAK
+ if row["test_type"].upper() not in tst_params["test-type"]:
+ tst_params["test-type"].append(row["test_type"].upper())
self._spec_tbs = tbs
# Read from files:
:returns: Control panel.
:rtype: list
"""
- return [
+ test_selection = [
dbc.Row(
class_name="g-0 p-1",
children=[
dbc.InputGroup(
[
- dbc.InputGroupText(
- children=show_tooltip(
- self._tooltips,
- "help-release",
- "CSIT Release"
- )
- ),
+ dbc.InputGroupText(show_tooltip(
+ self._tooltips,
+ "help-release",
+ "CSIT Release"
+ )),
dbc.Select(
id={"type": "ctrl-dd", "index": "rls"},
placeholder="Select a Release...",
children=[
dbc.InputGroup(
[
- dbc.InputGroupText(
- children=show_tooltip(
- self._tooltips,
- "help-dut",
- "DUT"
- )
- ),
+ dbc.InputGroupText(show_tooltip(
+ self._tooltips,
+ "help-dut",
+ "DUT"
+ )),
dbc.Select(
id={"type": "ctrl-dd", "index": "dut"},
placeholder="Select a Device under Test..."
children=[
dbc.InputGroup(
[
- dbc.InputGroupText(
- children=show_tooltip(
- self._tooltips,
- "help-dut-ver",
- "DUT Version"
- )
- ),
+ dbc.InputGroupText(show_tooltip(
+ self._tooltips,
+ "help-dut-ver",
+ "DUT Version"
+ )),
dbc.Select(
id={"type": "ctrl-dd", "index": "dutver"},
placeholder=\
children=[
dbc.InputGroup(
[
- dbc.InputGroupText(
- children=show_tooltip(
- self._tooltips,
- "help-area",
- "Area"
- )
- ),
+ dbc.InputGroupText(show_tooltip(
+ self._tooltips,
+ "help-area",
+ "Area"
+ )),
dbc.Select(
id={"type": "ctrl-dd", "index": "area"},
placeholder="Select an Area..."
children=[
dbc.InputGroup(
[
- dbc.InputGroupText(
- children=show_tooltip(
- self._tooltips,
- "help-test",
- "Test"
- )
- ),
+ dbc.InputGroupText(show_tooltip(
+ self._tooltips,
+ "help-test",
+ "Test"
+ )),
dbc.Select(
id={"type": "ctrl-dd", "index": "test"},
placeholder="Select a Test..."
children=[
dbc.InputGroup(
[
- dbc.InputGroupText(
- children=show_tooltip(
- self._tooltips,
- "help-infra",
- "Infra"
- )
- ),
+ dbc.InputGroupText(show_tooltip(
+ self._tooltips,
+ "help-infra",
+ "Infra"
+ )),
dbc.Select(
id={"type": "ctrl-dd", "index": "phy"},
placeholder=\
dbc.Row(
class_name="g-0 p-1",
children=[
- dbc.InputGroup(
- [
- dbc.InputGroupText(
- children=show_tooltip(
- self._tooltips,
- "help-normalize",
- "Normalization"
- )
- ),
- dbc.Col(
- children=[
- dbc.Checklist(
- id="normalize",
- options=[{
- "value": "normalize",
- "label": (
- "Normalize to CPU frequency "
- "2GHz"
- )
- }],
- value=[],
- inline=True,
- class_name="ms-2"
- )
- ]
- )
- ],
- style={"align-items": "center"},
- size="sm"
+ dbc.Button(
+ id={"type": "ctrl-btn", "index": "add-test"},
+ children="Add Selected",
+ color="info",
+ class_name="p-1"
)
]
- ),
+ )
+ ]
+ processing = [
dbc.Row(
class_name="g-0 p-1",
children=[
- dbc.Button(
- id={"type": "ctrl-btn", "index": "add-test"},
- children="Add Selected",
- color="info"
+ dbc.Checklist(
+ id="normalize",
+ options=[{
+ "value": "normalize",
+ "label": "Normalize to 2GHz CPU frequency"
+ }],
+ value=[],
+ inline=True,
+ class_name="ms-2"
)
]
- ),
+ )
+ ]
+ test_list = [
dbc.Row(
id="row-card-sel-tests",
class_name="g-0 p-1",
- style=C.STYLE_DISABLED,
children=[
dbc.ListGroup(
class_name="overflow-auto p-0",
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",
+ class_name="w-100 p-1",
color="info",
disabled=False
),
dbc.Button(
id={"type": "ctrl-btn", "index": "rm-test-all"},
children="Remove All",
- class_name="w-100",
+ class_name="w-100 p-1",
color="info",
disabled=False
)
dbc.Button(
id="plot-btn-url",
children="Show URL",
- class_name="w-100",
+ class_name="w-100 p-1",
color="info",
disabled=False
),
dbc.Button(
id="plot-btn-download",
children="Download Data",
- class_name="w-100",
+ class_name="w-100 p-1",
color="info",
disabled=False
)
)
]
+ return [
+ dbc.Row(
+ dbc.Card(
+ [
+ dbc.CardHeader(
+ html.H5("Test Selection")
+ ),
+ dbc.CardBody(
+ children=test_selection,
+ class_name="g-0 p-0"
+ )
+ ],
+ color="secondary",
+ outline=True
+ ),
+ class_name="g-0 p-1"
+ ),
+ dbc.Row(
+ dbc.Card(
+ [
+ dbc.CardHeader(
+ html.H5("Data Manipulations")
+ ),
+ dbc.CardBody(
+ children=processing,
+ class_name="g-0 p-0"
+ )
+ ],
+ color="secondary",
+ outline=True
+ ),
+ class_name="g-0 p-1"
+ ),
+ dbc.Row(
+ dbc.Card(
+ [
+ dbc.CardHeader(
+ html.H5("Selected Tests")
+ ),
+ dbc.CardBody(
+ children=test_list,
+ class_name="g-0 p-0"
+ )
+ ],
+ color="secondary",
+ outline=True
+ ),
+ id = "row-selected-tests",
+ class_name="g-0 p-1",
+ style=C.STYLE_DISABLED,
+ )
+ ]
+
def _get_plotting_area(
self,
tests: list,
Output("store-control-panel", "data"),
Output("store-selected-tests", "data"),
Output("plotting-area", "children"),
- Output("row-card-sel-tests", "style"),
- Output("row-btns-sel-tests", "style"),
+ Output("row-selected-tests", "style"),
Output("lg-selected", "children"),
Output({"type": "ctrl-dd", "index": "rls"}, "value"),
url_params = None
plotting_area = no_update
- row_card_sel_tests = no_update
- row_btns_sel_tests = no_update
+ row_sel_tests = no_update
lg_selected = no_update
trigger = Trigger(callback_context.triggered)
except (KeyError, IndexError, AttributeError):
pass
if store_sel:
- row_card_sel_tests = C.STYLE_ENABLED
- row_btns_sel_tests = C.STYLE_ENABLED
+ row_sel_tests = C.STYLE_ENABLED
last_test = store_sel[-1]
test = self._spec_tbs[last_test["rls"]][last_test["dut"]]\
[last_test["dutver"]][last_test["area"]]\
{"store_sel": store_sel, "norm": normalize}
)
)
- row_card_sel_tests = C.STYLE_ENABLED
- row_btns_sel_tests = C.STYLE_ENABLED
+ row_sel_tests = C.STYLE_ENABLED
else:
plotting_area = C.PLACEHOLDER
- row_card_sel_tests = C.STYLE_DISABLED
- row_btns_sel_tests = C.STYLE_DISABLED
+ row_sel_tests = C.STYLE_DISABLED
store_sel = list()
ret_val = [
ctrl_panel.panel,
store_sel,
plotting_area,
- row_card_sel_tests,
- row_btns_sel_tests,
+ row_sel_tests,
lg_selected
]
ret_val.extend(ctrl_panel.values)