- options = \
- generate_options(sorted(self.spec_tbs[dd_rls].keys()))
- disabled = False
- except KeyError:
- options = list()
- disabled = True
- ctrl_panel.set({
- "dd-rls-value": dd_rls,
- "dd-dut-value": str(),
- "dd-dut-options": options,
- "dd-dut-disabled": disabled,
- "dd-dutver-value": str(),
- "dd-dutver-options": list(),
- "dd-dutver-disabled": True,
- "dd-phy-value": str(),
- "dd-phy-options": list(),
- "dd-phy-disabled": True,
- "dd-area-value": str(),
- "dd-area-options": list(),
- "dd-area-disabled": True,
- "dd-test-value": str(),
- "dd-test-options": list(),
- "dd-test-disabled": True,
- "cl-core-options": list(),
- "cl-core-value": list(),
- "cl-core-all-value": list(),
- "cl-core-all-options": C.CL_ALL_DISABLED,
- "cl-framesize-options": list(),
- "cl-framesize-value": list(),
- "cl-framesize-all-value": list(),
- "cl-framesize-all-options": C.CL_ALL_DISABLED,
- "cl-testtype-options": list(),
- "cl-testtype-value": list(),
- "cl-testtype-all-value": list(),
- "cl-testtype-all-options": C.CL_ALL_DISABLED
- })
- elif trigger_id == "dd-ctrl-dut":
- try:
- rls = ctrl_panel.get("dd-rls-value")
- dut = self.spec_tbs[rls][dd_dut]
- options = generate_options(sorted(dut.keys()))
- disabled = False
- except KeyError:
- options = list()
- disabled = True
- ctrl_panel.set({
- "dd-dut-value": dd_dut,
- "dd-dutver-value": str(),
- "dd-dutver-options": options,
- "dd-dutver-disabled": disabled,
- "dd-phy-value": str(),
- "dd-phy-options": list(),
- "dd-phy-disabled": True,
- "dd-area-value": str(),
- "dd-area-options": list(),
- "dd-area-disabled": True,
- "dd-test-value": str(),
- "dd-test-options": list(),
- "dd-test-disabled": True,
- "cl-core-options": list(),
- "cl-core-value": list(),
- "cl-core-all-value": list(),
- "cl-core-all-options": C.CL_ALL_DISABLED,
- "cl-framesize-options": list(),
- "cl-framesize-value": list(),
- "cl-framesize-all-value": list(),
- "cl-framesize-all-options": C.CL_ALL_DISABLED,
- "cl-testtype-options": list(),
- "cl-testtype-value": list(),
- "cl-testtype-all-value": list(),
- "cl-testtype-all-options": C.CL_ALL_DISABLED
- })
- elif trigger_id == "dd-ctrl-dutver":
- try:
- rls = ctrl_panel.get("dd-rls-value")
- dut = ctrl_panel.get("dd-dut-value")
- dutver = self.spec_tbs[rls][dut][dd_dutver]
- options = generate_options(sorted(dutver.keys()))
- disabled = False
- except KeyError:
- options = list()
- disabled = True
- ctrl_panel.set({
- "dd-dutver-value": dd_dutver,
- "dd-phy-value": str(),
- "dd-phy-options": options,
- "dd-phy-disabled": disabled,
- "dd-area-value": str(),
- "dd-area-options": list(),
- "dd-area-disabled": True,
- "dd-test-value": str(),
- "dd-test-options": list(),
- "dd-test-disabled": True,
- "cl-core-options": list(),
- "cl-core-value": list(),
- "cl-core-all-value": list(),
- "cl-core-all-options": C.CL_ALL_DISABLED,
- "cl-framesize-options": list(),
- "cl-framesize-value": list(),
- "cl-framesize-all-value": list(),
- "cl-framesize-all-options": C.CL_ALL_DISABLED,
- "cl-testtype-options": list(),
- "cl-testtype-value": list(),
- "cl-testtype-all-value": list(),
- "cl-testtype-all-options": C.CL_ALL_DISABLED
- })
- elif trigger_id == "dd-ctrl-phy":
- try:
- rls = ctrl_panel.get("dd-rls-value")
- dut = ctrl_panel.get("dd-dut-value")
- dutver = ctrl_panel.get("dd-dutver-value")
- phy = self.spec_tbs[rls][dut][dutver][dd_phy]
- options = [{"label": label(v), "value": v} \
- for v in sorted(phy.keys())]
- disabled = False
- except KeyError:
- options = list()
- disabled = True
- ctrl_panel.set({
- "dd-phy-value": dd_phy,
- "dd-area-value": str(),
- "dd-area-options": options,
- "dd-area-disabled": disabled,
- "dd-test-value": str(),
- "dd-test-options": list(),
- "dd-test-disabled": True,
- "cl-core-options": list(),
- "cl-core-value": list(),
- "cl-core-all-value": list(),
- "cl-core-all-options": C.CL_ALL_DISABLED,
- "cl-framesize-options": list(),
- "cl-framesize-value": list(),
- "cl-framesize-all-value": list(),
- "cl-framesize-all-options": C.CL_ALL_DISABLED,
- "cl-testtype-options": list(),
- "cl-testtype-value": list(),
- "cl-testtype-all-value": list(),
- "cl-testtype-all-options": C.CL_ALL_DISABLED
- })
- elif trigger_id == "dd-ctrl-area":
- try:
- rls = ctrl_panel.get("dd-rls-value")
- dut = ctrl_panel.get("dd-dut-value")
- dutver = ctrl_panel.get("dd-dutver-value")
- phy = ctrl_panel.get("dd-phy-value")
- area = self.spec_tbs[rls][dut][dutver][phy][dd_area]
- options = generate_options(sorted(area.keys()))
- disabled = False
- except KeyError:
- options = list()
- disabled = True
- ctrl_panel.set({
- "dd-area-value": dd_area,
- "dd-test-value": str(),
- "dd-test-options": options,
- "dd-test-disabled": disabled,
- "cl-core-options": list(),
- "cl-core-value": list(),
- "cl-core-all-value": list(),
- "cl-core-all-options": C.CL_ALL_DISABLED,
- "cl-framesize-options": list(),
- "cl-framesize-value": list(),
- "cl-framesize-all-value": list(),
- "cl-framesize-all-options": C.CL_ALL_DISABLED,
- "cl-testtype-options": list(),
- "cl-testtype-value": list(),
- "cl-testtype-all-value": list(),
- "cl-testtype-all-options": C.CL_ALL_DISABLED
- })
- elif trigger_id == "dd-ctrl-test":
- rls = ctrl_panel.get("dd-rls-value")
- dut = ctrl_panel.get("dd-dut-value")
- dutver = ctrl_panel.get("dd-dutver-value")
- phy = ctrl_panel.get("dd-phy-value")
- area = ctrl_panel.get("dd-area-value")
- if all((rls, dut, dutver, phy, area, dd_test, )):
- test = self.spec_tbs[rls][dut][dutver][phy][area][dd_test]
+ store_sel = literal_eval(url_params["store_sel"][0])
+ normalize = literal_eval(url_params["norm"][0])
+ except (KeyError, IndexError):
+ pass
+ if store_sel:
+ row_card_sel_tests = C.STYLE_ENABLED
+ row_btns_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["phy"]]\
+ [last_test["area"]][last_test["test"]]
+ ctrl_panel.set({
+ "dd-rls-val": last_test["rls"],
+ "dd-dut-val": last_test["dut"],
+ "dd-dut-opt": generate_options(
+ self._spec_tbs[last_test["rls"]].keys()
+ ),
+ "dd-dut-dis": False,
+ "dd-dutver-val": last_test["dutver"],
+ "dd-dutver-opt": generate_options(
+ self._spec_tbs[last_test["rls"]]\
+ [last_test["dut"]].keys()
+ ),
+ "dd-dutver-dis": False,
+ "dd-phy-val": last_test["phy"],
+ "dd-phy-opt": generate_options(
+ self._spec_tbs[last_test["rls"]][last_test["dut"]]\
+ [last_test["dutver"]].keys()
+ ),
+ "dd-phy-dis": False,
+ "dd-area-val": last_test["area"],
+ "dd-area-opt": [
+ {"label": label(v), "value": v} for v in \
+ sorted(self._spec_tbs[last_test["rls"]]\
+ [last_test["dut"]][last_test["dutver"]]\
+ [last_test["phy"]].keys())
+ ],
+ "dd-area-dis": False,
+ "dd-test-val": last_test["test"],
+ "dd-test-opt": generate_options(
+ self._spec_tbs[last_test["rls"]][last_test["dut"]]\
+ [last_test["dutver"]][last_test["phy"]]\
+ [last_test["area"]].keys()
+ ),
+ "dd-test-dis": False,
+ "cl-core-opt": generate_options(test["core"]),
+ "cl-core-val": [last_test["core"].upper(), ],
+ "cl-core-all-val": list(),
+ "cl-core-all-opt": C.CL_ALL_ENABLED,
+ "cl-frmsize-opt": generate_options(test["frame-size"]),
+ "cl-frmsize-val": [last_test["framesize"].upper(), ],
+ "cl-frmsize-all-val": list(),
+ "cl-frmsize-all-opt": C.CL_ALL_ENABLED,
+ "cl-tsttype-opt": generate_options(test["test-type"]),
+ "cl-tsttype-val": [last_test["testtype"].upper(), ],
+ "cl-tsttype-all-val": list(),
+ "cl-tsttype-all-opt": C.CL_ALL_ENABLED,
+ "cl-normalize-val": normalize,
+ "btn-add-dis": False
+ })
+ on_draw = True
+ elif trigger.type == "normalize":
+ ctrl_panel.set({"cl-normalize-val": normalize})
+ on_draw = True
+ elif trigger.type == "ctrl-dd":
+ if trigger.idx == "rls":
+ try:
+ options = generate_options(
+ self._spec_tbs[trigger.value].keys()
+ )
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True