Skip to content
Snippets Groups Projects
Commit 3ad1576c authored by Michael Hartung's avatar Michael Hartung
Browse files

script to export netex & adding example html files in app-test

parent 9f590c3b
Branches
Tags
No related merge requests found
Showing
with 387 additions and 20 deletions
...@@ -58,8 +58,8 @@ deploy:dev: ...@@ -58,8 +58,8 @@ deploy:dev:
- docker info - docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script: script:
- docker build -t gitlab.lrz.de:5005/covid-19/frontend:dev -f ./Dockerfile.dev . - docker build -t gitlab.lrz.de:5005/netex/frontend:dev -f ./Dockerfile.dev .
- docker push gitlab.lrz.de:5005/covid-19/frontend:dev - docker push gitlab.lrz.de:5005/netex/frontend:dev
dependencies: dependencies:
- build - build
...@@ -77,7 +77,7 @@ deploy:prod: ...@@ -77,7 +77,7 @@ deploy:prod:
- docker info - docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script: script:
- docker build -t gitlab.lrz.de:5005/covid-19/frontend:prod -f ./Dockerfile.prod . - docker build -t gitlab.lrz.de:5005/netex/frontend:prod -f ./Dockerfile.prod .
- docker push gitlab.lrz.de:5005/covid-19/frontend:prod - docker push gitlab.lrz.de:5005/netex/frontend:prod
dependencies: dependencies:
- build - build
...@@ -21,9 +21,9 @@ RUN npm run -- bundle ...@@ -21,9 +21,9 @@ RUN npm run -- bundle
RUN cp -r website/* /usr/share/nginx/html/ RUN cp -r website/* /usr/share/nginx/html/
RUN mkdir /usr/share/nginx/html/lib RUN mkdir /usr/share/nginx/html/lib
RUN cp dist/covid19/bundle-es2015.js /usr/share/nginx/html/lib/ RUN cp dist/netex/bundle-es2015.js /usr/share/nginx/html/lib/
RUN cp dist/covid19/bundle-es5.js /usr/share/nginx/html/lib/ RUN cp dist/netex/bundle-es5.js /usr/share/nginx/html/lib/
RUN cp dist/covid19/styles.css /usr/share/nginx/html/lib/ RUN cp dist/netex/styles.css /usr/share/nginx/html/lib/
COPY nginx/default.conf /etc/nginx/conf.d/ COPY nginx/default.conf /etc/nginx/conf.d/
COPY nginx/htpasswd /etc/nginx/htpasswd COPY nginx/htpasswd /etc/nginx/htpasswd
......
...@@ -18,7 +18,7 @@ COPY . /app/ ...@@ -18,7 +18,7 @@ COPY . /app/
RUN npm run build -- --prod --base-href=/covex/ RUN npm run build -- --prod --base-href=/covex/
RUN cp -r dist/covid19/* /usr/share/nginx/html/ RUN cp -r dist/netex/* /usr/share/nginx/html/
COPY nginx/default.conf /etc/nginx/conf.d/ COPY nginx/default.conf /etc/nginx/conf.d/
COPY nginx/htpasswd /etc/nginx/htpasswd COPY nginx/htpasswd /etc/nginx/htpasswd
......
# Covid19 # netex
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.3. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.3.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": 1, "version": 1,
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"covid19": { "netex": {
"projectType": "application", "projectType": "application",
"schematics": { "schematics": {
"@schematics/angular:component": { "@schematics/angular:component": {
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "dist/covid19", "outputPath": "dist/netex",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
...@@ -67,18 +67,18 @@ ...@@ -67,18 +67,18 @@
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": { "options": {
"browserTarget": "covid19:build" "browserTarget": "netex:build"
}, },
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "covid19:build:production" "browserTarget": "netex:build:production"
} }
} }
}, },
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "covid19:build" "browserTarget": "netex:build"
} }
}, },
"test": { "test": {
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
"karmaConfig": "karma.conf.js", "karmaConfig": "karma.conf.js",
"assets": [ "assets": [
"src/favicon.ico", "src/favicon.ico",
"src/assets" "src/assets",
"src/app-test"
], ],
"styles": [ "styles": [
"src/styles.scss" "src/styles.scss"
...@@ -115,18 +116,18 @@ ...@@ -115,18 +116,18 @@
"builder": "@angular-devkit/build-angular:protractor", "builder": "@angular-devkit/build-angular:protractor",
"options": { "options": {
"protractorConfig": "e2e/protractor.conf.js", "protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "covid19:serve" "devServerTarget": "netex:serve"
}, },
"configurations": { "configurations": {
"production": { "production": {
"devServerTarget": "covid19:serve:production" "devServerTarget": "netex:serve:production"
} }
} }
} }
} }
} }
}, },
"defaultProject": "covid19", "defaultProject": "netex",
"cli": { "cli": {
"analytics": "bb00cc29-2ec5-4bd5-9235-62ac2e9e51b5" "analytics": "bb00cc29-2ec5-4bd5-9235-62ac2e9e51b5"
} }
......
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Network Expander</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/ico" href="src/assets/covex_logo_small.png">
<script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
<link rel="stylesheet" href="netex-build/styles.css">
<script type="text/javascript" src="netex-build/netex.js"></script>
</head>
<body>
<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('{"showLeftSidebar":'+this.checked+'}') checked /> Show sidebar<br>
<input type="checkbox" onclick=changeConfigStr('{"showItemSelector":'+this.checked+'}') checked /> Show ItemSelector<br>
<input type="checkbox" onclick=changeConfigStr('{"showSimpleAnalysis":'+this.checked+'}') /> Show SimpleAnalysis<br>
<input type="checkbox" onclick=changeConfigStr('{"showAdvAnalysis":'+this.checked+'}') checked /> Show Advanced Analysis<br>
<input type="checkbox" onclick=changeConfigStr('{"showTasks":'+this.checked+'}') checked /> Show Tasks<br>
<input type="checkbox" onclick=changeConfigStr('{"showSelection":'+this.checked+'}') checked /> Show Selection<br>
<input type="checkbox" onclick=changeConfigStr('{"showFooter":'+this.checked+'}') checked /> Show Footer<br>
<input type="checkbox" onclick=changeConfigStr('{"showLegend":'+this.checked+'}') checked /> Show Legend<br>
<!--<input type="checkbox" onclick=changeConfigStr('{"showSimpleAnalysis":'+this.checked+'}') checked /> Show SimpleAnalysis<br>-->
<br>
<button onclick="setNetwork('netexp1')">Add proteins</button>
<!-- "legendUrl": "https://exbio.wzw.tum.de/covex/assets/leg1.png",-->
<div>
<network-expander id="netexp1" config='{
"showQuery": false,
"legendPos": "right",
"nodeGroups": {"default": {"color": "grey", "name": "Default Group", "shape": "triangle", "image": "https://i.ibb.co/vmLV1tB/dna.png"}, "pug-group": {"color": "grey", "name": "Pug Group", "shape": "triangle", "image": "https://static.raymondcamden.com/images/2016/11/pug.png"} },
"edgeGroups":{"default": {"color": "grey", "name": "Default Edge Group"}, "custom": {"color": "red", "name": "Custom Edge Group"}}
}' onload="init1()" style="height: 100vh"></network-expander>
</div>
<!--
<div> <div style="border: 3px solid red">
<network-expander id="netexp2" config='{"legendUrl": "https://i.pinimg.com/originals/ff/72/80/ff72801189f650f11672915cda0f1bdf.png", "legendClass": "my-legend-2"}'></network-expander>
</div>
-->
<script>
function init1() {
document.getElementsByClassName('my-legend-1')[0].onclick = function() {this.remove()};
}
function changeConfig() {
const netexp = document.getElementById('netexp1');
netexp.setAttribute('config', '{"showLeftSidebar": false}');
}
function changeConfigStr(config) {
console.log(config);
const netexp = document.getElementById('netexp1');
netexp.setAttribute('config', config);
}
function setNetwork(nw) {
const netexp = document.getElementById(nw);
netexp.setAttribute('network', JSON.stringify({
nodes: [
{
name: "Protein 1",
id: "1",
access: "A",
group: "protein"
},
{
name: "Unknown type",
id: "2",
access: "B"
},
{
name: "Drug 123",
id: "3",
access: "C",
group: "drug"
},
{
name: "Gene abz",
id: "4",
access: "D",
group: "default"
},
{
name: "Pug abz",
id: "5",
access: "D",
group: "pug-group"
}
],
edges: [
{
from: '1',
to: '2',
},
{
from: '2',
to: '3',
group: 'custom'
}
]
}));
}
</script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Network Expander</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/ico" href="src/assets/covex_logo_small.png">
<script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
<link rel="stylesheet" href="netex-build/styles.css">
<script type="text/javascript" src="netex-build/netex.js"></script>
</head>
<body>
<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('{"showLeftSidebar":'+this.checked+'}') checked /> Show sidebar<br>
<input type="checkbox" onclick=changeConfigStr('{"showItemSelector":'+this.checked+'}') checked /> Show ItemSelector<br>
<input type="checkbox" onclick=changeConfigStr('{"showSimpleAnalysis":'+this.checked+'}') /> Show SimpleAnalysis<br>
<input type="checkbox" onclick=changeConfigStr('{"showAdvAnalysis":'+this.checked+'}') checked /> Show Advanced Analysis<br>
<input type="checkbox" onclick=changeConfigStr('{"showTasks":'+this.checked+'}') checked /> Show Tasks<br>
<input type="checkbox" onclick=changeConfigStr('{"showSelection":'+this.checked+'}') checked /> Show Selection<br>
<input type="checkbox" onclick=changeConfigStr('{"showFooter":'+this.checked+'}') checked /> Show Footer<br>
<input type="checkbox" onclick=changeConfigStr('{"showLegend":'+this.checked+'}') checked /> Show Legend<br>
<button onclick=changeConfigStr('{"legendPos":'+'"left"'+'}') > Legend to Left </button> <br>
<button onclick=changeConfigStr('{"legendPos":'+'"right"'+'}') > Legend to Right </button> <br>
<!--<input type="checkbox" onclick=changeConfigStr('{"showSimpleAnalysis":'+this.checked+'}') checked /> Show SimpleAnalysis<br>-->
<br>
<button onclick="setNetwork('netexp1')">Add proteins</button>
<div>
<network-expander id="netexp1" config='{
"showQuery": false,
"legendPos": "right",
"nodeGroups": {"default": {"color": "grey", "name": "Default Group", "shape": "triangle"} },
"edgeGroups":{"default": {"color": "grey", "name": "Default Edge Group"}, "custom": {"color": "red", "name": "Custom Edge Group"}},
"legendUrl": "https://exbio.wzw.tum.de/covex/assets/leg1.png"
}' onload="init1()" style="height: 100vh"></network-expander>
</div>
<script>
function init1() {
document.getElementsByClassName('my-legend-1')[0].onclick = function() {this.remove()};
}
function changeConfig() {
const netexp = document.getElementById('netexp1');
netexp.setAttribute('config', '{"showLeftSidebar": false}');
}
function changeConfigStr(config) {
console.log(config);
const netexp = document.getElementById('netexp1');
netexp.setAttribute('config', config);
}
function setNetwork(nw) {
const netexp = document.getElementById(nw);
netexp.setAttribute('network', JSON.stringify({
nodes: [
{
name: "Protein 1",
id: "1",
access: "A",
group: "protein"
},
{
name: "Unknown type",
id: "2",
access: "B"
},
{
name: "Drug 123",
id: "3",
access: "C",
group: "drug"
},
{
name: "Gene abz",
id: "4",
access: "D",
group: "default"
}
],
edges: [
{
from: '1',
to: '2',
},
{
from: '2',
to: '3',
group: 'custom'
}
]
}));
}
</script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Network Expander</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/ico" href="src/assets/covex_logo_small.png">
<script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
<link rel="stylesheet" href="netex-build/styles.css">
<script type="text/javascript" src="netex-build/netex.js"></script>
</head>
<body>
<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('{"showLeftSidebar":'+this.checked+'}') checked /> Show sidebar<br>
<input type="checkbox" onclick=changeConfigStr('{"showItemSelector":'+this.checked+'}') checked /> Show ItemSelector<br>
<input type="checkbox" onclick=changeConfigStr('{"showSimpleAnalysis":'+this.checked+'}') /> Show SimpleAnalysis<br>
<input type="checkbox" onclick=changeConfigStr('{"showAdvAnalysis":'+this.checked+'}') checked /> Show Advanced Analysis<br>
<input type="checkbox" onclick=changeConfigStr('{"showTasks":'+this.checked+'}') checked /> Show Tasks<br>
<input type="checkbox" onclick=changeConfigStr('{"showSelection":'+this.checked+'}') checked /> Show Selection<br>
<input type="checkbox" onclick=changeConfigStr('{"showFooter":'+this.checked+'}') checked /> Show Footer<br>
<input type="checkbox" onclick=changeConfigStr('{"showLegend":'+this.checked+'}') checked /> Show Legend<br>
<!--<input type="checkbox" onclick=changeConfigStr('{"showSimpleAnalysis":'+this.checked+'}') checked /> Show SimpleAnalysis<br>-->
<br>
<button onclick="setNetwork('netexp1')">Add proteins</button>
<!-- "legendUrl": "https://exbio.wzw.tum.de/covex/assets/leg1.png",-->
<div>
<network-expander id="netexp1" config='{
"showQuery": false,
"legendPos": "right",
"nodeGroups": {"default": {"color": "grey", "name": "Default Group", "shape": "triangle"} },
"edgeGroups":{"default": {"color": "grey", "name": "Default Edge Group"}, "custom": {"color": "red", "name": "Custom Edge Group"}}
}' onload="init1()" style="height: 100vh"></network-expander>
</div>
<!--
<div> <div style="border: 3px solid red">
<network-expander id="netexp2" config='{"legendUrl": "https://i.pinimg.com/originals/ff/72/80/ff72801189f650f11672915cda0f1bdf.png", "legendClass": "my-legend-2"}'></network-expander>
</div>
-->
<script>
function init1() {
document.getElementsByClassName('my-legend-1')[0].onclick = function() {this.remove()};
}
function changeConfig() {
const netexp = document.getElementById('netexp1');
netexp.setAttribute('config', '{"showLeftSidebar": false}');
}
function changeConfigStr(config) {
console.log(config);
const netexp = document.getElementById('netexp1');
netexp.setAttribute('config', config);
}
function setNetwork(nw) {
const netexp = document.getElementById(nw);
netexp.setAttribute('network', JSON.stringify({
nodes: [
{
name: "Protein 1",
id: "1",
access: "A",
group: "protein"
},
{
name: "Unknown type",
id: "2",
access: "B"
},
{
name: "Drug 123",
id: "3",
access: "C",
group: "drug"
},
{
name: "Gene abz",
id: "4",
access: "D",
group: "default"
}
],
edges: [
{
from: '1',
to: '2',
},
{
from: '2',
to: '3',
group: 'custom'
}
]
}));
}
</script>
</body>
</html>
const fs = require('fs-extra');
const concat = require('concat');
(async function build() {
const files = [
'./dist/netex/runtime-es5.js',
'./dist/netex/polyfills-es5.js',
// './dist/netex/scripts.js',
'./dist/netex/main-es5.js'
];
await fs.ensureDir('netex-build');
await concat(files, 'netex-build/netex.js');
await fs.copy('./dist/netex/styles.css', 'netex-build/styles.css');
await fs.copy('./dist/netex/assets/', 'netex/assets/');
})();
...@@ -10,7 +10,7 @@ describe('workspace-project App', () => { ...@@ -10,7 +10,7 @@ describe('workspace-project App', () => {
it('should display welcome message', () => { it('should display welcome message', () => {
page.navigateTo(); page.navigateTo();
expect(page.getTitleText()).toEqual('covid19 app is running!'); expect(page.getTitleText()).toEqual('netex app is running!');
}); });
afterEach(async () => { afterEach(async () => {
......
...@@ -16,7 +16,7 @@ module.exports = function (config) { ...@@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser clearContext: false // leave Jasmine Spec Runner output visible in browser
}, },
coverageIstanbulReporter: { coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/covid19'), dir: require('path').join(__dirname, './coverage/netex'),
reports: ['html', 'lcovonly', 'text-summary'], reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true fixWebpackSourcePaths: true
}, },
......
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
netex/assets/boxplot.png

10 KiB

netex/assets/covex_logo.png

23.2 KiB

netex/assets/covex_logo_small.png

9 KiB

netex/assets/graph_example.png

269 KiB

netex/assets/leg1.png

18.7 KiB

netex/assets/leg2.png

33.3 KiB

netex/assets/legend.png

24.9 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment