Skip to content
This repository was archived by the owner on Dec 15, 2020. It is now read-only.

Commit b514518

Browse files
shiroyukimpanik
authored andcommitted
Manually merge Data Explorer module, COVID-19 app (i.e., discovery app), and beacon app; and resolved regression introduced by babel/compat-data (angular/angular-cli#17262)
Aggregated commits from 2020.03.03 to 2020.03.20 - Support for coronavirus app - Preliminary support for Google Maps - Added the condition to hide the app switcher if there is only one accessible app - Implemented the condition to hide the sidebar if there is only one submodule available - Preliminary support for Bing Maps - Moved terms into its own menu - Nextstrain integration and small style fixes - Added attribution for GISAID - Added attribution of NGDC - Parameterized COVID Beacon Url - Ensured that the first query is triggered on initialization - Preliminary UX updates - Synchronize query params with URL and initiate search automatically - Make mouse a hand over clickable rows - Fixed the error/warning on bi-directional binding, unused reference, hid the info panel by default, and make the button explicitly do something (instead of 'toggle') - Do search on enter - When the search starts, deactivate the search box - Dynamically set mobile state if necessary - Turn off pagination on mobile - Reduced self-referencing and local variables and ensure that when the row is selected, the details panel is automatically displayed. - When the user clicks on a row (cell), the info panel is auto-displayed. - Replaced how the sidebar is able from relying on the number of submodules to the property of the module metadata. - Added the test for Workflow Registry - Added the test for COVID-19 beacon - Removed the default title. (COVID-23) - Implemented Google Analytics by injecting to <head> (COVID-8) - Introduced dynamic theme (COVID-20)
1 parent 5175243 commit b514518

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2859
-1020
lines changed

angular/package-lock.json

Lines changed: 881 additions & 975 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular/package.json

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,55 +14,66 @@
1414
},
1515
"private": true,
1616
"dependencies": {
17-
"@angular/animations": "^8.2.8",
18-
"@angular/cdk": "~8.2.1",
19-
"@angular/common": "^8.2.8",
20-
"@angular/compiler": "~8.2.8",
21-
"@angular/core": "^8.2.8",
17+
"@agm/core": "^1.1.0",
18+
"@angular/animations": "^8.2.14",
19+
"@angular/cdk": "^8.2.3",
20+
"@angular/common": "^8.2.14",
21+
"@angular/compiler": "^8.2.14",
22+
"@angular/core": "^8.2.14",
2223
"@angular/flex-layout": "^8.0.0-beta.27",
23-
"@angular/forms": "^8.2.8",
24-
"@angular/material": "^8.2.1",
25-
"@angular/platform-browser": "~8.2.8",
26-
"@angular/platform-browser-dynamic": "~8.2.8",
27-
"@angular/router": "~8.2.8",
24+
"@angular/forms": "^8.2.14",
25+
"@angular/material": "^8.2.3",
26+
"@angular/platform-browser": "^8.2.14",
27+
"@angular/platform-browser-dynamic": "^8.2.14",
28+
"@angular/router": "^8.2.14",
29+
"@materia-ui/ngx-monaco-editor": "4.0.1",
2830
"@ngx-loading-bar/core": "^4.2.0",
2931
"@ngx-loading-bar/http-client": "^4.2.0",
32+
"@types/bingmaps": "0.0.1",
33+
"@types/googlemaps": "^3.39.3",
34+
"ag-grid-angular": "^22.1.1",
35+
"ag-grid-community": "^22.1.1",
3036
"ang-jsoneditor": "1.8.3",
37+
"angular-maps": "^6.0.3",
38+
"angular-material-dynamic-themes": "^1.0.4",
3139
"angular7-json-schema-form": "^1.0.4",
40+
"bingmaps": "^2.0.3",
3241
"brace": "^0.11.1",
3342
"dayjs": "^1.8.16",
34-
"ddap-common-lib": "0.0.19-67-g6ac7b50",
43+
"ddap-common-lib": "0.0.19-72-g461e5a4",
3544
"hammerjs": "^2.0.8",
36-
"jsoneditor": "^7.0.4",
45+
"highlight.js": "^9.15.10",
46+
"jsoneditor": "^7.5.0",
47+
"linkifyjs": "latest",
3748
"lodash.clonedeep": "^4.5.0",
3849
"lodash.get": "^4.4.2",
3950
"lodash.isequal": "^4.5.0",
4051
"lodash.samplesize": "^4.2.0",
4152
"lodash.set": "^4.3.2",
4253
"lodash.startcase": "^4.4.0",
4354
"lodash.uniq": "^4.5.0",
55+
"monaco-editor": "~0.18.1",
4456
"ng2-ace-editor": "^0.3.9",
45-
"ngx-chips": "^2.0.2",
46-
"ngx-clipboard": "^12.2.0",
57+
"ngx-chips": "^2.1.0",
58+
"ngx-clipboard": "^12.3.1",
59+
"ngx-highlightjs": "^3.0.3",
4760
"ngx-webstorage-service": "^4.1.0",
48-
"@materia-ui/ngx-monaco-editor": "4.0.1",
49-
"monaco-editor": "~0.18.1",
50-
"rxjs": "~6.5.3",
61+
"rxjs": "^6.5.4",
5162
"showdown": "^1.9.1",
52-
"tslib": "^1.10.0",
53-
"zone.js": "~0.9.1",
54-
"linkifyjs": "latest"
63+
"tslib": "^1.11.0",
64+
"zone.js": "~0.9.1"
5565
},
5666
"devDependencies": {
57-
"@angular-devkit/build-angular": "^0.803.24",
58-
"@angular-devkit/build-ng-packagr": "~0.803.6",
59-
"@angular/cli": "^8.3.6",
60-
"@angular/compiler-cli": "^8.2.8",
61-
"@types/long": "^4.0.0",
62-
"@types/node": "~12.7.8",
63-
"codelyzer": "~5.1.0",
67+
"@angular-devkit/build-angular": "^0.803.25",
68+
"@angular-devkit/build-ng-packagr": "^0.803.25",
69+
"@angular/cli": "^8.3.25",
70+
"@angular/compiler-cli": "^8.2.14",
71+
"@babel/compat-data": "~7.8.0",
72+
"@types/long": "^4.0.1",
73+
"@types/node": "^12.7.12",
74+
"codelyzer": "^5.1.2",
6475
"husky": "^4.2.3",
65-
"lint-staged": "^10.0.7",
76+
"lint-staged": "^10.0.8",
6677
"protobufjs": "^6.8.8",
6778
"ts-node": "~8.3.0",
6879
"tslint": "~5.18.0",

angular/src/app/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const routes: Routes = [
3333
.then(mod => mod.WorkflowsModule),
3434
},
3535
{
36-
path: 'search',
37-
loadChildren: () => import('./search/search.module')
38-
.then(mod => mod.SearchModule),
36+
path: 'discovery',
37+
loadChildren: () => import('./discovery/discovery.module')
38+
.then(mod => mod.DiscoveryModule),
3939
},
4040
],
4141
},

