issue #0001649: Stop monitoring works

This commit is contained in:
Arman KYOKCHAN 2013-06-17 12:26:12 +00:00
parent 77f10abadb
commit 0d73687326
8 changed files with 406 additions and 299 deletions

View File

@ -231,11 +231,13 @@ class GiantController extends Zend_Controller_Action
$this->view->lang = $this->getRequest()->getParam('lang');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->monitoring($this->getRequest()->getParam('CompanyId'),
$result = $giantController->startmonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('CategoryName'),
$this->getRequest()->getParam('EventType'),
$this->getRequest()->getParam('StartDate'),
@ -248,4 +250,26 @@ class GiantController extends Zend_Controller_Action
}
}
public function stopmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->stopmonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('EndDate'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('Pays')
);
$this->view->result = $result;
}
}
}

View File

@ -133,7 +133,8 @@
<h1>Liste des monitoring<img style="margin-top:4px;float:right" src="/themes/default/images/giant/expanded.gif" ></h1>
<a class="dial" title="monitoring" href='/giant/startmonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/lang/<?=serialize($this->listeRapport->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)?>'>Start monitoring</a>
<a class="dial" title="Start Monitoring" href='/giant/startmonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/lang/<?=serialize($this->listeRapport->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Start monitoring</a><br />
<a class="dial" title="Stop Monitoring" href='/giant/stopmonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Stop monitoring</a>
<?php echo'<pre>';print_r($this->modification); ?>

View File

@ -2,33 +2,42 @@
<form>
<input type="hidden" name="CompanyId" value="<?=$this->CompanyId?>" />
<input type="hidden" name="Pays" value="<?=$this->Pays?>" />
<input type="hidden" name="action" value="<?=$this->action?>" />
<p>
<strong>CompanyId: </strong><?=$this->CompanyId?><br /><br />
<strong>Company Name: </strong><?=$this->CompanyName?><br /><br />
<strong>LanguageCode: </strong><br />
<div style='width: 250px; float: left;'>
<strong>Category Name: </strong><br />
<select name="CategoryName" class="all_select">
<option value='All'>All</option>
<option value='CreditRecommendation'>CreditRecommendation</option>
</select><br /><br />
<strong>Event Type: </strong><br />
<select name="EventType" class="all_select">
<option value='EventOnly'>EventOnly</option>
<option value='EventWithData'>EventWithData</option>
</select><br /><br />
<strong>Language Code: </strong><br />
<select name="LanguageCode" class="all_select">
<?php foreach (unserialize($this->lang) as $key=>$language):?>
<option class="lang<?=$key;?>" value=<?=$language;?>><?=$language;?></option>
<?php endforeach;?>
</select><br /><br />
<strong>CategoryName: </strong><br />
<select name="CategoryName" class="all_select">
<option value='All'>All</option>
<option value='CreditRecommendation'>CreditRecommendation</option>
</select><br /><br />
<strong>EventType: </strong><br />
<select name="EventType" class="all_select">
<option value='EventOnly'>EventOnly</option>
<option value='EventWithData'>EventWithData</option>
</select><br /><br />
<strong>PreferredStartDate: </strong><br />
<input type="text" id='datepicker' name="StartDate" value=""/> optional<br /><br />
<strong>PreferredEndDate: </strong><br />
<input type="text" id='datepicker1' name="EndDate" value="" /> optional<br /><br />
<strong>MonitoringVersion: </strong><br />
</div>
<div>
<strong>Preferred Start Date: </strong><br />
<input type="text" class='datepicker' name="StartDate" value=""/> optional<br /><br />
<strong>Preferred End Date: </strong><br />
<input type="text" class='datepicker' name="EndDate" value="" /> optional<br /><br />
<strong>Monitoring Version: </strong><br />
<input type="text" name="Version" value="1.0" required /><br /><br />
</div>
</p>
</form>
<div id="loading" class="hide_monitor" style="display:none;z-index: 1;">
<center><img style="padding-top:30%" src="/themes/default/images/giant/19-1.gif" /></center>
</div>
<?php echo'<pre>'; print_r($this->values);print_r($this->result);?>
</div>
<script type="text/javascript" src="/themes/default/scripts/giant_monitoring.js" />

