Skip to content

Commit

Permalink
Merge pull request #22 from geneontology/issue-21-view-pathway
Browse files Browse the repository at this point in the history
View button points to (Noctua-hosted) Alliance Pathway Preview
  • Loading branch information
dustine32 authored Oct 10, 2022
2 parents 0a61a55 + f648a87 commit d64d187
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/browse-models/browse-models.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h2 class="heading-secondary">Title</h2>
<div class="row__title">

<div class="row__title__content">
<a href="{{ urlHandler.getGraphView(row.gocam) }}" target="blank" class="row__title__link">{{row.title}} &nbsp;
<a href="{{ urlHandler.getAlliancePathwayView(row.gocam) }}" target="blank" class="row__title__link">{{row.title}} &nbsp;
<br>
<hr>
</a>
Expand All @@ -137,7 +137,7 @@ <h2 class="heading-secondary">Title</h2>
</span>
</div>

<a href="{{ urlHandler.getGraphView(row.gocam) }}" target="blank" *ngIf="auth.isAuthenticated()">
<a href="{{ urlHandler.getAlliancePathwayView(row.gocam) }}" target="blank" *ngIf="auth.isAuthenticated()">
<span class="row__view-edit" matTooltip="Edit Model" matTooltipPosition="below" [matTooltipShowDelay]="0.2">
<mat-icon class="row__open">edit</mat-icon>
</span>
Expand All @@ -146,7 +146,7 @@ <h2 class="heading-secondary">Title</h2>
</div>

<!--
<a href="{{ urlHandler.getGraphView(row.gocam) }}" target="blank" class="row__title">
<a href="{{ urlHandler.getAlliancePathwayView(row.gocam) }}" target="blank" class="row__title">
<span class="row__view-primary" matTooltip="Open Graph View" matTooltipPosition="below" [matTooltipShowDelay]="0.2">G
<mat-icon class="row__open">open_in_new</mat-icon>
</span>
Expand All @@ -162,7 +162,7 @@ <h2 class="heading-secondary">Title</h2>
<div class="row__title__actions">

<span matTooltip="Open Graph View" matTooltipPosition="after" [matTooltipShowDelay]="0.2">
<a href="{{ urlHandler.getGraphView(row.gocam) }}" target="blank">
<a href="{{ urlHandler.getAlliancePathwayView(row.gocam) }}" target="blank">
<button mat-button class="button-open">
<span>View &nbsp;
<mat-icon>open_in_new</mat-icon>
Expand Down
7 changes: 7 additions & 0 deletions src/app/core/url-handler.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ export class UrlHandlerService {
return environment.noctuaPathwayViewUrl + model;
}

getAlliancePathwayView(goModelId: string): string {
let model = goModelId;
if (model.includes("http")) {
model = this.curieService.getCurie(goModelId);
}
return environment.noctuaAlliancePathwayViewUrl + model;
}

getPubMedAbstract(pmid: string) : string {
let modpmid = pmid.replace("PMID:", "");
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const environment = {
// External URL to explore a GO-Term or GO-CAM
noctuaUrl : "http://noctua.geneontology.org/",
noctuaGraphViewUrl : "http://noctua.geneontology.org/editor/graph/",
noctuaAlliancePathwayViewUrl: 'http://noctua.geneontology.org/workbench/noctua-alliance-pathway-preview/?model_id=',
noctuaPathwayViewUrl : "http://noctua.geneontology.org/workbench/pathwayview/?model_id=",
amigoUrl : "http://amigo.geneontology.org/",
amigoTermUrl : "http://amigo.geneontology.org/amigo/term/",
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const environment = {
// External URL to explore a GO-Term or GO-CAM
noctuaUrl : "http://noctua.geneontology.org/",
noctuaGraphViewUrl : "http://noctua.geneontology.org/editor/graph/",
noctuaAlliancePathwayViewUrl: 'http://noctua.geneontology.org/workbench/noctua-alliance-pathway-preview/?model_id=',
noctuaPathwayViewUrl : "http://noctua.geneontology.org/workbench/pathwayview/?model_id=",
amigoUrl : "http://amigo.geneontology.org/",
amigoTermUrl : "http://amigo.geneontology.org/amigo/term/",
Expand Down

0 comments on commit d64d187

Please sign in to comment.