From b6bf96b701cb217f58dd9d9e5a35876356808445 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Mon, 6 May 2013 08:40:25 -0400 Subject: [PATCH] Added the list of distinct monitors to the monitors variable for later use with filtering --- web/app/Controller/EventsController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/Controller/EventsController.php b/web/app/Controller/EventsController.php index 63fc38262..5779d6f87 100644 --- a/web/app/Controller/EventsController.php +++ b/web/app/Controller/EventsController.php @@ -12,9 +12,10 @@ class EventsController extends AppController { public function index() { -# $this->set('events', $this->Event->find('all', array('limit' => 1000))); $data = $this->paginate('Event'); $this->set('events', $data); + $options = array('fields' => array('DISTINCT Monitor.Id')); + $this->set('monitors', $this->Event->Monitor->Find('all', $options)); } public function view($id = null) {