-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dockstore/dockstore#2386 All api calls go to /api on same domain (host/port) as UI is served from endpoint -- see app.module.ts In the APP_INITIALIZER, UI calls /api/metadata/config.json and sets dockstore.model.ts based on the response. When running locally, use Angular proxy. Just use `npm run start`. When running on Circle-CI, use nginx. Also: In checkerWorkflowFromWorkflow.ts, it was checking if a button was not visible, then if it was visible. Removed that, as I think it was relying on a delay for the button to appear.
- Loading branch information
Showing
19 changed files
with
226 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,14 +107,20 @@ commands: | |
name: Install cypress dependencies | ||
command: sudo apt install libgtk2.0-0 -yq | ||
- run: | ||
name: Install angular http server (replace with nginx) | ||
command: bash -i -c 'npm i [email protected] [email protected] --no-save' | ||
name: Install cypress | ||
command: bash -i -c 'npm i [email protected] --no-save' | ||
- run: | ||
name: Prepare webservice | ||
command: bash -i -c 'npm run webservice' | ||
- run: | ||
name: Serve | ||
command: bash -i -c 'npx angular-http-server --path ./dist -p 4200' | ||
name: Install nginx | ||
command: sudo apt install -y nginx || true | ||
- run: | ||
name: Prepapre nginx config | ||
command: sed "s%REPLACEME%`pwd`%" .circleci/nginx.conf.tmpl > .circleci/nginx.conf | ||
- run: | ||
name: Run nginx | ||
command: sudo nginx -c `pwd`/.circleci/nginx.conf | ||
background: true | ||
- run: | ||
name: Run webservice | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
events { | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
server { | ||
listen 4200; | ||
|
||
location = /swagger.json { | ||
proxy_pass http://localhost:8080/swagger.json; | ||
} | ||
|
||
location /api/ { | ||
rewrite ^ $request_uri; | ||
rewrite ^/api/(.*) $1 break; | ||
return 400; | ||
proxy_pass http://localhost:8080/$uri; | ||
} | ||
|
||
location / { | ||
root REPLACEME/dist; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ describe('Dockstore tool/workflow search table', () => { | |
cy.server(); | ||
// Tools/worflows not starred in this response. | ||
cy.route({ | ||
url: '/api/ga4gh/v2/extended/tools/entry/_search', | ||
url: '*/api/ga4gh/v2/extended/tools/entry/_search', | ||
method: 'POST', | ||
status: 200, | ||
response: {"took":18,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":4,"max_score":1.0,"hits":[{"_index":"entry","_type":"tool","_id":"52","_score":1.0,"_source":{"tool_maintainer_email":"","aliases":{},"default_dockerfile_path":"/Dockerfile","is_published":true,"toolname":"cgpmap-cramOut","last_modified_date":null,"checker_id":null,"private_access":false,"descriptorType":["cwl"],"mode":"MANUAL_IMAGE_PATH","lastBuild":1518478819000,"lastUpdated":1518479742691,"path":"quay.io/garyluu/dockstore-cgpmap","defaultCWLTestParameterFile":"/examples/cgpmap/cramOut/fastq_gz_input.json","has_checker":false,"id":52,"last_modified":null,"email":null,"default_wdl_path":"/Dockstore.wdl","tool_path":"quay.io/garyluu/dockstore-cgpmap/cgpmap-cramOut","registry":"QUAY_IO","dbUpdateDate":null,"author":null,"registry_string":"quay.io","tags":[{"doiURL":null,"hidden":false,"workingDirectory":"cwls","versionEditor":null,"verifiedSource":null,"verified":false,"referenceType":"UNSET","commitID":null,"dockerfile_path":"/Dockerfile","doiStatus":"NOT_REQUESTED","reference":"3.0.0-rc8","valid":true,"wdl_path":"/Dockstore.wdl","automated":true,"size":138844180,"cwl_path":"/cwls/cgpmap-cramOut.cwl","name":"3.0.0-rc8","id":52,"image_id":"c387f22e65f066c42ccaf11392fdbd640aa2b7627eb40ac06a0dbaca2ca323cb","dirtyBit":false,"last_modified":1518479368000}],"dbCreateDate":null,"custom_docker_registry_path":"quay.io","default_cwl_path":"/cwls/cgpmap-cramOut.cwl","name":"dockstore-cgpmap","namespace":"garyluu","gitUrl":"[email protected]:garyluu/dockstore-cgpmap.git","defaultWDLTestParameterFile":"/test.wdl.json","defaultVersion":null}},{"_index":"entry","_type":"tool","_id":"5","_score":1.0,"_source":{"tool_maintainer_email":"","aliases":{},"default_dockerfile_path":"/Dockerfile","is_published":true,"toolname":null,"last_modified_date":null,"checker_id":null,"private_access":false,"descriptorType":["cwl"],"mode":"AUTO_DETECT_QUAY_TAGS_AUTOMATED_BUILDS","lastBuild":1465419996000,"lastUpdated":1480374043873,"path":"quay.io/A2/a","defaultCWLTestParameterFile":null,"has_checker":false,"id":5,"last_modified":null,"email":null,"default_wdl_path":"/Dockstore.wdl","tool_path":"quay.io/A2/a","registry":"QUAY_IO","dbUpdateDate":null,"author":null,"registry_string":"quay.io","tags":[{"doiURL":null,"hidden":false,"workingDirectory":"","versionEditor":null,"verifiedSource":null,"verified":false,"referenceType":"UNSET","commitID":null,"dockerfile_path":"/Dockerfile","doiStatus":"NOT_REQUESTED","reference":"master","valid":true,"wdl_path":"/Dockstore.wdl","automated":true,"size":44363874,"cwl_path":"/Dockstore.cwl","name":"latest","id":11,"image_id":"9227b87c1304b9ce746d06d0eb8144ec17a253f5b8e00a3922d86b538c8296c0","dirtyBit":false,"last_modified":1465420088000},{"doiURL":null,"hidden":false,"workingDirectory":"","versionEditor":null,"verifiedSource":null,"verified":false,"referenceType":"UNSET","commitID":null,"dockerfile_path":"/Dockerfile","doiStatus":"NOT_REQUESTED","reference":"master","valid":true,"wdl_path":"/Dockstore.wdl","automated":true,"size":44363874,"cwl_path":"/Dockstore.cwl","name":"master","id":10,"image_id":"9227b87c1304b9ce746d06d0eb8144ec17a253f5b8e00a3922d86b538c8296c0","dirtyBit":false,"last_modified":1465420088000}],"dbCreateDate":null,"custom_docker_registry_path":"quay.io","default_cwl_path":"/Dockstore.cwl","name":"a","namespace":"A2","gitUrl":"[email protected]:A2/a.git","defaultWDLTestParameterFile":null,"defaultVersion":null}},{"_index":"entry","_type":"tool","_id":"4","_score":1.0,"_source":{"tool_maintainer_email":"","aliases":{},"default_dockerfile_path":"/Dockerfile","is_published":true,"toolname":null,"last_modified_date":null,"checker_id":null,"private_access":false,"descriptorType":["wdl"],"mode":"AUTO_DETECT_QUAY_TAGS_AUTOMATED_BUILDS","lastBuild":1458081382000,"lastUpdated":1480374043873,"path":"quay.io/A2/b3","defaultCWLTestParameterFile":null,"has_checker":false,"id":4,"last_modified":null,"email":null,"default_wdl_path":"/Dockstore.wdl","tool_path":"quay.io/A2/b3","registry":"QUAY_IO","dbUpdateDate":null,"author":null,"registry_string":"quay.io","tags":[{"doiURL":null,"hidden":false,"workingDirectory":"","versionEditor":null,"verifiedSource":null,"verified":false,"referenceType":"UNSET","commitID":null,"dockerfile_path":"/Dockerfile","doiStatus":"NOT_REQUESTED","reference":"master","valid":true,"wdl_path":"/Dockstore.wdl","automated":true,"size":108722128,"cwl_path":"/Dockstore.cwl","name":"latest","id":9,"image_id":"f92aa8edcc265e4d5faabf7f89157008d52d514f8f6d7c1b833024f58f126e9d","dirtyBit":false,"last_modified":1458081725000},{"doiURL":null,"hidden":true,"workingDirectory":"","versionEditor":null,"verifiedSource":null,"verified":false,"referenceType":"UNSET","commitID":null,"dockerfile_path":"/Dockerfile","doiStatus":"NOT_REQUESTED","reference":"master","valid":true,"wdl_path":"/Dockstore.wdl","automated":true,"size":108722128,"cwl_path":"/Dockstore.cwl","name":"master","id":8,"image_id":"f92aa8edcc265e4d5faabf7f89157008d52d514f8f6d7c1b833024f58f126e9d","dirtyBit":false,"last_modified":1458081724000}],"dbCreateDate":null,"custom_docker_registry_path":"quay.io","default_cwl_path":"/Dockstore.cwl","name":"b3","namespace":"A2","gitUrl":"[email protected]:A2/b3.git","defaultWDLTestParameterFile":null,"defaultVersion":null}},{"_index":"entry","_type":"workflow","_id":"11","_score":1.0,"_source":{"aliases":{},"is_published":true,"last_modified_date":null,"is_checker":false,"checker_id":null,"repository":"l","source_control_provider":"GITHUB","descriptorType":"cwl","full_workflow_path":"github.com/A/l","mode":"FULL","lastUpdated":1480374057688,"path":"github.com/A/l","workflowVersions":[{"doiURL":null,"verifiedSource":null,"versionEditor":null,"verified":false,"referenceType":"UNSET","commitID":null,"id":13,"doiStatus":"NOT_REQUESTED"},{"doiURL":null,"verifiedSource":null,"versionEditor":null,"verified":false,"referenceType":"UNSET","commitID":null,"id":14,"doiStatus":"NOT_REQUESTED"}],"sourceControl":"github.com","has_checker":false,"id":11,"last_modified":null,"email":null,"dbUpdateDate":null,"author":null,"defaultTestParameterFilePath":null,"workflowName":null,"workflow_path":"/1st-workflow.cwl","dbCreateDate":null,"parent_id":null,"organization":"A","gitUrl":"[email protected]:A/l.git","defaultVersion":null}}]}} | ||
|
@@ -44,7 +44,7 @@ describe('Dockstore tool/workflow search table', () => { | |
// First tool and workflow starred | ||
cy.fixture('searchTableResponse').then((json) => { | ||
cy.route({ | ||
url: '/api/ga4gh/v2/extended/tools/entry/_search', | ||
url: '*/api/ga4gh/v2/extended/tools/entry/_search', | ||
method: 'POST', | ||
response: json | ||
}); | ||
|
@@ -79,7 +79,7 @@ describe('search table items per page', () => { | |
cy.server(); | ||
cy.fixture('searchTableResponse').then((json) => { | ||
cy.route({ | ||
url: '/api/ga4gh/v2/extended/tools/entry/_search', | ||
url: '*/api/ga4gh/v2/extended/tools/entry/_search', | ||
method: 'POST', | ||
response: json | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"/api": { | ||
"target": "http://localhost:8080", | ||
"pathRewrite": { | ||
"^/api" : "" | ||
} | ||
}, | ||
"/swagger.json": { | ||
"target": "http://localhost:8080" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.