Replace jquery.flot in Perfherder and metrics-graphics usage with one library
Categories
(Tree Management :: Treeherder: Frontend, task, P1)
Tracking
(Not tracked)
People
(Reporter: sclements, Assigned: sclements)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-github-pull-request
|
Details |
Metrics-graphics is no longer being maintained, which is used by Intermittent Failures View and also Perfherder's Compare-Replicates view.
As part of the react conversion of Perfherder's Graphs view, I've made the decision to stick with the jquery plot library for the time being because many of the popular open-source libraries were either missing key functionality that would require a time investment to add in and/or they used inline styles which would contravene the Content Security Policy adopted in bug 1529862 (notes from my analysis of the different libraries is here)
However, we should still aim to switch to one library that will support Perfherder and Intermittent Failure View rather than importing two (especially since jquery is only used in very few places in Treeherder and can likely be removed entirely).
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
I spoke with Gene and April in infosec who told me that inline styles (‘unsafe-inline’ in style-src) are not ideal since they pose a risk via CSS injection and altering our UI. However, it's low risk and ok to use a graphing library that uses them since it's a challenge to find one that doesn't require custom code and that has adopted CSS and svg style attributes instead. I'm currently trying out the Victory library and if this works out well for Perfherder, I'll swap out metrics graphics in a separate pr. I'll also file a bug with Victory to see if they can offer the option to opt out of inline-styles in a future release.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
jquery.flot has been replaced in Perfherder in bug 1519995 so the only thing left to do is replace the usage of metrics-graphics with the Victory library.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Description
•