diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000000..2675ce18e2 --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,129 @@ +version: '2.4' + +services: + postgres: + image: postgres:12.6 + command: postgres -c listen_addresses='*' + environment: + - PGPORT=5433 + - POSTGRES_PASSWORD=docker-compose-postgres-password + volumes: + - ./data/postgres:/var/lib/postgresql/data + healthcheck: + test: pg_isready -h postgres -U postgres + interval: 5s + timeout: 10s + retries: 100 + + redis: + image: gcr.io/seqr-project/redis:gcloud-prod + healthcheck: + test: redis-cli ping + interval: 3s + timeout: 5s + retries: 100 + + # elasticsearch: + # image: docker.elastic.co/elasticsearch/elasticsearch:7.16.3 + # volumes: + # - /mnt/hpf/data/elasticsearch:/usr/share/elasticsearch/data + # container_name: elasticsearch + # environment: + # - http.host=0.0.0.0 + # - discovery.type=single-node + # - cluster.routing.allocation.disk.threshold_enabled=false + # healthcheck: + # test: bash -c "curl -s elasticsearch:9200/_cat/health | grep green" + # interval: 3s + # timeout: 5s + # retries: 100 + # ports: + # - 9200:9200 + +# kibana: +# image: docker.elastic.co/kibana/kibana:7.16.3 +# environment: +# - ELASTICSEARCH_HOSTS=http://elasticsearch:9200 +# depends_on: +# elasticsearch: +# condition: service_healthy +# healthcheck: +# test: bash -c "curl -s kibana:5601 | grep kibana" +# interval: 3s +# timeout: 5s +# retries: 100 + + seqr: + build: . + image: ccm-seqr:dev + volumes: + - /mnt/hpf/bam_files:/readviz + # - ./data/readviz:/readviz + - /mnt/hpf/data/seqr_static_files:/seqr_static_files + - ./settings.py:/seqr/settings.py + - ./gunicorn/gunicorn_config.py:/seqr/gunicorn_config.py + - ./logs/django:/var/log/django + - ./logs/gunicorn:/var/log/gunicorn + ports: + - 8000:8000 + develop: + watch: + - action: sync + path: ./ui + target: /seqr/ui + environment: + - BASE_URL=https://seqr.ccm.sickkids.ca + - SEQR_GIT_BRANCH=dev + - PYTHONPATH=/seqr + - STATIC_MEDIA_DIR=/seqr_static_files + - POSTGRES_SERVICE_HOSTNAME=postgres + - POSTGRES_SERVICE_PORT=5433 + - POSTGRES_PASSWORD=docker-compose-postgres-password + - ELASTICSEARCH_SERVICE_HOSTNAME=elasticsearch + - REDIS_SERVICE_HOSTNAME=redis + - KIBANA_SERVICE_HOSTNAME=kibana + - PGHOST=postgres + - PGPORT=5433 + - PGUSER=postgres + - GUNICORN_WORKER_THREADS=4 + - ANALYST_USER_GROUP=analyst + depends_on: + postgres: + condition: service_healthy + # elasticsearch: + # condition: service_healthy + redis: + condition: service_healthy + healthcheck: + test: bash -c "curl -s 'http://localhost:8000' | grep html" + + # pipeline-runner: + # image: gcr.io/seqr-project/pipeline-runner:20220526_130649 + # volumes: + # - /mnt/hpf/data/seqr-reference-data:/seqr-reference-data + # - /mnt/hpf/data/vep_data:/vep_data + # - /mnt/hpf/data/input_vcfs:/input_vcfs + # - ./pipeline_runner/download_reference_data.sh:/usr/local/bin/download_reference_data.sh + # - ./pipeline_runner/ensembl-vep-release-104:/ensembl-vep-release-104 + # - ./pipeline_runner/entrypoint.sh:/entrypoint.sh + # - ./pipeline_runner/update_clinvar_matrix_table.sh:/usr/local/bin/update_clinvar_matrix_table.sh + # - ./pipeline_runner/update_combined_reference_data.sh:/usr/local/bin/update_combined_reference_data.sh + # - ./pipeline_runner/vep_configs/vep-GRCh37-loftee.json:/vep_configs/vep-GRCh37-loftee.json + # - ./pipeline_runner/vep_configs/vep-GRCh38-loftee.json:/vep_configs/vep-GRCh38-loftee.json + # - ~/.config:/root/.config + # depends_on: + # elasticsearch: + # condition: service_healthy + + # nginx: + # image: nginx + # ports: + # - 80:80 + # - 443:443 + # depends_on: + # seqr: + # condition: service_healthy + # volumes: + # - ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf + # - ./nginx/certs:/etc/nginx/certs + # - ./logs/nginx:/var/log/nginx \ No newline at end of file diff --git a/ui/package-lock.json b/ui/package-lock.json index ebeb23a2dd..07348bad47 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -164,12 +164,6 @@ "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==", "dev": true }, - "node_modules/@babel/compat-data/node_modules/caniuse-lite": { - "version": "1.0.30001246", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001246.tgz", - "integrity": "sha512-Tc+ff0Co/nFNbLOrziBXmMVtpt9S2c2Y+Z9Nk9Khj09J+0zR9ejvIW5qkZAErCbOrVODCx/MN+GpB5FNBs5GFA==", - "dev": true - }, "node_modules/@babel/compat-data/node_modules/electron-to-chromium": { "version": "1.3.782", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.782.tgz", @@ -494,12 +488,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/@babel/core/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/@babel/core/node_modules/convert-source-map": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", @@ -900,12 +888,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/caniuse-lite": { - "version": "1.0.30001219", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001219.tgz", - "integrity": "sha512-c0yixVG4v9KBc/tQ2rlbB3A/bgBFRvl8h8M4IeUbqCca4gsiCfvtaheUssbnux/Mb66Vjz7x8yYjDgYcNQOhyQ==", - "dev": true - }, "node_modules/@babel/helper-compilation-targets/node_modules/electron-to-chromium": { "version": "1.3.723", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.723.tgz", @@ -3366,12 +3348,6 @@ "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==", "dev": true }, - "node_modules/@babel/preset-env/node_modules/caniuse-lite": { - "version": "1.0.30001246", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001246.tgz", - "integrity": "sha512-Tc+ff0Co/nFNbLOrziBXmMVtpt9S2c2Y+Z9Nk9Khj09J+0zR9ejvIW5qkZAErCbOrVODCx/MN+GpB5FNBs5GFA==", - "dev": true - }, "node_modules/@babel/preset-env/node_modules/electron-to-chromium": { "version": "1.3.782", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.782.tgz", @@ -5900,12 +5876,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/autoprefixer/node_modules/caniuse-lite": { - "version": "1.0.30001299", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", - "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", - "dev": true - }, "node_modules/autoprefixer/node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -6446,12 +6416,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/browserslist/node_modules/caniuse-lite": { - "version": "1.0.30001299", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", - "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", - "dev": true - }, "node_modules/browserslist/node_modules/node-releases": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", @@ -6591,12 +6555,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/caniuse-api/node_modules/browserslist/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/caniuse-api/node_modules/electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -6604,10 +6562,24 @@ "dev": true }, "node_modules/caniuse-lite": { - "version": "1.0.30000865", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000865.tgz", - "integrity": "sha512-vs79o1mOSKRGv/1pSkp4EXgl4ZviWeYReXw60XfacPU64uQWZwJT6vZNmxRF9O+6zu71sJwMxLK5JXxbzuVrLw==", - "dev": true + "version": "1.0.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "node_modules/case-sensitive-paths-webpack-plugin": { "version": "2.4.0", @@ -7188,12 +7160,6 @@ "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==", "dev": true }, - "node_modules/core-js-compat/node_modules/caniuse-lite": { - "version": "1.0.30001246", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001246.tgz", - "integrity": "sha512-Tc+ff0Co/nFNbLOrziBXmMVtpt9S2c2Y+Z9Nk9Khj09J+0zR9ejvIW5qkZAErCbOrVODCx/MN+GpB5FNBs5GFA==", - "dev": true - }, "node_modules/core-js-compat/node_modules/electron-to-chromium": { "version": "1.3.782", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.782.tgz", @@ -17604,12 +17570,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/postcss-colormin/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/postcss-colormin/node_modules/electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -17790,12 +17750,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/postcss-merge-rules/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/postcss-merge-rules/node_modules/electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -17875,12 +17829,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/postcss-minify-params/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/postcss-minify-params/node_modules/electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -18093,12 +18041,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/postcss-normalize-unicode/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/postcss-normalize-unicode/node_modules/electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -18200,12 +18142,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/postcss-reduce-initial/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/postcss-reduce-initial/node_modules/electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -19304,6 +19240,11 @@ "react-is": "^16.8.1" } }, + "node_modules/react-redux/node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/react-redux/node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -21406,12 +21347,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/stylehacks/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/stylehacks/node_modules/electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -23415,12 +23350,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/webpack/node_modules/caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "node_modules/webpack/node_modules/electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -23894,12 +23823,6 @@ } } }, - "caniuse-lite": { - "version": "1.0.30001246", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001246.tgz", - "integrity": "sha512-Tc+ff0Co/nFNbLOrziBXmMVtpt9S2c2Y+Z9Nk9Khj09J+0zR9ejvIW5qkZAErCbOrVODCx/MN+GpB5FNBs5GFA==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.782", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.782.tgz", @@ -24151,12 +24074,6 @@ "node-releases": "^1.1.76" } }, - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "convert-source-map": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", @@ -24512,12 +24429,6 @@ "node-releases": "^1.1.71" } }, - "caniuse-lite": { - "version": "1.0.30001219", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001219.tgz", - "integrity": "sha512-c0yixVG4v9KBc/tQ2rlbB3A/bgBFRvl8h8M4IeUbqCca4gsiCfvtaheUssbnux/Mb66Vjz7x8yYjDgYcNQOhyQ==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.723", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.723.tgz", @@ -26839,12 +26750,6 @@ } } }, - "caniuse-lite": { - "version": "1.0.30001246", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001246.tgz", - "integrity": "sha512-Tc+ff0Co/nFNbLOrziBXmMVtpt9S2c2Y+Z9Nk9Khj09J+0zR9ejvIW5qkZAErCbOrVODCx/MN+GpB5FNBs5GFA==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.782", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.782.tgz", @@ -29059,12 +28964,6 @@ "postcss-value-parser": "^4.2.0" }, "dependencies": { - "caniuse-lite": { - "version": "1.0.30001299", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", - "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", - "dev": true - }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -29516,12 +29415,6 @@ "picocolors": "^1.0.0" }, "dependencies": { - "caniuse-lite": { - "version": "1.0.30001299", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", - "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", - "dev": true - }, "node-releases": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", @@ -29640,14 +29533,6 @@ "escalade": "^3.1.1", "nanocolors": "^0.2.12", "node-releases": "^1.1.76" - }, - "dependencies": { - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - } } }, "electron-to-chromium": { @@ -29659,9 +29544,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000865", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000865.tgz", - "integrity": "sha512-vs79o1mOSKRGv/1pSkp4EXgl4ZviWeYReXw60XfacPU64uQWZwJT6vZNmxRF9O+6zu71sJwMxLK5JXxbzuVrLw==", + "version": "1.0.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", "dev": true }, "case-sensitive-paths-webpack-plugin": { @@ -30157,12 +30042,6 @@ } } }, - "caniuse-lite": { - "version": "1.0.30001246", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001246.tgz", - "integrity": "sha512-Tc+ff0Co/nFNbLOrziBXmMVtpt9S2c2Y+Z9Nk9Khj09J+0zR9ejvIW5qkZAErCbOrVODCx/MN+GpB5FNBs5GFA==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.782", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.782.tgz", @@ -38735,12 +38614,6 @@ "node-releases": "^1.1.76" } }, - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -38890,12 +38763,6 @@ "node-releases": "^1.1.76" } }, - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -38966,12 +38833,6 @@ "node-releases": "^1.1.76" } }, - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -39156,12 +39017,6 @@ "node-releases": "^1.1.76" } }, - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -39253,12 +39108,6 @@ "node-releases": "^1.1.76" } }, - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -40134,6 +39983,13 @@ "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.8.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } } }, "react-is": { @@ -41935,12 +41791,6 @@ "node-releases": "^1.1.76" } }, - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", @@ -43228,12 +43078,6 @@ "node-releases": "^1.1.76" } }, - "caniuse-lite": { - "version": "1.0.30001263", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz", - "integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==", - "dev": true - }, "electron-to-chromium": { "version": "1.3.856", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.856.tgz", diff --git a/ui/pages/Register/components/Register.jsx b/ui/pages/Register/components/Register.jsx index bf54d9967c..84681aed2a 100644 --- a/ui/pages/Register/components/Register.jsx +++ b/ui/pages/Register/components/Register.jsx @@ -2,17 +2,39 @@ import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { Link } from 'react-router-dom' - +import { BooleanCheckbox } from 'shared/components/form/Inputs' import { validators } from 'shared/components/form/FormHelpers' import register from '../reducers' import { UserFormContainer, UserForm } from './UserFormLayout' const FIELDS = [ - { name: 'username', label: 'Username', validate: validators.required }, { name: 'first_name', label: 'First Name', validate: validators.required }, { name: 'last_name', label: 'Last Name', validate: validators.required }, - { name: 'email', label: 'Email Address', type: 'email', validate: validators.required }, - { name: 'password', label: 'Password', type: 'password', validate: validators.required }, + { name: 'email', label: 'Institutional Email Address', validate: validators.requiredEmail }, + { name: 'username', label: 'Username', validate: validators.required }, + { name: 'password', label: 'Password', type: 'password', validate: validators.requiredPassword }, + { name: 'affiliation', label: 'Affiliation', validate: validators.required }, + { name: 'referral', label: 'How did you hear about the CCM-seqr instance?', validate: validators.required }, + { + name: 'check_1', + component: BooleanCheckbox, + validate: validators.required, + label: ( + + ), + }, + { + name: 'check_2', + component: BooleanCheckbox, + validate: validators.required, + label: ( + + ), + }, ] const Register = ({ onSubmit }) => ( diff --git a/ui/shared/components/form/FormHelpers.jsx b/ui/shared/components/form/FormHelpers.jsx index 4abfab5d46..c85ba62159 100644 --- a/ui/shared/components/form/FormHelpers.jsx +++ b/ui/shared/components/form/FormHelpers.jsx @@ -28,6 +28,31 @@ export const validators = { requiredEmail: value => ( /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value) ? undefined : 'Invalid email address' ), + requiredPassword: (value) => { + if (!value) { + return 'Required' + } + + const errors = [] + + if (value.length <= 7) { + errors.push('Password must be at least 8 characters') + } + if (!/\d/.test(value)) { + errors.push('Password must contain at least one number') + } + if (!/[!@#$%^&*(),.?":{}|<>]/.test(value)) { + errors.push('Password must contain at least one special character') + } + if (!/[A-Z]/.test(value)) { + errors.push('Password must contain at least one uppercase letter') + } + if (!/[a-z]/.test(value)) { + errors.push('Password must contain at least one lowercase letter') + } + + return errors.length > 0 ? errors : undefined + }, } const renderField = (props) => { diff --git a/ui/shared/components/form/FormWrapper.jsx b/ui/shared/components/form/FormWrapper.jsx index 878af52c9e..fca2eeb609 100644 --- a/ui/shared/components/form/FormWrapper.jsx +++ b/ui/shared/components/form/FormWrapper.jsx @@ -207,7 +207,7 @@ class FormWrapper extends React.PureComponent { const saveErrorMessage = errorMessages?.join('; ') || (currentFormSubmitFailed ? 'Error' : null) return [ - showErrorPanel && errorMessages && , + showErrorPanel && errorMessages && , submitSucceeded && successMessage && , !submitOnChange && (