Closed Bug 1568913 Opened 5 years ago Closed 5 years ago

Replace jquery.flot in Perfherder and metrics-graphics usage with one library

Categories

(Tree Management :: Treeherder: Frontend, task, P1)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sclements, Assigned: sclements)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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).

Blocks: 1492003
Summary: Replace jquery.flot usage in Perfherder and metrics-graphics in IFV with one library → Replace jquery.flot in Perfherder and metrics-graphics usage with one library

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: nobody → sclements
Status: NEW → ASSIGNED
Priority: -- → P2
Blocks: 1529862

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.

No longer blocks: 1492003
Priority: P2 → P3
Priority: P3 → P1
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: