From c5aa7795145044a97b889ff68036f7abe6035880 Mon Sep 17 00:00:00 2001 From: Arman KYOKCHAN Date: Thu, 27 Jun 2013 06:03:46 +0000 Subject: [PATCH] issue #0001649: Retrive monitoring types --- application/controllers/GiantController.php | 3 ++- library/Giant/Controllers.lib.php | 8 ++++---- library/Giant/WSgiant.php | 8 ++++---- public/themes/default/scripts/giant.js | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/application/controllers/GiantController.php b/application/controllers/GiantController.php index 2ed57b83e..5d2f7088f 100644 --- a/application/controllers/GiantController.php +++ b/application/controllers/GiantController.php @@ -314,7 +314,8 @@ class GiantController extends Zend_Controller_Action $this->getRequest()->getParam('StartFrom'), $this->getRequest()->getParam('InternalOrderId'), $this->getRequest()->getParam('Pays'), - $this->TestIndication + $this->TestIndication, + $this->getRequest()->getParam('monitor_type') ); $this->view->result = $result; diff --git a/library/Giant/Controllers.lib.php b/library/Giant/Controllers.lib.php index 8957f311b..999cde77d 100644 --- a/library/Giant/Controllers.lib.php +++ b/library/Giant/Controllers.lib.php @@ -79,10 +79,10 @@ Class GiantControllerLib $result = $rapport->GetUpdateMonitoring($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode); return ($result); } - public function retrivemonitoring($CompanyId, $StartFrom,$InternalOrderId,$Pays,$TestIndication) + public function retrivemonitoring($CompanyId, $StartFrom,$InternalOrderId,$Pays,$TestIndication,$EventType) { $rapport = new GiantRechercheController($Pays, $TestIndication); - $result = $rapport->GetretriveMonitoring($CompanyId, $StartFrom,$InternalOrderId); + $result = $rapport->GetretriveMonitoring($CompanyId, $StartFrom,$InternalOrderId,$EventType); return ($result); } protected function parcourTableau($array) @@ -278,10 +278,10 @@ Class GiantRechercheController extends GiantFunction $result = $this->CreditData->getMethode('UpdateMonitoringOptions', array($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode)); return ($result); } - public function GetRetriveMonitoring($CompanyId, $StartFrom, $InternalOrderId) + public function GetRetriveMonitoring($CompanyId, $StartFrom, $InternalOrderId,$EventType) { $this->CreditData = new CreditData($this->soapG, $CompanyId); - $result = $this->CreditData->getMethode('RetrieveMonitoringEventsForOrder', array($CompanyId, $StartFrom, $InternalOrderId)); + $result = $this->CreditData->getMethode('RetrieveMonitoringEventsFor'.$EventType, array($CompanyId, $StartFrom, $InternalOrderId)); return ($result); } public function ListeRapport($CompanyId) diff --git a/library/Giant/WSgiant.php b/library/Giant/WSgiant.php index c59b296d7..f4dc3a14b 100644 --- a/library/Giant/WSgiant.php +++ b/library/Giant/WSgiant.php @@ -290,10 +290,10 @@ Class CreditData extends GiantFunction return ($result); } - protected function RetrieveMonitoringEventsForCustomer($StartFrom) + protected function RetrieveMonitoringEventsForCustomer($CompanyId, $StartFrom) { $parametres = new stdClass(); - $parametres->StartFrom = $StartFrom; + if (!empty($StartFrom)) {$parametres->StartFrom = $StartFrom;} try { $result = $this->soapG->RetrieveMonitoringEventsForCustomer($parametres); } catch (SoapFault $soapFault) { @@ -302,10 +302,10 @@ Class CreditData extends GiantFunction return ($result); } - protected function RetrieveMonitoringEventsForConsumer($StartFrom) + protected function RetrieveMonitoringEventsForConsumer($CompanyId, $StartFrom) { $parametres = new stdClass(); - $parametres->StartFrom = $StartFrom; + if (!empty($StartFrom)) {$parametres->StartFrom = $StartFrom;} try { $result = $this->soapG->RetrieveMonitoringEventsForConsumer($parametres); } catch (SoapFault $soapFault) { diff --git a/public/themes/default/scripts/giant.js b/public/themes/default/scripts/giant.js index 882556cd6..47d2b9a19 100644 --- a/public/themes/default/scripts/giant.js +++ b/public/themes/default/scripts/giant.js @@ -65,7 +65,7 @@ $(document).ready( function() $( ".monitor_but a,.retrive_but a" ) .button(); }); - + $.mon_type = $('.mon_type').val(); $('.retr').on('click', function(e){ e.preventDefault(); var title = $(this).attr('title');