Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
reForis
Diagnostics Plugin
Commits
4aacf809
Commit
4aacf809
authored
Jan 10, 2020
by
Maciej Lenartowicz
Browse files
Merge branch 'foris-js-3.0.0' into 'master'
Updated Foris JS to 3.1.1. See merge request
!25
parents
95d83222
8f8d543a
Pipeline
#59370
passed with stage
in 5 minutes and 20 seconds
Changes
9
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
js/jest.config.js
View file @
4aacf809
...
...
@@ -18,6 +18,7 @@ module.exports = {
collectCoverageFrom
:
[
"
src/**/*.{js,jsx}
"
],
coverageDirectory
:
"
coverage
"
,
testPathIgnorePatterns
:
[
"
/node_modules/
"
,
"
/__fixtures__/
"
],
transformIgnorePatterns
:
[
"
node_modules/(?!(foris)/)
"
],
verbose
:
false
,
setupFilesAfterEnv
:
[
"
@testing-library/react/cleanup-after-each
"
,
...
...
js/package-lock.json
View file @
4aacf809
This diff is collapsed.
Click to expand it.
js/package.json
View file @
4aacf809
...
...
@@ -6,11 +6,11 @@
"url"
:
"https://gitlab.labs.nic.cz/turris/reforis/reforis-diagnostics.git"
},
"license"
:
"GPL-3.0"
,
"version"
:
"2.2.
1
"
,
"version"
:
"2.2.
2
"
,
"description"
:
"Diagnostics plugins for Foris."
,
"main"
:
"./src/app.js"
,
"dependencies"
:
{
"foris"
:
"
1.3.2
"
"foris"
:
"
3.1.1
"
},
"peerDependencies"
:
{
"prop-types"
:
"15.7.2"
,
...
...
@@ -18,35 +18,29 @@
"react-dom"
:
"16.9.0"
},
"devDependencies"
:
{
"@babel/cli"
:
"^7.4.4"
,
"@babel/core"
:
"^7.4.5"
,
"@babel/plugin-proposal-class-properties"
:
"^7.4.4"
,
"@babel/plugin-transform-runtime"
:
"^7.4.4"
,
"@babel/preset-env"
:
"^7.4.5"
,
"@babel/preset-react"
:
"^7.0.0"
,
"@babel/cli"
:
"^7.7.7"
,
"@babel/core"
:
"^7.7.7"
,
"@babel/plugin-transform-runtime"
:
"^7.7.6"
,
"@babel/preset-env"
:
"^7.7.7"
,
"@babel/preset-react"
:
"^7.7.4"
,
"@testing-library/react"
:
"^8.0.9"
,
"babel-jest"
:
"^24.8.0"
,
"babel-loader"
:
"^8.0.6"
,
"babel-plugin-react-transform"
:
"^3.0.0"
,
"babel-polyfill"
:
"^6.26.0"
,
"css-loader"
:
"^3.0.0"
,
"eslint"
:
"^6.1.0"
,
"css-loader"
:
"^3.4.1"
,
"eslint"
:
"^6.8.0"
,
"eslint-config-reforis"
:
"^1.0.0"
,
"immutability-helper"
:
"3.0.1"
,
"jest"
:
"^24.8.0"
,
"jest-mock-axios"
:
"^3.0.0"
,
"moment-timezone"
:
"^0.5.25"
,
"jest"
:
"^24.9.0"
,
"jest-mock-axios"
:
"^3.2.0"
,
"moment-timezone"
:
"^0.5.27"
,
"prop-types"
:
"15.7.2"
,
"react"
:
"16.9.0"
,
"react-dom"
:
"16.9.0"
,
"snapshot-diff"
:
"^0.5.1"
,
"style-loader"
:
"^0.23.1"
,
"webpack"
:
"^4.
33.0
"
,
"webpack-cli"
:
"^3.3.
4
"
"webpack"
:
"^4.
41.5
"
,
"webpack-cli"
:
"^3.3.
10
"
},
"scripts"
:
{
"watch"
:
"webpack --watch --mode=development
--env.lighttpd
"
,
"build"
:
"webpack --mode=production
--env.lighttpd
"
,
"watch"
:
"webpack --watch --mode=development"
,
"build"
:
"webpack --mode=production"
,
"lint"
:
"eslint src"
,
"lint:fix"
:
"eslint --fix src"
,
"test"
:
"jest"
,
...
...
js/src/diagnostics/ModulesForm.js
View file @
4aacf809
...
...
@@ -40,7 +40,7 @@ export default function ModulesForm({
function
generateReport
(
event
)
{
event
.
preventDefault
();
postReport
({
modules
:
selectedModules
});
postReport
({
data
:
{
modules
:
selectedModules
}
});
}
const
checkboxes
=
(
...
...
@@ -51,7 +51,6 @@ export default function ModulesForm({
<
CheckBox
label
=
{
name
}
checked
=
{
modules
[
name
]}
useDefaultSize
=
{
false
}
onChange
=
{
setFormValue
((
value
)
=>
({
modules
:
{
[
name
]:
{
$set
:
value
}
}
}))
}
...
...
@@ -71,20 +70,21 @@ export default function ModulesForm({
label
=
{
_
(
"
Select all
"
)}
checked
=
{
Object
.
keys
(
modules
)
.
every
((
name
)
=>
modules
[
name
]
===
true
)}
useDefaultSize
=
{
false
}
onChange
=
{
setFormValue
(
(
value
)
=>
({
modules
:
updateAllValues
(
modules
,
value
)
}),
)}
/
>
<
/div
>
{
checkboxes
}
<
Button
type
=
"
submit
"
disabled
=
{
!
selectedModules
.
length
}
forisFormSize
>
{
_
(
"
Generate report
"
)}
<
/Button
>
<
div
className
=
"
text-right
"
>
<
Button
type
=
"
submit
"
disabled
=
{
!
selectedModules
.
length
}
forisFormSize
>
{
_
(
"
Generate report
"
)}
<
/Button
>
<
/div
>
<
/form
>
<
/
>
);
...
...
js/src/diagnostics/__tests__/__snapshots__/Diagnostics.test.js.snap
View file @
4aacf809
...
...
@@ -15,7 +15,7 @@ exports[`<Diagnostics /> should handle error on loading reports 1`] = `
Select modules which you want to include in the report.
</p>
<form
class="col-sm-12 offset-lg-1 col-lg-10"
class="col-sm-12 offset-lg-1 col-lg-10
p-0 mb-3
"
>
<div
style="font-weight: bold;"
...
...
@@ -72,15 +72,19 @@ exports[`<Diagnostics /> should handle error on loading reports 1`] = `
</div>
</div>
</div>
<button
class="btn btn-primary offset-lg-8 col-lg-3 col-sm-12"
disabled=""
type="submit"
<div
class="text-right"
>
Generate report
</button>
<button
class="btn btn-primary col-sm-12 col-lg-3"
disabled=""
type="submit"
>
Generate report
</button>
</div>
</form>
<h3
class="mt-3"
...
...
@@ -110,7 +114,7 @@ exports[`<Diagnostics /> should reload reports table when new report is generate
Select modules which you want to include in the report.
</p>
<form
class="col-sm-12 offset-lg-1 col-lg-10"
class="col-sm-12 offset-lg-1 col-lg-10
p-0 mb-3
"
>
<div
style="font-weight: bold;"
...
...
@@ -167,14 +171,18 @@ exports[`<Diagnostics /> should reload reports table when new report is generate
</div>
</div>
</div>
<button
class="btn btn-primary offset-lg-8 col-lg-3 col-sm-12"
type="submit"
<div
class="text-right"
>
Generate report
</button>
<button
class="btn btn-primary col-sm-12 col-lg-3"
type="submit"
>
Generate report
</button>
</div>
</form>
<h3
class="mt-3"
...
...
@@ -281,7 +289,7 @@ exports[`<Diagnostics /> should render modules and reports 1`] = `
Select modules which you want to include in the report.
</p>
<form
class="col-sm-12 offset-lg-1 col-lg-10"
class="col-sm-12 offset-lg-1 col-lg-10
p-0 mb-3
"
>
<div
style="font-weight: bold;"
...
...
@@ -338,15 +346,19 @@ exports[`<Diagnostics /> should render modules and reports 1`] = `
</div>
</div>
</div>
<button
class="btn btn-primary offset-lg-8 col-lg-3 col-sm-12"
disabled=""
type="submit"
<div
class="text-right"
>
Generate report
</button>
<button
class="btn btn-primary col-sm-12 col-lg-3"
disabled=""
type="submit"
>
Generate report
</button>
</div>
</form>
<h3
class="mt-3"
...
...
js/src/diagnostics/__tests__/__snapshots__/Modules.test.js.snap
View file @
4aacf809
...
...
@@ -9,16 +9,13 @@ exports[`<Modules /> should display spinner 1`] = `
class="spinner-wrapper my-3 text-center"
>
<div
class="spinner-border
"
class="spinner-border"
role="status"
>
<span
class="sr-only"
/>
</div>
<div
class="spinner-text"
/>
</div>
</div>
`;
...
...
@@ -45,7 +42,7 @@ exports[`<Modules /> should render modules 1`] = `
Select modules which you want to include in the report.
</p>
<form
class="col-sm-12 offset-lg-1 col-lg-10"
class="col-sm-12 offset-lg-1 col-lg-10
p-0 mb-3
"
>
<div
style="font-weight: bold;"
...
...
@@ -186,15 +183,19 @@ exports[`<Modules /> should render modules 1`] = `
</div>
</div>
</div>
<button
class="btn btn-primary offset-lg-8 col-lg-3 col-sm-12"
disabled=""
type="submit"
<div
class="text-right"
>
Generate report
</button>
<button
class="btn btn-primary col-sm-12 col-lg-3"
disabled=""
type="submit"
>
Generate report
</button>
</div>
</form>
</div>
`;
js/src/diagnostics/__tests__/__snapshots__/ReportsTable.test.js.snap
View file @
4aacf809
...
...
@@ -32,16 +32,13 @@ exports[`<ReportsTable /> should display spinner when report is not ready 1`] =
class="text-center"
>
<div
class="spinner-border
"
class="spinner-border"
role="status"
>
<span
class="sr-only"
/>
</div>
<div
class="spinner-text"
/>
</td>
<td
class="text-right"
...
...
js/webpack.config.js
View file @
4aacf809
...
...
@@ -24,7 +24,7 @@ module.exports = () => ({
rules
:
[
{
test
:
/
\.
js$/
,
exclude
:
/node_modules/
,
exclude
:
/node_modules
\/(?!
foris
)
/
,
loader
:
"
babel-loader
"
,
},
{
...
...
setup.py
View file @
4aacf809
...
...
@@ -32,7 +32,7 @@ class CustomBuild(build_py):
setuptools
.
setup
(
name
=
NAME
,
version
=
'2.2.
1
'
,
version
=
'2.2.
2
'
,
packages
=
setuptools
.
find_packages
(
exclude
=
[
'tests'
]),
include_package_data
=
True
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment