I believe this was the main bug causing the slowdown. It was setting state
in ``filterPlatform`` which is called once per platform when a filter change is
made. But that ``setState`` was updating ALL the platforms for that push.
* Remove unnecessary clonejobs artifact
* Fix the regression with expand/collapse counts
* Very minor optimizations and cleanup
* Add some unit tests for groups
These refs were not actually used, so can be removed. It does appear to
improve rendering speed, especially when changin filtering. I had noticed
that the JobGroup was re-rendering more times than it should, and this
change stops that. I believe more work is to be done here, but this is one
step.
This also includes a couple other small tweaks that may help speed.
* Move JobDetailsPane to details-panel folder
* Convert to 2 space indent
* Cleanup props with deconstruction
* Subsume some filters into jobdetailspane
* Subsume logic for job signature filtering
* Subsume logic for visibleFields and visibleTimeFields
* Only need latest classification, not whole array
* Ensure all helper functions are named
* Move getBugUrl, getSlaveHealthUrl, getInspectTaskUrl, getWorkerExplorerUrl,
getLogViewerUrl, getRootUrl, getProjectUrl and getProjectJobUrl to urlHelper
* Move getJobsUrl to only place its used
* Replace thServiceDomain with SERVICE_DOMAIN
* remove thUrl provider
The third argument was changed from a bool to an options object in
bug 1402062 - so these instances would fail with:
`Error: Must pass an object as last argument to thNotify.send!`
This helps prevent:
https://www.owasp.org/index.php/Reverse_Tabnabbing
We're not also using `noreferrer`, since most browsers now support
`noopener` (https://caniuse.com/#search=noopener) and the link targets
are all Mozilla properties where the referrer may be useful.
The auth.js `window.open()` has not been changed, since the login
callback makes use of `window.opener`.
This also fixes Bug 1438315 - Pinned jobs take a long time
to show the annotation. These two bugs were related so it
made sense to fix them at the same time.
This adds some new components and removes the AngularJS ng-repeat for
pushes. In the course of this work, some of the AngularJS providers were
converted to helper functions.
In a couple cases, I had to add new code to the AngularJS areas so that it
would continue to interact well between Angular and React.
Also:
* Rename some functions and CSS classes from resultset to push
* Add unlistening for events during unmount of components
This replaces the logic that was in clonejobs.js that formerly
handled rendering the pushes, platforms and jobs and converts it to
ReactJS. The ReactJS code is hosted as a directive in AngularJS
using ngReact reactDirective.
This also removes the feature where you can hide revisions because
it was believed to not be used and added unnecessary complications
to the code.
Co-authored-by: Casey Williams cwillia5@gmail.com