diff --git a/backend/lib/Util/UUID.php b/backend/lib/Util/UUID.php
index 7ed154f..d42b356 100644
--- a/backend/lib/Util/UUID.php
+++ b/backend/lib/Util/UUID.php
@@ -116,26 +116,12 @@ class UUID {
}
/**
- * Performant validation of UUID's
- *
- * Replaces preg_match('/[a-f0-9\-]{36}/', $uuid);
+ * Validation of UUID's
*
* @param string $uuid
- * @param boolen $short whether to allow abbreviated form of UUID's or not
*/
- public static function validate($uuid, $short = FALSE) {
- $len = strlen($uuid);
-
- for ($i = 0; $i < $len; $i++) {
- $char = $uuid[$i];
- $ord = ord($char);
-
- if (($ord > 57 || $ord < 48) && ($ord > 70 || $ord < 65) && ($ord > 102 || $ord < 97) && $ord != 45) {
- return FALSE; // char not allowed
- }
- }
-
- return ($short) ? $len <= 36 : $len == 36; // check for strlen
+ public static function validate($uuid) {
+ return (boolean) preg_match('/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/', $uuid);
}
/**
diff --git a/frontend/index.html b/frontend/index.html
index 92b1c4c..32add7a 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -8,6 +8,9 @@
+
+
+
@@ -15,12 +18,10 @@
-
-
-
-
-
+
+
+
diff --git a/frontend/javascripts/backend.js b/frontend/javascripts/backend.js
deleted file mode 100644
index 5982f71..0000000
--- a/frontend/javascripts/backend.js
+++ /dev/null
@@ -1,258 +0,0 @@
-/**
- * Backend related javascript code
- *
- * @author Florian Ziegler
- * @author Justin Otherguy
- * @author Steffen Vogel
- * @copyright Copyright (c) 2010, The volkszaehler.org project
- * @package default
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- */
-/*
- * This file is part of volkzaehler.org
- *
- * volkzaehler.org is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or any later version.
- *
- * volkzaehler.org is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * volkszaehler.org. If not, see .
- */
-
-/**
- * Get all entity information from backend
- */
-function loadEntities() {
- $.each(vz.uuids, function(index, value) {
- $.getJSON(vz.options.backendUrl + '/entity/' + value + '.json', ajaxWait(function(json) {
- vz.entities.push(json.entity);
- }, showEntities, 'information'));
- });
-}
-
-/**
- * Create nested entity list
- * @param data
- */
-function showEntities() {
- $('#entities tbody').empty();
-
- var i = 0;
- eachRecursive(vz.entities, function(entity, parent) {
- entity.active = true; // TODO active by default or via backend property?
- entity.color = vz.options.plot.colors[i++ % vz.options.plot.colors.length];
-
- var row = $('