diff --git a/web/app/Controller/MonitorsController.php b/web/app/Controller/MonitorsController.php new file mode 100644 index 000000000..76f0586c2 --- /dev/null +++ b/web/app/Controller/MonitorsController.php @@ -0,0 +1,23 @@ +set('monitors', $this->Monitor->find('all')); + } + + public function view($id = null) { + if (!$id) { + throw new NotFoundException(__('Invalid monitor')); + } + + $monitor = $this->Monitor->findById($id); + if (!$monitor) { + throw new NotFoundException(__('Invalid monitor')); + } + $this->set('monitor', $monitor); + } + } + +?> diff --git a/web/app/Model/Monitor.php b/web/app/Model/Monitor.php new file mode 100644 index 000000000..6a6bb64a6 --- /dev/null +++ b/web/app/Model/Monitor.php @@ -0,0 +1,5 @@ + diff --git a/web/app/View/Monitors/index.ctp b/web/app/View/Monitors/index.ctp new file mode 100644 index 000000000..38caf9caf --- /dev/null +++ b/web/app/View/Monitors/index.ctp @@ -0,0 +1,17 @@ +

Monitors

+ + + + + + + + + + + + +
NameMonitorId
+ Html->link($monitor['Monitor']['Name'], +array('controller' => 'monitors', 'action' => 'view', $monitor['Monitor']['Id'])); ?> +