diff --git a/block_server.py b/block_server.py index f9a883d0..adf96984 100644 --- a/block_server.py +++ b/block_server.py @@ -84,7 +84,7 @@ initial_dbs = { BlockserverPVNames.BLOCKNAMES: char_waveform(16000), BlockserverPVNames.HEARTBEAT: {"type": "int", "count": 1, "value": [0]}, - BlockserverPVNames.BLOCK_DETAILS: char_waveform(16000), + BlockserverPVNames.WD_CONF_DETAILS: char_waveform(16000), BlockserverPVNames.GROUPS: char_waveform(16000), BlockserverPVNames.COMPS: char_waveform(16000), BlockserverPVNames.LOAD_CONFIG: char_waveform(1000), @@ -465,6 +465,7 @@ def _initialise_config(self, full_init=False): self.update_blocks_monitors() self.update_get_details_monitors() + self.update_wd_details_monitors() self.update_curr_config_name_monitors() self._active_configserver.update_archiver(full_init) for handler in self.on_the_fly_handlers: @@ -656,6 +657,15 @@ def update_get_details_monitors(self): ) self.updatePVs() + def update_wd_details_monitors(self): + """Updates the monitor for the active configuration, so the web dashboard can see any changes.""" + with self.monitor_lock: + config_details_json = convert_to_json({k: v for k, v in self._active_configserver.get_config_details(exclude_macros=True).items() if k not in ["component_iocs", "iocs"]}) + self.setParam( + BlockserverPVNames.WD_CONF_DETAILS, compress_and_hex(config_details_json) + ) + self.updatePVs() + def update_curr_config_name_monitors(self): """Updates the monitor for the active configuration name, so the clients can see any changes.""" with self.monitor_lock: diff --git a/server_common/pv_names.py b/server_common/pv_names.py index 4e82fdce..cea8b350 100644 --- a/server_common/pv_names.py +++ b/server_common/pv_names.py @@ -46,7 +46,7 @@ class BlockserverPVNames: """Holds and manages blockserver PV names""" BLOCKNAMES = prepend_blockserver("BLOCKNAMES") - BLOCK_DETAILS = prepend_blockserver("BLOCK_DETAILS") + WD_CONF_DETAILS = prepend_blockserver("WD_CONF_DETAILS") BLOCK_RULES = prepend_blockserver("BLOCK_RULES") GROUPS = prepend_blockserver("GROUPS") GROUP_RULES = prepend_blockserver("GROUP_RULES")