Commit Graph

12 Commits

Author SHA1 Message Date
James E. Blair 1035ff81b3 Don't enforce js whitespace
In the Zuul project in general we try to avoid having nitpicky
arguments about code style.  Unless it causes a real problem,
we usually accept the stylistic aspects of code as people write
it.  Since js indentation is not functional, like python, let's
ignore it.

Change-Id: If787e9a9fee92bdca1c4add448a5c85f02d4118d
2020-11-20 06:26:36 -08:00
Sorin Sbarnea ebad14f1f9 Consolidate js/jsx indentation
Previously indentation was not checked at all and in order to avoid
reviewers time with style checks, we can enforce it with eslint.

Current js/jsx changes were made by: yarn lint-fix

Note this this change can easily become outdated so we need to
coordinate and merge it quickly as each rebase would loose previous
votes.

Change-Id: I85883fc8db924ad4ce9acad5acdd42aed7e4d0e4
2020-11-20 09:39:31 +00:00
Felix Edel 7abe44ef73
Configure redux for development
This enables the redux developer tools for the browser. To make use of
this, one must also install the Redux DevTools extension which is
available for various browsers. The extension visualize all state
transitions in the redux store and also allows changing them manually to
see the effects.

Additionally, this change makes use of the third-party library called
"redux-immutable-state-invariant", which throws exception in development
mode whenever a state is mutated directly within an action or reducer.

Change-Id: I8a8588cd7f5f1b17b247d9700a492e5c1e27f040
2020-10-14 08:20:50 +02:00
Monty Taylor 36de1dd85b Update to create-react-app 3.4.1
While trying to figure out why the ansi patch wouldn't
build it emerged that we're now 2 major releases behind
on create-react-app.

Update create-react-app to the latest 3.4.1. This also updates
react to 16.13, and updates eslint globals processing so that
we don't have to declare globals in headers when we've
declared them already in the eslint file.

Finally, although this doesn't do it, create-react-app 3
has support for typescript, so if we want we can start migrating
files to .ts or .tsx extensions and start doing typing in
them.

Pin nanoid to v2 until such a time as create-react-app can be
updated to 3.4.2 which is needed ot handle .cjs extensions
being used by nanoid.

Change-Id: Ibc69bef605a62e4fdd2ebba33d9d1b822e7dfeba
2020-05-21 10:55:29 -05:00
Monty Taylor fdc9a1830a Add linter rule disallowing use of var
var in javascript has some surprising behaviors, especially for those
of us from a python background, and can hide some errors. There's a
good article on it here: https://tylermcginnis.com/var-let-const/

Tell eslint to not allow the use of var and instead require either
let or const. Then update the one use.

Change-Id: Idd4b0a9086a68070dc35b546b7f73701c94ba1b0
2019-08-28 09:06:05 +02:00
James E. Blair 8fdc387c83 Add log browsing to build page
This looks for a zuul_manifest artifact, and if it is present,
it fetches it and shows a tree view of logs.  Text logs are
displayed in-app with some basic line anchoring.

Part of the implementation of
https://zuul-ci.org/docs/zuul/developer/specs/logs.html

es6 added to .eslint to allow use of Promise.

Change-Id: Ib04d013b4118005ba66a91d2bec0b0c429d12863
2019-07-24 09:25:13 -07:00
Clark Boylan ba6306bc1f Update axios version and yarn.lock
Axios <= 0.18.0 should apparently not be used any longer. Bump this to
0.19.0 and regenerate the yarn lock. This does update all the other
packages too because that is how yarn.lock works.

Note we have to fix the linter errors in the process (and clear out an
annoying warning).

Change-Id: Iabf5171ce8e0ccfabbebc7784da3299b2fd04693
2019-06-06 12:05:52 -07:00
David Shrewsbury da721e6e08 Revert "web: upgrade react and react-scripts to ^2.0.0"
Dashboard appears to be broken by this. JS errors at: http://paste.openstack.org/show/751488/

This reverts commit 9a4cd7a026.

Change-Id: I881b28815237cf4b0bc151a267a49162613df72e
2019-05-16 19:55:31 +00:00
Tristan Cacqueray 9a4cd7a026 web: upgrade react and react-scripts to ^2.0.0
- react-scripts>2.0.0 supports requirements written in newer javascript.
- eslint=5.6.0 is required by react-scripts>2.0.0
- update redux, patternfly-react and react to latest release
- default browserslist is added to the packages.json
- fix new eslint error

Change-Id: Ibee14604b364ce8d4133bcc409a70402bdde9df0
2019-05-02 09:20:22 +00:00
Tristan Cacqueray 68d1189871
Revert "Revert "web: rewrite interface in react""
This reverts commit 3dba813c64.

Change-Id: I233797a9b4e3485491c49675da2c2efbdba59449
2018-10-06 10:42:31 -05:00
James E. Blair 3dba813c64 Revert "web: rewrite interface in react"
Revert "Fix publish-openstack-javascript-content"

This reverts commit ca199eb9db.
This reverts commit 1082faae95.

This appears to remove the tarball publishing system that we rely on.

Change-Id: Id746fb826dfc01b157c5b772adc1d2991ddcd93a
2018-09-29 11:51:43 -07:00
Tristan Cacqueray 1082faae95 web: rewrite interface in react
This change rewrites the web interface using React:
http://lists.zuul-ci.org/pipermail/zuul-discuss/2018-August/000528.html

Depends-On: https://review.openstack.org/591964
Change-Id: Ic6c33102ac3da69ebd0b8e9c6c8b431d51f3cfd4
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Co-Authored-By: James E. Blair <jeblair@redhat.com>
2018-09-27 02:14:46 +00:00