Skip to content

Commit

Permalink
Merge branch 'hotfix/2.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Overbeck committed Feb 19, 2020
2 parents d79a578 + 199d693 commit 9a1732a
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 71 deletions.
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.0-beta.9"
"webservice_version": "1.8.1-rc.0"
},
"scripts": {
"ng": "npx ng",
Expand Down
8 changes: 5 additions & 3 deletions src/app/configuration.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Injectable } from '@angular/core';
import { Config, MetadataService } from './shared/swagger';
import { Dockstore } from './shared/dockstore.model';
import { ConfigService } from 'ng2-ui-auth';
import { AuthConfig } from './shared/auth.model';
import { IOauth2Options } from 'ng2-ui-auth/lib/config-interfaces';
import { AuthConfig } from './shared/auth.model';
import { Dockstore } from './shared/dockstore.model';
import { Config, MetadataService } from './shared/swagger';

@Injectable({
providedIn: 'root'
Expand Down Expand Up @@ -35,6 +35,8 @@ export class ConfigurationService {
Dockstore.DNASTACK_IMPORT_URL = config.dnaStackImportUrl;
Dockstore.DNANEXUS_IMPORT_URL = config.dnaNexusImportUrl;
Dockstore.TERRA_IMPORT_URL = config.terraImportUrl;
Dockstore.BD_CATALYST_SEVEN_BRIDGES_IMPORT_URL = config.bdCatalystSevenBridgesImportUrl;
Dockstore.BD_CATALYST_TERRA_IMPORT_URL = config.bdCatalystTerraImportUrl;

Dockstore.GITHUB_CLIENT_ID = config.githubClientId;
Dockstore.GITHUB_AUTH_URL = config.gitHubAuthUrl;
Expand Down
26 changes: 15 additions & 11 deletions src/app/home-page/home-logged-out/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,26 @@ <h2 class="title caption">Docker Tools and Workflows for the Sciences</h2>
</div>
</div>

<div fxLayout="column wrap" fxLayoutAlign="center center" fxLayoutGap="5px">
<h3 class="search-title">New to Dockstore?</h3>
<div fxLayout="row wrap" fxLayoutAlign="center center" fxLayoutGap="20px" class="pb-5">
<a mat-raised-button href="#overview" class="button-link">Start here</a>
</div>

<!-- Left the boat and truck here in case we want them back -->
<!-- <div fxLayout="row wrap" fxLayoutAlign="center" fxLayoutGap="20px">
<img fxFlexAlign="end" src="../assets/images/dockstore/ship.png">
<img fxFlexAlign="end" src="../assets/images/dockstore/truck.png">
</div> -->
<div fxLayout="column wrap" fxLayoutAlign="center center" fxLayoutGap="5px" class="pb-3">
<h4 class="title caption text-center landing-message">
Dockstore, developed by the
<a class="white-link" href="https://www.cancercollaboratory.org/" target="_blank">Cancer Genome Collaboratory</a>, is an open
platform used by the <a class="white-link" href="https://genomicsandhealth.org/" target="_blank">GA4GH</a> for sharing
Docker-based tools described with either the
<a class="white-link" href="http://www.commonwl.org/" target="_blank">Common Workflow Language (CWL)</a>, the
<a class="white-link" href="https://software.broadinstitute.org/wdl/" target="_blank">Workflow Description Language (WDL)</a>, or
<a class="white-link" href="https://www.nextflow.io/" target="_blank">Nextflow</a>
</h4>
</div>
</div>
</div>
</div>

<div class="header-lower boat-header" fxLayout="row wrap" fxLayoutAlign="end" fxLayoutGap="20px" fxShow fxHide.lt-md>
<img fxFlexAlign="end" src="../assets/images/dockstore/ship.png" />
<img fxFlexAlign="end" src="../assets/images/dockstore/truck.png" class="pr-2" />
</div>

<div class="header-lower" id="overview">
<img class="blue-rectangle" src="../assets/images/dockstore/rectangle.png" alt="blue rectangle" />

Expand Down
14 changes: 9 additions & 5 deletions src/app/home-page/home-logged-out/home.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,26 @@ span {
}

.top-section {
min-height: 800px;
}

.search-holder {
margin-top: 40px;
min-height: 500px;
}

.header-lower {
min-height: 200px;
}

.boat-header {
background-color: #21335b;
}

.content-holder {
padding: 40px 0px 40px 0px;
min-height: 300px;
}

.landing-message {
max-width: 700px;
}

.stripe-holder {
min-height: 175px;
width: 100%;
Expand Down
19 changes: 0 additions & 19 deletions src/app/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ export class SearchComponent implements OnInit, OnDestroy {
this.advancedSearchQuery.advancedSearch$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
this.updatePermalink();
});
this.keyUp$.pipe(
debounceTime(formInputDebounceTime),
distinctUntilChanged(),
takeUntil(this.ngUnsubscribe)).subscribe(() => this.onKey());
}

/**
Expand Down Expand Up @@ -470,21 +466,6 @@ export class SearchComponent implements OnInit, OnDestroy {
this.updatePermalink();
}

/**
* Sets autocomplete terms based on the elasticsearch results
*
* @param {*} hits Elasticsearch results
* @memberof SearchComponent
*/
setAutocompleteTerms(hits: any): void {
try {
this.autocompleteTerms = hits.aggregations.autocomplete.buckets.map(term => term.key);
} catch (error) {
console.error('Could not retrieve autocomplete terms');
this.autocompleteTerms = [];
}
}

searchSuggestTerm() {
this.searchService.searchSuggestTerm();
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/shared/dockstore.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export class Dockstore {
static TERRA_IMPORT_URL = 'https://app.terra.bio/#import-tool/dockstore';
static CGC_IMPORT_URL = 'https://cgc.sbgenomics.com/integration/trs/import';
static ANVIL_IMPORT_URL = 'https://anvil.terra.bio/#import-tool/dockstore';
static BD_CATALYST_SEVEN_BRIDGES_IMPORT_URL = 'https://sb.biodatacatalyst.nhlbi.nih.gov/integration/trs/import';
static BD_CATALYST_TERRA_IMPORT_URL = 'https://terra.biodatacatalyst.nhlbi.nih.gov/#import-tool/dockstore';

static GITHUB_CLIENT_ID = 'will be filled in by configuration.service';
static GITHUB_AUTH_URL = 'https://github.com/login/oauth/authorize';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,10 @@ <h3>Launch with</h3>
<div fxFlex="100%" *ngIf="workflow?.descriptorType === 'WDL'">
<a
mat-raised-button
[matTooltip]="
!(hasContent$ | async)
? 'The WDL has no content. '
: (hasFileImports$ | async)
? 'Terra does not support file-path imports in WDL. It only supports http(s) imports.'
: ''
"
[matTooltip]="terraTooltip$ | async"
target="_blank"
rel="noopener"
[disabled]="!(hasContent$ | async) || (hasFileImports$ | async)"
[disabled]="disableTerraPlatform$ | async"
[attr.href]="config.TERRA_IMPORT_URL + '/' + workflow?.full_workflow_path + ':' + selectedVersion?.name"
color="primary"
><mat-icon svgIcon="terra"></mat-icon> Terra &raquo;</a
Expand All @@ -59,29 +53,47 @@ <h3>Launch with</h3>
target="_blank"
rel="noopener"
[attr.href]="config.CGC_IMPORT_URL + '?trs=' + trsUrl"
[disabled]="!(hasContent$ | async) || (hasHttpImports$ | async)"
[disabled]="disableSevenBridgesPlatform$ | async"
color="primary"
><img src="../assets/images/thirdparty/cgc.png" /> CGC
</a>
</div>
<div fxFlex="100%" *ngIf="workflow?.descriptorType === 'CWL'">
<a
mat-raised-button
[matTooltip]="bdCatalystSevenBridgesTooltip$ | async"
target="_blank"
rel="noopener"
[attr.href]="config.BD_CATALYST_SEVEN_BRIDGES_IMPORT_URL + '?trs=' + trsUrl"
[disabled]="disableSevenBridgesPlatform$ | async"
color="primary"
>NHLBI BioData Catalyst
</a>
</div>
<div fxFlex="100%" *ngIf="workflow?.descriptorType === 'WDL'">
<a
mat-raised-button
[matTooltip]="
!(hasContent$ | async)
? 'The WDL has no content. '
: (hasFileImports$ | async)
? 'AnVIL does not support file-path imports in WDL. It only supports http(s) imports.'
: ''
"
[matTooltip]="anvilTooltip$ | async"
target="_blank"
rel="noopener"
[disabled]="!(hasContent$ | async) || (hasFileImports$ | async)"
[disabled]="disableTerraPlatform$ | async"
[attr.href]="config.ANVIL_IMPORT_URL + '/' + workflow?.full_workflow_path + ':' + selectedVersion?.name"
color="primary"
><mat-icon class="anvil-icon" svgIcon="anvil"></mat-icon> AnVIL &raquo;</a
>
</div>
<div fxFlex="100%" *ngIf="workflow?.descriptorType === 'WDL'">
<a
mat-raised-button
[matTooltip]="bdCatalystTerraTooltip$ | async"
target="_blank"
rel="noopener"
[disabled]="disableTerraPlatform$ | async"
[attr.href]="config.BD_CATALYST_TERRA_IMPORT_URL + '/' + workflow?.full_workflow_path + ':' + selectedVersion?.name"
color="primary"
>NHLBI BioData Catalyst</a
>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
a {
margin-bottom: 10px;
width: 150px;
margin-bottom: 0.625rem;
width: 18.5rem;
max-width: 98%;
img {
width: 24px;
Expand Down
62 changes: 49 additions & 13 deletions src/app/workflow/launch-third-party/launch-third-party.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { HttpUrlEncodingCodec } from '@angular/common/http';
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { MatIconRegistry } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';
import { combineLatest, Observable } from 'rxjs';
import { map, share, takeUntil } from 'rxjs/operators';
import { Base } from '../../shared/base';
import { DescriptorTypeCompatService } from '../../shared/descriptor-type-compat.service';
Expand All @@ -13,7 +14,6 @@ import { SourceFile } from '../../shared/swagger/model/sourceFile';
import { DescriptorsQuery } from './state/descriptors-query';
import { DescriptorsStore } from './state/descriptors-store';
import { DescriptorsService } from './state/descriptors.service';
import { combineLatest, Observable } from 'rxjs';
import FileTypeEnum = ToolFile.FileTypeEnum;

// tslint:disable:max-line-length
Expand Down Expand Up @@ -147,18 +147,34 @@ export class LaunchThirdPartyComponent extends Base implements OnChanges, OnInit
workflowPathAsQueryValue: string;

// Note: intentionally not using this.hasContent$ in the next line, as that does not work
cgcTooltip$: Observable<string> = combineLatest(this.descriptorsQuery.hasContent$, this.hasHttpImports$).pipe(
map(([hasContent, hasHttpImports]) => {
if (!hasContent) {
return 'The CWL has no content.';
}
if (hasHttpImports) {
return (
'This version of the CWL has http(s) imports, which are not supported by the CGC. ' + 'Select a version without http(s) imports.'
);
}
return 'Export this workflow version to the CGC.';
})
cgcTooltip$: Observable<string> = combineLatest(this.hasContent$, this.hasHttpImports$).pipe(
map(([hasContent, hasHttpImports]) => this.sevenBridgesTooltip(hasContent, hasHttpImports, 'the CGC'))
);

disableSevenBridgesPlatform$: Observable<boolean> = combineLatest(this.hasContent$, this.hasHttpImports$).pipe(
map(([hasContent, hasHttpImports]) => !hasContent || hasHttpImports)
);

bdCatalystSevenBridgesTooltip$: Observable<string> = combineLatest(this.hasContent$, this.hasHttpImports$).pipe(
map(([hasContent, hasHttpImports]) =>
this.sevenBridgesTooltip(hasContent, hasHttpImports, 'NHLBI BioData Catalyst powered by Seven Bridges')
)
);

terraTooltip$: Observable<string> = combineLatest(this.hasContent$, this.hasFileImports$).pipe(
map(([hasContent, hasFileImports]) => this.terraTooltip(hasContent, hasFileImports, 'Terra'))
);

anvilTooltip$: Observable<string> = combineLatest(this.hasContent$, this.hasFileImports$).pipe(
map(([hasContent, hasFileImports]) => this.terraTooltip(hasContent, hasFileImports, 'AnVIL'))
);

bdCatalystTerraTooltip$: Observable<string> = combineLatest(this.hasContent$, this.hasFileImports$).pipe(
map(([hasContent, hasFileImports]) => this.terraTooltip(hasContent, hasFileImports, 'NHLBI BioData Catalyst powered by Terra'))
);

disableTerraPlatform$: Observable<boolean> = combineLatest(this.hasContent$, this.hasFileImports$).pipe(
map(([hasContent, hasFileImports]) => !hasContent || hasFileImports)
);

constructor(
Expand Down Expand Up @@ -210,4 +226,24 @@ export class LaunchThirdPartyComponent extends Base implements OnChanges, OnInit
this.workflowPathAsQueryValue = new HttpUrlEncodingCodec().encodeValue(this.workflow.full_workflow_path);
}
}

private sevenBridgesTooltip(hasContent: boolean, hasHttpImports, platform: string): string {
if (!hasContent) {
return 'The CWL has no content.';
}
if (hasHttpImports) {
return `This version of the CWL has http(s) imports, which are not supported by ${platform}. Select a version without http(s) imports.`;
}
return `Export this workflow version to ${platform}.`;
}

private terraTooltip(hasContent: boolean, hasFileImports, platform: string): string {
if (!hasContent) {
return 'The WDL has no content.';
}
if (hasFileImports) {
return `${platform} does not support file-path imports in WDL. It only supports http(s) imports.`;
}
return `Export this workflow version to ${platform}.`;
}
}

0 comments on commit 9a1732a

Please sign in to comment.