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
This commit is contained in:
parent
7e29b8a910
commit
9a4cd7a026
|
@ -66,6 +66,7 @@
|
||||||
javascript_content_dir: "../zuul/web/static"
|
javascript_content_dir: "../zuul/web/static"
|
||||||
zuul_work_dir: "{{ zuul.project.src_dir }}/web"
|
zuul_work_dir: "{{ zuul.project.src_dir }}/web"
|
||||||
zuul_api_url: https://zuul.openstack.org
|
zuul_api_url: https://zuul.openstack.org
|
||||||
|
node_version: 8
|
||||||
run: playbooks/dashboard/run.yaml
|
run: playbooks/dashboard/run.yaml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
|
|
|
@ -51,6 +51,8 @@ class TestWebURLs(ZuulTestCase):
|
||||||
]:
|
]:
|
||||||
for item in page.find_all(tag):
|
for item in page.find_all(tag):
|
||||||
suburl = item.get(attr)
|
suburl = item.get(attr)
|
||||||
|
if not suburl:
|
||||||
|
continue
|
||||||
if suburl.startswith('/'):
|
if suburl.startswith('/'):
|
||||||
suburl = suburl[1:]
|
suburl = suburl[1:]
|
||||||
link = urllib.parse.urljoin(url, suburl)
|
link = urllib.parse.urljoin(url, suburl)
|
||||||
|
|
|
@ -17,7 +17,7 @@ extends:
|
||||||
- plugin:react/recommended
|
- plugin:react/recommended
|
||||||
settings:
|
settings:
|
||||||
react:
|
react:
|
||||||
version: 16.4
|
version: "16.4"
|
||||||
env:
|
env:
|
||||||
jest/globals: true
|
jest/globals: true
|
||||||
browser: true
|
browser: true
|
||||||
|
|
|
@ -11,27 +11,26 @@
|
||||||
"immutability-helper": "^2.8.1",
|
"immutability-helper": "^2.8.1",
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.10",
|
||||||
"moment": "^2.22.2",
|
"moment": "^2.22.2",
|
||||||
"patternfly-react": "^2.13.1",
|
"patternfly-react": "^2.29.8",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react": "^16.4.2",
|
"react": "^16.7.0",
|
||||||
"react-dom": "^16.4.2",
|
"react-dom": "^16.4.2",
|
||||||
"react-height": "^3.0.0",
|
"react-height": "^3.0.0",
|
||||||
"react-json-view": "^1.19.1",
|
"react-json-view": "^1.19.1",
|
||||||
"react-redux": "^5.0.7",
|
"react-redux": "^5.0.7",
|
||||||
"react-router": "^4.3.1",
|
"react-router": "^4.3.1",
|
||||||
"react-router-dom": "^4.3.1",
|
"react-router-dom": "^4.3.1",
|
||||||
"react-scripts": "1.1.4",
|
"react-scripts": "^2.0.0",
|
||||||
"redux": "<4.0.0",
|
"redux": "^4.0.1",
|
||||||
"redux-thunk": "^2.3.0",
|
"redux-thunk": "^2.3.0",
|
||||||
"sockette": "^2.0.0",
|
"sockette": "^2.0.0",
|
||||||
"xterm": "^3.12.0"
|
"xterm": "^3.12.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^5.3.0",
|
"eslint": "5.6.0",
|
||||||
"eslint-plugin-jest": "^21.21.0",
|
"eslint-plugin-jest": "^21.21.0",
|
||||||
"eslint-plugin-react": "^7.11.1",
|
"eslint-plugin-react": "^7.12.0",
|
||||||
"eslint-plugin-standard": "^3.1.0",
|
"eslint-plugin-standard": "^3.1.0"
|
||||||
"yarn": "^1.9.4"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start:openstack": "REACT_APP_ZUUL_API='https://zuul.openstack.org/api/' react-scripts start",
|
"start:openstack": "REACT_APP_ZUUL_API='https://zuul.openstack.org/api/' react-scripts start",
|
||||||
|
@ -41,5 +40,14 @@
|
||||||
"test": "react-scripts test --env=jsdom",
|
"test": "react-scripts test --env=jsdom",
|
||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"lint": "eslint --ext .js --ext .jsx src"
|
"lint": "eslint --ext .js --ext .jsx src"
|
||||||
}
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": "react-app"
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
">0.2%",
|
||||||
|
"not dead",
|
||||||
|
"not ie <= 11",
|
||||||
|
"not op_mini all"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,9 +44,9 @@ class Refreshable extends React.Component {
|
||||||
const { remoteData } = this.props
|
const { remoteData } = this.props
|
||||||
return (
|
return (
|
||||||
<Spinner loading={ remoteData.isFetching }>
|
<Spinner loading={ remoteData.isFetching }>
|
||||||
<a className="refresh" onClick={() => {this.updateData(true)}}>
|
<div className="refresh" onClick={() => {this.updateData(true)}}>
|
||||||
<Icon type="fa" name="refresh" /> refresh
|
<Icon type="fa" name="refresh" /> refresh
|
||||||
</a>
|
</div>
|
||||||
</Spinner>
|
</Spinner>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,11 @@ body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
a.refresh {
|
div.refresh {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom-style: none;
|
border-bottom-style: none;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
color: #0088ce;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Notification bell color */
|
/* Notification bell color */
|
||||||
|
|
|
@ -37,9 +37,9 @@ class ConfigErrorsPage extends React.Component {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<div className="pull-right">
|
<div className="pull-right">
|
||||||
<a className="refresh" onClick={() => {this.updateData()}}>
|
<div className="refresh" onClick={() => {this.updateData()}}>
|
||||||
<Icon type="fa" name="refresh" /> refresh
|
<Icon type="fa" name="refresh" /> refresh
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="pull-left">
|
<div className="pull-left">
|
||||||
<ul className="list-group">
|
<ul className="list-group">
|
||||||
|
|
8942
web/yarn.lock
8942
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue