+ if trigger_id == "dd-ctrl-phy":
+ try:
+ options = [
+ {"label": self.spec_tbs[dd_phy][v]["label"], "value": v}
+ for v in [v for v in self.spec_tbs[dd_phy].keys()]
+ ]
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = no_update
+ ctrl_panel.set({
+ "dd-ctrl-phy-value": dd_phy,
+ "dd-ctrl-area-value": str(),
+ "dd-ctrl-area-options": options,
+ "dd-ctrl-area-disabled": disabled,
+ "dd-ctrl-test-options": list(),
+ "dd-ctrl-test-disabled": True,
+ "cl-ctrl-core-options": list(),
+ "cl-ctrl-core-value": list(),
+ "cl-ctrl-core-all-value": list(),
+ "cl-ctrl-core-all-options": self.CL_ALL_DISABLED,
+ "cl-ctrl-framesize-options": list(),
+ "cl-ctrl-framesize-value": list(),
+ "cl-ctrl-framesize-all-value": list(),
+ "cl-ctrl-framesize-all-options": self.CL_ALL_DISABLED,
+ "cl-ctrl-testtype-options": list(),
+ "cl-ctrl-testtype-value": list(),
+ "cl-ctrl-testtype-all-value": list(),
+ "cl-ctrl-testtype-all-options": self.CL_ALL_DISABLED,
+ "btn-ctrl-add-disabled": True,
+ })
+ elif trigger_id == "dd-ctrl-area":
+ try:
+ phy = ctrl_panel.get("dd-ctrl-phy-value")
+ options = [
+ {"label": v, "value": v}
+ for v in self.spec_tbs[phy][dd_area]["test"]
+ ]
+ disabled = False
+ except KeyError:
+ options = list()
+ disabled = True
+ ctrl_panel.set({
+ "dd-ctrl-area-value": dd_area,
+ "dd-ctrl-test-value": str(),
+ "dd-ctrl-test-options": options,
+ "dd-ctrl-test-disabled": disabled,
+ "cl-ctrl-core-options": list(),
+ "cl-ctrl-core-value": list(),
+ "cl-ctrl-core-all-value": list(),
+ "cl-ctrl-core-all-options": self.CL_ALL_DISABLED,
+ "cl-ctrl-framesize-options": list(),
+ "cl-ctrl-framesize-value": list(),
+ "cl-ctrl-framesize-all-value": list(),
+ "cl-ctrl-framesize-all-options": self.CL_ALL_DISABLED,
+ "cl-ctrl-testtype-options": list(),
+ "cl-ctrl-testtype-value": list(),
+ "cl-ctrl-testtype-all-value": list(),
+ "cl-ctrl-testtype-all-options": self.CL_ALL_DISABLED,
+ "btn-ctrl-add-disabled": True,
+ })
+ elif trigger_id == "dd-ctrl-test":
+ core_opts = list()
+ framesize_opts = list()
+ testtype_opts = list()
+ phy = ctrl_panel.get("dd-ctrl-phy-value")
+ area = ctrl_panel.get("dd-ctrl-area-value")
+ if phy and area and dd_test:
+ core_opts = [
+ {"label": v, "value": v}
+ for v in self.spec_tbs[phy][area]["core"]
+ ]
+ framesize_opts = [
+ {"label": v, "value": v}
+ for v in self.spec_tbs[phy][area]["frame-size"]
+ ]
+ testtype_opts = [
+ {"label": v, "value": v}
+ for v in self.spec_tbs[phy][area]["test-type"]
+ ]
+ ctrl_panel.set({
+ "dd-ctrl-test-value": dd_test,
+ "cl-ctrl-core-options": core_opts,
+ "cl-ctrl-core-value": list(),
+ "cl-ctrl-core-all-value": list(),
+ "cl-ctrl-core-all-options": self.CL_ALL_ENABLED,
+ "cl-ctrl-framesize-options": framesize_opts,
+ "cl-ctrl-framesize-value": list(),
+ "cl-ctrl-framesize-all-value": list(),
+ "cl-ctrl-framesize-all-options": self.CL_ALL_ENABLED,
+ "cl-ctrl-testtype-options": testtype_opts,
+ "cl-ctrl-testtype-value": list(),
+ "cl-ctrl-testtype-all-value": list(),
+ "cl-ctrl-testtype-all-options": self.CL_ALL_ENABLED,
+ "btn-ctrl-add-disabled": False,
+ })
+ elif trigger_id == "cl-ctrl-core":
+ val_sel, val_all = self._sync_checklists(
+ opt=ctrl_panel.get("cl-ctrl-core-options"),
+ sel=cl_core,
+ all=list(),
+ id=""
+ )
+ ctrl_panel.set({
+ "cl-ctrl-core-value": val_sel,
+ "cl-ctrl-core-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-core-all":
+ val_sel, val_all = self._sync_checklists(
+ opt = ctrl_panel.get("cl-ctrl-core-options"),
+ sel=list(),
+ all=cl_core_all,
+ id="all"
+ )
+ ctrl_panel.set({
+ "cl-ctrl-core-value": val_sel,
+ "cl-ctrl-core-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-framesize":
+ val_sel, val_all = self._sync_checklists(
+ opt = ctrl_panel.get("cl-ctrl-framesize-options"),
+ sel=cl_framesize,
+ all=list(),
+ id=""
+ )
+ ctrl_panel.set({
+ "cl-ctrl-framesize-value": val_sel,
+ "cl-ctrl-framesize-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-framesize-all":
+ val_sel, val_all = self._sync_checklists(
+ opt = ctrl_panel.get("cl-ctrl-framesize-options"),
+ sel=list(),
+ all=cl_framesize_all,
+ id="all"
+ )
+ ctrl_panel.set({
+ "cl-ctrl-framesize-value": val_sel,
+ "cl-ctrl-framesize-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-testtype":
+ val_sel, val_all = self._sync_checklists(
+ opt = ctrl_panel.get("cl-ctrl-testtype-options"),
+ sel=cl_testtype,
+ all=list(),
+ id=""
+ )
+ ctrl_panel.set({
+ "cl-ctrl-testtype-value": val_sel,
+ "cl-ctrl-testtype-all-value": val_all,
+ })
+ elif trigger_id == "cl-ctrl-testtype-all":
+ val_sel, val_all = self._sync_checklists(
+ opt = ctrl_panel.get("cl-ctrl-testtype-options"),
+ sel=list(),
+ all=cl_testtype_all,
+ id="all"
+ )
+ ctrl_panel.set({
+ "cl-ctrl-testtype-value": val_sel,
+ "cl-ctrl-testtype-all-value": val_all,
+ })
+ elif trigger_id == "btn-ctrl-add":
+ _ = btn_add
+ phy = ctrl_panel.get("dd-ctrl-phy-value")
+ area = ctrl_panel.get("dd-ctrl-area-value")
+ test = ctrl_panel.get("dd-ctrl-test-value")
+ cores = ctrl_panel.get("cl-ctrl-core-value")
+ framesizes = ctrl_panel.get("cl-ctrl-framesize-value")
+ testtypes = ctrl_panel.get("cl-ctrl-testtype-value")