-
Notifications
You must be signed in to change notification settings - Fork 282
Description
The method of the PHP class Javascript.php#optimizeDefine() manipulates the JS calls of define.js#define() to insert the full path of the script.
When implementing billboard.js, I came across the limitations of this mechanism. The regex pattern return false positives. Billboard.js (non-minified file) contains some function definitions named define(...). This mechanism also manipulates these function definitions, which leads to JS errors when trying to create charts.
Changing the regex pattern of Javascript::DEFINE_RE constant in such a way that it covers all possible call patterns is not the solution.
After discussion with @nilmerg, we have decided to create an issue so it can be improved at a later date.
To reproduce:
- With Introduce chart library
billboard.jsipl-web#230, try to render billboard charts with_devparameter in the url. - Have a look at the browser console.
Billboard charts can be created with the reporting module by adding a report of the type ‘Host/Service Sla Chart’.