コード例 #1
0
ファイル: ServiceController.php プロジェクト: rk4an/centreon
 /**
  * Display the configuration snapshot of a service
  * with template inheritance
  *
  * @method get
  * @route /service/snapshot/[i:id]
  */
 public function snapshotAction()
 {
     $params = $this->getParams();
     $data = ServiceRepository::getConfigurationData($params['id']);
     //If service inherits a template
     if (isset($data['service_template_model_stm_id'])) {
         $data = ServiceRepository::getConfigurationData($data['service_template_model_stm_id']);
     } else {
         $data = ServiceRepository::getConfigurationData($params['id']);
     }
     $checkdata = ServiceRepository::formatDataForTooltip($data);
     $this->tpl->assign('checkdata', $checkdata);
     $this->tpl->display('file:[CentreonConfigurationModule]service_conf_tooltip.tpl');
 }
コード例 #2
0
 /**
  * Display service template configuration in a popin window
  *
  * @method get
  * @route /servicetemplate/viewconf/[i:id]
  */
 public function displayConfAction()
 {
     $params = $this->getParams();
     $data = ServiceRepository::getConfigurationData($params['id']);
     $checkdata = ServiceRepository::formatDataForTooltip($data);
     $this->tpl->assign('checkdata', $checkdata);
     $this->tpl->display('file:[CentreonConfigurationModule]service_conf_tooltip.tpl');
 }