diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 37fdc628b376407f513887804cf6508ba1477e19..bfece6a5f2ab67d55f8886c6eba73baa90315941 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -12,14 +12,14 @@ import {AppRoutingModule} from './app-routing.module'; import {ExplorerPageComponent} from './pages/explorer-page/explorer-page.component'; import {AboutPageComponent} from './pages/about-page/about-page.component'; import {HomePageComponent} from './pages/home-page/home-page.component'; -import {QueryComponent} from './components/query/query.component'; -import {LaunchAnalysisComponent} from './components/launch-analysis/launch-analysis.component'; -import {SelectDatasetComponent} from './components/select-dataset/select-dataset.component'; -import {AnalysisWindowComponent} from './components/analysis-window/analysis-window.component'; +import {QueryTileComponent} from './components/query-tile/query-tile.component'; +import {LaunchAnalysisComponent} from './dialogs/launch-analysis/launch-analysis.component'; +import {DatasetTileComponent} from './components/dataset-tile/dataset-tile.component'; +import {AnalysisPanelComponent} from './components/analysis-panel/analysis-panel.component'; import {TaskListComponent} from './components/task-list/task-list.component'; import {ToggleComponent} from './components/toggle/toggle.component'; -import {InfoBoxComponent} from './components/info-box/info-box.component'; -import {CustomProteinsComponent} from './components/custom-proteins/custom-proteins.component'; +import {InfoTileComponent} from './components/info-tile/info-tile.component'; +import {CustomProteinsComponent} from './dialogs/custom-proteins/custom-proteins.component'; import {AnalysisService} from './analysis.service'; @@ -30,13 +30,13 @@ import {AnalysisService} from './analysis.service'; ExplorerPageComponent, AboutPageComponent, HomePageComponent, - QueryComponent, + QueryTileComponent, LaunchAnalysisComponent, - SelectDatasetComponent, - AnalysisWindowComponent, + DatasetTileComponent, + AnalysisPanelComponent, TaskListComponent, ToggleComponent, - InfoBoxComponent, + InfoTileComponent, CustomProteinsComponent, ], imports: [ diff --git a/src/app/components/analysis-window/analysis-window.component.html b/src/app/components/analysis-panel/analysis-panel.component.html similarity index 95% rename from src/app/components/analysis-window/analysis-window.component.html rename to src/app/components/analysis-panel/analysis-panel.component.html index 632c92ef491828e7b3ca891cba83930b50b49c54..02cf7ec80e0f2f551e4f8e0ad57a1569fc57c90e 100644 --- a/src/app/components/analysis-window/analysis-window.component.html +++ b/src/app/components/analysis-panel/analysis-panel.component.html @@ -231,6 +231,10 @@ Status <p-sortIcon [field]="'status'"></p-sortIcon> </th> + <th [pSortableColumn]="'inTrial'"> + Trial + <p-sortIcon [field]="'inTrial'"></p-sortIcon> + </th> <th *ngIf="tableHasScores" [pSortableColumn]="'score'"> Score <p-sortIcon [field]="'score'"></p-sortIcon> @@ -241,7 +245,22 @@ <tr> <td><a href="https://www.drugbank.ca/drugs/{{ e.drugId }}" target="_blank">{{ e.drugId }}</a></td> <td>{{e.name}}</td> - <td>{{e.status}}</td> + <td> + <span *ngIf="e.status === 'approved'"> + <i class="fa fa-check"></i> + approved + </span> + <span *ngIf="e.status === 'unapproved'"> + <i class="fa fa-times"></i> + not approved + </span> + </td> + <td> + <span *ngIf="e.inTrial"> + <i class="fa fa-microscope has-text-primary"></i> + in Trial + </span> + </td> <td *ngIf="tableHasScores">{{e.score | number}}</td> </tr> </ng-template> diff --git a/src/app/components/analysis-window/analysis-window.component.scss b/src/app/components/analysis-panel/analysis-panel.component.scss similarity index 100% rename from src/app/components/analysis-window/analysis-window.component.scss rename to src/app/components/analysis-panel/analysis-panel.component.scss diff --git a/src/app/components/analysis-window/analysis-window.component.spec.ts b/src/app/components/analysis-panel/analysis-panel.component.spec.ts similarity index 63% rename from src/app/components/analysis-window/analysis-window.component.spec.ts rename to src/app/components/analysis-panel/analysis-panel.component.spec.ts index 35a1330d5bcca33d20bf430e237388f3e10e810f..42fbf7d2a3bdfa1d7cc99789e0b27e4fe1c1153d 100644 --- a/src/app/components/analysis-window/analysis-window.component.spec.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.spec.ts @@ -1,22 +1,22 @@ import {async, ComponentFixture, TestBed} from '@angular/core/testing'; -import {AnalysisWindowComponent} from './analysis-window.component'; +import {AnalysisPanelComponent} from './analysis-panel.component'; import {HttpClientModule} from '@angular/common/http'; describe('AnalysisWindowComponent', () => { - let component: AnalysisWindowComponent; - let fixture: ComponentFixture<AnalysisWindowComponent>; + let component: AnalysisPanelComponent; + let fixture: ComponentFixture<AnalysisPanelComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [AnalysisWindowComponent], + declarations: [AnalysisPanelComponent], imports: [HttpClientModule], }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(AnalysisWindowComponent); + fixture = TestBed.createComponent(AnalysisPanelComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/components/analysis-window/analysis-window.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts similarity index 98% rename from src/app/components/analysis-window/analysis-window.component.ts rename to src/app/components/analysis-panel/analysis-panel.component.ts index 3370e8e5f417684a28ed005a4ebc202c0399c5c1..41f37f4c5cf8b0b1091c0b281b80dc17cabd15fd 100644 --- a/src/app/components/analysis-window/analysis-window.component.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.ts @@ -39,11 +39,11 @@ interface Scored { } @Component({ - selector: 'app-analysis-window', - templateUrl: './analysis-window.component.html', - styleUrls: ['./analysis-window.component.scss'], + selector: 'app-analysis-panel', + templateUrl: './analysis-panel.component.html', + styleUrls: ['./analysis-panel.component.scss'], }) -export class AnalysisWindowComponent implements OnInit, OnChanges { +export class AnalysisPanelComponent implements OnInit, OnChanges { @ViewChild('network', {static: false}) networkEl: ElementRef; diff --git a/src/app/components/select-dataset/select-dataset.component.html b/src/app/components/dataset-tile/dataset-tile.component.html similarity index 100% rename from src/app/components/select-dataset/select-dataset.component.html rename to src/app/components/dataset-tile/dataset-tile.component.html diff --git a/src/app/components/select-dataset/select-dataset.component.scss b/src/app/components/dataset-tile/dataset-tile.component.scss similarity index 100% rename from src/app/components/select-dataset/select-dataset.component.scss rename to src/app/components/dataset-tile/dataset-tile.component.scss diff --git a/src/app/components/select-dataset/select-dataset.component.spec.ts b/src/app/components/dataset-tile/dataset-tile.component.spec.ts similarity index 59% rename from src/app/components/select-dataset/select-dataset.component.spec.ts rename to src/app/components/dataset-tile/dataset-tile.component.spec.ts index b5e96d6e83f570baf5d5eebc56f7c3cea8c12e66..b7aa720212f5902e84733e95efa687d54b5c56eb 100644 --- a/src/app/components/select-dataset/select-dataset.component.spec.ts +++ b/src/app/components/dataset-tile/dataset-tile.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { SelectDatasetComponent } from './select-dataset.component'; +import { DatasetTileComponent } from './dataset-tile.component'; describe('SelectDatasetComponent', () => { - let component: SelectDatasetComponent; - let fixture: ComponentFixture<SelectDatasetComponent>; + let component: DatasetTileComponent; + let fixture: ComponentFixture<DatasetTileComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ SelectDatasetComponent ] + declarations: [ DatasetTileComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(SelectDatasetComponent); + fixture = TestBed.createComponent(DatasetTileComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/components/select-dataset/select-dataset.component.ts b/src/app/components/dataset-tile/dataset-tile.component.ts similarity index 70% rename from src/app/components/select-dataset/select-dataset.component.ts rename to src/app/components/dataset-tile/dataset-tile.component.ts index 2e6898f795dea8ece605126c6a0c90a7d4c084b0..b949c85c5540c1a8a34deaedbc4f3633928cd045 100644 --- a/src/app/components/select-dataset/select-dataset.component.ts +++ b/src/app/components/dataset-tile/dataset-tile.component.ts @@ -2,12 +2,12 @@ import {Component, EventEmitter, Input, Output} from '@angular/core'; import {Dataset} from '../../interfaces'; @Component({ - selector: 'app-select-dataset', - templateUrl: './select-dataset.component.html', - styleUrls: ['./select-dataset.component.scss'] + selector: 'app-dataset-tile', + templateUrl: './dataset-tile.component.html', + styleUrls: ['./dataset-tile.component.scss'] }) -export class SelectDatasetComponent { +export class DatasetTileComponent { @Input() selectedDataset: Dataset; @Output() selectedDatasetChange: EventEmitter<any> = new EventEmitter(); diff --git a/src/app/components/info-box/info-box.component.html b/src/app/components/info-tile/info-tile.component.html similarity index 100% rename from src/app/components/info-box/info-box.component.html rename to src/app/components/info-tile/info-tile.component.html diff --git a/src/app/components/info-box/info-box.component.scss b/src/app/components/info-tile/info-tile.component.scss similarity index 100% rename from src/app/components/info-box/info-box.component.scss rename to src/app/components/info-tile/info-tile.component.scss diff --git a/src/app/components/info-box/info-box.component.spec.ts b/src/app/components/info-tile/info-tile.component.spec.ts similarity index 66% rename from src/app/components/info-box/info-box.component.spec.ts rename to src/app/components/info-tile/info-tile.component.spec.ts index 90ca0818d9720bc190333bc6323a8abb9f9dae4a..ae3ce55eed1714302aa0cd8a39624c9b75b58261 100644 --- a/src/app/components/info-box/info-box.component.spec.ts +++ b/src/app/components/info-tile/info-tile.component.spec.ts @@ -1,22 +1,22 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { InfoBoxComponent } from './info-box.component'; +import { InfoTileComponent } from './info-tile.component'; import {HttpClientModule} from '@angular/common/http'; describe('InfoBoxComponent', () => { - let component: InfoBoxComponent; - let fixture: ComponentFixture<InfoBoxComponent>; + let component: InfoTileComponent; + let fixture: ComponentFixture<InfoTileComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ InfoBoxComponent ], + declarations: [ InfoTileComponent ], imports: [HttpClientModule], }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(InfoBoxComponent); + fixture = TestBed.createComponent(InfoTileComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/components/info-box/info-box.component.ts b/src/app/components/info-tile/info-tile.component.ts similarity index 63% rename from src/app/components/info-box/info-box.component.ts rename to src/app/components/info-tile/info-tile.component.ts index b45c8ca5fe64ac733b495841d9a344468d898c1c..0d6f89ff3bf24791dbd5ffb121e903d27a1319e6 100644 --- a/src/app/components/info-box/info-box.component.ts +++ b/src/app/components/info-tile/info-tile.component.ts @@ -3,11 +3,11 @@ import {Wrapper} from '../../interfaces'; import {AnalysisService} from '../../analysis.service'; @Component({ - selector: 'app-info-box', - templateUrl: './info-box.component.html', - styleUrls: ['./info-box.component.scss'] + selector: 'app-info-tile', + templateUrl: './info-tile.component.html', + styleUrls: ['./info-tile.component.scss'] }) -export class InfoBoxComponent implements OnInit { +export class InfoTileComponent implements OnInit { @Input() public wrapper: Wrapper; diff --git a/src/app/components/query/query.component.html b/src/app/components/query-tile/query-tile.component.html similarity index 100% rename from src/app/components/query/query.component.html rename to src/app/components/query-tile/query-tile.component.html diff --git a/src/app/components/query/query.component.scss b/src/app/components/query-tile/query-tile.component.scss similarity index 100% rename from src/app/components/query/query.component.scss rename to src/app/components/query-tile/query-tile.component.scss diff --git a/src/app/components/query/query.component.spec.ts b/src/app/components/query-tile/query-tile.component.spec.ts similarity index 60% rename from src/app/components/query/query.component.spec.ts rename to src/app/components/query-tile/query-tile.component.spec.ts index 3ea08874e46f2932065caf4c1c242570101f2514..c988c387feda158611f35e93f06e6be2a3820adc 100644 --- a/src/app/components/query/query.component.spec.ts +++ b/src/app/components/query-tile/query-tile.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { QueryComponent } from './query.component'; +import { QueryTileComponent } from './query-tile.component'; describe('QueryComponent', () => { - let component: QueryComponent; - let fixture: ComponentFixture<QueryComponent>; + let component: QueryTileComponent; + let fixture: ComponentFixture<QueryTileComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ QueryComponent ] + declarations: [ QueryTileComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(QueryComponent); + fixture = TestBed.createComponent(QueryTileComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/components/query/query.component.ts b/src/app/components/query-tile/query-tile.component.ts similarity index 83% rename from src/app/components/query/query.component.ts rename to src/app/components/query-tile/query-tile.component.ts index 383e50f9e0598ac12d0f979b517d2dd196808726..773bde8e4b15fe617c1906124da4a12cc9ef2249 100644 --- a/src/app/components/query/query.component.ts +++ b/src/app/components/query-tile/query-tile.component.ts @@ -2,11 +2,11 @@ import {Component, Input, Output, EventEmitter} from '@angular/core'; import {Protein, Wrapper, ViralProtein} from '../../interfaces'; @Component({ - selector: 'app-query-component', - templateUrl: './query.component.html', - styleUrls: ['./query.component.scss'] + selector: 'app-query-tile-component', + templateUrl: './query-tile.component.html', + styleUrls: ['./query-tile.component.scss'] }) -export class QueryComponent { +export class QueryTileComponent { @Output() selectItem: EventEmitter<any> = new EventEmitter(); diff --git a/src/app/components/custom-proteins/custom-proteins.component.html b/src/app/dialogs/custom-proteins/custom-proteins.component.html similarity index 100% rename from src/app/components/custom-proteins/custom-proteins.component.html rename to src/app/dialogs/custom-proteins/custom-proteins.component.html diff --git a/src/app/components/custom-proteins/custom-proteins.component.scss b/src/app/dialogs/custom-proteins/custom-proteins.component.scss similarity index 100% rename from src/app/components/custom-proteins/custom-proteins.component.scss rename to src/app/dialogs/custom-proteins/custom-proteins.component.scss diff --git a/src/app/components/custom-proteins/custom-proteins.component.spec.ts b/src/app/dialogs/custom-proteins/custom-proteins.component.spec.ts similarity index 100% rename from src/app/components/custom-proteins/custom-proteins.component.spec.ts rename to src/app/dialogs/custom-proteins/custom-proteins.component.spec.ts diff --git a/src/app/components/custom-proteins/custom-proteins.component.ts b/src/app/dialogs/custom-proteins/custom-proteins.component.ts similarity index 100% rename from src/app/components/custom-proteins/custom-proteins.component.ts rename to src/app/dialogs/custom-proteins/custom-proteins.component.ts diff --git a/src/app/components/launch-analysis/launch-analysis.component.html b/src/app/dialogs/launch-analysis/launch-analysis.component.html similarity index 100% rename from src/app/components/launch-analysis/launch-analysis.component.html rename to src/app/dialogs/launch-analysis/launch-analysis.component.html diff --git a/src/app/components/launch-analysis/launch-analysis.component.scss b/src/app/dialogs/launch-analysis/launch-analysis.component.scss similarity index 100% rename from src/app/components/launch-analysis/launch-analysis.component.scss rename to src/app/dialogs/launch-analysis/launch-analysis.component.scss diff --git a/src/app/components/launch-analysis/launch-analysis.component.ts b/src/app/dialogs/launch-analysis/launch-analysis.component.ts similarity index 100% rename from src/app/components/launch-analysis/launch-analysis.component.ts rename to src/app/dialogs/launch-analysis/launch-analysis.component.ts diff --git a/src/app/pages/explorer-page/explorer-page.component.html b/src/app/pages/explorer-page/explorer-page.component.html index 2d2c24c4fdfbf0180859441a6973e9f06caeb63d..be655e2aa1b2ce1c366b286d4fc6fa75d448c7d9 100644 --- a/src/app/pages/explorer-page/explorer-page.component.html +++ b/src/app/pages/explorer-page/explorer-page.component.html @@ -31,9 +31,9 @@ </header> <div *ngIf="collapseData"> <div class="card-content"> - <app-select-dataset [datasetItems]="datasetItems" [selectedDataset]="selectedDataset" + <app-dataset-tile [datasetItems]="datasetItems" [selectedDataset]="selectedDataset" (selectedDatasetChange)="selectedDataset = $event; createNetwork($event.data)"> - </app-select-dataset> + </app-dataset-tile> </div> </div> </div> @@ -97,8 +97,8 @@ <div class="card-content"> <div class="field"> <div class="control"> - <app-query-component [queryItems]="queryItems" - (selectItem)="queryAction($event)"></app-query-component> + <app-query-tile-component [queryItems]="queryItems" + (selectItem)="queryAction($event)"></app-query-tile-component> </div> </div> </div> @@ -179,9 +179,9 @@ </div> <div class="analysis-view" *ngIf="selectedAnalysisToken"> - <app-analysis-window [(token)]="selectedAnalysisToken" + <app-analysis-panel [(token)]="selectedAnalysisToken" (showDetailsChange)="selectedWrapper = $event" - (visibleItems)="analysisWindowChanged($event)"></app-analysis-window> + (visibleItems)="analysisWindowChanged($event)"></app-analysis-panel> </div> </div> @@ -213,7 +213,7 @@ </header> <div *ngIf="collapseDetails"> <div class="card-content"> - <app-info-box [wrapper]="selectedWrapper"></app-info-box> + <app-info-tile [wrapper]="selectedWrapper"></app-info-tile> </div> </div> </div>