fix(juice): copy template_variables before mutating in Plot Monitor dashboard

Summary

Fixes #203 (closed).

create_plotmon_doc mutated the process-wide template_variables dict that orangeqs.juice.dashboard.dashboard_load.collect_dashboard_applications() builds once and shares by reference across every Juice dashboard entry. Once the Plot Monitor page was opened a single time, page_title (and content) leaked permanently into that shared dict, crashing every other page (Home, the dashboard's own error-fallback handler, etc.) with:

ValueError: The name page_title has already been used for another variable.

This regressed in 76a84731, which added the page_title default to both insmon/dashboard.py and plotmon/dashboard.py. The insmon side correctly copied the dict first (merged_template_variables = dict(template_variables)); the plotmon side did not. This MR applies the same copy-before-mutate pattern to plotmon.

Edited by Wiggert Vermeer

Merge request reports

Loading
Loading