/**
  * Constructor
  *
  * @param integer $uid
  * @param string $title
  * @param tx_caretaker_AbstractNode $parent
  * @param string $url
  * @param string $host
  * @param string $ip
  * @param boolean $hidden
  */
 public function __construct($uid, $title, $parent, $url = '', $hostname = '', $publicKey = '', $hidden = 0)
 {
     parent::__construct($uid, $title, $parent, tx_caretaker_Constants::table_Instances, tx_caretaker_Constants::nodeType_Instance, $hidden);
     $this->url = $url;
     $this->hostname = $hostname;
     $this->publicKey = $publicKey;
 }
 /**
  * Constructor
  *
  * @param integer $uid
  * @param string $title
  * @param tx_caretaker_AbstractNode $parent
  * @param boolean $hidden
  */
 public function __construct($uid, $title, $parent, $hidden = 0)
 {
     parent::__construct($uid, $title, $parent, tx_caretaker_Constants::table_Instancegroups, tx_caretaker_Constants::nodeType_Instancegroup, $hidden);
 }
 /**
  * Save Aggregator Result to the DB
  *
  * @param tx_caretaker_AggregatorNode $node
  * @param tx_caretaker_AggregatorResult $aggregator_result
  * @return integer UID of the new DB result Record
  */
 public function addNodeResult(tx_caretaker_AggregatorNode $node, tx_caretaker_AggregatorResult $aggregator_result)
 {
     //add an undefined row to the testresult column
     $instance = $node->getInstance();
     if ($instance) {
         $instanceUid = $instance->getUid();
     } else {
         $instanceUid = 0;
     }
     $values = array('aggregator_uid' => $node->getUid(), 'aggregator_type' => $node->getType(), 'instance_uid' => $instanceUid, 'result_status' => $aggregator_result->getState(), 'tstamp' => $aggregator_result->getTstamp(), 'result_num_undefined' => $aggregator_result->getNumUNDEFINED(), 'result_num_ok' => $aggregator_result->getNumOK(), 'result_num_warnig' => $aggregator_result->getNumWARNING(), 'result_num_error' => $aggregator_result->getNumERROR(), 'result_msg' => $aggregator_result->getMessage()->getText(), 'result_values' => serialize($aggregator_result->getMessage()->getValues()), 'result_submessages' => serialize($aggregator_result->getSubMessages()));
     $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_caretaker_aggregatorresult', $values);
     return $GLOBALS['TYPO3_DB']->sql_insert_id();
 }
 public function getAggregatedResult($results)
 {
     return parent::getAggregatedResult($results);
 }
 /**
  * Get the test configuration overlay (configuration overwritten in instance)
  *
  * @param integer $testUid UID of the test
  * @return array
  */
 public function getTestConfigurationOverlayForTestUid($testUid)
 {
     $overlayConfig = FALSE;
     if ($this->testConfigurationOverlay) {
         $fftools = new \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools();
         $tests = $fftools->getArrayValueByPath('data/sDEF/lDEF/testconfigurations/el', $this->testConfigurationOverlay);
         if (is_array($tests)) {
             foreach ($tests as $key => $el) {
                 if ($tests[$key]['test']['el']['test_service']['vDEF'] == $testUid) {
                     $overlayConfig = $tests[$key]['test']['el']['test_conf']['vDEF'];
                     $overlayConfig['hidden'] = $tests[$key]['test']['el']['test_hidden']['vDEF'];
                     $overlayConfig['overwritten_in']['title'] = $this->title;
                     $overlayConfig['overwritten_in']['uid'] = $this->uid;
                     $overlayConfig['overwritten_in']['id'] = $this->getCaretakerNodeId();
                 }
             }
         }
     }
     if (!$overlayConfig) {
         $overlayConfig = parent::getTestConfigurationOverlayForTestUid($testUid);
     }
     return $overlayConfig;
 }
 /**
  * @param bool $hidden
  */
 public function __construct($hidden = FALSE)
 {
     parent::__construct(0, 'Caretaker Root', NULL, NULL, tx_caretaker_Constants::nodeType_Root, $hidden);
 }