Skip to content

Commit

Permalink
Fresh branch copy of changes for #21
Browse files Browse the repository at this point in the history
  • Loading branch information
dustine32 committed Oct 3, 2022
1 parent 0a61a55 commit f648a87
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

1 comment on commit f648a87

@dustine32
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that these code changes were actually made by @tmushayahama. I only copied them to a new branch and PR.

Please sign in to comment.