CMSTrackerDPG / MLplayground

Web application for collaborating to build ML models for Tracker DQM/DC
4 stars 2 forks source link

Histogram manager breaks when histogram name filter contains a forwardslash `/` #96

Closed vicha-w closed 1 year ago

vicha-w commented 1 year ago

Hi,

I just discovered that the histogram manager breaks when a histogram name containing a forward slash / is selected in a filter. The URL below demonstrates the error message.

https://ml4dqm-playground.web.cern.ch/histograms/lumisections_2D/list/?title=EcalBarrel%2FEBOccupancyTask%2FEBOT+digi+occupancy+EB%2B10

My initial explanation is that, since each row of the histogram manager contains the link to the visualiser in the form of ['visualize/(?P<runnr>[0-9]+)/(?P<lumisection>[0-9]+)/(?P<title>[^/]+)/\\Z'], the histogram title containing a forward slash can break the pattern.

With this problem, we need some way to "sanitise" histogram titles so that it would not contain forward slashes that breaks the URL pattern defined in visualize_histogram/urls.py.

Thanks, Vichayanun

vicha-w commented 1 year ago

The PR addressing this issue has been merged into main repo. Closing this issue now.

Vichayanun