From 6eeb6216c91f664914f2e1fd88f66bb222954806 Mon Sep 17 00:00:00 2001 From: Julian Matschinske <julian@vyze.ai> Date: Fri, 4 Dec 2020 02:13:49 +0100 Subject: [PATCH] Add bundle script --- Dockerfile.dev | 8 +++- package.json | 6 ++- .../analysis-panel.component.html | 7 ---- src/app/config.ts | 2 - .../launch-analysis.component.html | 41 ------------------- .../explorer-page.component.html | 2 +- .../explorer-page/explorer-page.component.ts | 2 +- src/index.html | 16 +------- src/styles.scss | 8 ++-- website/index.html | 12 ++++++ 10 files changed, 32 insertions(+), 72 deletions(-) create mode 100644 website/index.html diff --git a/Dockerfile.dev b/Dockerfile.dev index 92f94e58..b9ca87d6 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -16,9 +16,13 @@ RUN npm install COPY . /app/ -RUN npm run build -- --prod --base-href=/covex_dev/ +RUN npm run -- bundle -RUN cp -r dist/covid19/* /usr/share/nginx/html/ +RUN cp -r website/* /usr/share/nginx/html/ + +RUN mkdir /usr/share/nginx/html/lib +RUN cp dist/covid19/bundle-es2015.js /usr/share/nginx/html/lib/ +RUN cp dist/covid19/bundle-es5.js /usr/share/nginx/html/lib/ COPY nginx/default.conf /etc/nginx/conf.d/ COPY nginx/htpasswd /etc/nginx/htpasswd diff --git a/package.json b/package.json index aaac7c83..6a6ede42 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,11 @@ "build": "ng build", "test": "ng test", "lint": "ng lint && htmlhint", - "e2e": "ng e2e" + "e2e": "ng e2e", + "build-prod": "ng build --prod --output-hashing=none", + "package-es5": "cd dist/covid19 && cat runtime-es5.js polyfills-es5.js main-es5.js > bundle-es5.js", + "package-es2015": "cd dist/covid19 && cat runtime-es2015.js polyfills-es2015.js main-es2015.js > bundle-es2015.js", + "bundle": "npm run build-prod covid19 && npm run package-es5 && npm run package-es2015" }, "private": true, "dependencies": { diff --git a/src/app/components/analysis-panel/analysis-panel.component.html b/src/app/components/analysis-panel/analysis-panel.component.html index bf5ff4ac..6ff2bde3 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.html +++ b/src/app/components/analysis-panel/analysis-panel.component.html @@ -71,13 +71,6 @@ <i *ngIf="!task.info.parameters.includeNonApprovedDrugs" class="fa fa-times"></i> </td> </tr> - <tr *ngIf="task.info.parameters.ignoreNonSeedBaits !== undefined && task.info.target === 'drug-target'"> - <td>Include non-seed viral proteins</td> - <td> - <i *ngIf="!task.info.parameters.ignoreNonSeedBaits" class="fa fa-check"></i> - <i *ngIf="task.info.parameters.ignoreNonSeedBaits" class="fa fa-times"></i> - </td> - </tr> </tbody> </table> </div> diff --git a/src/app/config.ts b/src/app/config.ts index f6d3e603..34a5a918 100644 --- a/src/app/config.ts +++ b/src/app/config.ts @@ -5,7 +5,6 @@ export interface IConfig { showLeftSidebar: boolean; showOverview: boolean; showQuery: boolean; - showFilter: boolean; showItemSelector: boolean; showSimpleAnalysis: boolean; showAdvAnalysis: boolean; @@ -21,7 +20,6 @@ export const defaultConfig: IConfig = { showLeftSidebar: true, showOverview: true, showQuery: true, - showFilter: true, showItemSelector: true, showSimpleAnalysis: false, showAdvAnalysis: true, diff --git a/src/app/dialogs/launch-analysis/launch-analysis.component.html b/src/app/dialogs/launch-analysis/launch-analysis.component.html index e2ec0268..9133d786 100644 --- a/src/app/dialogs/launch-analysis/launch-analysis.component.html +++ b/src/app/dialogs/launch-analysis/launch-analysis.component.html @@ -90,15 +90,6 @@ </p> </div> - <div class="field" *ngIf="target === 'drug-target'"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="trustrankIncludeViralNonSeeds"> - </app-toggle> - </div> - <div class="box"> <article class="media"> <div class="media-left"> @@ -174,14 +165,6 @@ </p> </div> - <div class="field" *ngIf="target === 'drug-target'"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="closenessIncludeViralNonSeeds"></app-toggle> - </div> - <div class="box"> <article class="media"> <div class="media-left"> @@ -229,14 +212,6 @@ </p> </div> - <div class="field" *ngIf="target === 'drug-target'"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="degreeIncludeViralNonSeeds"></app-toggle> - </div> - <div class="box"> <article class="media"> <div class="media-left"> @@ -346,14 +321,6 @@ </p> </div> - <div class="field"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="betweennessIncludeViralNonSeeds"></app-toggle> - </div> - <div class="box"> <article class="media"> <div class="media-left"> @@ -477,14 +444,6 @@ </p> </div> - <div class="field" *ngIf="target === 'drug-target'"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="multisteinerIncludeViralNonSeeds"></app-toggle> - </div> - </div> <p class="doc-link"> diff --git a/src/app/pages/explorer-page/explorer-page.component.html b/src/app/pages/explorer-page/explorer-page.component.html index 9130e3e1..a7ff6356 100644 --- a/src/app/pages/explorer-page/explorer-page.component.html +++ b/src/app/pages/explorer-page/explorer-page.component.html @@ -273,7 +273,7 @@ <span class="icon"> <i class="fas fa-flask" aria-hidden="true"></i> </span> - Advanced Analysis + Analysis </p> <a (click)="collapseAnalysis = !collapseAnalysis" data-action="collapse" class="card-header-icon is-hidden-fullscreen" aria-label="more options"> diff --git a/src/app/pages/explorer-page/explorer-page.component.ts b/src/app/pages/explorer-page/explorer-page.component.ts index b8a20738..66f901e6 100644 --- a/src/app/pages/explorer-page/explorer-page.component.ts +++ b/src/app/pages/explorer-page/explorer-page.component.ts @@ -67,7 +67,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { public selectedWrapper: Wrapper | null = null; public collapseAnalysisQuick = true; - public collapseAnalysis = false; + public collapseAnalysis = true; public collapseDetails = true; public collapseTask = true; public collapseSelection = true; diff --git a/src/index.html b/src/index.html index 2083606c..90953474 100644 --- a/src/index.html +++ b/src/index.html @@ -1,14 +1,6 @@ <!doctype html> <html lang="en"> <head> -<style> - .my-legend-1{ - width: 10%; - } -</style> - - - <meta charset="utf-8"> <title>Network Expander</title> <base href="/"> @@ -25,16 +17,14 @@ <input type="checkbox" onclick=changeConfigStr('{"showOverview":'+this.checked+'}') checked /> Show overview<br> <input type="checkbox" onclick=changeConfigStr('{"showQuery":'+this.checked+'}') /> Show query<br> -<input type="checkbox" onclick=changeConfigStr('{"showFilter":'+this.checked+'}') /> Show filter<br> <input type="checkbox" onclick=changeConfigStr('{"showLeftSidebar":'+this.checked+'}') checked /> Show sidebar<br> <br> -<button onclick="changeConfig()">Hide sidebar</button> <button onclick="setNetwork('netexp1')">Add proteins</button> -<div style="border: 3px solid red"> - <network-expander id="netexp1" config='{"legendClass": "my-legend-1", "showQuery": false, "showFilter": false}' onload="init1()" style="height: 100vh"></network-expander> +<div> + <network-expander id="netexp1" config='{"legendClass": "my-legend-1", "showQuery": false}' onload="init1()" style="height: 100vh"></network-expander> </div> <!-- @@ -43,8 +33,6 @@ </div> --> - - <script> function init1() { document.getElementsByClassName('my-legend-1')[0].onclick = function() {this.remove()}; diff --git a/src/styles.scss b/src/styles.scss index 1cfb339b..11392e29 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -16,6 +16,8 @@ $info: $primary; @import "~primeng/resources/primeng.min.css"; @import "~primeicons/primeicons.css"; +$height: '1000px'; + nav.navbar { height: 60px; } @@ -53,7 +55,7 @@ input.checkbox { } div.covex.sidebar { - height: calc(100% - 70px); + height: calc(#{$height} - 70px); overflow-y: auto; overflow-x: hidden; width: 340px; @@ -109,7 +111,7 @@ div.card.network { } div.network { - height: calc(100% - 200px); + height: calc(#{$height} - 200px); } div.parent { @@ -134,7 +136,7 @@ div.center { div.covex.explorer { - height: calc(100% - 70px); + height: calc(#{$height} - 70px); margin-left: 10px; margin-right: 10px; } diff --git a/website/index.html b/website/index.html new file mode 100644 index 00000000..0ccf46fa --- /dev/null +++ b/website/index.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>DrugsToNe</title> +</head> +<body> + +DrugsToNe! + +</body> +</html> -- GitLab