Skip to content

Commit

Permalink
release v2.3.0rc
Browse files Browse the repository at this point in the history
  • Loading branch information
kikkomep committed May 16, 2018
2 parents bff3a54 + 7593d30 commit a67f226
Show file tree
Hide file tree
Showing 51 changed files with 7,130 additions and 6,636 deletions.
12,374 changes: 6,267 additions & 6,107 deletions package-lock.json

Large diffs are not rendered by default.

44 changes: 19 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-phenomenal-portal",
"version": "2.0.0",
"version": "2.3.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
Expand All @@ -13,54 +13,48 @@
},
"private": true,
"dependencies": {
"@angular-devkit/schematics": "0.0.51",
"@angular/animations": "^4.4.4",
"@angular/common": "^4.4.4",
"@angular/compiler": "^4.4.4",
"@angular/core": "^4.4.4",
"@angular/forms": "^4.4.4",
"@angular/http": "^4.4.4",
"@angular-devkit/schematics": "^0.3.2",
"@angular/animations": "^4.4.7",
"@angular/common": "^4.4.7",
"@angular/compiler": "^4.4.7",
"@angular/core": "^4.4.7",
"@angular/forms": "^4.4.7",
"@angular/http": "^4.4.7",
"@angular/material": "^2.0.0-beta.12",
"@angular/platform-browser": "^4.4.4",
"@angular/platform-browser-dynamic": "^4.4.4",
"@angular/router": "^4.4.4",
"@angular/platform-browser": "^4.4.7",
"@angular/platform-browser-dynamic": "^4.4.7",
"@angular/router": "^4.4.7",
"@ng-bootstrap/ng-bootstrap": "1.0.0-beta.5",
"angular2-jwt": "^0.2.0",
"aws-sdk": "^2.186.0",
"bootstrap": "^3.3.7",
"bootstrap": ">=3.3.7",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"ng-block-ui": "^1.0.0-beta.15",
"ng-block-ui": "^0.9.5",
"ng2-cloud-portal-presentation-lib": "0.2.33",
"ng2-cloud-portal-service-lib": "0.2.24",
"ngx-bootstrap": "^1.8.0",
"ngx-clipboard": "^8.0.3",
"popper.js": "^1.14.3",
"rxjs": "^5.5.5",
"webpack": "^3.10.0",
"webpack": "3.11.0",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cdk": "^2.0.0-beta.12",
"@angular/cli": "^1.6.1",
"@angular/cli": "^1.7.3",
"@angular/compiler-cli": "^4.0.0",
"@compodoc/compodoc": "^1.0.1",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.60",
"codelyzer": "~2.0.0",
"html-webpack-plugin": "^2.30.1",
"jasmine-core": "~2.5.2",
"jasmine": "^3.1.0",
"jasmine-core": "~3.1.0",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.7.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "^2.3.4"
"typescript": ">=2.1.0 <2.4.0"
}
}
2 changes: 0 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { CloudResearchEnvironmentComponent } from './static-page/cloud-research-
import { CRELocalInstallationComponent } from './static-page/cre-local-installation/cre-local-installation.component';
import { CRELocalInstallationInstructionComponent } from './static-page/cre-local-installation-instruction/cre-local-installation-instruction.component';
import { HelpComponent } from './help/help.component';
import { FaqComponent } from './help/faq/faq.component';
import { HelpTopicComponent } from './help/help-topic/help-topic.component';
import { StatisticsComponent } from './statistics/statistics.component';
import { HomeComponent } from './static-page/home/home.component';
Expand All @@ -22,7 +21,6 @@ import { LogMonitorComponent } from "./log-monitor/log-monitor.component";
const routes: Routes = [
{path: 'app-library', loadChildren: 'app/application-library/application-library.module#ApplicationLibraryModule'},
{path: 'help', component: HelpComponent},
{path: 'help/faq', component: FaqComponent},
{path: 'help/:id', component: HelpTopicComponent},
{path: 'login', component: LoginComponent},
{path: 'logs', component: LogMonitorComponent, canActivate: [UserAuthenticatedGuard, AcceptedTermsGuard]},
Expand Down
8 changes: 6 additions & 2 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export class AppConfig {

private config: Object = null;
private env: Object = null;
private readonly _packageInfo: Object = null;

constructor(private http: Http) {

this._packageInfo = require('../../package.json');
}

/**
Expand All @@ -26,6 +27,10 @@ export class AppConfig {
return this.env[key];
}

public getPackageInfo() {
return this._packageInfo;
}

/**
* This method:
* a) Loads "env.json" to get the current working environment (e.g.: 'production', 'development')
Expand Down Expand Up @@ -77,7 +82,6 @@ export class AppConfig {
resolve(true);
}
});

});
}
}
2 changes: 0 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import { OstackSetupComponent } from './setup/ostack-setup/ostack-setup.componen
import { AwsSetupComponent } from './setup/aws-setup/aws-setup.component';
import { GcpSetupComponent } from './setup/gcp-setup/gcp-setup.component';
import { CloudSetupComponent } from './setup/cloud-setup/cloud-setup.component';
import { FaqComponent } from './help/faq/faq.component';
import { TermAndConditionComponent } from './login/term-and-condition/term-and-condition.component';
import { CloudProviderMetadataService } from './shared/service/cloud-provider-metadata/cloud-provider-metadata.service';

Expand Down Expand Up @@ -123,7 +122,6 @@ export function initConfig(config: AppConfig) {
AwsSetupComponent,
GcpSetupComponent,
CloudSetupComponent,
FaqComponent,
TermAndConditionComponent,
TestCreComponent,
LogMonitorComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ <h6 class="card-title">
<div class="col-xl-6">
<div class="btn-group pull-right view">
<div *ngIf="isList">
<button mat-raised-button (click)="triigerList()" color='primary'>
<button mat-raised-button (click)="triggerList()" color='primary'>
<span class="fa fa-th"></span> Grid
</button>
<button mat-raised-button disabled (click)="triigerList()" color='primary'>
<button mat-raised-button disabled (click)="triggerList()" color='primary'>
<span class="fa fa-list"></span> List
</button>
</div>
<div *ngIf="!isList">
<button mat-raised-button disabled (click)="triigerList()" color='primary'>
<button mat-raised-button disabled (click)="triggerList()" color='primary'>
<span class="fa fa-th"></span> Grid
</button>
<button mat-raised-button (click)="triigerList()" color='primary'>
<button mat-raised-button (click)="triggerList()" color='primary'>
<span class="fa fa-list"></span> List
</button>
</div>
Expand Down
168 changes: 35 additions & 133 deletions src/app/application-library/application-library.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ApplicationLibraryService } from '../shared/service/application-library/application-library.service';
import { Node } from '../shared/component/tree/node/node';
import { AppLibraryCategories } from "../shared/service/application-library/categories";

@Component({
selector: 'ph-application-library',
Expand All @@ -14,133 +15,42 @@ import { Node } from '../shared/component/tree/node/node';
*/
export class ApplicationLibraryComponent implements OnInit {

content: string;
public isList = false;
apps;
appSize;
content: string;
isList = false;
previousQuery: string;
functionality: Node[];
approaches: Node[];
instrument: Node[];
private readonly appLibFilterKey = "AppLibraryFilter";

functionality: Node[] = [
{id: '1', name: 'Preprocessing', parent: '#', children: [], isCheck: false},
{
id: '2', name: 'Annotation', parent: '#', children: [
{
id: '7', name: 'MS', parent: '2', children: [
{id: '9', name: 'L4 Unequivocal Molecular Formula', parent: '7', children: [], isCheck: false},
{id: '10', name: 'L3 Tentative Candidates', parent: '7', children: [], isCheck: false},
{id: '11', name: 'L2a Library Spectrum Match', parent: '7', children: [], isCheck: false}
], isCheck: false
},
{id: '8', name: 'NMR', parent: '2', children: [], isCheck: false}
], isCheck: false
},
{id: '3', name: 'Post-processing', parent: '#', children: [], isCheck: false},
{id: '4', name: 'Statistical Analysis', parent: '#', children: [], isCheck: false},
{id: '5', name: 'Workflows', parent: '#', children: [], isCheck: false},
{id: '6', name: 'Other Tools', parent: '#', children: [], isCheck: false}
];

approaches: Node[] = [
{
id: 'a1', name: 'Metabolomics', parent: '#', children: [
{id: 'a9', name: 'Targeted', parent: 'a1', children: [], isCheck: false},
{id: 'a10', name: 'Untargeted', parent: 'a1', children: [], isCheck: false},
], isCheck: false
},
{
id: 'a2', name: 'Isotopic Labelling Analysis', parent: '#', children: [
{id: 'a7', name: '¹³C', parent: 'a2', children: [], isCheck: false},
{id: 'a8', name: 'All Isotopes', parent: 'a2', children: [], isCheck: false}
], isCheck: false
},
{
id: 'a3', name: 'Lipidomics', parent: '#', children: [
{id: 'a6', name: 'Lipidomics MS', parent: 'a3', children: [], isCheck: false}
], isCheck: false
},
{id: 'a4', name: 'Glycomics', parent: '#', children: [], isCheck: false}
];

instrument: Node[] = [
{
id: 'b1', name: 'MS', parent: '#', children: [
{
id: 'b9', name: 'LC-MS', parent: 'b1', children: [
{id: 'b30', name: 'Orbitrap LC-MS', parent: 'b9', children: [], isCheck: false},
{
id: 'b31', name: 'LC-MS/MS', parent: 'b9', children: [
{id: 'b37', name: 'LC-MSⁿ', parent: 'b31', children: [], isCheck: false}
], isCheck: false
},
{id: 'b32', name: 'CE-FT-MS', parent: 'b9', children: [], isCheck: false},
{id: 'b33', name: 'HPLC-MS', parent: 'b9', children: [], isCheck: false},
{id: 'b34', name: 'UPLC-MS', parent: 'b9', children: [], isCheck: false},
{id: 'b35', name: 'Centroid LC-MS', parent: 'b9', children: [], isCheck: false},
{id: 'b36', name: 'LC-MS SRM', parent: 'b9', children: [], isCheck: false}
], isCheck: false
},
{
id: 'b10', name: 'GC-MS', parent: 'b1', children: [
{id: 'b42', name: 'GC-TOF-MS', parent: 'b10', children: [], isCheck: false},
{id: 'b43', name: '2D GC-MS', parent: 'b10', children: [], isCheck: false},
{id: 'b44', name: 'GC-MS/MS', parent: 'b10', children: [], isCheck: false},
{id: 'b45', name: 'GC-MS SRM', parent: 'b10', children: [], isCheck: false},
{id: 'b46', name: 'GC-MS SIM', parent: 'b10', children: [], isCheck: false}
], isCheck: false
},
{
id: 'b11', name: 'DI-MS', parent: 'b1', children: [
{id: 'b55', name: 'DI-MS/MS', parent: 'b11', children: [], isCheck: false},
{id: 'b56', name: 'DI-FT-ICR-MS', parent: 'b11', children: [], isCheck: false}
], isCheck: false
},
{
id: 'b12', name: 'CE-MS', parent: 'b1', children: [
{id: 'b56', name: 'CE-MS/MS', parent: 'b12', children: [], isCheck: false}
], isCheck: false
}
], isCheck: false
},
{
id: 'b2', name: 'NMR', parent: '#', children: [
{id: 'b67', name: '1D NMR', parent: 'b2', children: [], isCheck: false},
{
id: 'b68', name: '2D NMR', parent: 'b2', children: [
{id: 'b75', name: '2D TOCSY', parent: 'b68', children: [], isCheck: false},
{
id: 'b76', name: '2D HSQC', parent: 'b68', children: [
{id: 'b77', name: '2D ¹H ¹³C-HSQC NMR', parent: 'b76', children: [], isCheck: false}
], isCheck: false
}
], isCheck: false
},
{id: 'b69', name: '¹H NMR', parent: 'b2', children: [], isCheck: false},
{id: 'b66', name: 'Covariance NMR', parent: 'b2', children: [], isCheck: false}
], isCheck: false
},
{id: 'b3', name: 'IR', parent: '#', children: [], isCheck: false},
{id: 'b4', name: 'Raman', parent: '#', children: [], isCheck: false},
{id: 'b5', name: 'UV/VIS', parent: '#', children: [], isCheck: false},
{
id: 'b6', name: 'DAD', parent: '#', children: [
{id: 'b89', name: 'HPLC-DAD', parent: 'b6', children: [], isCheck: false},
{id: 'b86', name: 'LC-UV-DAD', parent: 'b6', children: [], isCheck: false}
], isCheck: false
}
];

constructor(// private service: ApplicationsDatabaseService,
private appLibraryService: ApplicationLibraryService) {

constructor(private appLibraryService: ApplicationLibraryService) {
}

ngOnInit() {
let categories: AppLibraryCategories = this.appLibraryService.getCategories();
this.functionality = categories.functionality;
this.approaches = categories.approaches;
this.instrument = categories.instrument;

if (this.isAppListFiltered()) {
this.getAppsByFilter();
} else {
this.getAllApp();
}
}

this.getAllApp();

private setAppListFilter(value: boolean) {
localStorage.setItem(this.appLibFilterKey, value ? "1" : "0");
}

triigerList() {
private isAppListFiltered(): boolean {
return localStorage.getItem(this.appLibFilterKey) === "1";
}

triggerList() {
this.isList = !this.isList;
}

Expand All @@ -150,30 +60,28 @@ export class ApplicationLibraryComponent implements OnInit {
data => {
this.apps = data;
this.appSize = data.length;
this.setAppListFilter(false);
}
);
this.previousQuery = 'functionality=&approaches=&instrument=';
}

getAppsByFilter() {

// get filters
const filter1 = this.traverseTree(this.functionality);

const filter2 = this.traverseTree(this.approaches);

const filter3 = this.traverseTree(this.instrument);

let query = 'functionality=' + this.transformFilter(filter1);

query += '&approaches=' + this.transformFilter(filter2);

query += '&instrument=' + this.transformFilter(filter3);

// build query
let query = 'functionality=' + ApplicationLibraryComponent.transformFilter(filter1)
+ '&approaches=' + ApplicationLibraryComponent.transformFilter(filter2)
+ '&instrument=' + ApplicationLibraryComponent.transformFilter(filter3);
// perform query
if (query !== this.previousQuery) {
this.appLibraryService.loadSomeApp(query)
.subscribe(
data => {
this.apps = data;
this.setAppListFilter(true);
}
);
}
Expand Down Expand Up @@ -210,24 +118,18 @@ export class ApplicationLibraryComponent implements OnInit {
}

filter.push.apply(filter, temp);

return filter;
}

private transformFilter(filter: string[]) {

private static transformFilter(filter: string[]) {
let text = '';
const plus = '+';
for (let f of filter) {

f = f.replace(/ /g, '_');
f = f.toUpperCase();
text += f;
text += plus;
}

return text;

}

}
Loading

0 comments on commit a67f226

Please sign in to comment.