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 eb1c3448fa Add docker-compose-dev.yml for easy start to dev.
Convert SVG images to PNG for easier handle.
Fix ElectricalGrid queue entity for new data.
2016-05-23 21:05:27 +02:00

39 lines
849 B
JavaScript

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