angular/src/app/data/data.module.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { NgModule } from '@angular/core';
22
import { MatGridListModule } from '@angular/material/grid-list';
3+
import { MatToolbarModule } from '@angular/material/toolbar';
4+
import { DdapLayoutModule } from 'ddap-common-lib';
5+
import { AceEditorModule } from 'ng2-ace-editor';
36

47
import { SharedModule } from '../shared/shared.module';
58

@@ -8,7 +11,6 @@ import { DataListComponent } from './data-list/data-list.component';
811
import { DataRoutingModule } from './data-routing.module';
912
import { DataSearchComponent } from './data-search/data-search.component';
1013

11-
1214
@NgModule({
1315
declarations: [
1416
DataListComponent,
@@ -18,8 +20,10 @@ import { DataSearchComponent } from './data-search/data-search.component';
1820
imports: [
1921
SharedModule,
2022
DataRoutingModule,
21-
2223
MatGridListModule,
24+
MatToolbarModule,
25+
AceEditorModule,
26+
DdapLayoutModule,
2327
],
2428
})
2529
export class DataModule {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export class BeaconRequest {
2+
referenceName: string;
3+
referenceBases: string;
4+
alternateBases: string;
5+
assemblyId: string;
6+
start: number;
7+
}
8+
9+
export class BeaconResponse {
10+
datasetId: string;
11+
exists: boolean;
12+
info: any[];
13+
}
14+
15+
export interface BeaconAPIResponse {
16+
beaconId: string;
17+
alleleRequest: {
18+
referenceName: string,
19+
referenceBases: string,
20+
alternateBases: string,
21+
assemblyId: string,
22+
start: number,
23+
};
24+
datasetAlleleResponses: BeaconResponse[];
25+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
2+
import { Injectable } from '@angular/core';
3+
4+
import { BeaconResponse } from './beacon.model';
5+
6+
@Injectable({
7+
providedIn: 'root',
8+
})
9+
export class BeaconService {
10+
11+
apiUrl: String;
12+
13+
constructor(
14+
private httpClient: HttpClient
15+
) {}
16+
17+
setApiUrl (url: String) {
18+
this.apiUrl = url;
19+
}
20+
21+
getApiUrl() {
22+
return this.apiUrl;
23+
}
24+
25+
searchBeacon(
26+
assembly: string,
27+
referenceName: string,
28+
start: number,
29+
referenceBases: string,
30+
alternateBases: string,
31+
headers?: HttpHeaders)
32+
: Promise<BeaconResponse[]> { // FIXME This is an incorrect response type. Need to use BeaconAPIResponse instead.
33+
return this.searchBeacons(
34+
assembly,
35+
referenceName,
36+
start,
37+
referenceBases,
38+
alternateBases,
39+
headers);
40+
}
41+
42+
searchBeacons(
43+
assembly: string,
44+
referenceName: string,
45+
start: number,
46+
referenceBases: string,
47+
alternateBases: string,
48+
headers?: HttpHeaders)
49+
: Promise<BeaconResponse[]> {
50+
51+
const params = new HttpParams()
52+
.set('assemblyId', assembly)
53+
.set('referenceName', referenceName)
54+
.set('start', start + '')
55+
.set('referenceBases', referenceBases)
56+
.set('alternateBases', alternateBases)
57+
;
58+
59+
// /query?referenceName=1&start=9924&referenceBases=C&alternateBases=T&assemblyId=GRCh38
60+
return this.httpClient.get<BeaconResponse[]>(`${this.apiUrl}`
61+
+ '/query', { 'params': params, 'headers' : headers }).toPromise();
62+
}
63+
}

0 commit comments

Comments
 (0)