From 63501843460247ae0c0759e700a005c452b4f732 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 18 May 2021 11:12:37 -0400 Subject: [PATCH] Add Event_Summary model so that it is included in monitor listing --- web/api/app/Model/Event_Summary.php | 49 +++++++++++++++++++++++++++++ web/api/app/Model/Monitor.php | 5 +++ 2 files changed, 54 insertions(+) create mode 100644 web/api/app/Model/Event_Summary.php diff --git a/web/api/app/Model/Event_Summary.php b/web/api/app/Model/Event_Summary.php new file mode 100644 index 000000000..b9395ab1b --- /dev/null +++ b/web/api/app/Model/Event_Summary.php @@ -0,0 +1,49 @@ + array( + 'numeric' => array( + 'rule' => array('numeric'), + //'message' => 'Your custom message here', + //'allowEmpty' => false, + //'required' => false, + //'last' => false, // Stop validation after this rule + //'on' => 'create', // Limit validation to 'create' or 'update' operations + ), + ), + ); +} diff --git a/web/api/app/Model/Monitor.php b/web/api/app/Model/Monitor.php index 1a80fed41..cc4ef1375 100644 --- a/web/api/app/Model/Monitor.php +++ b/web/api/app/Model/Monitor.php @@ -134,6 +134,11 @@ class Monitor extends AppModel { 'className' => 'Monitor_Status', 'foreignKey' => 'MonitorId', 'joinTable' => 'Monitor_Status', + ), + 'Event_Summary' => array( + 'className' => 'Event_Summary', + 'foreignKey' => 'MonitorId', + 'joinTable' => 'Event_Summaries', ) );