From 33b8a54ea4f0030f1180c57ab2e4a312f73c6dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Henning?= <stu114708@informatik.uni-kiel.de> Date: Tue, 26 Jul 2016 16:37:10 +0200 Subject: [PATCH] removed random value generation --- src/main/resources/public/index.html | 30 ---------------------------- 1 file changed, 30 deletions(-) diff --git a/src/main/resources/public/index.html b/src/main/resources/public/index.html index d95e2cf..4b01e55 100644 --- a/src/main/resources/public/index.html +++ b/src/main/resources/public/index.html @@ -25,28 +25,6 @@ <script type="text/javascript"> - // TODO TEMP - var MeasurementsCreator = { - lastMeasurements: [2500, 2500, 2500, 2500, 2500], - createNewMeasurement: function(time) { - this.lastMeasurements.shift(); - var lastMeasurement = this.lastMeasurements[this.lastMeasurements.length-1]; - var measurement = Math.max(0, lastMeasurement + 100*2 * (Math.random() - 0.5)); - this.lastMeasurements.push(measurement); - if (Math.random() >= 0.9) { - measurement = Math.max(0, lastMeasurement + 1000*2 * (Math.random() - 0.5)); - } - var prediction = this.lastMeasurements.reduce(function(a, b) { return a + b; }) / this.lastMeasurements.length; - var anomalyscore = (measurement - prediction) / prediction; - return { - "time": time, - "measurement": measurement, - "prediction": prediction, - "anomalyscore": anomalyscore - } - } - } - $(document).ready(function() { var plotcontainer = $("#plotcontainer"); @@ -77,14 +55,6 @@ setInterval(requestNewData, 1000); - - // TODO TEMP - function addNewData() { - visualization.addMeasurements([MeasurementsCreator.createNewMeasurement(new Date().getTime())]); - setTimeout(addNewData, Math.random() * (500 - 100) + 100); - } - addNewData(); - }); </script> -- GitLab