Граф коммитов

322 Коммитов

Автор SHA1 Сообщение Дата
Cameron Dawson 508a4786fc
Bug 1576966 - Convert Selenium Filter menu Reset test to Jest (#5482) 2019-10-09 13:32:42 -07:00
Armen Zambrano a45bb487d7
Upgrade to Neutrino 9 RC4 (#5454)
* Upgrade to Neutrino 9 RC4
* yarn-deduplicate
2019-10-08 10:13:28 -04:00
ionutgoldan 53c639c166
Bug 1571404 - Set assignees for alert summaries 2019-10-02 14:50:12 +03:00
Cameron Dawson 7f72192565
Bug 1574651 - add tc_root_url to each repository (#5405)
* Bug 1574651 - add tc_root_url to each repository

* Fix issues introduced since initial creation of this feature
* Fix unit tests
* Fix retriggers in Compare Chooser of Perfherder
2019-09-30 16:18:07 -07:00
octavian-negru 6ca78bd25c Bug 1582692 - Ensure no one can add confirming state from Perfherder 2019-09-30 13:40:57 +03:00
Sarah Clements 59737af771
Bug 1539232 - Switch Perfherder to react-router (#5379)
Switch Perfherder to react-router
Use top-level of app as a cache for projects, frameworks, alerts data and compare data
Cleanup files and move constants to dedicated perfherder file
Remove angular-related libraries and bump up the neutrino entry and asset limits
2019-09-25 15:15:37 -07:00
Cameron Dawson 2f9d6b2a1c
Bug 1576966 - Convert range and get next selenium tests (#5385) 2019-09-20 12:10:53 -07:00
Cameron Dawson 10a351a587
Bug 1576966 - Convert app switch test to React Testing Library (#5383) 2019-09-18 12:48:44 -07:00
Cameron Dawson adffd63a27
Bug 1575006 - Include Tier-2 jobs in Push Health (#5378) 2019-09-18 11:28:46 -07:00
Cameron Dawson aff331f3d3
Bug 1566077 - Improve getting decision task ID (#5360) 2019-09-17 14:42:57 -07:00
Cameron Dawson 9b095eb04b Bug 1575941 - Fix error message when task action not available 2019-09-13 07:40:00 -07:00
Alexandru Irimovici ec7b376043 Bug 1571643 - retrigger from compare view (#5304) 2019-09-11 10:07:19 -07:00
ionutgoldan 6753250f7e
Bug 1202731 - Provide permalinks in Compare view 2019-09-10 13:02:17 +03:00
Sarah Clements 47b53c157a
Bug 1519995 - Perfherder graphs react conversion part 3 (#5286)
Create components to handle graph controls, legend and graph container
Convert graph functionalty to react and replace jquery.flot with Victory
2019-09-09 13:19:04 -07:00
Cameron Dawson 6899768b35 Bug 1573462 - Job and group name keeps capitalizations 2019-09-06 11:02:10 -07:00
Cameron Dawson 56f2c5ca78 Bug 1576966 - Convert filtering selenium tests to React Testing Library 2019-09-05 09:17:13 -07:00
Armen Zambrano G 90c3d98cf3 Disable no-unused-vars for few lines 2019-08-21 16:16:45 -04:00
Cameron Dawson 6581c84289 Fix retriggers and add new jobs 2019-08-21 12:02:26 -07:00
Cameron Dawson 9f37dc3343 Bug 1331399 - Reduce payload size and memory footprint of job data
This fixes the issues with retriggering and add-new-jobs that the
original PR introduced.  It also adds a few unit tests to catch
this potential mistake in the future.

This reverts commit ffd871ae34.
2019-08-21 12:02:26 -07:00
Cameron Dawson 8ad1b1fec0 Bug 1572095 - Fix commit/revision links after changing repo 2019-08-16 15:30:35 -07:00
Cameron Dawson ffd871ae34 Revert "Bug 1331399 - Trim job data that we store"
This reverts commit 613d7f0172.
2019-08-14 11:58:40 -07:00
Cameron Dawson 613d7f0172 Bug 1331399 - Trim job data that we store 2019-08-13 14:45:21 -07:00
Cameron Dawson c58badbe60 Bug 1510280 - Convert PinnedJobs context to Redux 2019-08-12 14:08:49 -07:00
Cameron Dawson f408887675
Bug 1572255 - Fix set top and bottom of range links (#5253) 2019-08-08 12:19:23 -07:00
Armen Zambrano G 879918708a Switch from `jest-dom` to `@testing-library/jest-dom`
`jest-dom` has moved to `@testing-library/jest-dom`. Please uninstall jest-dom and install `@testing-library/jest-dom` instead,
or use an older version of `jest-dom`. If you do upgrade to `@testing-library/jest-dom`, make sure to update your usage of `jest-dom`
to use `@testing-library/jest-dom/extend-expect` rather than simply `jest-dom/extend-expect`. Learn more about this change here:
https://github.com/testing-library/dom-testing-library/issues/260 Thanks!
2019-08-08 10:10:16 -04:00
Alexandru Irimovici fd7f541076 Bug 1553719 - Trim revision id for compare chooser 2019-08-07 09:48:19 +03:00
Cameron Dawson 5d4ca44e7d
Rename details selectedJob to selectedJobFull (#5230)
* Rename details panel ``selectedJob`` to ``selectedJobFull``

The job that's passed in the DetailsPanel has a bunch of extra fields
that are not in the normal downloaded list of jobs.  So I wanted to
depict that ``selectedJob`` is not the same thing as what you see
in the DetailsPanel.

* Stop using Redux where not necessary

I was using Redux to assign the selectedJob in a few details
classes when I should have just passed it where it was needed.

* New addAggregateFields function

Instead of using a more heavy weight JobModel for each job,
we just persist some fields that were getting constantly calculated
over and over.  This was especially true during filtering and re-rendering.

* Remove some cruft leftover from Buildbot.
2019-08-06 12:10:33 -07:00
Cameron Dawson 9181ff4b94 Bug 1510280 - Convert Pushes context to Redux 2019-07-22 15:46:17 -07:00
Cameron Dawson 5993dea2dc
Cleanup tests/ui folder (#5120) 2019-07-05 09:48:22 -07:00
Sarah Clements 44463206f9 install newly scoped testing library 2019-06-21 14:21:31 -07:00
Sarah Clements 0cab1eafcc
Bug 1519991 - Convert graphs chooser controller to React (#5053)
Create TestDataModal component with redesigned layout; refactor FilterInput to use debounce for on-the-go filtering.
2019-06-15 17:16:32 -07:00
Cameron Dawson d982fb2060
Bug 1438555 - Fix 'n' after classifying going to top failure (#5063) 2019-06-14 11:41:02 -07:00
Sarah Clements c12ca9a8fa
Bug 1558752 - Fix alert summary checkbox on Perfherder alerts view (#5061)
Fix alert summary checkbox functionality for when one alert is deselected; add another test to cover this scenario.
2019-06-12 16:22:51 -07:00
KWierso 15c2d1973d Bug 1552250 - Make autoland the default repo (#5051)
Most landings these days are going to autoland rather than
mozilla-inbound, so lets default to showing autoland if no repo is
specified.
2019-06-10 15:39:58 -07:00
Sarah Clements cfde588e43
Bug 1523710 - Convert alerts view to react (#5005)
replace all angular partials and controllers with react components;
write tests for filters and different alert functionality
2019-06-03 11:53:44 -07:00
KWierso 2e5c8deb5f Bug 1555864 - Fix bugfiler's use of bugzilla's product/component search (#5020)
Bugfiler used an undocumented bugzilla api to search for
product/component pairs, and bugzilla recently moved the api endpoint,
breaking the bug filer. This patch points to the correct endpoint.
2019-05-30 17:06:29 -07:00
Cameron Dawson dbe14844ea
Fix circular dependency in JobModel/PushModel (#4929) 2019-04-30 15:15:15 -07:00
ionutgoldan 33eeaeb7db
Bug 1532995 - Provide tests for compare replicates 2019-04-23 15:14:10 +03:00
Sarah Clements 1f6809a751
Bug 1509216 - Convert Perfherder compare and comparesubtests views to react (#4811)
Move compare files to new directory, set up validation HOC and
create components for compare view and compare subtests views
2019-03-25 18:54:53 -07:00
Ed Morley 8aa5d30cad
Bug 1506805 - Convert job-view and userguide to react-fontawesome (#4710)
This is the second part to the Font Awesome conversion started in #4556.

After this PR, all that is left is the Perfherder parts, which can be
converted from the inline HTML style SVG+JS to using
`@fortawesome/react-fontawesome` as part of the React conversion.
2019-02-27 17:58:55 +00:00
Sarah Clements 5a47eca3c3
Add tests for Perfherder's compare table using react-testing-library (#4647) 2019-02-24 15:37:11 -08:00
Cameron Dawson deb71d65e0 Bug 1364045 - Convert all unit tests to Jest (#4603)
Also remove all Karma support and update the docs to only mention ``Jest``.

One of the test files was testing some AngularJS filters. I converted these
tests to test the equivalent helper functions.
2019-02-12 07:49:50 +00:00
Cameron Dawson 9498ac526a Bug 1364045 - Convert the groups unit tests to Jest 2019-02-07 17:08:16 -08:00
Cameron Dawson c32f673bfc
Switch front-end to use /push/ endpoint (#4514) 2019-01-29 09:33:22 -08:00
Cameron Dawson 646e716a6a
Bug 1364045 - Convert the revisions unit tests to Jest (#4495) 2019-01-28 09:41:59 -08:00
Ed Morley 4cfdae3f41 Bug 1522101 - Use Prettier to format JSON 2019-01-23 20:19:04 +00:00
Cameron Dawson 7a48bbc575
Bug 1493833 - Fix ESLint errors with import/no-cycle (#4451) 2019-01-14 08:30:51 -08:00
Kartikaya Gupta (kats) ebe9db4b7c Bug 1517264 - Treat wrench jobs as reftests. (#4412)
Wrench jobs are a job type for the standalone WebRender test suite, and
run reftests as part of the job. Having reftest-ish things like the
reftest analyzer links for these jobs is desirable.
2019-01-03 09:42:15 -08:00
Cameron Dawson 6eeff4bafe
Bug 1513601 - Fix/enable ESLint 'react/button-has-type' (#4377)
Also make tests less brittle
2018-12-18 14:22:32 -08:00
Ed Morley 0009e7fa50 Bug 1514720 - Stop using jasmine-jquery JSON fixtures support
Since it's unnecessary given that we now have the ability to import JSON
directly, and the current usage is causing ESLint warnings like:

```
warning: Illegal usage of jasmine global (jest/no-jasmine-globals) at tests/ui/unit/context/pushes.tests.jsx:15:5:
  13 |
  14 |   beforeEach(() => {
> 15 |     jasmine.getJSONFixtures().fixturesPath = 'base/tests/ui/mock';
     |     ^
  16 |
  17 |     fetchMock.get(
  18 |       getProjectUrl('/resultset/?full=true&count=10', repoName),
```

This means the only `jasmine-jquery` feature we're now using is the
`toHaveLength` matcher, so use of `jasmine-jquery` can be dropped entirely
once the tests are migrated to Jest, which supports `toHaveLength`
natively.
2018-12-17 20:11:57 +00:00
Cameron Dawson 5e8377a3ff
Bug 1364045 - Introduce Jest unit tests (#4369) 2018-12-13 08:24:52 -08:00
Ed Morley 65b7f4ab45
Bug 1507172 - Use Prettier for formatting JS/JSX (#4276)
Since it's more reliable (and strict) at code formatting than ESLint.
We use it via an ESLint plugin, and so disable the style-related AirBnB
preset rules, leaving the AirBnB guide to handle only correctness and
best practices rules.

It's highly encouraged to use an IDE integration or Git commit hook
to run Prettier (or `yarn lint --fix`) automatically. See:
* https://prettier.io/docs/en/editors.html
* https://prettier.io/docs/en/precommit.html

We may consider enabling a git commit hook out of the box (using eg
Husky) in the future, however they have previously been known to
interfere with partial-staging workflows, so would need to test the
fixes they have made for them thoroughly first.

In future PRs we may also want to start formatting JSON/CSS/Markdown
using Prettier too.
2018-11-16 08:28:34 +00:00
Cameron Dawson a9c2dedf0a
Bug 1506424 - Fix logic to unselect job by clicking open areas (#4269) 2018-11-14 08:27:46 -08:00
Ed Morley 70e15b8334 Bug 1505758 - Fix/enable ESLint 'prefer-arrow-callback'
https://eslint.org/docs/rules/prefer-arrow-callback
2018-11-08 16:27:37 +00:00
Ed Morley ec87836e3b Bug 1505758 - Fix/enable ESLint 'prefer-destructuring'
https://eslint.org/docs/rules/prefer-destructuring
2018-11-08 16:27:37 +00:00
Ed Morley dd0165c0e0 Bug 1505758 - Fix/enable ESLint 'no-restricted-globals'
https://eslint.org/docs/rules/no-restricted-globals
2018-11-08 16:27:37 +00:00
Ed Morley 565ae4c13e
Bug 1364894 - Upgrade from Neutrino 4 to 9 (#4216)
Neutrino controls our frontend linting, transpilation, source-maps,
testing, dev-server and optimisation of production builds.

Highlights of the upgrade are:

* Major version updates to the individual tools within (such as webpack,
  Babel and ESLint), significantly improving performance, fixing
  transpilation/minification correctness bugs, adding support for newer
  ECMAScript features, and increasing linter coverage.
* Hot reloading in the dev server now works for all entry-points and not
  just the jobs view, shortening the feedback cycle.
* Reduced bundle size due to webpack 4's tree shaking, scope hoisting,
  automatic shared/vendor code chunk splitting (no need for the manually
  maintained 'vendor' list).
* CSS is now extracted out of JS, which improves performance, reduces
  bundle size and prevents the initial white flash of un-styled content.
* Support for dynamic imports/code splitting (needed for bug 1502192).
* Support for Jest via a new Jest preset (unblocks bug 1364045).
* Support for public class field declarations (unblocks bug 1480166).
* Improved source-maps (increases the quality of production exception
  trace-backs and fixes several debugger breakpoint bugs).
* Reduced amount of custom configuration required for our fairly complex
  frontend needs, reducing maintenance burden and allowing for easier
  future Neutrino upgrades.

In addition this PR:

* Fixes the WhiteNoise `immutable_file_test()` regex, so that it now
  correctly enables browser caching of images, fonts and source maps.
* Enables webpack-dev-server's overlay feature, which displays any
  compilation errors in the browser, saving having to switch back
  to the console (this can be enabled for warnings too if desired).
* Enables webpack-dev-server's automatic browser-opening feature,
  which saves having to manually navigate to `localhost:5000` after
  running `yarn start`.
* Switches Karma tests to run Firefox in headless mode, reducing the
  workflow disruption when running `yarn test`.
* Uses the new webpack `performance` option to enable maximum asset
  file size thresholds, to help prevent bundle-size regressions.
* Rewrites the `package.json` script commands so that they now work
  correctly on Windows, even when setting environment variables.

Performance comparison:

* Local `yarn build`:
  - Cached: 2m34s -> 23s
  - Uncached: 2m34s -> 58s
* Local `yarn start`:
  - Cached: 34.5s -> 13.6s
  - Uncached: 34.5s -> 31.3s
* Local `yarn test`
  - Cached: 61.5s -> 19.8s
  - Uncached: 61.5s -> 22.0s
* Local `yarn lint`
  - Cached: 3.8s -> 1.8s
  - Uncached: 13.7s -> 13.4s
* Travis end-to-end time:
  9 minutes -> 6 minutes
* Heroku deploy end-to-end time:
  14 minutes -> 9 minutes
2018-11-02 18:48:28 +00:00
Cameron Dawson 3c07a53692
Bug 1450041 - Convert angular events to CustomEvent (#4166)
* Convert event selectNextTab
* Convert event saveClassification
* Convert event jobsClassified
* Convert event deleteClassification
* Convert event openLogviewer
* Convert event autoclassifyIgnore
2018-10-19 17:13:01 -07:00
Cameron Dawson 49368ca7ff
Bug 1450024 - Convert Notifications to ReactJS (#4132) 2018-10-12 17:16:20 -07:00
Cameron Dawson 01c3c73703
Bug 1450041 - Convert job dup and count to properties (#4119) 2018-10-10 08:39:00 -07:00
Cameron Dawson 68f6001822
Bug 1450040 - Replace ThResultSetStore with Pushes context (#4102)
* Switch from using job.result_set_id to job.push_id
* Switch to using template strings for aggregateIds
* Fix notification where selected job not in push range
* Fix push status notifications(watching) to use safe React lifecycle method
* Fix some lodash _ imports to specific file imports
* Remove last usage of globalFilterChanged event
* Rename usage internal to PushJobs from "platforms" to "filteredPlatforms"

This takes what ThResultSetStore used to do and moves it to a React Context
called "Pushes.jsx" and into the "Push.jsx" component to manage
its own jobs.
2018-10-09 11:50:43 -07:00
renovate[bot] bb39a9dbd1 Update dependency fetch-mock to v7 (#4065) 2018-10-02 09:39:34 -07:00
Cameron Dawson 1b0eb3bbe8
Bug 1494667 - Fix selecting job within count on page load (#4081) 2018-10-02 08:31:28 -07:00
Cameron Dawson 8644c1160f Fix warning in JobGroup tests (#4070) 2018-09-26 19:07:57 +01:00
Ed Morley 05a421c0e2
Bug 1364894 - Fix ESLint issues found by Neutrino 9 (#4056)
This pre-emptively fixes the issues found by the newer ESLint and
ESLint plugins that come with Neutrino 9 - in order to reduce the
size of the Neutrino 9 PR.
2018-09-24 17:59:14 +01:00
Cameron Dawson 46568ce088 Move the constants.js file to /helpers 2018-09-21 13:09:46 -07:00
Cameron Dawson d19f0a791c
Bug 1490967 - Fix filtering with uppercase email address (#4032) 2018-09-14 13:08:52 -07:00
Cameron Dawson edbc680937 Bug 1488869 - Convert all usages of angular location window.location 2018-09-06 14:18:37 -07:00
Cameron Dawson 0d535214c8 Tidy up job-view folder 2018-09-06 08:25:35 -07:00
Cameron Dawson 5406ebb45c
Bug 1450033 - Convert Job Filtering component to ReactJS (#3971) 2018-09-04 12:25:42 -07:00
Cameron Dawson 3af1db6b2c Bug 1485090 - Convert ResultSet Model to ReactJS 2018-08-27 09:01:14 -07:00
Cameron Dawson a1dc384a9b Bug 1482536 - Convert Repository Model to ReactJS 2018-08-21 10:53:45 -07:00
Cameron Dawson e7f026d499
React work cleanup (#3892)
* Remove vestigial pinboard service file
* Test cleanup: hanging commas, arrow functions, quotes, etc.
* Fix async job tests.  Using .then meant they sometimes didn't 
  return before the test run completedand would throw a warning 
  AND not execute the test ``expect``.
* Fix resultset tests fetching
  Some models changed to use ``fetch`` so we needed to use 
 ``fetchMock`` instead of ``$httpBackend`` for setting expected results.
* Fix warnings in bugfiler tests: We needed to pass some dummy objects 
  for PropTypes that are required.
* Fix warnings in JobGroup tests: We needed to pass some dummy objects 
  for PropTypes that are required here, too.
2018-08-08 17:00:51 -07:00
Cameron Dawson ed2e800d90
Bug 1465987 - Convert the BugFiler to ReactJS (#3878) 2018-08-06 10:54:00 -07:00
KWierso 33bb723a56 Bug 1475438 - Add the job result/status to the job button's title attribute (#3793)
This somewhat improves the accessibility of Treeherder for blind users, as a screen reader can read the title attribute, and the user doesn't need to open each log to find the status.
2018-07-17 09:49:09 -07:00
Cameron Dawson 135615d308
Bug 1450038 - Stop using dangerouslySetInnerHTML (#3785)
Using components based on react-linkify, we can replace all
usages of dangerouslySetInnerHtml.  This also allowed us
to remove a few related helper functions.

enable no-danger eslint rule
2018-07-16 08:09:17 -07:00
Cameron Dawson bc4e8a7b14
Bug 1450032 - Convert bottom (secondary) nav bar to ReactJS (#3779)
Also convert term resultState back to resultStatus

I had wanted to migrate to using "resultState" instead, as it
seemed more descriptive of what it is.  But the filter params
are using "resultStatus" and it would not be worth
the effort to migrate.  It doesn't really matter, but I want to be
consistent to remove confusion, so moving these terms back
to "resultStatus"-ish names.
2018-07-13 16:04:51 -07:00
Cameron Dawson 1bf2e61f97
Bug 1472717 - Fix clear selected job when clicking away (#3753) 2018-07-03 15:37:36 -07:00
Cameron Dawson 15721f009c
Bug 1450022 - Convert the rest of Details Panel to ReactJS (#3621) 2018-06-13 15:40:38 -07:00
Cameron Dawson eddbc1c8a7
Bug 1450039 - Convert Models for accessing API data to Classes (#3568) 2018-05-25 10:32:21 -07:00
Ed Morley 55654a1195
Bug 1363722 - Allow login to work in all development workflows (#3534)
Previously it was not possible to test features that required an
authenticated user when:
* using `yarn start` with Vagrant (bug 1363722), which meant slower
  watch builds
* pointing the UI at the prod/stage API (bug 1317752), which was
  extremely limiting

Now login works in all environments, since the frontend no longer uses a
URL prefix, but instead webpack-dev-server proxies non-webpack URLs to
the chosen `BACKEND_DOMAIN` - avoiding cross-domain issues. Cookies are
rewritten to remove any `secure` directive (which is set on production),
so that they can still be read from HTTP localhost. The `Referer` has to
also be changed to stop Django's CSRF checks from rejecting request.

The slower "build into `dist` and watch" mode is therefore no longer
necessary, so `yarn start:local` instead invokes webpack-dev-server just
like `yarn start` - and the `local-watch.js` workaround has been
removed.

Support for the "publish to GitHub with hardcoded `SERVICE_DOMAIN`"
workflow has been dropped, since it was already rarely used and there is
no way to make it support login.

The API domain environment variable was renamed to `BACKEND_DOMAIN` to
avoid potential confusion given it no longer behaves the same as
`SERVICE_DOMAIN` used to.

NB: For full stack Vagrant workflows users must now connect to port
*5000* on localhost, not 8000.
2018-05-10 17:58:04 +01:00
Cameron Dawson 46763562e5
Bug 1457205 - Convert Job Details tab to ReactJS (#3491) 2018-04-26 11:54:24 -07:00
Ed Morley 47ac771a84 Bug 1456894 - Import jQuery explicitly
The last remaining `ProvidePlugin` definition cannot be removed since
AngularJS and Flot both expect `window.jQuery` to be defined (and
whilst AngularJS falls back to jqLite, it's buggy). It's not possible
to set `window.jQuery` manually in the entrypoints, since ES6 imports
are hoisted, thereby giving no opportunity to modify window first.
2018-04-25 19:48:41 +01:00
Ed Morley f522727087 Bug 1456894 - Import React explicitly
Rather than relying on `ProvidePlugin`.
2018-04-25 19:48:41 +01:00
Ed Morley cc64c07802 Bug 1456894 - Import lodash explicitly
Rather than relying on `ProvidePlugin`.
2018-04-25 19:48:41 +01:00
Cameron Dawson 5d23735359
Bug 1446427 - Convert Autoclassify panel to ReactJS (#3414) 2018-04-24 12:39:06 -07:00
Cameron Dawson 0b5fec254a
Bug 1449240 - Convert Angular values.js to import-able constants (#3378)
After looking at these, I think I want to go back to using "th" prefix and "ph" prefix.
It is a nice way to see right off the bat that these are constants that are established
by our code and not some external library.  So converting ``platformMap`` back to
``thPlatformMap``.  It also makes for less code/blame churn as we move to imported
constants.

* Move thOptionOrder to constants.js
* Move thFailureResults to constants.js
* Move thRepoGroupOrder to constants.js
* Move thFavIcons to constants.js
* Move phCompareDefaultOriginalRepo to constants.js
* Move phCompareDefaultNewRepo to constants.js
* Move thDefaultRepo to constants.js
* Move thTitleSuffixLimit to constants.js
* Move phTimeRanges to constants.js
* Move thDateFormat to constants.js
* Move phDefaultTimeRangeValue to constants.js
* Move phTimeRangeValues to constants.js
* Move phBlockers to constants.js
* Move phDefaultFramework to constants.js
* Move phAlertSummaryStatusMap to constants.js
* Move phAlertSummaryIssueTrackersMap to constants.js
* Move phAlertStatusMap to constants.js
* Move thJobNavSelectors to constants.js
* Move thPerformanceBranches to constants.js
* Move phDashboardValues to dashboard.js
* Move phCompareBaseLineDefaultTimeRange to constants.js
* Move thPinboardCountError to constants.js
* Remove now-unused values.js
* Move thResultStatusFilters to constants.js
* Move thEvents to constants.js
* Move thAggregateIds to a aggregateIdHelper.js
* Move thReftestStatus to jobHelper.js
* Remove now-unused provider.js
2018-04-04 10:01:17 -07:00
Cameron Dawson cca48d14df
Bug 1444134 - Consolidate references to SERVICE_DOMAIN (#3319)
* Don't use SERVICE_DOMAIN for references to the front-end code
* Change getRootUrl to getApiUrl to better represent what it is for
* Convert other usages of SERVICE_DOMAIN to getApiUrl
* Convert usages of SERVICE_DOMAIN to getProjectUrl
* Convert uses of SERVICE_DOMAIN to getServiceUrl
* Convert tests to use ``urlHelper``
2018-03-08 15:48:31 -08:00
Cameron Dawson 6e2242b2c5 Bug 1443667 - Fix 'tier' not yet assigned when getJobGroupInfo() creates map 2018-03-08 08:26:25 -08:00
Cameron Dawson cffdb1b0f2
Bug 1442556 - Fix slowness on filtering (#3309)
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
2018-03-07 08:38:44 -08:00
Cameron Dawson b8076190d3
Bug 1441700 - Consolidate job details pane (#3291)
* 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
2018-03-03 10:04:19 -08:00
Cameron Dawson 2240fbd3a9
Bug 1441912 - Replace thUrl angular provider with urlHelper lib (#3285)
* 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
2018-03-01 16:00:28 -08:00
Ed Morley b3d02f3874 Bug 1441617 - Convert CJS imports to ES6
This converts virtually all of the CJS imports, apart from:
* the partials/plugin template loading in cache-loader - since that
  is being handled in bug 1441614
* `.eslintrc.js` / `neutrino-custom/*` - since they are used by node
  directly (which doesn't yet support ES6 modules) rather than via
  webpack.

File extensions have been omitted for JS/JSX, otherwise eslint reports:
`Unexpected use of file extension "js" for "..." (import/extensions)`
2018-03-01 01:42:49 +00:00
Ed Morley ebe97fa18e Bug 1441617 - Always import mousetrap explicitly
...rather than relying on `window.Mousetrap`.

And also switch to ES6 imports.
2018-03-01 01:42:49 +00:00
Ed Morley 800b31b719 Bug 1441617 - Always import angular explicitly
...rather than relying on `window.angular`.

And also switch to ES6 imports.
2018-03-01 01:42:49 +00:00
Ed Morley a8e09c5786 Bug 1441617 - Use ES6 imports for angular module dependencies
An AngularJS module declares a dependency on another module like so:
```
const fooModule = angular.module('foo', ['name_of_dep_module']);
```

This is suboptimal, since:
a) the dependency is only validated at runtime not during the build
b) the module name often doesn't match the NPM package name, making
   it hard to know whether imports are unused.

As such, many AngularJS packages now export a string containing the
module name, which allows for an ES6-like approach (it still uses
globals underneath, but better than nothing):
```
import nameOfDepModule from 'dep-module';

const fooModule = angular.module('foo', [nameOfDepModule]);
```

Just to complicate things, some modules don't export the module name,
but the actual module object itself. This can't be passed to
`angular.module()` directly, so for these modules we have to use the
`name` property on the module instead:
https://docs.angularjs.org/api/ng/type/angular.Module#name

eg:
```
import depModuleObject from 'awkward-dep-module';

const fooModule = angular.module('foo', [depModuleObject.name]);
```

In fact, the treeherder modules do just that - however its not worth
fixing, since otherwise we'd have to change every file that registers
directives/filters/values/... to fetch the module first, using
`angular.module('name-of-existing-module')`.
2018-03-01 01:42:49 +00:00
Ed Morley 3e2e22e132 Bug 1441617 - Switch the treeherder module to ES6 exports
This is the shared module that is a dependency of the `treeherder.app`,
`perf` and `logviewer` modules.
2018-03-01 01:42:49 +00:00
Ed Morley 7bab404d40 Bug 1441617 - Switch the perf module to ES6 exports 2018-03-01 01:42:49 +00:00
Ed Morley 588947856a Bug 1441617 - Switch the treeherder.app module to ES6 exports
This module is for use by the `index` entrypoint, and inherits from
the shared `treeherder` module.
2018-03-01 01:42:49 +00:00
Ed Morley 6053d8110a Bug 1441617 - Switch the logviewer module to ES6 exports 2018-03-01 01:42:49 +00:00