diff --git a/frontend/index.html b/frontend/index.html index fdc0ad8..b1ed721 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -73,7 +73,7 @@ -
+

Optionen

diff --git a/frontend/javascripts/entity.js b/frontend/javascripts/entity.js index 4941520..0972e70 100644 --- a/frontend/javascripts/entity.js +++ b/frontend/javascripts/entity.js @@ -69,43 +69,24 @@ Entity.prototype.showDetails = function() { * @todo implement/test */ Entity.prototype.getDOM = function() { - var properties = $('') - .append($('') - .addClass('required') - .append($(''); + + for (var property in this) { + if (this.hasOwnProperty(property) && property != 'data' && property != 'children') { + data.append($('') + .append($('
KeyValue
') - .addClass('key') - .text(key) - ) - .append($('') - .addClass('value') - .text(value) - ) - ); - }); - - var entity = getDefinition(entities, type); - - entity.required.each(function(index, property) { - var property = getDefinition(properties, property); - - if (property) { - $('#properties') - .append($('
') - .append($('').append(getPropertyDOM(property))) - .append($('').text('(*)')) - ); + var table = $('
KeyValue
'); + var data = $('
') + .addClass('key') + .text(property) + ) + .append($('') + .addClass('value') + .text(this[property]) + ) + ); } - }); - - // TODO optional properties + } + return table.append(data); }; /** diff --git a/frontend/javascripts/frontend.js b/frontend/javascripts/frontend.js index 436bad0..ccbe302 100644 --- a/frontend/javascripts/frontend.js +++ b/frontend/javascripts/frontend.js @@ -33,7 +33,7 @@ */ vz.wui.init = function() { // start auto refresh timer - window.setInterval(this.refresh, 5000); + window.setInterval(this.refresh, 3000); // initialize dropdown accordion $('#accordion h3').click(function() { diff --git a/frontend/javascripts/options.js b/frontend/javascripts/options.js index 3be9122..9ab5be5 100644 --- a/frontend/javascripts/options.js +++ b/frontend/javascripts/options.js @@ -43,7 +43,7 @@ vz.options.plot = { //symbol: 'square' symbol: function(ctx, x, y, radius, shadow) { // just draw simple pixels ctx.lineWidth = 1; - ctx.strokeRect(x-0.5, y-0.5, 1, 1); + ctx.strokeRect(x-1, y-1, 2, 2); } } },