From e163c9e245c7901220a5d2601659418c0d59d14c Mon Sep 17 00:00:00 2001 From: Markus Grigull Date: Mon, 23 May 2016 21:44:34 +0200 Subject: [PATCH 1/2] Fix logo class --- app/styles/app.css | 62 ++++++++++++++++++------------------ app/templates/lab-mashup.hbs | 4 +-- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/app/styles/app.css b/app/styles/app.css index 2733811..302ed35 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -11,13 +11,13 @@ html, body { .ember-application { width: 100%; height: 100%; - + top: 0; left: 0; - + position: absolute; overflow: hidden; - + background: #6EA2B0; color: #4d4d4d; @@ -68,7 +68,7 @@ header { height: 80px; top: 0; - + border-bottom: 3px solid #bbb; } @@ -79,17 +79,17 @@ header #title { text-rendering: optimizeLegibility; -webkit-text-rendering: optimizeLegiblity; -moz-text-rendering: optimizeLegibitliy; - + padding: 25px 0 20px 30px; - + float: left; } header #logos { height: 80px; - + padding-top: 8px; - + float: right; } @@ -107,7 +107,7 @@ footer { #main { top: 80px; bottom: 0px; - + left: 20px; right: 20px; } @@ -119,31 +119,31 @@ footer { padding-left: 42px; } -.svg-logo { +.logo { width: auto; height: 60px; - + padding-right: 30px; - + float: left; } #rwth-logo { margin-top: 15px; - + height: 30px !important; } h1 { font-size: 1.4em; - + margin: 0; padding: 0; } h2 { font-size: 1.2em; - + text-align: left; } @@ -165,15 +165,15 @@ p { .grid { width: 100%; height: 100%; - + margin: 0; /*padding: 0;*/ - + padding-top: 10px; padding-bottom: 10px; border: 0; - + border-collapse: collapse; } @@ -187,18 +187,18 @@ p { background-color: #fff; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 9px 18px 0 rgba(0, 0, 0, 0.1); - + width: 99%; height: 99%; - + padding: 20px; - + overflow: hidden; } .layout-page h2 { text-align: center; - + margin: 0; margin-bottom: 5px; } @@ -210,10 +210,10 @@ p { .page-grid { width: 100%; height: 100%; - + max-width: 100%; max-height: 100%; - + padding: 0; margin: 0; } @@ -233,9 +233,9 @@ p { */ .property-cell { - + } - + .chart-cell { padding-left: 10px !important; } @@ -264,7 +264,7 @@ p { border: 1px solid #999; border-collapse: collapse; - + vertical-align: top; } @@ -290,19 +290,19 @@ p { .label-source { text-align: left; - + margin: 0; padding: 0; - + float: left; } .label-type { text-align: right; - + margin: 0; padding: 0; - + float: right; } diff --git a/app/templates/lab-mashup.hbs b/app/templates/lab-mashup.hbs index 2772ddd..816ea0b 100644 --- a/app/templates/lab-mashup.hbs +++ b/app/templates/lab-mashup.hbs @@ -14,7 +14,7 @@

[pu]

{{line-chart data=S2Voltage203937 height="150px" useLabel=false}}

[min]

- +

Frequency at the substation bus

[Hz]

{{line-chart data=S1Freq575 height="150px" useLabel=false}} @@ -32,7 +32,7 @@

Prosumer behavior

- +

Total consumption

[MW]

{{line-chart data=S3LoadProfile height="150px" useLabel=false}} From c339c749ff9b87e54d3ca4bab8e6772d6f2afc62 Mon Sep 17 00:00:00 2001 From: Markus Grigull Date: Wed, 25 May 2016 11:12:21 +0200 Subject: [PATCH 2/2] Add docker-compose.yml for production use. --- config/environment.js | 8 ++++---- docker-compose-dev.yml | 10 +++++++++- docker-compose.yml | 32 ++++++++++++++++++++++++++++++++ nginx-conf.d/default.conf | 5 +++++ 4 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 docker-compose.yml diff --git a/config/environment.js b/config/environment.js index 24eeae0..d37d263 100644 --- a/config/environment.js +++ b/config/environment.js @@ -17,7 +17,7 @@ module.exports = function(environment) { // Here you can pass flags/options to your application instance // when it is created - API_HOST: '', + ENV.APP.API_HOST = 'http://nginx:80', UPDATE_RATE: 200, }, @@ -25,7 +25,7 @@ module.exports = function(environment) { 'default-src': "'none'", 'script-src': "'self' 'unsafe-eval'", 'font-src': "'self'", - 'connect-src': "'self' 192.168.99.100:80", + 'connect-src': "'self' nginx:80", 'img-src': "'self'", 'style-src': "'self' 'unsafe-inline'", 'media-src': "'self'" @@ -44,7 +44,7 @@ module.exports = function(environment) { // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; // ENV.APP.LOG_VIEW_LOOKUPS = true; - ENV.APP.API_HOST = 'http://192.168.99.100:80'; + //ENV.APP.API_HOST = 'http://nginx:80'; } if (environment === 'test') { @@ -60,7 +60,7 @@ module.exports = function(environment) { } if (environment === 'production') { - ENV.baseURL = '/technical/'; + //ENV.baseURL = '/technical/'; } return ENV; diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index d2fd6ee..63922c8 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -4,8 +4,16 @@ nginx: - ./nginx-conf.d/:/etc/nginx/conf.d/ links: - orion + +ember: + image: danlynn/ember-cli + volumes: + - ./:/myapp/ + links: + - nginx ports: - - "80:80" + - "4200:4200" + command: serve -dev mongo: image: mongo:3.2 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d8d6205 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,32 @@ +nginx: + image: nginx + volumes: + - ./nginx-conf.d/:/etc/nginx/conf.d/ + - ./dist/:/www/ + links: + - orion + - ember + ports: + - "80:80" + +ember: + image: danlynn/ember-cli + volumes: + - ./:/myapp/ + command: build -prod + +mongo: + image: mongo:3.2 + command: --smallfiles --nojournal + +orion: + image: fiware/orion + links: + - mongo + command: -dbhost mongo + +playback: + image: acs/playback + links: + - orion + command: orion:1026 m1_S1_ElectricalGrid_data.txt diff --git a/nginx-conf.d/default.conf b/nginx-conf.d/default.conf index 3c37efe..babdf7e 100644 --- a/nginx-conf.d/default.conf +++ b/nginx-conf.d/default.conf @@ -28,6 +28,11 @@ server { proxy_pass http://orion:1026/; } + # website location + location / { + root /www; + } + error_page 404 /404.html; location = /404.html { root /usr/share/nginx/html;