Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Development #114

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '16'
- '18'

addons:
chrome: stable
Expand Down
7 changes: 3 additions & 4 deletions apps/ramp-client/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component, ElementRef,
OnInit, ViewChild,
Component,
OnInit,
ViewEncapsulation
} from "@angular/core";
import { MatDialog } from '@angular/material/dialog';
import { ErrorDialogComponent } from '@ramp/shared/ui/error-dialog';
import { LinkTemplateProperty } from '@ramp/shared/ui/header-template';
import { RampFacade } from '@ramp/stores/ramp-store';

Expand Down Expand Up @@ -103,7 +102,7 @@ export class AppComponent implements OnInit {
ngOnInit() {
this.rampFacade.error$.subscribe((error) => {
if (error) {
console.log(error);
// console.log(error);
/* this.dialog.open(ErrorDialogComponent, {
data: {
error: error,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export class PathwayEnrichmentComponent
.subscribe(
(res: any | undefined) => {
if (res && res.data) {
if (res.data.length) {
this.dataAsDataProperty = res.data.map((enrichment: FisherResult) => {
const newObj: { [key: string]: DataProperty } = {};
Object.entries(enrichment).map((value: any, index: any) => {
Expand All @@ -173,12 +174,23 @@ export class PathwayEnrichmentComponent
});
return newObj;
});
this.enrichmentLoading = false;
this.enrichmentLoading = false;


this.allDataAsDataProperty = this.dataAsDataProperty;
this.imageLoading = false;
this.ref.markForCheck();
this.allDataAsDataProperty = this.dataAsDataProperty;
this.imageLoading = false;
this.ref.markForCheck();
} else {
const ref: MatDialogRef<CompleteDialogComponent> = this.dialog.open(CompleteDialogComponent, {
data: {
title: 'Pathway',
message: "No enriched pathways found.",
tabs: [ 'Pathways' ]

}
})

}
}
if (res && res.query) {
this.query = res.query;
Expand Down Expand Up @@ -244,6 +256,7 @@ export class PathwayEnrichmentComponent

fetchEnrichment(event: string[]): void {
this.inputList = event.map(item => item.toLocaleLowerCase());
this.image = null;
this.rampFacade.dispatch(fetchPathwaysFromAnalytes({ analytes: event }));
this.pathwaysLoading = true;
this.enrichmentLoading = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,9 @@ export class PropertiesFromMetabolitesComponent
value: value[1],
});
});

console.log(obj.iso_smiles)
newObj.imageUrl.url = `${
this.route.snapshot.data.renderUrl
}(${encodeURIComponent(obj.iso_smiles)})?size=150`;
console.log(newObj.imageUrl.url)
console.log(`${
this.route.snapshot.data.renderUrl
}(${encodeURI(obj.iso_smiles)})?size=150`)
newObj.imageUrl.label = newObj.common_name.value;
return newObj;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ncats-frontend-library-header-template class="ramp-header" [links]="links">
<ncats-frontend-library-header-template class="header" [links]="links">
<div class="left-options">
<a href="/" title="RaMP home page">
<img
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FlexLayoutModule } from "@angular/flex-layout";
import { MatIconModule } from "@angular/material/icon";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { RouterTestingModule } from "@angular/router/testing";

Expand All @@ -15,7 +16,8 @@ describe('NcatsFooterComponent', () => {
imports: [
RouterTestingModule,
BrowserAnimationsModule,
FlexLayoutModule
FlexLayoutModule,
MatIconModule
]
})
.compileComponents();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Component } from '@angular/core';
import { Component, ViewEncapsulation } from "@angular/core";

@Component({
selector: 'ncats-frontend-library-ncats-header',
templateUrl: './ncats-header.component.html',
styleUrls: ['./ncats-header.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class NcatsHeaderComponent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<span mat-dialog-title>Analysis Complete</span> <mat-icon matRipple (click)="close()" class="close-button">close</mat-icon>
</div>
<div mat-dialog-content>
<p>{{data.title}} analysis is now complete. Click on the tabs or below buttons to view the data.</p>
<p *ngIf="!data.message">{{data.title}} analysis is now complete. Click on the tabs or below buttons to view the data.</p>
<p *ngIf="data.message">{{data.message}}</p>
<br>
<br>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FlexLayoutModule } from "@angular/flex-layout";
import { MatButtonModule } from "@angular/material/button";
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from "@angular/material/dialog";
import { MatIconModule } from "@angular/material/icon";

import { CompleteDialogComponent } from './complete-dialog.component';

Expand All @@ -16,7 +17,8 @@ describe('CompleteDialogComponent', () => {
imports: [
MatDialogModule,
FlexLayoutModule,
MatButtonModule
MatButtonModule,
MatIconModule
],
declarations: [CompleteDialogComponent],
providers: [{ provide: MatDialogRef, useValue: {} }, { provide: MAT_DIALOG_DATA, useValue: "dfgdfg" }]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { FlexLayoutModule } from "@angular/flex-layout";
import { MatButtonModule } from "@angular/material/button";
import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
import { MatIconModule } from "@angular/material/icon";

import { ErrorDialogComponent } from './error-dialog.component';

Expand All @@ -10,7 +13,12 @@ describe('ErrorDialogComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ErrorDialogComponent],
imports: [],
imports: [
MatDialogModule,
FlexLayoutModule,
MatButtonModule,
MatIconModule
],
providers: [{ provide: MAT_DIALOG_DATA, useValue: {} }],
}).compileComponents();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-sidenav-container class="mobile-menu-container">
<mat-sidenav-container class="mobile-menu-container header">
<nav>
<mat-toolbar class="toolbar-template" [@slideInOut]="animationState">
<ng-content select=".left-options"></ng-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.toolbar-template {
position: fixed;
margin-bottom: 60px;
background-color: mat.get-color-from-palette($primary);
background-color: mat.get-color-from-palette($accent) !important;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class RampEffects {
}
),
catchError((error: ErrorEvent) => {
console.log(error);
// console.log(error);
return of(RampActions.fetchPathwaysFromAnalytesFailure({ error }));
})
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ on(
RampActions.fetchPropertiesFromMetabolitesFailure,
filterEnrichmentFromMetabolitesFailure,
(state, { error }) => {
console.log(error);
// console.log(error);
return {
...state,
loading: false,
Expand Down
4 changes: 2 additions & 2 deletions libs/stores/ramp-store/src/lib/+state/ramp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ export class RampService {
min_pathway_tocluster?: number,
perc_pathway_overlap?: number
){
if(!dataframe.fishresults || dataframe.fishresults.length >= 10) {
if(!dataframe.fishresults || dataframe.fishresults.length >= 100) {
return ""
} else {
const body = {
Expand Down Expand Up @@ -553,7 +553,7 @@ export class RampService {
console.error(error); // log to console instead

// TODO: better job of transforming error for user consumption
console.log(`${operation} failed: ${error.message}`);
// console.log(`${operation} failed: ${error.message}`);

// Let the app keep running by returning an empty result.
return of(result as T);
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
Expand Down
Loading