Skip to content

Commit

Permalink
Merge branch 'hotfix/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-yuen committed Apr 9, 2018
2 parents 6104047 + a58896f commit 77388cc
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
8 changes: 7 additions & 1 deletion src/app/container/container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,16 @@ export class ContainerComponent extends Entry {
this._toolType = 'containers';
this.location = locationService;

let trimmedURL = window.location.href;
const indexOfLastColon = window.location.href.indexOf(':', window.location.href.indexOf('containers'));
if (indexOfLastColon > 0) {
trimmedURL = window.location.href.substring(0, indexOfLastColon);
}

// Initialize discourse urls
(<any>window).DiscourseEmbed = {
discourseUrl: Dockstore.DISCOURSE_URL,
discourseEmbedUrl: decodeURIComponent(window.location.href)
discourseEmbedUrl: decodeURIComponent(trimmedURL)
};
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/container/launch/tool-launch.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ describe('ToolLaunchService', () => {
expect(service).toBeTruthy();
}));
it('should getParamsString', inject([ToolLaunchService], (service: ToolLaunchService) => {
expect(service.getParamsString('quay.io/a/b', 'latest', 'wdl'))
expect(service.getParamsString('quay.io/a/b', 'latest', 'WDL'))
.toContain('$ dockstore tool convert entry2json --descriptor wdl --entry quay.io/a/b:latest > Dockstore.json');
}));
it('should getCliString', inject([ToolLaunchService], (service: ToolLaunchService) => {
expect(service.getCliString('a/b', 'latest', 'cwl'))
expect(service.getCliString('a/b', 'latest', 'CWL'))
.toContain('dockstore tool launch --entry a/b:latest --json Dockstore.json');
expect(service.getCliString('quay.io/a/b', 'c', 'wdl'))
expect(service.getCliString('quay.io/a/b', 'c', 'WDL'))
.toContain('dockstore tool launch --entry quay.io/a/b:c --json Dockstore.json --descriptor wdl');
}));

Expand Down
5 changes: 2 additions & 3 deletions src/app/container/launch/tool-launch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ToolLaunchService extends LaunchService {
getParamsString(path: string, versionName: string, currentDescriptor: string) {
let descriptor = '';

if (currentDescriptor === 'wdl') {
if (currentDescriptor === 'WDL') {
descriptor = ToolLaunchService.descriptorWdl;
}

Expand All @@ -32,8 +32,7 @@ export class ToolLaunchService extends LaunchService {

getCliString(path: string, versionName: string, currentDescriptor: string) {
let descriptor = '';

if (currentDescriptor === 'wdl') {
if (currentDescriptor === 'WDL') {
descriptor = ToolLaunchService.descriptorWdl;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h3>Step 1: Link External Accounts</h3>
</li>
<li *ngIf="tokenSetComplete">
<button class="changePage" (click)="nextStep()" id="next_step" *ngIf="curStep < 2">Next<span class="glyphicon glyphicon-chevron-right"></span></button>
<button class="changePage" routerLink="/docs/getting-started-with-docker" id="finish_step" *ngIf="curStep >= 2">Finish<span class="glyphicon glyphicon-chevron-right"></span></button>
<a href="https://docs.dockstore.org/docs/prereqs/getting-started-with-docker/" *ngIf="curStep >= 2">Finish<span class="glyphicon glyphicon-chevron-right"></span></a>
</li>
</ul>
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<button class="changePage" (click)="prevStep()"><span class="glyphicon glyphicon-chevron-left"></span>Previous</button>
</li>
<li>
<button class="changePage" routerLink="/docs/launch" id="finish_step">Finish<span class="glyphicon glyphicon-chevron-right"></span></button>
<a href="https://docs.dockstore.org/docs/user-tutorials/launch/">Finish<span class="glyphicon glyphicon-chevron-right"></span></a>
</li>
</ul>
</nav>
Expand Down
8 changes: 7 additions & 1 deletion src/app/workflow/workflow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ export class WorkflowComponent extends Entry {
this._toolType = 'workflows';
this.location = locationService;

let trimmedURL = window.location.href;
const indexOfLastColon = window.location.href.indexOf(':', window.location.href.indexOf('workflows'));
if (indexOfLastColon > 0) {
trimmedURL = window.location.href.substring(0, indexOfLastColon);
}

// Initialize discourse urls
(<any>window).DiscourseEmbed = {
discourseUrl: Dockstore.DISCOURSE_URL,
discourseEmbedUrl: decodeURIComponent(window.location.href)
discourseEmbedUrl: decodeURIComponent(trimmedURL)
};

this.resourcePath = this.location.prepareExternalUrl(this.location.path());
Expand Down

0 comments on commit 77388cc

Please sign in to comment.