diff --git a/backend/lib/Controller/AggregatorController.php b/backend/lib/Controller/AggregatorController.php
index cc749b1..dd45e68 100644
--- a/backend/lib/Controller/AggregatorController.php
+++ b/backend/lib/Controller/AggregatorController.php
@@ -44,7 +44,7 @@ class AggregatorController extends EntityController {
return $aggregator;
}
else {
- throw new \Exception($identifier . ' is not a group uuid');
+ throw new \Exception($identifier . ' is not a group');
}
}
diff --git a/backend/lib/Controller/ChannelController.php b/backend/lib/Controller/ChannelController.php
index fa6dd75..6543603 100644
--- a/backend/lib/Controller/ChannelController.php
+++ b/backend/lib/Controller/ChannelController.php
@@ -44,7 +44,7 @@ class ChannelController extends EntityController {
return $channel;
}
else {
- throw new \Exception($identifier . ' is not a channel uuid');
+ throw new \Exception($identifier . ' is not a channel');
}
}
diff --git a/backend/lib/View/JSON.php b/backend/lib/View/JSON.php
index 0333b34..c1137d6 100644
--- a/backend/lib/View/JSON.php
+++ b/backend/lib/View/JSON.php
@@ -23,8 +23,8 @@
namespace Volkszaehler\View;
+use Doctrine\ORM\Query\AST\Functions;
use Volkszaehler\Interpreter;
-
use Volkszaehler\View\HTTP;
use Volkszaehler\Util;
use Volkszaehler\Model;
@@ -67,7 +67,7 @@ class JSON extends View {
$json = $this->json->encode((Util\Debug::isActivated()) ? JSON_PRETTY : 0);
if ($this->padding) {
- $json = 'if (self.' . $this->padding . ') { ' . $this->padding . '(' . $json . '); }';
+ $json = 'if (' . $this->padding . ') { ' . $this->padding . '(' . $json . '); }';
}
$this->response->setHeader('Content-type', 'application/json');
@@ -79,18 +79,13 @@ class JSON extends View {
*
* @param Model\Channel $channel
*/
- protected function addChannel(Model\Channel $channel) {
- $this->json['channel'] = self::convertEntity($channel);
- }
-
- /**
- * Add aggregator to output queue
- *
- * @param Model\Aggregator $aggregator
- * @param boolean $recursive
- */
- protected function addAggregator(Model\Aggregator $aggregator, $recursive = FALSE) {
- $this->json['group'] = self::convertAggregator($aggregator, $recursive);
+ protected function addEntity(Model\Entity $entity) {
+ if ($entity instanceof Model\Aggregator) {
+ $this->json['entity'] = self::convertAggregator($entity);
+ }
+ else {
+ $this->json['entity'] = self::convertEntity($entity);
+ }
}
/**
@@ -198,12 +193,11 @@ class JSON extends View {
$jsonAggregator = self::convertEntity($aggregator);
foreach ($aggregator->getChildren() as $entity) {
-
if ($entity instanceof Model\Channel) {
- $jsonAggregator['channels'][] = self::convertEntity($entity);
+ $jsonAggregator['children'][] = self::convertEntity($entity);
}
elseif ($entity instanceof Model\Aggregator) {
- $jsonAggregator['groups'][] = self::convertAggregator($entity);
+ $jsonAggregator['children'][] = self::convertAggregator($entity);
}
}
diff --git a/backend/lib/View/View.php b/backend/lib/View/View.php
index 1d6c5db..fc909ce 100644
--- a/backend/lib/View/View.php
+++ b/backend/lib/View/View.php
@@ -110,11 +110,8 @@ abstract class View {
if ($data instanceof Interpreter\InterpreterInterface) {
$this->addData($data);
}
- elseif ($data instanceof Model\Channel) {
- $this->addChannel($data);
- }
- elseif ($data instanceof Model\Aggregator) {
- $this->addAggregator($data);
+ elseif ($data instanceof Model\Entity) {
+ $this->addEntity($data);
}
elseif ($data instanceof \Exception) {
$this->addException($data);
@@ -131,8 +128,7 @@ abstract class View {
protected abstract function render();
protected abstract function addData(Interpreter\InterpreterInterface $data);
- protected abstract function addChannel(Model\Channel $channel);
- protected abstract function addAggregator(Model\Aggregator $aggregator);
+ protected abstract function addEntity(Model\Entity $entity);
protected abstract function addException(\Exception $exception);
protected abstract function addDebug(Util\Debug $debug);
}
diff --git a/frontend/images/add.png b/frontend/images/add.png
new file mode 100644
index 0000000..6332fef
Binary files /dev/null and b/frontend/images/add.png differ
diff --git a/frontend/images/arrow_refresh.png b/frontend/images/arrow_refresh.png
new file mode 100644
index 0000000..0de2656
Binary files /dev/null and b/frontend/images/arrow_refresh.png differ
diff --git a/frontend/images/chart_curve.png b/frontend/images/chart_curve.png
new file mode 100644
index 0000000..01e933a
Binary files /dev/null and b/frontend/images/chart_curve.png differ
diff --git a/frontend/images/chart_line.png b/frontend/images/chart_line.png
new file mode 100644
index 0000000..85020f3
Binary files /dev/null and b/frontend/images/chart_line.png differ
diff --git a/frontend/images/control_end_blue.png b/frontend/images/control_end_blue.png
new file mode 100644
index 0000000..7207935
Binary files /dev/null and b/frontend/images/control_end_blue.png differ
diff --git a/frontend/images/control_fastforward_blue.png b/frontend/images/control_fastforward_blue.png
new file mode 100644
index 0000000..4a2f9d4
Binary files /dev/null and b/frontend/images/control_fastforward_blue.png differ
diff --git a/frontend/images/control_rewind_blue.png b/frontend/images/control_rewind_blue.png
new file mode 100644
index 0000000..15d1584
Binary files /dev/null and b/frontend/images/control_rewind_blue.png differ
diff --git a/frontend/images/control_start_blue.png b/frontend/images/control_start_blue.png
new file mode 100644
index 0000000..6f11fcb
Binary files /dev/null and b/frontend/images/control_start_blue.png differ
diff --git a/frontend/images/cookie.png b/frontend/images/cookie.png
new file mode 100644
index 0000000..c84714b
Binary files /dev/null and b/frontend/images/cookie.png differ
diff --git a/frontend/images/delete.png b/frontend/images/delete.png
new file mode 100644
index 0000000..08f2493
Binary files /dev/null and b/frontend/images/delete.png differ
diff --git a/frontend/images/folder.png b/frontend/images/folder.png
new file mode 100644
index 0000000..784e8fa
Binary files /dev/null and b/frontend/images/folder.png differ
diff --git a/frontend/images/server.png b/frontend/images/server.png
new file mode 100644
index 0000000..720a237
Binary files /dev/null and b/frontend/images/server.png differ
diff --git a/frontend/images/shading.png b/frontend/images/shading.png
new file mode 100644
index 0000000..09275f9
Binary files /dev/null and b/frontend/images/shading.png differ
diff --git a/frontend/index.html b/frontend/index.html
index 37a1eb8..dc49af7 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -18,6 +18,7 @@
+
@@ -29,38 +30,50 @@
-
+
Kanäle
-
+
+
- UUID |
- Title |
+ Titel |
Typ |
Operationen |
+ Anzeige |
+
+
Optionen
+