forked from Support/sp-hydra-veil-gui
20 lines
669 B
Python
20 lines
669 B
Python
|
|
from core.services.profiles.attribute_filters import get_filtered_protocol_list
|
|
from core.models.enum_models import ProtocolChoice
|
|
|
|
from pathlib import Path
|
|
|
|
def get_protocol_button_data(button_path: str) -> dict|None:
|
|
"""Return a dict of protocols with their image paths."""
|
|
protocol_list = get_filtered_protocol_list()
|
|
|
|
protocol_display_dto = {}
|
|
|
|
for each_protocol in protocol_list:
|
|
name_as_string = each_protocol.value
|
|
button_image_path = f"{name_as_string}_button.png"
|
|
full_image_path = Path(button_path, button_image_path)
|
|
protocol_display_dto[each_protocol] = full_image_path
|
|
|
|
return protocol_display_dto
|
|
|