diff --git a/.travis.yml b/.travis.yml index 1e55bf54..b52966c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - '16' + - '18' addons: chrome: stable diff --git a/apps/ramp-client/src/app/app.component.ts b/apps/ramp-client/src/app/app.component.ts index d04c6fc9..700b1215 100644 --- a/apps/ramp-client/src/app/app.component.ts +++ b/apps/ramp-client/src/app/app.component.ts @@ -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'; @@ -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, diff --git a/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts b/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts index fa57e9aa..b2b505cd 100644 --- a/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts +++ b/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts @@ -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) => { @@ -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 = this.dialog.open(CompleteDialogComponent, { + data: { + title: 'Pathway', + message: "No enriched pathways found.", + tabs: [ 'Pathways' ] + + } + }) + + } } if (res && res.query) { this.query = res.query; @@ -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; diff --git a/libs/features/ramp/properties-from-metabolites/src/lib/properties-from-metabolites/properties-from-metabolites.component.ts b/libs/features/ramp/properties-from-metabolites/src/lib/properties-from-metabolites/properties-from-metabolites.component.ts index ddb4d028..3653b826 100644 --- a/libs/features/ramp/properties-from-metabolites/src/lib/properties-from-metabolites/properties-from-metabolites.component.ts +++ b/libs/features/ramp/properties-from-metabolites/src/lib/properties-from-metabolites/properties-from-metabolites.component.ts @@ -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; }); diff --git a/libs/features/ramp/ramp-header/src/lib/ramp-header/ramp-header.component.html b/libs/features/ramp/ramp-header/src/lib/ramp-header/ramp-header.component.html index 1439cc5b..297d79aa 100644 --- a/libs/features/ramp/ramp-header/src/lib/ramp-header/ramp-header.component.html +++ b/libs/features/ramp/ramp-header/src/lib/ramp-header/ramp-header.component.html @@ -1,4 +1,4 @@ - +
-

{{data.title}} analysis is now complete. Click on the tabs or below buttons to view the data.

+

{{data.title}} analysis is now complete. Click on the tabs or below buttons to view the data.

+

{{data.message}}



diff --git a/libs/shared/ui/complete-dialog/src/lib/complete-dialog/complete-dialog.component.spec.ts b/libs/shared/ui/complete-dialog/src/lib/complete-dialog/complete-dialog.component.spec.ts index 6f85e1a1..cc16f4cf 100644 --- a/libs/shared/ui/complete-dialog/src/lib/complete-dialog/complete-dialog.component.spec.ts +++ b/libs/shared/ui/complete-dialog/src/lib/complete-dialog/complete-dialog.component.spec.ts @@ -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'; @@ -16,7 +17,8 @@ describe('CompleteDialogComponent', () => { imports: [ MatDialogModule, FlexLayoutModule, - MatButtonModule + MatButtonModule, + MatIconModule ], declarations: [CompleteDialogComponent], providers: [{ provide: MatDialogRef, useValue: {} }, { provide: MAT_DIALOG_DATA, useValue: "dfgdfg" }] diff --git a/libs/shared/ui/error-dialog/src/lib/error-dialog/error-dialog.component.spec.ts b/libs/shared/ui/error-dialog/src/lib/error-dialog/error-dialog.component.spec.ts index 1f48b4d9..b2b84108 100644 --- a/libs/shared/ui/error-dialog/src/lib/error-dialog/error-dialog.component.spec.ts +++ b/libs/shared/ui/error-dialog/src/lib/error-dialog/error-dialog.component.spec.ts @@ -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'; @@ -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(); }); diff --git a/libs/shared/ui/header-template/src/lib/header-template/header-template.component.html b/libs/shared/ui/header-template/src/lib/header-template/header-template.component.html index 291f74c8..26786d1a 100644 --- a/libs/shared/ui/header-template/src/lib/header-template/header-template.component.html +++ b/libs/shared/ui/header-template/src/lib/header-template/header-template.component.html @@ -1,4 +1,4 @@ - +