mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-30 00:00:13 +01:00
24 lines
473 B
JavaScript
24 lines
473 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Route.extend({
|
|
model() {
|
|
return this.store.findAll('entity');
|
|
},
|
|
|
|
afterModel() {
|
|
// first time call poll
|
|
Ember.run.later(this, function() {
|
|
this.refreshEntities();
|
|
}, 500);
|
|
},
|
|
|
|
refreshEntities: function() {
|
|
// fetch new data from server
|
|
this.store.findAll('entity');
|
|
|
|
// reschedule refresh
|
|
Ember.run.later(this, function() {
|
|
this.refreshEntities();
|
|
}, 500);
|
|
}
|
|
});
|