Skip to content

Commit

Permalink
CollectionEntry and My Workflows Optimization (#980)
Browse files Browse the repository at this point in the history
* Use new CollectionEntry object in template (not typed though)
* Update package.json to 1.8.5
* Temporarily use CircleCI JAR. MUST REMOVE.
  • Loading branch information
garyluu authored May 27, 2020
1 parent 54dd769 commit fbe0c72
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 32 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/group2/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ describe('Dockstore Organizations', () => {
it('be able to remove an entry from a collection', () => {
cy.visit('/organizations/Potatoe/collections/veryFakeCollectionName');
cy.contains('quay.io/garyluu/dockstore-cgpmap/cgpmap-cramOut');
cy.get('#removeToolButton').click();
cy.get('#removeEntryButton').click();
cy.get('#accept-remove-entry-from-org').click();
cy.contains('This collection has no associated entries');
cy.visit('/organizations/Potatoe');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.3.0",
"license": "Apache License 2.0",
"config": {
"webservice_version": "1.8.1-rc.0"
"webservice_version": "1.8.5"
},
"scripts": {
"ng": "npx ng",
Expand Down
3 changes: 3 additions & 0 deletions scripts/generate-openapi-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ GENERATOR_VERSION="3.3.4"
BASE_PATH="https://raw.githubusercontent.com/dockstore/dockstore/$npm_package_config_webservice_version"
# DOCKSTORE-2428 - demo how to add new workflow language, generate from local copy of swagger
# BASE_PATH="../dockstore"
#CIRCLE_CI_PATH="https://3855-33383826-gh.circle-artifacts.com/0/tmp/artifacts"

wget --no-verbose https://repo.maven.apache.org/maven2/org/openapitools/openapi-generator-cli/${GENERATOR_VERSION}/openapi-generator-cli-${GENERATOR_VERSION}.jar -O openapi-generator-cli.jar
rm -Rf src/app/shared/swagger
rm -Rf src/app/shared/openapi
java -jar openapi-generator-cli.jar generate -i ${BASE_PATH}/dockstore-webservice/src/main/resources/swagger.yaml -l typescript-angular -o src/app/shared/swagger -c swagger-config.json
java -jar openapi-generator-cli.jar generate -i ${BASE_PATH}/dockstore-webservice/src/main/resources/openapi3/openapi.yaml -l typescript-angular -o src/app/shared/openapi -c swagger-config.json
#java -jar openapi-generator-cli.jar generate -i ${CIRCLE_CI_PATH}/swagger.yaml -l typescript-angular -o src/app/shared/swagger -c swagger-config.json
#java -jar openapi-generator-cli.jar generate -i ${CIRCLE_CI_PATH}/openapi.yaml -l typescript-angular -o src/app/shared/openapi -c swagger-config.json
rm openapi-generator-cli.jar

5 changes: 4 additions & 1 deletion scripts/run-webservice-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ set -o pipefail
set -o nounset
set -o xtrace

wget -O dockstore-webservice.jar --no-verbose --tries=10 https://artifacts.oicr.on.ca/artifactory/collab-release/io/dockstore/dockstore-webservice/${npm_package_config_webservice_version}/dockstore-webservice-${npm_package_config_webservice_version}.jar
#JAR_PATH="https://artifacts.oicr.on.ca/artifactory/collab-release/io/dockstore/dockstore-webservice/${npm_package_config_webservice_version}/dockstore-webservice-${npm_package_config_webservice_version}.jar"
JAR_PATH="https://3855-33383826-gh.circle-artifacts.com/0/tmp/artifacts/dockstore-webservice-1.8.6-SNAPSHOT.jar"

wget -O dockstore-webservice.jar --no-verbose --tries=10 ${JAR_PATH}
chmod u+x dockstore-webservice.jar
psql -h localhost -c "create user dockstore with password 'dockstore' createdb;" -U postgres
psql -h localhost -c "ALTER USER dockstore WITH superuser;" -U postgres
Expand Down
34 changes: 5 additions & 29 deletions src/app/organizations/collection/collection.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,48 +87,24 @@ <h1>
<mat-card-header>
<mat-card-title>
<h4>
<span *ngIf="entry?.full_workflow_path">
<a
*ngIf="entry?.mode === WorkflowMode.SERVICE; else workflow"
[routerLink]="['/services/', entry.full_workflow_path]"
>
{{ entry.full_workflow_path }}
</a>
<ng-template #workflow>
<a [routerLink]="['/workflows/', entry.full_workflow_path]">
{{ entry.full_workflow_path }}
</a>
</ng-template>
</span>
<a *ngIf="entry?.tool_path" [routerLink]="['/containers/', entry.tool_path]">
{{ entry.tool_path }}
<a [routerLink]="['/' + entry.entryType + 's/', entry.entryPath]">
{{ entry.entryPath }}
</a>
</h4>
</mat-card-title>
<mat-card-subtitle> Last updated {{ entry.dbUpdateDate | date }} </mat-card-subtitle>
</mat-card-header>

<mat-card-actions *ngIf="canEdit$ | async" fxLayout="row" fxLayoutAlign="end center">
<span *ngIf="entry?.full_workflow_path; else toolRemoveButton">
<span *ngIf="entry?.entryPath">
<button
mat-flat-button
matTooltip="Remove entry from collection."
id="removeWorkflowButton"
(click)="openRemoveEntryDialog(organization.id, collection.id, entry.id, collection.name, entry.full_workflow_path)"
id="removeEntryButton"
(click)="openRemoveEntryDialog(organization.id, collection.id, entry.id, collection.name, entry.entryPath)"
>
<mat-icon>clear</mat-icon> Remove
</button>
</span>
<ng-template #toolRemoveButton>
<button
mat-flat-button
matTooltip="Remove entry from collection."
id="removeToolButton"
(click)="openRemoveEntryDialog(organization.id, collection.id, entry.id, collection.name, entry.tool_path)"
>
<mat-icon>clear</mat-icon> Remove
</button>
</ng-template>
</mat-card-actions>
</mat-card>
</div>
Expand Down

0 comments on commit fbe0c72

Please sign in to comment.