1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-23 00:00:02 +01:00
VILLASweb/app/routes/lab-mashup.js
Markus Grigull 8ecc8ba95d Improved grid layout
S1's properties are clickable and drawn in the plot.
2015-10-13 16:02:28 +02:00

48 lines
1 KiB
JavaScript

import Ember from 'ember';
export default Ember.Route.extend({
model() {
return this.store.query('entity', { entities: [
{
id: 'S1_ElectricalGrid',
isPattern: false,
type: 'ElectricalGridMonitoring'
},
{
id: 'S2_ElectricalGrid',
isPattern: false,
type: 'ElectricalGridMonitoring'
}
]});
//return this.store.findAll('entity');
},
afterModel() {
// first time call poll
Ember.run.later(this, function() {
this.refreshEntities();
}, 100);
},
refreshEntities: function() {
// fetch new data from server
this.store.query('entity', { entities: [
{
id: 'S1_ElectricalGrid',
isPattern: false,
type: 'ElectricalGridMonitoring'
},
{
id: 'S2_ElectricalGrid',
isPattern: false,
type: 'ElectricalGridMonitoring'
}
]});
//this.store.findAll('entity');
// reschedule refresh
Ember.run.later(this, function() {
this.refreshEntities();
}, 100);
}
});