Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

Model Validator fix and error popup for BECMonitor; closes #56 #39

wyzula_j requested to merge pydantic-validator-fix into master
  • Signal validation changed from independent 'name' and 'entry' validation to one model_validator which first validate 'name' and then processed with 'entry'
  • New error popup message if there is wrong config with indication where is the problem

Example:

CONFIG_WRONG = {
    "plot_settings": {
        "background_color": "white",
        "num_columns": 5,
        "colormap": "plasma",
        "scan_types": False,
    },
    "plot_data": [
        {
            "plot_name": "BPM4i plots vs samx",
            "x": {"label": "Motor Y", "signals": [{"name": "samx"}]},
            "y": {"label": "bpm4i", "signals": [{"name": "bpm4i"}]},
        },
        {
            "plot_name": "Gauss plots vs samx",
            "x": {"label": "Motor X", "signals": [{"name": "samx"}]},
            "y": {
                "label": "Gauss",
                "signals": [
                    {"name": "gauss_bpm"},
                    {"name": "non_exist1"},
                    {"name": "non_exist2"},
                    {"name": "gauss_bpm", "entry": "samx"},
                ],
            },
        },
    ],
}

Error message: Screenshot_2023-12-07_at_19.17.45

Merge request reports

Loading