diff --git a/app/components/bar-chart.js b/app/components/bar-chart.js
new file mode 100644
index 0000000..40b3dc7
--- /dev/null
+++ b/app/components/bar-chart.js
@@ -0,0 +1,44 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+ tagName: 'div',
+ classNames: ['bar-chart'],
+ attributeBindings: ['style'],
+ minValue: '',
+ maxValue: '',
+ width: 150,
+ height: 300,
+
+ didInsertElement: function() {
+ this._drawChart();
+ },
+
+ style: function() {
+ return 'width: ' + this.get('width') + '; height: ' + this.get('height') + ';';
+ }.property('width', 'height'),
+
+ _drawChart: function() {
+ // get element
+ var element = this.get('element');
+ if (element && element.id) {
+ if (this.data) {
+ // chart options
+ var options = { xaxis: {} };
+
+ if (this.get('minValue') !== '') {
+ options.yaxis.min = this.get('minValue');
+ }
+
+ if (this.get('maxValue') !== '') {
+ options.yaxis.max = this.get('maxValue');
+ }
+
+ // draw chart
+ $.plot('#' + element.id, this.data, options);
+ } else {
+ // draw empty chart
+ $.plot('#' + element.id, [[]], { xaxis: { show: false }, yaxis: { show: false }});
+ }
+ }
+ }.observes('data')
+});
diff --git a/app/styles/app.css b/app/styles/app.css
index 5459d5c..85c2b26 100644
--- a/app/styles/app.css
+++ b/app/styles/app.css
@@ -108,7 +108,7 @@ footer {
}
.svg-image {
- width: 80%;
+ width: 50%;
height: auto;
}
@@ -154,7 +154,7 @@ h2 {
h3 {
font-size: 0.85em;
- font-weight: bold;
+ /*font-weight: bold;*/
}
h4 {
@@ -167,6 +167,7 @@ p {
.gauge {
padding-top: 20px;
+ padding-left: 20px;
float: left;
}
@@ -174,6 +175,7 @@ p {
.alarm {
float: right;
padding-top: 20px;
+ padding-right: 80px;
}
button {
@@ -193,6 +195,25 @@ button:disabled {
background-color: #ccc !important;
}
+.link-button {
+ display: block;
+ border: 3px solid green;
+ color: #333;
+ background-color: #beb;
+
+ font-size: 14px;
+ font-weight: bold;
+ text-align: center;
+
+ width: 120px;
+ height: 30px;
+ padding: 5px;
+}
+
+.link-button:hover {
+ text-decoration: none !important;
+}
+
#init-button {
}
diff --git a/app/templates/components/bar-chart.hbs b/app/templates/components/bar-chart.hbs
new file mode 100644
index 0000000..889d9ee
--- /dev/null
+++ b/app/templates/components/bar-chart.hbs
@@ -0,0 +1 @@
+{{yield}}
diff --git a/app/templates/lab-mashup.hbs b/app/templates/lab-mashup.hbs
index 74a17ff..944d8ab 100644
--- a/app/templates/lab-mashup.hbs
+++ b/app/templates/lab-mashup.hbs
@@ -20,7 +20,7 @@
|
-
+
|
@@ -39,7 +39,7 @@
- {{d3-alarm value=freq575Value alarmZones=freq575AlarmZones}}
+ {{d3-alarm value=freq575Value alarmZones=freq575AlarmZones size=35}}
{{d3-gauge label="Freq" value=freq575Value minValue=49 maxValue=51 minorTicks=4 size=120 greenZones=freq575GreenZones yellowZones=freq575YellowZones}}
@@ -63,15 +63,13 @@
Control Center
-
+
|
- Distribution grid monitoring
-
- Voltage measurement
+ Distribution grid monitoring voltage measurement
{{line-chart data=Voltage203937 height="90%" xaxisLength=120 minValue=0.90 maxValue=1.05 label="RMS voltage [pu]"}}
@@ -83,6 +81,9 @@
+
|
@@ -107,12 +108,13 @@
{{/if}}
-
+
|
-
+ {{bar-chart width='200px' height='250px'}}
+
Turin - Piedmont - Italy
- Medium Voltage lines derived from Stura HV/MV
@@ -135,7 +137,7 @@
Prosumer behavior
|
-
+
|
diff --git a/config/environment.js b/config/environment.js
index 68518d8..6592919 100644
--- a/config/environment.js
+++ b/config/environment.js
@@ -5,7 +5,7 @@ module.exports = function(environment) {
modulePrefix: 'lab-mashup',
environment: environment,
baseURL: '/',
- locationType: 'auto',
+ locationType: 'none',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
@@ -60,6 +60,7 @@ module.exports = function(environment) {
if (environment === 'production') {
ENV.APP.API_HOST = 'http://46.101.131.212:80';
+ ENV.baseURL = '/simple/';
ENV['ember-cli-mirage'] = {
enabled: false
diff --git a/public/assets/images/ControlCenter_section/CS_fig1.svg b/public/assets/images/ControlCenter_section/CS_fig1.svg
index 4677dac..2dc9671 100644
--- a/public/assets/images/ControlCenter_section/CS_fig1.svg
+++ b/public/assets/images/ControlCenter_section/CS_fig1.svg
@@ -10,8 +10,8 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1547.9999"
- height="624"
+ width="766.37006"
+ height="395.80264"
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
@@ -64,8 +64,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.70710682"
- inkscape:cx="1149.2192"
- inkscape:cy="142.06867"
+ inkscape:cx="504.95259"
+ inkscape:cy="330.70026"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -94,17 +94,10 @@
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(4054.2698,7820.3408)">
-
+ transform="translate(3410.0032,7120.6692)">
+ transform="matrix(5.6319941,0,0,-5.7141574,-3195.4992,-5906.5706)">
@@ -125,7 +118,7 @@
JRC Ispra
-
diff --git a/public/assets/images/DS_section/DS_fig1.svg b/public/assets/images/DS_section/DS_fig1.svg
index 1b72b79..abd1297 100644
--- a/public/assets/images/DS_section/DS_fig1.svg
+++ b/public/assets/images/DS_section/DS_fig1.svg
@@ -10,8 +10,8 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1547.9999"
- height="624"
+ width="1205.673"
+ height="403.98267"
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
@@ -77,8 +77,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.50000002"
- inkscape:cx="1145.752"
- inkscape:cy="55.108979"
+ inkscape:cx="1019.7521"
+ inkscape:cy="661.10913"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -95,7 +95,7 @@
inkscape:guide-bbox="true">
+ transform="translate(3987.1064,7226.2292)">
Politecnico di Torino
+ transform="matrix(5.6319941,0,0,-5.7141574,-3333.2996,-6012.1306)">
@@ -161,12 +161,5 @@
-
diff --git a/public/assets/images/Prosumer_section/Cnsmr_fig1.svg b/public/assets/images/Prosumer_section/Cnsmr_fig1.svg
index 0d996bf..492884c 100644
--- a/public/assets/images/Prosumer_section/Cnsmr_fig1.svg
+++ b/public/assets/images/Prosumer_section/Cnsmr_fig1.svg
@@ -10,8 +10,8 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1547.9999"
- height="624"
+ width="808.05945"
+ height="405.16147"
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
@@ -56,8 +56,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.5"
- inkscape:cx="495.43179"
- inkscape:cy="-11.108901"
+ inkscape:cx="349.9975"
+ inkscape:cy="652.89098"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -86,9 +86,9 @@
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(4337.3403,8103.2139)">
+ transform="translate(4191.906,7220.3755)">
JRC Petten
-
diff --git a/public/assets/images/TS_section/TS_fig1.svg b/public/assets/images/TS_section/TS_fig1.svg
index 69846a3..a951bba 100644
--- a/public/assets/images/TS_section/TS_fig1.svg
+++ b/public/assets/images/TS_section/TS_fig1.svg
@@ -10,8 +10,8 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="1547.9999"
- height="624"
+ width="1333.887"
+ height="464.59662"
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
@@ -173,15 +173,15 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.50000002"
- inkscape:cx="520.17953"
- inkscape:cy="427.63791"
+ inkscape:cx="1417.3101"
+ inkscape:cy="-326.36214"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
- inkscape:window-width="944"
- inkscape:window-height="1002"
- inkscape:window-x="960"
- inkscape:window-y="1080"
+ inkscape:window-width="1920"
+ inkscape:window-height="1018"
+ inkscape:window-x="-8"
+ inkscape:window-y="1072"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
@@ -203,36 +203,36 @@
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(3931.2317,7188.3506)">
+ transform="translate(4828.3623,7782.9473)">
+ x="-4614.3057"
+ y="-7735.5024" />
RWTH Aachen University
-
diff --git a/tests/integration/components/bar-chart-test.js b/tests/integration/components/bar-chart-test.js
new file mode 100644
index 0000000..d57f577
--- /dev/null
+++ b/tests/integration/components/bar-chart-test.js
@@ -0,0 +1,26 @@
+import { moduleForComponent, test } from 'ember-qunit';
+import hbs from 'htmlbars-inline-precompile';
+
+moduleForComponent('bar-chart', 'Integration | Component | bar chart', {
+ integration: true
+});
+
+test('it renders', function(assert) {
+ assert.expect(2);
+
+ // Set any properties with this.set('myProperty', 'value');
+ // Handle any actions with this.on('myAction', function(val) { ... });
+
+ this.render(hbs`{{bar-chart}}`);
+
+ assert.equal(this.$().text().trim(), '');
+
+ // Template block usage:
+ this.render(hbs`
+ {{#bar-chart}}
+ template block text
+ {{/bar-chart}}
+ `);
+
+ assert.equal(this.$().text().trim(), 'template block text');
+});