diff --git a/app/models/entity.js b/app/models/entity.js index 29b0c4a..1b6bebe 100644 --- a/app/models/entity.js +++ b/app/models/entity.js @@ -1,6 +1,17 @@ +import Ember from 'ember'; import DS from 'ember-data'; export default DS.Model.extend({ type: DS.attr('string'), - properties: DS.attr() + properties: DS.attr(), + + poll: function() { + Ember.debug("Poll"); + + var _this = this; + Ember.run.later(function() { + _this.reload(); + _this.poll(); + }, 500); + }.observes('didLoad') }); diff --git a/app/serializers/application.js b/app/serializers/application.js index 871d3a8..c71ef80 100644 --- a/app/serializers/application.js +++ b/app/serializers/application.js @@ -43,7 +43,8 @@ export default DS.RESTSerializer.extend({ var property = { name: attribute.name, value: attribute.value, - type: attribute.type + type: attribute.type, + timestamp: attribute.metadatas[0].value } entity.attributes.properties.push(property); diff --git a/app/styles/app.css b/app/styles/app.css index 58b25b0..f5a1e36 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -89,8 +89,8 @@ body { #last-update-info { padding: 0px 0 20px 0; - font-size: 16px; - text-align: center; + font-size: 15px; + text-align: left; } .data-table { diff --git a/app/templates/components/properties-table.hbs b/app/templates/components/properties-table.hbs index 3609f4f..16a83ea 100644 --- a/app/templates/components/properties-table.hbs +++ b/app/templates/components/properties-table.hbs @@ -1,10 +1,12 @@
Last updated:
-