Example #1
0
 public function __construct($backend_id, $hostName, $serviceDescription)
 {
     $this->backend_id = array($backend_id[0]);
     // only supports one backend
     $this->host_name = $hostName;
     $this->service_description = $serviceDescription;
     parent::__construct();
 }
Example #2
0
 public function __construct($MAPCFG, $bIsView = IS_VIEW)
 {
     $this->MAPCFG = $MAPCFG;
     $this->map_name = $this->MAPCFG->getName();
     $this->linkedMaps = array();
     $this->isSummaryObject = false;
     $this->isLoopingBacklink = false;
     $this->isView = $bIsView;
     $this->clearMembers();
     $this->backend_id = $this->MAPCFG->getValue(0, 'backend_id');
     if ($this->backend_id === false) {
         $this->backend_id = array();
     }
     parent::__construct();
     $this->state[ALIAS] = $this->MAPCFG->getAlias();
 }
Example #3
0
 public function __construct($backend_id, $hostName)
 {
     $this->backend_id = $backend_id;
     $this->host_name = $hostName;
     parent::__construct();
 }
Example #4
0
 /**
  * Merges the summary output from objects and all child objects together
  */
 protected function mergeSummaryOutput($arrStates, $objLabel, $finish = true, $continue = false)
 {
     if (NagVisStatefulObject::$langMemberStates === null) {
         NagVisStatefulObject::$langMemberStates = l('Contains');
     }
     if ($this->sum[OUTPUT] === null) {
         $this->sum[OUTPUT] = '';
     }
     if (!$continue) {
         $this->sum[OUTPUT] .= NagVisStatefulObject::$langMemberStates . ' ';
     }
     foreach ($arrStates as $state => $num) {
         if ($num > 0) {
             $this->sum[OUTPUT] .= $num . ' ' . state_str($state) . ', ';
         }
     }
     // If some has been added remove last comma, else add a simple 0
     if (substr($this->sum[OUTPUT], -2, 2) == ', ') {
         $this->sum[OUTPUT] = rtrim($this->sum[OUTPUT], ', ');
     } else {
         $this->sum[OUTPUT] .= '0 ';
     }
     $this->sum[OUTPUT] .= ' ' . $objLabel;
     if ($finish) {
         $this->sum[OUTPUT] .= '.';
     }
 }
Example #5
0
 public function __construct($backend_id, $servicegroupName)
 {
     $this->backend_id = $backend_id;
     $this->servicegroup_name = $servicegroupName;
     parent::__construct();
 }