[icinga-checkins] icinga.org: icinga-web/feature/datapermissions-wip: TEMPORARY: disabled Permission Aggregated filter in Overviewmodels

git at icinga.org git at icinga.org
Thu Feb 14 16:27:57 CET 2013


Module: icinga-web
Branch: feature/datapermissions-wip
Commit: 9b4f1fab6122a3ecdd4c20fefd70c9d76f32e2e6
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=9b4f1fab6122a3ecdd4c20fefd70c9d76f32e2e6

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Thu Feb 14 16:26:51 2013 +0100

TEMPORARY: disabled Permission Aggregated filter in Overviewmodels

---

 .../models/Provider/StatusSummaryModel.class.php   |   10 +++++-----
 .../Provider/SystemPerformanceModel.class.php      |    4 +++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/app/modules/Cronks/models/Provider/StatusSummaryModel.class.php b/app/modules/Cronks/models/Provider/StatusSummaryModel.class.php
index c2c6828..9f65fdb 100644
--- a/app/modules/Cronks/models/Provider/StatusSummaryModel.class.php
+++ b/app/modules/Cronks/models/Provider/StatusSummaryModel.class.php
@@ -93,7 +93,7 @@ class Cronks_Provider_StatusSummaryModel extends CronksBaseModel {
             . 'count(x.display_name) as count'
         );
         
-        $filter = $this->getContext()->getModel('Filter.UserObjectId', 'Api');
+        //$filter = $this->getContext()->getModel('Filter.UserObjectId', 'Api');
         
         if ($type==='host') {
             $query->from('IcingaHosts x')
@@ -104,7 +104,7 @@ class Cronks_Provider_StatusSummaryModel extends CronksBaseModel {
              */
             // $query->leftJoin('x.services s');
             
-            $filter->setFieldsAsString('x.host_object_id');
+            //$filter->setFieldsAsString('x.host_object_id');
             
         } elseif ($type==='service') {
             $query->from('IcingaServices x')
@@ -118,7 +118,7 @@ class Cronks_Provider_StatusSummaryModel extends CronksBaseModel {
            $query->addGroupBy('hs.current_state, hs.scheduled_downtime_depth, '
                    . 'hs.problem_has_been_acknowledged');
            
-           $filter->setFieldsAsString('x.service_object_id, x.host_object_id');
+           //$filter->setFieldsAsString('x.service_object_id, x.host_object_id');
         }
         
         $query->addGroupBy('a.current_state, a.has_been_checked, '
@@ -127,7 +127,7 @@ class Cronks_Provider_StatusSummaryModel extends CronksBaseModel {
                 . 'a.active_checks_enabled')
         ->disableAutoIdentifierFields(true);
         
-        $query->addFilter($filter);
+        //$query->addFilter($filter);
         
         $records = $query->execute(array(), Doctrine::HYDRATE_SCALAR);
         
@@ -272,4 +272,4 @@ class Cronks_Provider_StatusSummaryModel extends CronksBaseModel {
         
         return $json;
     }
-}
\ No newline at end of file
+}
diff --git a/app/modules/Cronks/models/Provider/SystemPerformanceModel.class.php b/app/modules/Cronks/models/Provider/SystemPerformanceModel.class.php
index 88f3442..0feffa3 100644
--- a/app/modules/Cronks/models/Provider/SystemPerformanceModel.class.php
+++ b/app/modules/Cronks/models/Provider/SystemPerformanceModel.class.php
@@ -60,6 +60,7 @@ class Cronks_Provider_SystemPerformanceModel extends CronksBaseModel {
             $out[$f] = (int)0;
         }
         
+        /*
         $filter = $this->getContext()->getModel('Filter.UserObjectId', 'Api');
         
         if ($prefix === 'host') {
@@ -67,14 +68,15 @@ class Cronks_Provider_SystemPerformanceModel extends CronksBaseModel {
         } elseif ($prefix === 'service') {
             $filter->setFieldsAsString('a.host_object_id', 'a.service_object_id');
         }
+        */
         
         $data = IcingaDoctrine_Query::create()
         ->from($table. ' a')
         ->select('count(a.'. $prefix. '_id) as count, a.passive_checks_enabled, a.active_checks_enabled')
         ->groupBy('a.passive_checks_enabled, a.active_checks_enabled')
         ->disableAutoIdentifierFields(true)
-        ->addFilter($filter)
         ->execute(array(), Doctrine::HYDRATE_SCALAR);
+        //->addFilter($filter)
 
         foreach ($data as $f) {
             if ($f['a_active_checks_enabled']) {





More information about the icinga-checkins mailing list