DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
config_object_modifier_screen.py
Go to the documentation of this file.
2from daqconf.cider.widgets.modify_config_relations import RelationshipSelectPanel
3from daqconf.cider.widgets.config_table import ConfigTable
4from daqconf.cider.widgets.configuration_controller import ConfigurationController
5from daqconf.cider.widgets.popups.file_io import RenameConfigObject
6
7from textual.containers import Grid
8from textual.screen import ModalScreen
9from textual.widgets import Button
10from os import environ
11
12
13class ConfigObjectModifierScreen(ModalScreen):
14 css_file_path = f"{environ.get('DAQCONF_SHARE')}/config/textual_dbe/textual_css"
15
16 CSS_PATH = f"{css_file_path}/modify_object_layout.tcss"
17
18 def compose(self):
19 yield RelationshipSelectPanel(id="rel_select")
20 yield Button("Exit", variant="success", id="exit")
21
22 def on_button_pressed(self, event: Button.Pressed)->None:
23 if event.button.id=="exit":
24
25 rel_panel = self.query_one(RelationshipSelectPanel)
26
27
28 rel_panel.verify_relations()
29 # except Exception as e:
30 # self._logger.write_error(e)
31 main_screen = self.app.get_screen("main")
32 selection_menu = main_screen.query_exactly_one("SelectionPanel")
33 selection_menu.refresh(recompose=True)
34 selection_menu.restore_menu_state()
35 self.app.screen.dismiss()
36
37 # Refresh the main screen