From 55c8d45ca70c4b3f2351a0a898874658d5054e6f Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Mon, 5 Nov 2018 12:26:42 -0600 Subject: [PATCH 01/14] rename Atoms to Resources in download queue tooltip --- app/components/DblDotLocalAppBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/DblDotLocalAppBar.js b/app/components/DblDotLocalAppBar.js index dc91dad7bc..8327f899b7 100644 --- a/app/components/DblDotLocalAppBar.js +++ b/app/components/DblDotLocalAppBar.js @@ -88,7 +88,7 @@ class DblDotLocalAppBar extends React.PureComponent {
- +
From a19cfc80384e7fb38f7345f850b3e4f3bc930454 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Mon, 5 Nov 2018 16:34:25 -0600 Subject: [PATCH 02/14] update different modules --- package.json | 6 +- yarn.lock | 241 ++++++++++++++++++++++++--------------------------- 2 files changed, 116 insertions(+), 131 deletions(-) diff --git a/package.json b/package.json index 1e6bc6e719..d5f494435b 100644 --- a/package.json +++ b/package.json @@ -192,8 +192,8 @@ "webpack-merge": "^4.1.1" }, "dependencies": { - "@material-ui/core": "^1.4.3", - "@material-ui/icons": "^2.0.2", + "@material-ui/core": "^3.4.0", + "@material-ui/icons": "^3.0.1", "async-wait-until": "^1.2.4", "bootstrap": "4.0.0", "devtron": "^1.4.0", @@ -211,7 +211,7 @@ "material-ui": "^0.20.0", "material-ui-superselectfield": "^1.9.8", "md5-file": "^4.0.0", - "mui-table": "^2.1.4", + "mui-table": "^2.2.0", "popper.js": "^1.14.2", "react": "^16.3.0", "react-addons-shallow-compare": "^15.6.2", diff --git a/yarn.lock b/yarn.lock index db78b8ebed..f351619660 100644 --- a/yarn.lock +++ b/yarn.lock @@ -67,16 +67,15 @@ "@babel/types" "7.0.0-beta.51" lodash "^4.17.5" -"@babel/runtime@7.0.0-beta.42": - version "7.0.0-beta.42" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-beta.42.tgz#352e40c92e0460d3e82f49bd7e79f6cda76f919f" +"@babel/runtime@7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0.tgz#adeb78fedfc855aa05bc041640f3f6f98e85424c" dependencies: - core-js "^2.5.3" - regenerator-runtime "^0.11.1" + regenerator-runtime "^0.12.0" -"@babel/runtime@7.0.0-beta.56": - version "7.0.0-beta.56" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-beta.56.tgz#cda612dffd5b1719a7b8e91e3040bd6ae64de8b0" +"@babel/runtime@7.1.2", "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.2.tgz#81c89935f4647706fc54541145e6b4ecfef4b8e3" dependencies: regenerator-runtime "^0.12.0" @@ -165,12 +164,12 @@ version "0.8.1" resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.8.1.tgz#f3a81587ad8d0ef33cdad6f3b4310774fcc1053e" -"@material-ui/core@^1.4.3": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-1.5.0.tgz#00884bb4139d98786d05a97803d19426d4afa55d" +"@material-ui/core@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-3.4.0.tgz#b33c00a3c20e856ed7a4700dd398f128647beb4a" dependencies: - "@babel/runtime" "7.0.0-beta.42" - "@types/jss" "^9.5.3" + "@babel/runtime" "7.1.2" + "@types/jss" "^9.5.6" "@types/react-transition-group" "^2.0.8" brcast "^3.0.1" classnames "^2.2.5" @@ -178,7 +177,7 @@ debounce "^1.1.0" deepmerge "^2.0.1" dom-helpers "^3.2.1" - hoist-non-react-statics "^2.5.0" + hoist-non-react-statics "^3.0.0" is-plain-object "^2.0.4" jss "^9.3.3" jss-camel-case "^6.0.0" @@ -192,25 +191,24 @@ popper.js "^1.14.1" prop-types "^15.6.0" react-event-listener "^0.6.2" - react-jss "^8.1.0" react-transition-group "^2.2.1" - recompose "^0.28.0" + recompose "0.28.0 - 0.30.0" warning "^4.0.1" -"@material-ui/icons@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-2.0.2.tgz#0150c38cda089ef284e9b4a730dfe6e88a0b5de6" +"@material-ui/icons@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-3.0.1.tgz#671fb3d04dcaf9351dbbd2bf82ae2ae72e3d93cd" dependencies: - "@babel/runtime" "7.0.0-beta.42" - recompose "^0.28.0" + "@babel/runtime" "7.0.0" + recompose "^0.29.0" "@sellside/emitter@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@sellside/emitter/-/emitter-1.2.1.tgz#0dd839c30cdf01087f4dc63613503da6bcdf5f1e" -"@types/jss@^9.5.3": - version "9.5.3" - resolved "https://registry.yarnpkg.com/@types/jss/-/jss-9.5.3.tgz#0c106de3fe0b324cd4173fac7dab26c12cda624e" +"@types/jss@^9.5.6": + version "9.5.7" + resolved "https://registry.yarnpkg.com/@types/jss/-/jss-9.5.7.tgz#fa57a6d0b38a3abef8a425e3eb6a53495cb9d5a0" dependencies: csstype "^2.0.0" indefinite-observable "^1.0.1" @@ -223,16 +221,21 @@ version "7.0.52" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.52.tgz#8990d3350375542b0c21a83cd0331e6a8fc86716" +"@types/prop-types@*": + version "15.5.6" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.6.tgz#9c03d3fed70a8d517c191b7734da2879b50ca26c" + "@types/react-transition-group@^2.0.8": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-2.0.11.tgz#feb274676a39383fffaa0dff710958d2251abefb" + version "2.0.14" + resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-2.0.14.tgz#afd0cd785a97f070b55765e9f9d76ff568269001" dependencies: "@types/react" "*" "@types/react@*": - version "16.3.17" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.3.17.tgz#d59d1a632570b0713946ed9c2949d994773633c5" + version "16.4.18" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.18.tgz#2e28a2e7f92d3fa7d6a65f2b73275c3e3138a13d" dependencies: + "@types/prop-types" "*" csstype "^2.2.0" JSONStream@^0.8.4: @@ -2573,9 +2576,9 @@ copy-descriptor@^0.1.0: core-js@^1.0.0: version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + resolved "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.4.0, core-js@^2.5.3, core-js@^2.5.7: +core-js@^2.4.0, core-js@^2.5.7: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" @@ -2909,8 +2912,8 @@ cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": cssom "0.3.x" csstype@^2.0.0, csstype@^2.2.0, csstype@^2.5.2: - version "2.5.3" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.3.tgz#2504152e6e1cc59b32098b7f5d6a63f16294c1f7" + version "2.5.7" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.7.tgz#bf9235d5872141eccfb2d16d82993c6b149179ff" currently-unhandled@^0.4.1: version "0.4.1" @@ -2951,8 +2954,8 @@ dateformat@^2.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062" debounce@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.1.0.tgz#6a1a4ee2a9dc4b7c24bb012558dbcdb05b37f408" + version "1.2.0" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" debug@2.6.9, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.5.1, debug@^2.6.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" @@ -3004,8 +3007,8 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" deepmerge@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.1.1.tgz#e862b4e45ea0555072bf51e7fd0d9845170ae768" + version "2.2.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" deepmerge@~2.0.1: version "2.0.1" @@ -3212,10 +3215,16 @@ doiuse@^2.4.1: through2 "^0.6.3" yargs "^3.5.4" -dom-helpers@^3.2.0, dom-helpers@^3.2.1, dom-helpers@^3.3.1: +dom-helpers@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.3.1.tgz#fc1a4e15ffdf60ddde03a480a9c0fece821dd4a6" +dom-helpers@^3.2.1, dom-helpers@^3.3.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" + dependencies: + "@babel/runtime" "^7.1.2" + dom-serializer@0, dom-serializer@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" @@ -5142,8 +5151,14 @@ hoist-non-react-statics@^2.2.1, hoist-non-react-statics@^2.3.0: resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0" hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: - version "2.5.4" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.4.tgz#fc3b1ac05d2ae3abedec84eba846511b0d4fcc4f" + version "2.5.5" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" + +hoist-non-react-statics@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz#42414ccdfff019cd2168168be998c7b3bd5245c0" + dependencies: + react-is "^16.3.2" home-or-tmp@^2.0.0: version "2.0.0" @@ -5264,8 +5279,8 @@ iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@^0.4.19: resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" iconv-lite@~0.4.13: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" dependencies: safer-buffer ">= 2.1.2 < 3" @@ -5577,10 +5592,6 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" -is-function@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" - is-generator-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" @@ -6160,6 +6171,10 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + js-yaml@^3.10.0, js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" @@ -6314,32 +6329,16 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jss-camel-case@^6.0.0, jss-camel-case@^6.1.0: +jss-camel-case@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/jss-camel-case/-/jss-camel-case-6.1.0.tgz#ccb1ff8d6c701c02a1fed6fb6fb6b7896e11ce44" dependencies: hyphenate-style-name "^1.0.2" -jss-compose@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/jss-compose/-/jss-compose-5.0.0.tgz#ce01b2e4521d65c37ea42cf49116e5f7ab596484" - dependencies: - warning "^3.0.0" - jss-default-unit@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/jss-default-unit/-/jss-default-unit-8.0.2.tgz#cc1e889bae4c0b9419327b314ab1c8e2826890e6" -jss-expand@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/jss-expand/-/jss-expand-5.3.0.tgz#02be076efe650125c842f5bb6fb68786fe441ed6" - -jss-extend@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/jss-extend/-/jss-extend-6.2.0.tgz#4af09d0b72fb98ee229970f8ca852fec1ca2a8dc" - dependencies: - warning "^3.0.0" - jss-global@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/jss-global/-/jss-global-3.0.0.tgz#e19e5c91ab2b96353c227e30aa2cbd938cdaafa2" @@ -6350,40 +6349,19 @@ jss-nested@^6.0.1: dependencies: warning "^3.0.0" -jss-preset-default@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/jss-preset-default/-/jss-preset-default-4.5.0.tgz#d3a457012ccd7a551312014e394c23c4b301cadd" - dependencies: - jss-camel-case "^6.1.0" - jss-compose "^5.0.0" - jss-default-unit "^8.0.2" - jss-expand "^5.3.0" - jss-extend "^6.2.0" - jss-global "^3.0.0" - jss-nested "^6.0.1" - jss-props-sort "^6.0.0" - jss-template "^1.0.1" - jss-vendor-prefixer "^7.0.0" - jss-props-sort@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/jss-props-sort/-/jss-props-sort-6.0.0.tgz#9105101a3b5071fab61e2d85ea74cc22e9b16323" -jss-template@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/jss-template/-/jss-template-1.0.1.tgz#09aed9d86cc547b07f53ef355d7e1777f7da430a" - dependencies: - warning "^3.0.0" - jss-vendor-prefixer@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/jss-vendor-prefixer/-/jss-vendor-prefixer-7.0.0.tgz#0166729650015ef19d9f02437c73667231605c71" dependencies: css-vendor "^0.3.8" -jss@^9.3.3, jss@^9.7.0: - version "9.8.3" - resolved "https://registry.yarnpkg.com/jss/-/jss-9.8.3.tgz#399da571c4b2c8f4cf418ca7e8627e44fc287fc8" +jss@^9.3.3: + version "9.8.7" + resolved "https://registry.yarnpkg.com/jss/-/jss-9.8.7.tgz#ed9763fc0f2f0260fc8260dac657af61e622ce05" dependencies: is-in-browser "^1.1.3" symbol-observable "^1.1.0" @@ -6783,7 +6761,13 @@ longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1: +loose-envify@^1.0.0, loose-envify@^1.3.1, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +loose-envify@^1.1.0, loose-envify@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" dependencies: @@ -7172,9 +7156,9 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -mui-table@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/mui-table/-/mui-table-2.1.4.tgz#d9a8a20f662d69c56021396c81d3cf8f9db598ff" +mui-table@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/mui-table/-/mui-table-2.2.0.tgz#56744c7729775f6d73388256eee67b4b0cb70a09" dependencies: classnames "^2.2.6" lodash.merge "^4.6.1" @@ -7970,8 +7954,8 @@ pn@^1.1.0: resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" popper.js@^1.14.1: - version "1.14.3" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.3.tgz#1438f98d046acf7b4d78cd502bf418ac64d4f095" + version "1.14.4" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.4.tgz#8eec1d8ff02a5a3a152dd43414a15c7b79fd69b6" popper.js@^1.14.2: version "1.14.2" @@ -8425,7 +8409,7 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@^15, prop-types@^15.5.6, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1: +prop-types@^15, prop-types@^15.5.6, prop-types@^15.5.7: version "15.6.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" dependencies: @@ -8441,7 +8425,7 @@ prop-types@^15.5.10, prop-types@^15.5.4: loose-envify "^1.3.1" object-assign "^4.1.1" -prop-types@^15.6.2: +prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2: version "15.6.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" dependencies: @@ -8655,10 +8639,10 @@ react-event-listener@^0.5.1: warning "^3.0.0" react-event-listener@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/react-event-listener/-/react-event-listener-0.6.2.tgz#df405e9578be052b77a76e4c3914686637caecff" + version "0.6.4" + resolved "https://registry.yarnpkg.com/react-event-listener/-/react-event-listener-0.6.4.tgz#d0ea5ed897da1a796616c44b5a8758898140f203" dependencies: - "@babel/runtime" "7.0.0-beta.42" + "@babel/runtime" "7.0.0" prop-types "^15.6.0" warning "^4.0.1" @@ -8695,15 +8679,9 @@ react-input-autosize@^2.2.1: dependencies: prop-types "^15.5.8" -react-jss@^8.1.0: - version "8.5.1" - resolved "https://registry.yarnpkg.com/react-jss/-/react-jss-8.5.1.tgz#f97c72f6a1c86aa6408932a2a2836ce40c0ab9fc" - dependencies: - hoist-non-react-statics "^2.5.0" - jss "^9.7.0" - jss-preset-default "^4.3.0" - prop-types "^15.6.0" - theming "^1.3.0" +react-is@^16.3.2: + version "16.6.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.0.tgz#456645144581a6e99f6816ae2bd24ee94bdd0c01" react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4: version "3.0.4" @@ -8826,12 +8804,13 @@ react-transition-group@^1.2.1: warning "^3.0.0" react-transition-group@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.3.1.tgz#31d611b33e143a5e0f2d94c348e026a0f3b474b6" + version "2.5.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.5.0.tgz#70bca0e3546102c4dc5cf3f5f57f73447cce6874" dependencies: dom-helpers "^3.3.1" - loose-envify "^1.3.1" - prop-types "^15.6.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + react-lifecycles-compat "^3.0.4" react@^16.3.0: version "16.4.1" @@ -8976,6 +8955,17 @@ realpath-native@^1.0.0: dependencies: util.promisify "^1.0.0" +"recompose@0.28.0 - 0.30.0": + version "0.30.0" + resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.30.0.tgz#82773641b3927e8c7d24a0d87d65aeeba18aabd0" + dependencies: + "@babel/runtime" "^7.0.0" + change-emitter "^0.1.2" + fbjs "^0.8.1" + hoist-non-react-statics "^2.3.1" + react-lifecycles-compat "^3.0.2" + symbol-observable "^1.0.4" + recompose@^0.26.0: version "0.26.0" resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.26.0.tgz#9babff039cb72ba5bd17366d55d7232fbdfb2d30" @@ -8996,11 +8986,11 @@ recompose@^0.27.1: react-lifecycles-compat "^3.0.2" symbol-observable "^1.0.4" -recompose@^0.28.0: - version "0.28.2" - resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.28.2.tgz#19e679227bdf979e0d31b73ffe7ae38c9194f4a7" +recompose@^0.29.0: + version "0.29.0" + resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.29.0.tgz#f1a4e20d5f24d6ef1440f83924e821de0b1bccef" dependencies: - "@babel/runtime" "7.0.0-beta.56" + "@babel/runtime" "^7.0.0" change-emitter "^0.1.2" fbjs "^0.8.1" hoist-non-react-statics "^2.3.1" @@ -10565,15 +10555,6 @@ text-table@^0.2.0, text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" -theming@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/theming/-/theming-1.3.0.tgz#286d5bae80be890d0adc645e5ca0498723725bdc" - dependencies: - brcast "^3.0.1" - is-function "^1.0.1" - is-plain-object "^2.0.1" - prop-types "^15.5.8" - throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" @@ -10798,7 +10779,11 @@ typescript@^2.5.1: version "2.8.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170" -ua-parser-js@^0.7.18, ua-parser-js@^0.7.9: +ua-parser-js@^0.7.18: + version "0.7.19" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b" + +ua-parser-js@^0.7.9: version "0.7.18" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" @@ -11185,8 +11170,8 @@ warning@^3.0.0: loose-envify "^1.0.0" warning@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.1.tgz#66ce376b7fbfe8a887c22bdf0e7349d73d397745" + version "4.0.2" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.2.tgz#aa6876480872116fa3e11d434b0d0d8d91e44607" dependencies: loose-envify "^1.0.0" @@ -11366,8 +11351,8 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: iconv-lite "0.4.19" whatwg-fetch@>=0.10.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" whatwg-url@^6.4.0: version "6.4.0" From 3ed433c7112b5613316c419241aac65b3196b9d9 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Mon, 5 Nov 2018 16:37:33 -0600 Subject: [PATCH 03/14] increase height of progress bar --- app/components/DBLEntryRow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/DBLEntryRow.js b/app/components/DBLEntryRow.js index 584fec5463..7fac3df07a 100644 --- a/app/components/DBLEntryRow.js +++ b/app/components/DBLEntryRow.js @@ -473,7 +473,7 @@ class DBLEntryRow extends PureComponent { className="row" style={{ marginLeft: '20px', marginRight: '20px', paddingBottom: '10px' }} > - +
)} {isSelected && ( From 42f70fca78b5562ffaf790f438de5b0d0fd0fcb2 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Mon, 5 Nov 2018 17:07:54 -0600 Subject: [PATCH 04/14] begin adding upload queue --- app/actions/bundle.actions.js | 29 +++++++++++++++++++++++++++++ app/components/DblDotLocalAppBar.js | 29 +++++++++++++++++++++++------ app/constants/bundle.constants.js | 1 + app/reducers/bundles.reducer.js | 7 +++++++ app/services/bundle.service.js | 13 ++++++++++++- 5 files changed, 72 insertions(+), 7 deletions(-) diff --git a/app/actions/bundle.actions.js b/app/actions/bundle.actions.js index ae1867fef2..d84fb853d3 100644 --- a/app/actions/bundle.actions.js +++ b/app/actions/bundle.actions.js @@ -197,6 +197,7 @@ export function setupBundlesEventSource() { 'downloader/receiver': listenDownloaderReceiver, 'downloader/spec_status': (e) => dispatch(listenDownloaderSpecStatus(e)), 'downloader/global_status': (e) => dispatch(listenDownloaderGlobalStatus(e)), + 'uploader/global_status': (e) => dispatch(listenUploaderGlobalStatus(e)), 'storer/delete_resource': (e) => listenStorerDeleteResource(e, dispatch, getState), 'storer/delete_bundle': (e) => listenStorerDeleteBundle(e, dispatch, getState), 'storer/write_resource': (e) => dispatch(listenStorerWriteResource(e)) @@ -216,6 +217,15 @@ export function setupBundlesEventSource() { return updateDownloadQueue(nSpecs, nAtoms); } + /* + * data:{"args": [1, 11], "component": "uploader", "type": "global_status"} + */ + function listenUploaderGlobalStatus(e) { + const data = JSON.parse(e.data); + const [nAtoms] = data.args; + return updateUploadQueue(1, nAtoms); + } + function listenStorerExecuteTaskDownloadResources() { // console.log(e); } @@ -458,6 +468,12 @@ function updateDownloadQueue(nSpecs, nAtoms) { }; } +function updateUploadQueue(nSpecs, nAtoms) { + return (dispatch) => { + dispatch({ type: bundleConstants.UPDATE_UPLOAD_QUEUE, nSpecs, nAtoms }); + }; +} + export function fetchDownloadQueueCounts() { return async dispatch => { try { @@ -471,6 +487,19 @@ export function fetchDownloadQueueCounts() { }; } +export function fetchUploadQueueCounts() { + return async dispatch => { + try { + const uploadQueueList = await bundleService.getSubsystemUploadQueue(); + const nSpecs = Object.keys(uploadQueueList).length; + const nAtoms = uploadQueueList.reduce((acc, spec) => acc + spec.n_atoms, 0); + return dispatch(updateUploadQueue(nSpecs, nAtoms)); + } catch (error) { + log.error(error); + } + }; +} + function getAddedBundle(getState, bundleId) { const { bundles } = getState(); const { addedByBundleIds = {} } = bundles; diff --git a/app/components/DblDotLocalAppBar.js b/app/components/DblDotLocalAppBar.js index 8327f899b7..d52460fe5a 100644 --- a/app/components/DblDotLocalAppBar.js +++ b/app/components/DblDotLocalAppBar.js @@ -8,12 +8,16 @@ import Tooltip from '@material-ui/core/Tooltip'; import Typography from '@material-ui/core/Typography'; import ListIcon from '@material-ui/icons/List'; import ArrowDownwardIcon from '@material-ui/icons/ArrowDownward'; +import ArrowUpwardIcon from '@material-ui/icons/ArrowUpward'; -import { fetchDownloadQueueCounts } from '../actions/bundle.actions'; +import { fetchDownloadQueueCounts, fetchUploadQueueCounts } from '../actions/bundle.actions'; function mapStateToProps(state) { const { bundlesFilter, bundles } = state; - const { downloadQueue = { nSpecs: 0, nAtoms: 0 } } = bundles; + const { + downloadQueue = { nSpecs: 0, nAtoms: 0 }, + uploadQueue = { nSpecs: 0, nAtoms: 0 } + } = bundles; const { isSearchActive, searchResults } = bundlesFilter; const entriesMatching = (isSearchActive && searchResults) ? Object.keys(searchResults.bundlesMatching) : []; const entries = bundles.items; @@ -21,12 +25,14 @@ function mapStateToProps(state) { entries, entriesMatching, isSearchActive, - downloadQueue + downloadQueue, + uploadQueue }; } const mapDispatchToProps = { - fetchDownloadQueueCounts + fetchDownloadQueueCounts, + fetchUploadQueueCounts }; type Props = { @@ -35,7 +41,9 @@ type Props = { entriesMatching: [], isSearchActive: boolean, downloadQueue: {}, - fetchDownloadQueueCounts: () => {} + uploadQueue: {}, + fetchDownloadQueueCounts: () => {}, + fetchUploadQueueCounts: () => {} }; const styles = theme => ({ @@ -65,11 +73,12 @@ class DblDotLocalAppBar extends React.PureComponent { componentDidMount() { this.props.fetchDownloadQueueCounts(); + this.props.fetchUploadQueueCounts(); } render() { const { - classes, entries, entriesMatching, isSearchActive, downloadQueue + classes, entries, entriesMatching, isSearchActive, downloadQueue, uploadQueue } = this.props; return ( @@ -88,6 +97,14 @@ class DblDotLocalAppBar extends React.PureComponent {
+ +
+ + + {uploadQueue.nSpecs}/{uploadQueue.nAtoms} + +
+
diff --git a/app/constants/bundle.constants.js b/app/constants/bundle.constants.js index b59d97c1db..c339ff9bbd 100644 --- a/app/constants/bundle.constants.js +++ b/app/constants/bundle.constants.js @@ -37,6 +37,7 @@ export const bundleConstants = { REMOVE_RESOURCES_FAILURE: 'BUNDLES_REMOVE_RESOURCES_FAILURE', UPDATE_DOWNLOAD_QUEUE: 'BUNDLES_UPDATE_DOWNLOAD_QUEUE', + UPDATE_UPLOAD_QUEUE: 'BUNDLES_UPDATE_UPLOAD_QUEUE', SAVETO_REQUEST: 'BUNDLES_SAVETO_REQUEST', SAVETO_UPDATED: 'BUNDLES_SAVETO_UPDATED', diff --git a/app/reducers/bundles.reducer.js b/app/reducers/bundles.reducer.js index cbc7edca63..ae6d51e36f 100644 --- a/app/reducers/bundles.reducer.js +++ b/app/reducers/bundles.reducer.js @@ -164,6 +164,13 @@ export function bundles(state = { items: [], allBundles: [] }, action) { downloadQueue: { nSpecs, nAtoms } }; } + case bundleConstants.UPDATE_UPLOAD_QUEUE: { + const { nSpecs, nAtoms } = action; + return { + ...state, + uploadQueue: { nSpecs, nAtoms } + }; + } case bundleConstants.DOWNLOAD_RESOURCES_REQUEST: { return updateTaskStatusProgress(action.id, 'DOWNLOAD', 'IN_PROGRESS', 0); } diff --git a/app/services/bundle.service.js b/app/services/bundle.service.js index 5a9d7399ea..6a44350618 100644 --- a/app/services/bundle.service.js +++ b/app/services/bundle.service.js @@ -52,7 +52,8 @@ export const bundleService = { updatePublications, getPublicationsInstances, getSubSectionInstances, - getSubsystemDownloadQueue + getSubsystemDownloadQueue, + getSubsystemUploadQueue }; export default bundleService; @@ -311,6 +312,16 @@ function getSubsystemDownloadQueue() { return fetch(url, requestOptions).then(handleResponse); } +/* /subsystem/download/queue */ +function getSubsystemUploadQueue() { + const requestOptions = { + method: 'GET', + headers: authHeader() + }; + const url = `${dblDotLocalConfigConstants.getHttpDblDotLocalBaseUrl()}/${SUBSYSTEM_API}/upload/queue`; + return fetch(url, requestOptions).then(handleResponse); +} + function removeResources(bundleId) { return bundleAddTasks(bundleId, ''); } From c207aa527ccac4c1e32c47472b5e07a249468124 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Tue, 6 Nov 2018 11:10:09 -0600 Subject: [PATCH 05/14] fix startWaitUntil ensureLoadHtmlBaseUrl --- app/components/LoginForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/LoginForm.js b/app/components/LoginForm.js index fd40a29ca8..05bcfb4825 100644 --- a/app/components/LoginForm.js +++ b/app/components/LoginForm.js @@ -62,7 +62,7 @@ class LoginForm extends React.Component { } - async startWaitUntil() { + startWaitUntil = async () => { await wait.every(3000).and(this.ensureLoadHtmlBaseUrl).until(this.isDblBaseUrlReady); } From 7d18a0ebb453be3e6649d4967c84f31a4f9c4e42 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Tue, 6 Nov 2018 12:04:21 -0600 Subject: [PATCH 06/14] try to rework eventSource to be more compatible with hot reloading --- app/actions/bundle.actions.js | 16 +++++----- app/actions/user.actions.js | 5 ++-- app/constants/bundle.constants.js | 2 -- app/constants/user.constants.js | 2 ++ app/reducers/authentication.reducer.js | 9 +++++- app/services/dbl_dot_local.service.js | 41 +++++++++++--------------- 6 files changed, 39 insertions(+), 36 deletions(-) diff --git a/app/actions/bundle.actions.js b/app/actions/bundle.actions.js index d84fb853d3..a1d18b1533 100644 --- a/app/actions/bundle.actions.js +++ b/app/actions/bundle.actions.js @@ -5,7 +5,6 @@ import throttledQueue from 'throttled-queue'; import { bundleConstants } from '../constants/bundle.constants'; import { bundleService } from '../services/bundle.service'; import { updateSearchResultsForBundleId } from '../actions/bundleFilter.actions'; -import { dblDotLocalConfig } from '../constants/dblDotLocal.constants'; import { history } from '../store/configureStore'; import { navigationConstants } from '../constants/navigation.constants'; import { dblDotLocalService } from '../services/dbl_dot_local.service'; @@ -189,6 +188,11 @@ export function createNewBundle(_medium) { export function setupBundlesEventSource() { return (dispatch, getState) => { + const { authentication: { eventSource } } = getState(); + if (!eventSource) { + console.error('EventSource undefined'); + return; + } const listeners = { 'storer/execute_task': listenStorerExecuteTaskDownloadResources, 'storer/change_mode': (e) => dispatch(listenStorerChangeMode(e)), @@ -204,7 +208,7 @@ export function setupBundlesEventSource() { }; Object.keys(listeners).forEach((evType) => { const handler = listeners[evType]; - dblDotLocalService.eventSourceStore().addEventListener(evType, handler); + eventSource.addEventListener(evType, handler); }); }; @@ -218,12 +222,10 @@ export function setupBundlesEventSource() { } /* - * data:{"args": [1, 11], "component": "uploader", "type": "global_status"} + * data:{"args": [11], "component": "uploader", "type": "global_status"} */ - function listenUploaderGlobalStatus(e) { - const data = JSON.parse(e.data); - const [nAtoms] = data.args; - return updateUploadQueue(1, nAtoms); + function listenUploaderGlobalStatus() { + return fetchUploadQueueCounts(); } function listenStorerExecuteTaskDownloadResources() { diff --git a/app/actions/user.actions.js b/app/actions/user.actions.js index ec20613998..8dfa882ba6 100644 --- a/app/actions/user.actions.js +++ b/app/actions/user.actions.js @@ -60,9 +60,10 @@ function login(username, password, _workspaceName) { return { type: userConstants.LOGIN_FAILURE, error }; } function connectSSE(authToken) { - return () => { + return dispatch => { console.log(`SSE connect to Bundles: ${authToken}`); - dblDotLocalService.eventSourceStore().startEventSource(authToken); + const eventSource = dblDotLocalService.startEventSource(authToken); + dispatch({ type: userConstants.SERVER_SENT_EVENTS_SOURCE_CREATED, eventSource }); }; } } diff --git a/app/constants/bundle.constants.js b/app/constants/bundle.constants.js index c339ff9bbd..44f2bff1cb 100644 --- a/app/constants/bundle.constants.js +++ b/app/constants/bundle.constants.js @@ -26,8 +26,6 @@ export const bundleConstants = { UPDATE_UPLOAD_JOBS: 'BUNDLES_UPLOAD_UPDATE_JOBS', - SESSION_EVENTS_CONNECTED: 'BUNDLES_SESSION_EVENTS_CONNECTED', - DOWNLOAD_RESOURCES_REQUEST: 'BUNDLES_DOWNLOAD_RESOURCES_REQUEST', DOWNLOAD_RESOURCES_UPDATED: 'BUNDLES_DOWNLOAD_RESOURCES_UPDATED', DOWNLOAD_RESOURCES_FAILURE: 'BUNDLES_DOWNLOAD_RESOURCES_FAILURE', diff --git a/app/constants/user.constants.js b/app/constants/user.constants.js index 12f8be306f..115d90d98a 100644 --- a/app/constants/user.constants.js +++ b/app/constants/user.constants.js @@ -18,6 +18,8 @@ export const userConstants = { DELETE_REQUEST: 'USERS_DELETE_REQUEST', DELETE_SUCCESS: 'USERS_DELETE_SUCCESS', DELETE_FAILURE: 'USERS_DELETE_FAILURE', + + SERVER_SENT_EVENTS_SOURCE_CREATED: 'USERS_SERVER_SENT_EVENTS_SOURCE_CREATED', }; export default userConstants; diff --git a/app/reducers/authentication.reducer.js b/app/reducers/authentication.reducer.js index 7938e7be57..f723653a7f 100644 --- a/app/reducers/authentication.reducer.js +++ b/app/reducers/authentication.reducer.js @@ -1,7 +1,8 @@ import { userConstants } from '../constants'; const user = JSON.parse(localStorage.getItem('user')); -const initialState = user ? { loggedIn: true, user } : { loggedIn: false }; +const initialState = user ? + { loggedIn: true, user } : { loggedIn: false }; export function authentication(state = initialState, action) { switch (action.type) { @@ -36,6 +37,12 @@ export function authentication(state = initialState, action) { loggedOut: true, error: action.error }; + case userConstants.SERVER_SENT_EVENTS_SOURCE_CREATED: { + return { + ...state, + eventSource: action.eventSource + }; + } default: return state; } diff --git a/app/services/dbl_dot_local.service.js b/app/services/dbl_dot_local.service.js index 50eed113dc..49d92b2672 100644 --- a/app/services/dbl_dot_local.service.js +++ b/app/services/dbl_dot_local.service.js @@ -8,29 +8,6 @@ import { authHeader } from '../helpers'; // import { history } from '../store/configureStore'; // import { navigationConstants } from '../constants/navigation.constants'; -let eventSource: EventSource; -const eventSourceStore = () => { - return { - startEventSource(authToken) { - eventSource = new EventSource(`${dblDotLocalConstants.getHttpDblDotLocalBaseUrl()}/events/${authToken}`); - eventSource.onmessage = (event) => { - console.log(event); - }; - eventSource.onopen = () => { - console.log('Connection to event source opened.'); - }; - eventSource.onerror = (error) => { - console.log('EventSource error.'); - console.log(error); - log.error(JSON.stringify(error.data)); - }; - }, - addEventListener(evType, handler) { - eventSource.addEventListener(evType, handler); - } - }; -}; - export const dblDotLocalService = { health, htmlBaseUrl, @@ -47,7 +24,7 @@ export const dblDotLocalService = { convertConfigXmlToJson, updateConfigXmlWithNewPaths, updateAndWriteConfigXmlSettings, - eventSourceStore + startEventSource }; export default dblDotLocalService; @@ -330,3 +307,19 @@ function updateAndWriteConfigXmlSettings({ configXmlSettings, workspace }) { console.log(xml); return { xml, configXmlSettings: newConfigXmlSettings }; } + +function startEventSource(authToken) { + const eventSource = new EventSource(`${dblDotLocalConstants.getHttpDblDotLocalBaseUrl()}/events/${authToken}`); + eventSource.onmessage = (event) => { + console.log(event); + }; + eventSource.onopen = () => { + console.log('Connection to event source opened.'); + }; + eventSource.onerror = (error) => { + console.log('EventSource error.'); + console.log(error); + log.error(JSON.stringify(error.data)); + }; + return eventSource; +} From b75969f803e90d39ecd52b8bb788c816aa45ce8d Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Tue, 6 Nov 2018 14:07:03 -0600 Subject: [PATCH 07/14] indicate how many atoms are left to upload --- app/actions/bundle.actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/actions/bundle.actions.js b/app/actions/bundle.actions.js index a1d18b1533..08dbd73229 100644 --- a/app/actions/bundle.actions.js +++ b/app/actions/bundle.actions.js @@ -494,7 +494,7 @@ export function fetchUploadQueueCounts() { try { const uploadQueueList = await bundleService.getSubsystemUploadQueue(); const nSpecs = Object.keys(uploadQueueList).length; - const nAtoms = uploadQueueList.reduce((acc, spec) => acc + spec.n_atoms, 0); + const nAtoms = uploadQueueList.reduce((acc, spec) => acc + (spec.n_atoms - spec.n_uploaded), 0); return dispatch(updateUploadQueue(nSpecs, nAtoms)); } catch (error) { log.error(error); From 3f06fb07697792f9bf4fa4376f204932a39d183b Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Tue, 6 Nov 2018 14:19:20 -0600 Subject: [PATCH 08/14] only show atoms remaining to download --- app/actions/bundle.actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/actions/bundle.actions.js b/app/actions/bundle.actions.js index 08dbd73229..e6350a55b1 100644 --- a/app/actions/bundle.actions.js +++ b/app/actions/bundle.actions.js @@ -481,7 +481,7 @@ export function fetchDownloadQueueCounts() { try { const downloadQueueList = await bundleService.getSubsystemDownloadQueue(); const nSpecs = Object.keys(downloadQueueList).length; - const nAtoms = downloadQueueList.reduce((acc, spec) => acc + spec.n_atoms, 0); + const nAtoms = downloadQueueList.reduce((acc, spec) => acc + (spec.n_atoms - spec.n_downloaded), 0); return dispatch(updateDownloadQueue(nSpecs, nAtoms)); } catch (error) { log.error(error); From be96fc69e9f492d28b00a513edd9bf44dc899df8 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Tue, 6 Nov 2018 15:09:02 -0600 Subject: [PATCH 09/14] show decimal for downloads --- app/reducers/bundleResourceManager.reducer.js | 3 ++- app/reducers/bundles.reducer.js | 15 ++++++--------- app/utils/utilities.js | 7 ++++++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/reducers/bundleResourceManager.reducer.js b/app/reducers/bundleResourceManager.reducer.js index 5cc44828f4..b146cc96b4 100644 --- a/app/reducers/bundleResourceManager.reducer.js +++ b/app/reducers/bundleResourceManager.reducer.js @@ -1,4 +1,5 @@ import { bundleResourceManagerConstants } from '../constants/bundleResourceManager.constants'; +import { utilities } from '../utils/utilities'; const initialState = { bundleId: null, @@ -51,7 +52,7 @@ export function bundleManageResources(state = initialState, action) { const filesCompleted = [...filesCompletedPrev, filePath]; const filesDone = filesCompleted.length; const filesTotal = Object.keys(fileToContainerPaths).length; - const progress = Math.floor((filesDone / filesTotal) * 100); + const progress = utilities.calculatePercentage(filesDone, filesTotal); const loading = state.loading && filesDone < filesTotal; return { ...state, diff --git a/app/reducers/bundles.reducer.js b/app/reducers/bundles.reducer.js index ae6d51e36f..b1a55bb391 100644 --- a/app/reducers/bundles.reducer.js +++ b/app/reducers/bundles.reducer.js @@ -2,6 +2,7 @@ import sort from 'fast-sort'; import { List, Set } from 'immutable'; import { bundleConstants } from '../constants/bundle.constants'; import { bundleService } from '../services/bundle.service'; +import { utilities } from '../utils/utilities'; const [idKey] = ['id']; @@ -175,7 +176,7 @@ export function bundles(state = { items: [], allBundles: [] }, action) { return updateTaskStatusProgress(action.id, 'DOWNLOAD', 'IN_PROGRESS', 0); } case bundleConstants.DOWNLOAD_RESOURCES_UPDATED: { - const progress = Math.floor((action.resourcesDownloaded / action.resourcesToDownload) * 100); + const progress = utilities.calculatePercentage(action.resourcesDownloaded, action.resourcesToDownload); const status = progress === 100 ? 'COMPLETED' : 'IN_PROGRESS'; return updateTaskStatusProgress(action.id, 'DOWNLOAD', status, progress); } @@ -186,7 +187,7 @@ export function bundles(state = { items: [], allBundles: [] }, action) { } case bundleConstants.UPLOAD_RESOURCES_UPDATE_PROGRESS: { const percentage = action.resourceCountToUpload > 0 ? - Math.floor((action.resourceCountUploaded / action.resourceCountToUpload) * 100) : + utilities.calculatePercentage(action.resourceCountUploaded, action.resourceCountToUpload) : 100/* metadata only */; return updateTaskStatusProgress(action.bundleId, 'UPLOAD', 'IN_PROGRESS', percentage, () => ({ isUploading: true @@ -202,7 +203,7 @@ export function bundles(state = { items: [], allBundles: [] }, action) { return updateTaskStatusProgress(action.id, 'SAVETO', 'IN_PROGRESS', 0); } case bundleConstants.SAVETO_UPDATED: { - const progress = calcProgress(action.bundleBytesSaved, action.bundleBytesToSave); + const progress = utilities.calculatePercentage(action.bundleBytesSaved, action.bundleBytesToSave); const status = progress === 100 ? 'COMPLETED' : 'IN_PROGRESS'; const { apiBundle } = action; if (status === 'COMPLETED') { @@ -229,7 +230,7 @@ export function bundles(state = { items: [], allBundles: [] }, action) { const resourcesRemoved = originalResourceRemoved.includes(resourceToRemove) ? resourcesRemoved : [...originalResourceRemoved, resourceToRemove]; const resourcesToRemove = bundle.resourcesToRemove || [...resourcesRemoved, 'unknown']; - const progress = calcProgress(resourcesRemoved.length, resourcesToRemove.length); + const progress = utilities.calculatePercentage(resourcesRemoved.length, resourcesToRemove.length); const hasCompletedRemovingResources = progress === 100; const task = hasCompletedRemovingResources ? 'DOWNLOAD' : bundle.task; const status = hasCompletedRemovingResources ? 'NOT_STARTED' : bundle.status; @@ -270,10 +271,6 @@ export function bundles(state = { items: [], allBundles: [] }, action) { return state; } - function calcProgress(itemsDone, itemsToDo) { - return Math.floor((itemsDone / itemsToDo) * 100); - } - function updateTaskStatusProgress(bundleId, task, status, progress, updateDecorators) { const allBundles = updateBundleItems(bundleId, task, status, progress, updateDecorators); const { items } = sortAndFilterBundlesAsEntries(allBundles, false); @@ -292,7 +289,7 @@ export function bundles(state = { items: [], allBundles: [] }, action) { ...bundle, task: (task || bundle.task), status: (status || bundle.status), - progress: Number.isInteger(progress) ? progress : bundle.progress + progress: typeof progress === 'number' ? progress : bundle.progress // could be 'COMPLETED' }, updateDecorators); } diff --git a/app/utils/utilities.js b/app/utils/utilities.js index 6c230af5d8..7bc44716af 100644 --- a/app/utils/utilities.js +++ b/app/utils/utilities.js @@ -11,7 +11,8 @@ export const utilities = { sleep, union, difference, - buildRouteUrl + buildRouteUrl, + calculatePercentage }; export default utilities; @@ -72,3 +73,7 @@ function buildRouteUrl(routeUrl, params) { ); return url; } + +function calculatePercentage(completed, total) { + return parseFloat(((completed / total) * 100).toFixed(2)); +} From 43e71ddc5d97b9dd1071bd1bcc6a4a38c47f4528 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Tue, 6 Nov 2018 16:18:02 -0600 Subject: [PATCH 10/14] update upload/download queue statuses whenever an atom/file is transferred --- app/actions/bundle.actions.js | 5 ++++- app/reducers/bundles.reducer.js | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/actions/bundle.actions.js b/app/actions/bundle.actions.js index e6350a55b1..36b261ff6b 100644 --- a/app/actions/bundle.actions.js +++ b/app/actions/bundle.actions.js @@ -284,7 +284,9 @@ export function setupBundlesEventSource() { const [entryId, jobId, payload] = nextArgs; const bundleId = uploadJobs[jobId]; const [resourceCountToUpload, resourceCountUploaded] = [payload[0], payload[5]]; - return dispatch(updateUploadProgress(bundleId, entryId, jobId, resourceCountUploaded, resourceCountToUpload)); + dispatch(updateUploadProgress(bundleId, entryId, jobId, resourceCountUploaded, resourceCountToUpload)); + dispatch(fetchUploadQueueCounts()); + return; } if (type === 'state' || type === 'status') { const [jobId, payload] = nextArgs; @@ -341,6 +343,7 @@ export function setupBundlesEventSource() { } dispatch(updateDownloadStatus(bundleId, resourcesDownloaded, resourcesToDownload)); dispatch(updateSearchResultsForBundleId(bundleId)); + dispatch(fetchDownloadQueueCounts()); }; } diff --git a/app/reducers/bundles.reducer.js b/app/reducers/bundles.reducer.js index b1a55bb391..91fb2d990e 100644 --- a/app/reducers/bundles.reducer.js +++ b/app/reducers/bundles.reducer.js @@ -285,11 +285,12 @@ export function bundles(state = { items: [], allBundles: [] }, action) { } function updateBundleItem(bundle, task, status, progress, updateDecorators) { + const newProgress = (typeof progress === 'number' ? progress : bundle.progress); // could be 'COMPLETED' return addBundleDecorators({ ...bundle, task: (task || bundle.task), status: (status || bundle.status), - progress: typeof progress === 'number' ? progress : bundle.progress // could be 'COMPLETED' + progress: newProgress }, updateDecorators); } From a83d598f30bc245b8887a24e51079c18566c2d8d Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Wed, 7 Nov 2018 11:59:40 -0600 Subject: [PATCH 11/14] close eventSource if process is shutdown --- app/actions/user.actions.js | 1 - app/services/dbl_dot_local.service.js | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/actions/user.actions.js b/app/actions/user.actions.js index 8dfa882ba6..dac14b0efd 100644 --- a/app/actions/user.actions.js +++ b/app/actions/user.actions.js @@ -61,7 +61,6 @@ function login(username, password, _workspaceName) { } function connectSSE(authToken) { return dispatch => { - console.log(`SSE connect to Bundles: ${authToken}`); const eventSource = dblDotLocalService.startEventSource(authToken); dispatch({ type: userConstants.SERVER_SENT_EVENTS_SOURCE_CREATED, eventSource }); }; diff --git a/app/services/dbl_dot_local.service.js b/app/services/dbl_dot_local.service.js index 49d92b2672..4f266fb02c 100644 --- a/app/services/dbl_dot_local.service.js +++ b/app/services/dbl_dot_local.service.js @@ -310,6 +310,7 @@ function updateAndWriteConfigXmlSettings({ configXmlSettings, workspace }) { function startEventSource(authToken) { const eventSource = new EventSource(`${dblDotLocalConstants.getHttpDblDotLocalBaseUrl()}/events/${authToken}`); + console.log(`SSE connected: ${authToken}`); eventSource.onmessage = (event) => { console.log(event); }; @@ -319,7 +320,11 @@ function startEventSource(authToken) { eventSource.onerror = (error) => { console.log('EventSource error.'); console.log(error); - log.error(JSON.stringify(error.data)); + const evtSource = error.currentTarget; + if (evtSource.readyState !== 2) { + evtSource.close(); + console.log('session EventSource closed'); + } }; return eventSource; } From b321e62a4a4b5eb11bf7e2e1a1124f78c06ecaf1 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Wed, 7 Nov 2018 16:40:50 -0600 Subject: [PATCH 12/14] add more sort criteria --- app/reducers/bundles.reducer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/reducers/bundles.reducer.js b/app/reducers/bundles.reducer.js index 91fb2d990e..ecd0662095 100644 --- a/app/reducers/bundles.reducer.js +++ b/app/reducers/bundles.reducer.js @@ -23,6 +23,8 @@ function sortAndFilterBundlesAsEntries(allBundles, shouldIndexByIds = true) { const items = sort(reducedUnsorted).asc([ b => b.displayAs.languageAndCountry, b => b.displayAs.name, + b => b.displayAs.revision, + b => b.displayAs.status ]); const addedByBundleIds = shouldIndexByIds ? indexBy(sortedBundles, idKey) : null; return { items, addedByBundleIds }; From 1a53493267d6c5eb2bd0142bd6e343eb835729c4 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Wed, 7 Nov 2018 16:48:02 -0600 Subject: [PATCH 13/14] bump version to v.0.14.0 --- CHANGELOG.md | 12 ++++++++++++ app/package-lock.json | 2 +- app/package.json | 2 +- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f58f12584e..70c0ecfb93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +### Version 0.14.0 +#### Features +- increase height of progress bar +- added upload queue status +- update download/upload queue status whenever file transfers +- show demimals for upload/download progress +#### Fixes +- rename Atoms to Resources in download queue tooltip +- fix eventSource to shutdown after killing dbl_dot_local_app process +- Show files remaining to download in initial download queue status +- try keep (revision 0) bundles sorted in a more stable order + ### Version 0.13.2 - Update dbl_dot_local_app to latest (11-02-2018) - Skip calculating checksums for files over 250MB diff --git a/app/package-lock.json b/app/package-lock.json index 42ea454ab6..01f0c33bcf 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,5 +1,5 @@ { "name": "nathanael", - "version": "0.13.2", + "version": "0.14.0", "lockfileVersion": 1 } diff --git a/app/package.json b/app/package.json index 5f46a54c90..022866a01d 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "nathanael", "productName": "nathanael", - "version": "0.13.2", + "version": "0.14.0", "description": "Electron frontend to DBL dot Local", "main": "./main.prod.js", "author": { diff --git a/package-lock.json b/package-lock.json index a51cb40fb0..55fe378bc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nathanael", - "version": "0.13.2", + "version": "0.14.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d5f494435b..28ff4114e3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nathanael", "productName": "nathanael", - "version": "0.13.2", + "version": "0.14.0", "description": "Electron frontend to DBL dot Local", "scripts": { "build": "concurrently \"npm run build-main\" \"npm run build-renderer\"", From 1f14f7545b9b4e16537c7e0b99dad205683a76f0 Mon Sep 17 00:00:00 2001 From: Eric Pyle Date: Wed, 7 Nov 2018 16:49:43 -0600 Subject: [PATCH 14/14] add fix video/audio templates to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70c0ecfb93..eb6abb33e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - update download/upload queue status whenever file transfers - show demimals for upload/download progress #### Fixes +- dbl_dot_local_app video and audio templates - rename Atoms to Resources in download queue tooltip - fix eventSource to shutdown after killing dbl_dot_local_app process - Show files remaining to download in initial download queue status