View File

@ -0,0 +1,25 @@
<div id="center">
<form>
<input type="hidden" name="CompanyId" value="<?=$this->CompanyId?>" />
<input type="hidden" name="Pays" value="<?=$this->Pays?>" />
<input type="hidden" name="action" value="<?=$this->action?>" />
<p>
<strong>CompanyId: </strong><?=$this->CompanyId?><br /><br />
<strong>Company Name: </strong><?=$this->CompanyName?><br /><br />
<div style='width: 250px; float: left;'>
<strong>Internal Order Id: </strong><br />
<input type="text" name="InternalOrderId" value="" required /><br /><br />
</div>
<div>
<strong>Preferred End Date: </strong><br />
<input type="text" class='datepicker' name="EndDate" value="" required /> optional<br /><br />
</div>
</p>
</form>
<div id="loading" class="hide_monitor" style="display:none;z-index: 1;">
<center><img style="padding-top:30%" src="/themes/default/images/giant/19-1.gif" /></center>
</div>
<?php echo'<pre>'; print_r($this->values);print_r($this->result);?>
</div>
<script type="text/javascript" src="/themes/default/scripts/giant_monitoring.js" />

View File

@ -58,13 +58,20 @@ Class GiantControllerLib
return ($id);
}
public function monitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode,$Pays)
public function startmonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode,$Pays)
{
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetStartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode);
return ($result);
}
public function stopmonitoring($CompanyId, $PreferredEndDate,$InternalOrderId,$Pays)
{
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetStopMonitoring($CompanyId, $PreferredEndDate,$InternalOrderId);
return ($result);
}
protected function parcourTableau($array)
{
$tableau = array();
@ -244,6 +251,12 @@ Class GiantRechercheController extends GiantFunction
$result = $this->CreditData->getMethode('StartMonitoring', array($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode));
return ($result);
}
public function GetStopMonitoring($CompanyId, $PreferredEndDate, $InternalOrderId)
{
$this->CreditData = new CreditData($this->soapG, $CompanyId);
$result = $this->CreditData->getMethode('StopMonitoring', array($CompanyId, $PreferredEndDate, $InternalOrderId));
return ($result);
}
public function ListeRapport($CompanyId)
{

View File

@ -5,311 +5,330 @@ require_once ('Functions.lib.php');
define("DATA_SET_VERSION", '1.0');
class WSgiant extends Zend_Soap_Client
{
protected $wsService = array();
protected $header;
protected $wsService = array();
protected $header;
function __construct($parametres)
{
$this->wsService = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant.ini' );
if($parametres InstanceOF stdClass)
self::init($parametres);
}
function __construct($parametres)
{
$this->wsService = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant.ini' );
if($parametres InstanceOF stdClass)
self::init($parametres);
}
/**
* init
* @param unknown_type $parametres
*/
private function init($parametres)
{
$utilisateur = new Scores_Utilisateur();
$options = array(
'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS,
'soapVersion' => SOAP_1_1,
'login' => $this->wsService->options->login,
'password' => $this->wsService->options->password,
'compression' => SOAP_COMPRESSION_ACCEPT
);
/**
* init
* @param unknown_type $parametres
*/
private function init($parametres)
{
$utilisateur = new Scores_Utilisateur();
$options = array(
'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS,
'soapVersion' => SOAP_1_1,
'login' => $this->wsService->options->login,
'password' => $this->wsService->options->password,
'compression' => SOAP_COMPRESSION_ACCEPT
);
$this->setOptions($options);
$giantHeader = new stdClass();
$giantHeader->ConsumerId = $this->wsService->header->ConsumerId;
$giantHeader->CustomerId = $utilisateur->getLogin();
$giantHeader = new stdClass();
$giantHeader->ConsumerId = $this->wsService->header->ConsumerId;
$giantHeader->CustomerId = $utilisateur->getLogin();
$giantHeader->Provider = new stdClass();
$giantHeader->Provider->CountryCode = $parametres->CountryCode;
$giantHeader->Provider->ProviderId = $parametres->ProviderId;
$giantHeader->TimeStamp = time();
$giantHeader->TestIndication = $parametres->TestIndication;
$giantHeader->Provider = new stdClass();
$giantHeader->Provider->CountryCode = $parametres->CountryCode;
$giantHeader->Provider->ProviderId = $parametres->ProviderId;
$giantHeader->TimeStamp = time();
$giantHeader->TestIndication = $parametres->TestIndication;
$this->header = new SoapHeader(
$this->wsService->header->url,
$this->wsService->header->serviceName, $giantHeader
);
parent::addSoapInputHeader($this->header, true);
$this->header = new SoapHeader(
$this->wsService->header->url,
$this->wsService->header->serviceName, $giantHeader
);
parent::addSoapInputHeader($this->header, true);
}
}
/**
* getAllMethodesFromWsdl
* @param unknown_type $service
*/
public function getAllMethodesFromWsdl($service)
{
$this->setWsdl($this->wsService->$service->wsdl);
return ($this);
}
/**
* getAllMethodesFromWsdl
* @param unknown_type $service
*/
public function getAllMethodesFromWsdl($service)
{
$this->setWsdl($this->wsService->$service->wsdl);
return ($this);
}
}
Class Search extends GiantFunction
{
private $soapG;
protected $label;
protected $labelResults;
protected $query;
protected $methodes = array(
'search',
'advancedSearch'
);
private $soapG;
protected $label;
protected $labelResults;
protected $query;
protected $methodes = array(
'search',
'advancedSearch'
);
private $headerSearch;
private $headerSearch;
public function __construct($soap)
{
$this->soapG = $soap;
$this->label = new Zend_Config_Ini('Giant/Traductions/label.ini', 'search');
$this->labelResults = new Zend_Config_Ini('Giant/Traductions/results.ini', 'search');
$this->headerSearch = new stdClass();
$this->headerSearch->IncludePhoneticMatches = FALSE;
$this->headerSearch->IncludeSuggestions = FALSE;
$this->soapG->getAllMethodesFromWsdl('search');
}
public function __construct($soap)
{
$this->soapG = $soap;
$this->label = new Zend_Config_Ini('Giant/Traductions/label.ini', 'search');
$this->labelResults = new Zend_Config_Ini('Giant/Traductions/results.ini', 'search');
$this->headerSearch = new stdClass();
$this->headerSearch->IncludePhoneticMatches = FALSE;
$this->headerSearch->IncludeSuggestions = FALSE;
$this->soapG->getAllMethodesFromWsdl('search');
}
protected function search($paramatres, $page)
{
$this->query = $paramatres->Query;
$search = array_merge((array)$paramatres, (array)$this->headerSearch);
try {
$result = $this->soapG->search($search);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function search($paramatres, $page)
{
$this->query = $paramatres->Query;
$search = array_merge((array)$paramatres, (array)$this->headerSearch);
try {
$result = $this->soapG->search($search);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
public function advancedSearch($parametres, $page)
{
$advanced = array_merge((array)$parametres, (array)$this->headerSearch);
$this->query = $advanced['Query'];
try {
$result = $this->soapG->advancedSearch($advanced);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return($result);
}
public function advancedSearch($parametres, $page)
{
$advanced = array_merge((array)$parametres, (array)$this->headerSearch);
$this->query = $advanced['Query'];
try {
$result = $this->soapG->advancedSearch($advanced);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return($result);
}
protected function Tier2Search($Query, $StartRow, $NumRows)
{
$parametres = new stdClass();
$parametres->Query = $Query;
$parametres->StartRow = $StartRow;
$parametres->NumRows = $NumRows;
try {
$this->soapG->Tier2Search($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
}
protected function Tier2Search($Query, $StartRow, $NumRows)
{
$parametres = new stdClass();
$parametres->Query = $Query;
$parametres->StartRow = $StartRow;
$parametres->NumRows = $NumRows;
try {
$this->soapG->Tier2Search($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
}
public function Tier2SearchMethods()
{
try {
$result = $this->soapG->Tier2SearchMethods();
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
public function Tier2SearchMethods()
{
try {
$result = $this->soapG->Tier2SearchMethods();
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
public function __destruct()
{
unset($this->soapG);
}
public function __destruct()
{
unset($this->soapG);
}
}
Class CreditData extends GiantFunction
{
private $soapG;
protected $companyId;
protected $methodes = array(
'RetreiveOptions', 'OrderDataSet',
'RetrieveOrderStatus', 'RetrieveDataSet',
'StartInvestigation', 'StartMonitoring',
'UpdateMonitoringOptions', 'StopMonitoring',
'RetrieveMonitoringEventsForOrder', 'RetrieveMonitoringEventsForCustomer',
'RetrieveMonitoringEventsForConsumer', 'Ping'
);
private $soapG;
protected $companyId;
protected $methodes = array(
'RetreiveOptions', 'OrderDataSet',
'RetrieveOrderStatus', 'RetrieveDataSet',
'StartInvestigation', 'StartMonitoring',
'UpdateMonitoringOptions', 'StopMonitoring',
'RetrieveMonitoringEventsForOrder', 'RetrieveMonitoringEventsForCustomer',
'RetrieveMonitoringEventsForConsumer', 'Ping'
);
public function __construct($soapG, $companyId)
{
$this->soapG = $soapG;
$this->companyId = $companyId;
$this->soapG->getAllMethodesFromWsdl('credit-data');
}
public function __construct($soapG, $companyId)
{
$this->soapG = $soapG;
$this->companyId = $companyId;
$this->soapG->getAllMethodesFromWsdl('credit-data');
}
protected function RetreiveOptions()
{
$parametres = new stdClass();
$parametres->CompanyId = $this->companyId;
try {
$result = $this->soapG->RetrieveOptions($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
protected function RetreiveOptions()
{
$parametres = new stdClass();
$parametres->CompanyId = $this->companyId;
try {
$result = $this->soapG->RetrieveOptions($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
return ($result);
}
protected function OrderDataSet($DataSetType, $LanguageCode, $Version = null)
{
$parametres = new stdClass();
$parametres->CompanyId = $this->companyId;
$parametres->DataSetType = $DataSetType;
$parametres->DataSetVersion = DATA_SET_VERSION;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->OrderDataSet($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function OrderDataSet($DataSetType, $LanguageCode, $Version = null)
{
$parametres = new stdClass();
$parametres->CompanyId = $this->companyId;
$parametres->DataSetType = $DataSetType;
$parametres->DataSetVersion = DATA_SET_VERSION;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->OrderDataSet($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveOrderStatus($InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
try {
$result = $this->soapG->RetrieveOrderStatus($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function RetrieveOrderStatus($InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
try {
$result = $this->soapG->RetrieveOrderStatus($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveDataSet($InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
try {
$result = $this->soapG->RetrieveDataSet($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function RetrieveDataSet($InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
try {
$result = $this->soapG->RetrieveDataSet($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function StartInvestigation($DataSetType, $ServiceLevelName, $Version = null, $LanguageCode = null)
{
$parametres = new stdClass();
$parametres->DataSetType = $DataSetType;
$parametres->ServiceLevelName = $ServiceLevelName;
$parametres->Version = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartInvestigation($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function StartInvestigation($DataSetType, $ServiceLevelName, $Version = null, $LanguageCode = null)
{
$parametres = new stdClass();
$parametres->DataSetType = $DataSetType;
$parametres->ServiceLevelName = $ServiceLevelName;
$parametres->Version = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartInvestigation($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function StartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode)
{
$parametres = new stdClass();
$parametres->CompanyId = $CompanyId;
$parametres->CategoryName = $CategorieName;
$parametres->EventType = $EventType;
$parametres->PreferredStartDate = $PreferredStartDate;
$parametres->PreferredEndDate = $PreferredEndDate;
$parametres->MonitoringVersion = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartMonitoring($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function StartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode)
{
$parametres = new stdClass();
$parametres->CompanyId = $CompanyId;
$parametres->CategoryName = $CategorieName;
$parametres->EventType = $EventType;
if (!empty($PreferredStartDate)) {
$parametres->PreferredStartDate = $PreferredStartDate;
}
if (!empty($PreferredEndDate)) {
$parametres->PreferredEndDate = $PreferredEndDate;
}
$parametres->MonitoringVersion = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartMonitoring($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function UpdateMonitoringOptions($InternalOrderId, $NewCategorieName, $NewEventType, $NewPreferredStartDate, $NewVersion = null, $NewLanguageCode = null)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->NewCategorieName = $NewCategorieName;
$parametres->NewEventType = $NewEventType;
$parametres->NewPreferredStartDate = $NewPreferredStartDate;
$parametres->NewVersion = $NewVersion;
$parametres->NewLanguageCode = $NewLanguageCode;
try {
$result = $this->soapG->UpdateMonitoringOptions($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function UpdateMonitoringOptions($InternalOrderId, $NewCategorieName, $NewEventType, $NewPreferredStartDate, $NewVersion = null, $NewLanguageCode = null)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->NewCategorieName = $NewCategorieName;
$parametres->NewEventType = $NewEventType;
$parametres->NewPreferredStartDate = $NewPreferredStartDate;
$parametres->NewVersion = $NewVersion;
$parametres->NewLanguageCode = $NewLanguageCode;
try {
$result = $this->soapG->UpdateMonitoringOptions($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function StopMonitoring($InternalOrderId, $PreferredEndDate)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->PreferredEndDate = $PreferredEndDate;
try {
$result = $this->soapG->StopMonitoring($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function StopMonitoring($CompanyId, $PreferredEndDate, $InternalOrderId)
{
$parametres = new stdClass();
$parametres->CompanyId = $CompanyId;
$parametres->PreferredEndDate = $PreferredEndDate;
$parametres->InternalOrderId = $InternalOrderId;
print_r($InternalOrderId);
try {
$result = $this->soapG->StopMonitoring($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveMonitoringEventsForOrder($InternalOrderId, $StartFrom)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForOrder($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function RetrieveMonitoringEventsForOrder($InternalOrderId, $StartFrom)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForOrder($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveMonitoringEventsForCustomer($StartFrom)
{
$parametres = new stdClass();
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForCustomer($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveMonitoringEventsForCustomer($StartFrom)
{
$parametres = new stdClass();
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForCustomer($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveMonitoringEventsForConsumer($StartFrom)
{
$parametres = new stdClass();
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForConsumer($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function RetrieveMonitoringEventsForConsumer($StartFrom)
{
$parametres = new stdClass();
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForConsumer($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function Ping($Type)
{
$parametres = new stdClass();
$parametres->Type = $Type;
try {
$result = $this->soapG->Ping($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function Ping($Type)
{
$parametres = new stdClass();
$parametres->Type = $Type;
try {
$result = $this->soapG->Ping($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
public function __destruct()
{
unset($this->soapG);
}
public function __destruct()
{
unset($this->soapG);
}
}

View File

@ -7,33 +7,39 @@ function validate() {
}
});
};
$('[required]').blur(function() {
$("[required]").on("change", function(){
validate();
});
});
$(document).ready(function() {
validate();
$(function() {
$("#datepicker").datepicker($.datepicker.regional["fr"]);
});
$(function() {
$("#datepicker1").datepicker($.datepicker.regional["fr"]);
$.datepicker.setDefaults( $.datepicker.regional[ "fr" ] );
$( ".datepicker" ).datepicker({ dateFormat: "yy-mm-dd" });
});
$('#dial').dialog({
buttons : [ {
text : "Valider",
click : function() {
var action = $('[name=action]').val();
var values = $(this).find('form').serialize();
$.post('/giant/startmonitoring', values, function(data) {
$('form').remove();
if ($('#loading').css('display')=='none') {
$('#loading').css('display', 'block');
$('.ui-dialog-content').css('overflow','hidden');
$(".ui-dialog-buttonpane button:contains('Valider')").button("disable");
}
else { $('#loading').css('display', 'none');}
$.post('/giant/'+action, values, function(data) {
$('#dial').html(data);
$('form').remove();
});
}
}, {
text : "Fermer",
click : function() {
if ($(".message p").text() == 'Cut-off mis à jour.') {
if ($(".message p").text() == 'Monitoring mis à jour.') {
location.reload();
}
$(this).dialog('close');

View File

@ -253,6 +253,16 @@
width: 691px;
opacity:0.3;
}
.hide_monitor
{
background-color: #C0C0C0;
height: 497px;
position: absolute;
top: 0%;
width: 714px;
margin-left: -14px;
opacity: 0.3;
}
.radio_but
{