/**
  * Adds a service for caretaker. The service is registered and the type and flexform is added to the testconf
  *
  * @param string $extKey kex of the extension wich is adding the service
  * @param string $path path to the flexform and service class without slahes before and after
  * @param string $key key wich is used for to identify the service
  * @param string $title  title of the testservice
  * @param string $description description of the testservice
  */
 public static function registerCaretakerTestService($extKey, $path, $key, $title, $description = '')
 {
     if ($GLOBALS['T3_SERVICES']['caretaker_test_service'] === NULL) {
         // EXT:caretaker not yet loaded. Memorize the data for later registration
         self::$deferredTestServicesToRegister[$extKey . $path . $key] = array($extKey, $path, $key, $title, $description);
         return;
     } else {
         tx_caretaker_ServiceHelper::registerCaretakerTestService($extKey, $path, $key, $title, $description);
     }
 }
 public function execute()
 {
     $node_repository = tx_caretaker_NodeRepository::getInstance();
     $node = $node_repository->id2node($this->node_id);
     if (!$node) {
         return false;
     }
     $lockObj = t3lib_div::makeInstance('t3lib_lock', 'tx_caretaker_update_' . $node->getCaretakerNodeId(), $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']);
     // no output during scheduler runs
     tx_caretaker_ServiceHelper::unregisterCaretakerNotificationService('CliNotificationService');
     if ($lockObj->acquire()) {
         $node->updateTestResult();
         $lockObj->release();
     } else {
         return false;
     }
     // send aggregated notifications
     $notificationServices = tx_caretaker_ServiceHelper::getAllCaretakerNotificationServices();
     foreach ($notificationServices as $notificationService) {
         $notificationService->sendNotifications();
     }
     $success = true;
     return $success;
 }
 * This is a file of the caretaker project.
 * http://forge.typo3.org/projects/show/extension-caretaker
 *
 * Project sponsored by:
 * n@work GmbH - http://www.work.de
 * networkteam GmbH - http://www.networkteam.com/
 *
 * $Id$
 */
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
// register Test-Services
tx_caretaker_ServiceHelper::registerCaretakerTestService($_EXTKEY, 'classes/services/tests', 'tx_caretaker_ping', 'Ping', 'Retrieves System Informations');
tx_caretaker_ServiceHelper::registerCaretakerTestService($_EXTKEY, 'classes/services/tests', 'tx_caretaker_http', 'HTTP', 'Call an URI and check the HTTP-Status');
tx_caretaker_ServiceHelper::registerCaretakerTestService($_EXTKEY, 'classes/services/tests', 'tx_caretaker_Touch', 'Touch', 'Write a timestamp in a local file');
//register Notification-Services
tx_caretaker_ServiceHelper::registerCaretakerNotificationService($_EXTKEY, 'SimpleMailNotificationService', 'classes/services/notifications/class.tx_caretaker_SimpleMailNotificationService.php', 'tx_caretaker_SimpleMailNotificationService');
tx_caretaker_ServiceHelper::registerCaretakerNotificationService($_EXTKEY, 'CliNotificationService', 'classes/services/notifications/class.tx_caretaker_CliNotificationService.php', 'tx_caretaker_CliNotificationService');
tx_caretaker_ServiceHelper::registerCaretakerNotificationService($_EXTKEY, 'AdvancedNotificationService', 'classes/services/notifications/advanced/class.tx_caretaker_AdvancedNotificationService.php', 'tx_caretaker_AdvancedNotificationService');
// register ExitPoint services
tx_caretaker_ServiceHelper::registerNotificationExitPoint($_EXTKEY, 'classes/services/notifications/advanced/exitpoints', 'tx_caretaker_NotificationMail', 'E-Mail', 'Sends an e-mail');
tx_caretaker_ServiceHelper::registerNotificationExitPoint($_EXTKEY, 'classes/services/notifications/advanced/exitpoints', 'tx_caretaker_NotificationFile', 'File', 'Writes to a file');
tx_caretaker_ServiceHelper::registerNotificationExitPoint($_EXTKEY, 'classes/services/notifications/advanced/exitpoints', 'tx_caretaker_NotificationXmpp', 'XMPP/Jabber', 'Sends XMPP/Jabber messages');
// register ExtJS Panels
tx_caretaker_ServiceHelper::registerExtJsBackendPanel('node-info', 'caretaker-nodeinfo', array('EXT:caretaker/res/css/tx.caretaker.overview.css'), array('EXT:caretaker/res/js/tx.caretaker.NodeInfo.js'), $_EXTKEY);
tx_caretaker_ServiceHelper::registerExtJsBackendPanel('node-charts', 'caretaker-nodecharts', array('EXT:caretaker/res/css/tx.caretaker.overview.css'), array('EXT:caretaker/res/js/tx.caretaker.NodeCharts.js'), $_EXTKEY);
tx_caretaker_ServiceHelper::registerExtJsBackendPanel('node-log', 'caretaker-nodelog', array('EXT:caretaker/res/css/tx.caretaker.overview.css'), array('EXT:caretaker/res/js/tx.caretaker.NodeLog.js'), $_EXTKEY);
tx_caretaker_ServiceHelper::registerExtJsBackendPanel('node-contacts', 'caretaker-nodecontacts', array('EXT:caretaker/res/css/tx.caretaker.overview.css'), array('EXT:caretaker/res/js/tx.caretaker.NodeContacts.js'), $_EXTKEY);
tx_caretaker_ServiceHelper::registerExtJsBackendPanel('node-problems', 'caretaker-nodeproblems', array('EXT:caretaker/res/css/tx.caretaker.overview.css'), array('EXT:caretaker/res/js/tx.caretaker.NodeProblems.js'), $_EXTKEY);
 /**
  * Load all active notificationServices into static array which are active and of correct type
  *
  * @return void
  */
 protected static function loadAllCaretakerNotificationServices()
 {
     self::$notificationServiceInstances = array();
     foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['notificationServices'] as $serviceKey => $notificationService) {
         $instance = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['notificationServices'][$serviceKey]);
         if ($instance instanceof tx_caretaker_NotificationServiceInterface && $instance->isEnabled()) {
             self::$notificationServiceInstances[$serviceKey] = $instance;
         }
     }
 }
 /**
  * @param array $argv
  */
 public function cli_main($argv)
 {
     $task = (string) $this->cli_args['_DEFAULT'][1];
     if (!$task) {
         $this->cli_validateArgs();
         $this->cli_help();
         exit;
     }
     if ($task == 'update' || $task == 'get' || $task == 'ack' || $task == 'due') {
         $force = (bool) $this->readArgument('--force', '-f');
         $return_status = (bool) $this->readArgument('-r');
         $options = array('forceUpdate' => $force);
         $options = array_merge($options, $this->parseOptions($this->readArgument('--options', '-o')));
         $node = FALSE;
         $node_repository = tx_caretaker_NodeRepository::getInstance();
         $nodeId = $this->readArgument('--node', '-N');
         if ((bool) $this->readArgument('--root', '-R')) {
             $node = $node_repository->getRootNode();
         } else {
             if ($nodeId) {
                 $node = $node_repository->id2node($nodeId);
             }
         }
         if ($node) {
             $this->cli_echo('node ' . $node->getCaretakerNodeId() . chr(10));
             $result = FALSE;
             if ($task == 'update' || $task == 'ack' || $task == 'due') {
                 try {
                     $lockObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Locking\\Locker', 'tx_caretaker_update_' . $node->getCaretakerNodeId(), $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']);
                     $lockIsAquired = $lockObj->acquire();
                 } catch (Exception $e) {
                     $this->cli_echo('lock ' . 'tx_caretaker_update_' . $node->getCaretakerNodeId() . ' could not be aquired!' . chr(10) . $e->getMessage());
                     exit;
                 }
                 if ($lockIsAquired) {
                     if ($task == 'update') {
                         $result = $node->updateTestResult($options);
                     } else {
                         if ($task == 'ack' && is_a($node, 'tx_caretaker_TestNode')) {
                             $result = $node->setModeAck();
                         } else {
                             if ($task == 'due' && is_a($node, 'tx_caretaker_TestNode')) {
                                 $result = $node->setModeDue();
                             }
                         }
                     }
                     $lockObj->release();
                 } else {
                     $result = false;
                     $this->cli_echo('node ' . $node->getCaretakerNodeId() . ' is locked because of other running update processes!' . chr(10));
                     exit;
                 }
             }
             if ($task == 'get') {
                 $result = $node->getTestResult();
                 $this->cli_echo($node->getTitle() . ' [' . $node->getCaretakerNodeId() . ']' . chr(10));
                 $this->cli_echo($result->getLocallizedStateInfo() . ' [' . $node->getCaretakerNodeId() . ']' . chr(10));
             }
             // send aggregated notifications
             $notificationServices = tx_caretaker_ServiceHelper::getAllCaretakerNotificationServices();
             /** @var tx_caretaker_NotificationBaseExitPoint $notificationService */
             foreach ($notificationServices as $notificationService) {
                 $notificationService->sendNotifications();
             }
             if ($return_status) {
                 exit((int) $result->getState());
             } else {
                 exit;
             }
         } else {
             $this->cli_echo('Node not found or inactive' . chr(10));
             exit;
         }
     } elseif ($task == 'update-typo3-latest-version-list') {
         $result = tx_caretaker_LatestVersionsHelper::updateLatestTypo3VersionRegistry();
         $this->cli_echo('TYPO3 latest version list update result: ' . $result . chr(10));
         $versions = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Registry')->get('tx_caretaker', 'TYPO3versions');
         foreach ($versions as $key => $version) {
             $this->cli_echo($key . ' => ' . $version . chr(10));
         }
     }
     if ($task == 'help') {
         $this->cli_validateArgs();
         $this->cli_help();
         exit;
     }
 }
Beispiel #6
0
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$extConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker']);
$advancedNotificationsEnabled = $extConfig['notifications.']['advanced.']['enabled'] == '1';
$TCA['tx_caretaker_instancegroup'] = array('ctrl' => $TCA['tx_caretaker_instancegroup']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,tests,name'), 'feInterface' => $TCA['tx_caretaker_instancegroup']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'default' => '0', 'checkbox' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'checkbox' => '0', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020), 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y'))))), 'fe_group' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group', 'config' => array('type' => 'select', 'items' => array(array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')), 'exclusiveKeys' => '-1,-2', 'foreign_table' => 'fe_groups', 'foreign_table_where' => 'ORDER BY fe_groups.title', 'maxitems' => 20, 'size' => 7)), 'title' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.title', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'), 'defaultExtras' => 'richtext'), 'parent_group' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.parent_group', 'config' => array('type' => 'select', 'form_type' => 'user', 'userFunc' => 'tx_caretaker_treeview->displayGroupTree', 'treeView' => 1, 'foreign_table' => 'tx_caretaker_instancegroup', 'size' => 1, 'autoSizeMax' => 10, 'minitems' => 0, 'maxitems' => 2, 'items' => array(array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.parent_group.select', 0)))), 'contacts' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.contacts', 'config' => array('type' => 'inline', 'foreign_table' => 'tx_caretaker_node_address_mm', 'foreign_field' => 'uid_node', 'foreign_table_field' => 'node_table', 'appearance' => array('collapseAll' => true, 'expandSingle' => true))), 'notification_strategies' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_general.notification_strategies', 'config' => array('type' => 'inline', 'foreign_table' => 'tx_caretaker_node_strategy_mm', 'foreign_field' => 'uid_node', 'foreign_table_field' => 'node_table', 'foreign_selector' => 'uid_strategy', 'appearance' => array('collapseAll' => true, 'expandSingle' => true)))), 'types' => array('0' => array('showitem' => 'title;;1;;1-1-1, parent_group;;;;2-2-2,' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.tab.description, description, ' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.tab.contacts, contacts, ' . ($advancedNotificationsEnabled ? '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.tab.notifications, notification_strategies, ' : '') . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.tab.access, hidden, starttime, endtime, fe_group')), 'palettes' => array());
$TCA['tx_caretaker_instance'] = array('ctrl' => $TCA['tx_caretaker_instance']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,instancegroup,testgroups,tests,request_mode,encryption_mode,encryption_key,project_namename,project_manager,domain,additional_domains,contacts,server_type,server_provider,server_customer_id,server_other,cms_url,cms_admin,cms_pwd,cms_install_pwd,accesses,other,request_url,contacts'), 'feInterface' => $TCA['tx_caretaker_instance']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'default' => '0', 'checkbox' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'checkbox' => '0', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020), 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y'))))), 'fe_group' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group', 'config' => array('type' => 'select', 'items' => array(array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')), 'exclusiveKeys' => '-1,-2', 'foreign_table' => 'fe_groups', 'foreign_table_where' => 'ORDER BY fe_groups.title', 'maxitems' => 20, 'size' => 7)), 'title' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.title', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'), 'defaultExtras' => 'richtext'), 'url' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.url', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'host' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.host', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'groups' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.groups', 'config' => array('type' => 'select', 'form_type' => 'user', 'userFunc' => 'tx_caretaker_treeview->displayGroupTree', 'treeView' => 1, 'foreign_table' => 'tx_caretaker_testgroup', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 50, 'MM' => 'tx_caretaker_instance_testgroup_mm')), 'tests' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tests', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_test', 'MM' => 'tx_caretaker_instance_test_mm', 'MM_opposite_field' => 'instances', 'size' => 5, 'autoSizeMax' => 10, 'minitems' => 0, 'maxitems' => 10000, 'wizards' => array('_PADDING' => 1, '_VERTICAL' => 1, 'edit' => array('type' => 'popup', 'title' => 'Edit Test', 'module' => array('name' => 'wizard_edit'), 'icon' => 'edit2.gif', 'popup_onlyOpenIfSelected' => 1, 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1'), 'add' => array('type' => 'script', 'title' => 'Create new Test', 'icon' => 'add.gif', 'params' => array('table' => 'tx_caretaker_test', 'pid' => '###CURRENT_PID###', 'setValue' => 'prepend'), 'module' => array('name' => 'wizard_add'))))), 'public_key' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.public_key', 'displayCond' => 'EXT:caretaker_instance:LOADED:true', 'config' => array('type' => 'input', 'eval' => 'trim', 'max' => '1024')), 'instancegroup' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.instancegroup', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_instancegroup', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, 'items' => array(array('', '0')))), 'notifications' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.notifications', 'config' => array('type' => 'group', 'internal_type' => 'db', 'allowed' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_address') ? 'tt_address' : 'tx_caretaker_contactaddress', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 50)), 'testconfigurations' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_conf', 'config' => array('type' => 'flex', 'ds' => array('default' => 'FILE:EXT:caretaker/res/flexform/ds.tx_caretaker_instance_testconfiguration.xml'))), 'contacts' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.contacts', 'config' => array('type' => 'inline', 'foreign_table' => 'tx_caretaker_node_address_mm', 'foreign_field' => 'uid_node', 'foreign_table_field' => 'node_table', 'appearance' => array('collapseAll' => true, 'expandSingle' => true))), 'notification_strategies' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_general.notification_strategies', 'config' => array('type' => 'inline', 'foreign_table' => 'tx_caretaker_node_strategy_mm', 'foreign_field' => 'uid_node', 'foreign_table_field' => 'node_table', 'foreign_selector' => 'uid_strategy', 'appearance' => array('collapseAll' => true, 'expandSingle' => true)))), 'types' => array('0' => array('showitem' => 'title;;;;2-2-2, instancegroup, url;;;;3-3-3, host, public_key,' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.description, description, ' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.relations, groups, tests, ' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.contacts, contacts, ' . ($advancedNotificationsEnabled ? '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.notifications, notification_strategies, ' : '') . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.testconfigurations, testconfigurations, ' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.access, hidden, starttime, endtime, fe_group')), 'palettes' => array());
$TCA['tx_caretaker_node_address_mm'] = array('ctrl' => $TCA['tx_caretaker_node_address_mm']['ctrl'], 'interface' => array('showRecordFieldList' => ''), 'columns' => array('uid_address' => array('label' => 'LLL:EXT:tt_address/locallang_tca.xml:tt_address', 'config' => array('type' => 'select', 'foreign_table' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_address') ? 'tt_address' : 'tx_caretaker_contactaddress', 'wizards' => array('_PADDING' => 1, '_VERTICAL' => 1, 'edit' => array('type' => 'script', 'title' => 'Create new address', 'icon' => 'add.gif', 'params' => array('table' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_address') ? 'tt_address' : 'tx_caretaker_contactaddress', 'pid' => '0', 'setValue' => 'prepend'), 'module' => array('name' => 'wizard_add'))))), 'role' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_roles', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_roles', 'items' => array(array('', 0))))), 'types' => array('0' => array('showitem' => 'uid_address;;1;;1-1-1, role')));
$TCA['tx_caretaker_contactaddress'] = array('ctrl' => $TCA['tx_caretaker_contactaddress']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,name,email,xmpp'), 'feInterface' => $TCA['tx_caretaker_contactaddress']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'name' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_contactaddress.name', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'email' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_contactaddress.email', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'xmpp' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_contactaddress.xmpp', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim'))), 'types' => array('0' => array('showitem' => 'id;;;;1-1-1, name, email, xmpp')), 'palettes' => array('1' => array('showitem' => 'hidden')));
if ($advancedNotificationsEnabled) {
    $TCA['tx_caretaker_node_strategy_mm'] = array('ctrl' => $TCA['tx_caretaker_node_strategy_mm']['ctrl'], 'interface' => array('showRecordFieldList' => ''), 'columns' => array('uid_strategy' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_strategies', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_strategies'))), 'types' => array('0' => array('showitem' => 'uid_strategy;;1;;1-1-1')));
}
$TCA['tx_caretaker_testgroup'] = array('ctrl' => $TCA['tx_caretaker_testgroup']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,tests,name'), 'feInterface' => $TCA['tx_caretaker_testgroup']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'default' => '0', 'checkbox' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'checkbox' => '0', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020), 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y'))))), 'fe_group' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group', 'config' => array('type' => 'select', 'items' => array(array('', 0), array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')), 'foreign_table' => 'fe_groups')), 'title' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.title', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'), 'defaultExtras' => 'richtext'), 'parent_group' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.parent_group', 'config' => array('type' => 'select', 'form_type' => 'user', 'userFunc' => 'tx_caretaker_treeview->displayGroupTree', 'treeView' => 1, 'foreign_table' => 'tx_caretaker_testgroup', 'size' => 1, 'autoSizeMax' => 10, 'minitems' => 0, 'maxitems' => 2, 'items' => array(array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.parent_group.select', 0)))), 'instances' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.instances', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_instance', 'MM' => 'tx_caretaker_instance_testgroup_mm', 'MM_opposite_field' => 'group', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 10000)), 'tests' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.tests', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_test', 'MM' => 'tx_caretaker_testgroup_test_mm', 'MM_opposite_field' => 'groups', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 10000, 'wizards' => array('_PADDING' => 1, '_VERTICAL' => 1, 'edit' => array('type' => 'popup', 'title' => 'Edit Test', 'module' => array('name' => 'wizard_edit'), 'icon' => 'edit2.gif', 'popup_onlyOpenIfSelected' => 1, 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1'), 'add' => array('type' => 'script', 'title' => 'Create new Test', 'icon' => 'add.gif', 'params' => array('table' => 'tx_caretaker_test', 'pid' => '###CURRENT_PID###', 'setValue' => 'prepend'), 'module' => array('name' => 'wizard_add')))))), 'types' => array('0' => array('showitem' => 'hidden;;1;;1-1-1, title;;2;;2-2-2, parent_group;;;;3-3-3,
		--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.tab.description,description,
		--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.tab.relations,tests;;;;4-4-4
		')), 'palettes' => array('1' => array('showitem' => 'starttime,endtime,fe_group'), '2' => array('showitem' => 'instances')));
$TCA['tx_caretaker_test'] = array('ctrl' => $TCA['tx_caretaker_test']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,starttime,endtime,fe_group,title,description,test_interval,test_interval_start_hour,test_interval_stop_hour,test_service,test_conf,test_retry,test_due,roles,groups,instances'), 'feInterface' => $TCA['tx_caretaker_test']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'default' => '0', 'checkbox' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'checkbox' => '0', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020), 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y'))))), 'fe_group' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group', 'config' => array('type' => 'select', 'items' => array(array('', 0), array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')), 'foreign_table' => 'fe_groups')), 'title' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.title', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'), 'defaultExtras' => 'richtext'), 'test_interval' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_interval', 'config' => array('type' => 'select', 'items' => array(array('always', 0), array('1 Minute', 60), array('5 Minutes', 300), array('10 Minutes', 600), array('15 Minutes', 900), array('20 Minutes', 1200), array('30 Minutes', 1800), array('45 Minutes', 2700), array('1 Hour', 3600), array('2 Hours', 7200), array('4 Hours', 14400), array('8 Hours', 28800), array('10 Hours', 36000), array('12 Hours', 43200), array('1 Day', 86400), array('2 Days', 172800), array('3 Days', 259200), array('4 Days', 345600), array('5 Days', 432000), array('6 Days', 518400), array('1 Week', 604800), array('2 Weeks', 1209600), array('4 Weeks', 2419200)), 'default' => 0)), 'test_interval_start_hour' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_interval_start_hour', 'config' => array('type' => 'select', 'items' => array(array('', 0), array(1, 1), array(2, 2), array(3, 3), array(4, 4), array(5, 5), array(6, 6), array(7, 7), array(8, 8), array(9, 9), array(10, 10), array(11, 11), array(12, 12), array(13, 13), array(14, 14), array(15, 15), array(16, 16), array(17, 17), array(18, 18), array(19, 19), array(20, 20), array(21, 21), array(22, 22), array(23, 23), array(24, 24)))), 'test_interval_stop_hour' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_interval_stop_hour', 'config' => array('type' => 'select', 'items' => array(array('', 0), array(1, 1), array(2, 2), array(3, 3), array(4, 4), array(5, 5), array(6, 6), array(7, 7), array(8, 8), array(9, 9), array(10, 10), array(11, 11), array(12, 12), array(13, 13), array(14, 14), array(15, 15), array(16, 16), array(17, 17), array(18, 18), array(19, 19), array(20, 20), array(21, 21), array(22, 22), array(23, 23), array(24, 24)))), 'test_service' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_service', 'config' => array('type' => 'select', 'items' => array_merge(array(0 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_service.select_service', '')), \tx_caretaker_ServiceHelper::getTcaTestServiceItems()), 'size' => 1, 'maxitems' => 1)), 'test_conf' => array('displayCond' => 'FIELD:test_service:REQ:true', 'label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_conf', 'config' => array('type' => 'flex', 'ds_pointerField' => 'test_service', 'ds' => \tx_caretaker_ServiceHelper::getTcaTestConfigDs())), 'test_retry' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry', 'config' => array('type' => 'select', 'items' => array(0 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_0', 0), 2 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_1', 1), 3 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_2', 2), 4 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_3', 3), 5 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_4', 4), 6 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_5', 5)), 'size' => 1, 'maxitems' => 1, 'default' => 0)), 'test_due' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_due', 'config' => array('type' => 'check')), 'roles' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.roles', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_roles', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 100, 'MM' => 'tx_caretaker_test_roles_mm')), 'groups' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.groups', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_testgroup', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 50, 'MM' => 'tx_caretaker_testgroup_test_mm')), 'instances' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.instances', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_instance', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 10000, 'MM' => 'tx_caretaker_instance_test_mm'))), 'types' => array('0' => array('showitem' => 'test_service;;;;1-1-1, hidden;;1;;2-2-2, title;;3;;3-3-3,test_interval;;2,test_retry, test_due, test_conf;;;;4-4-4,
					--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.tab.description, description,
					--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.tab.notifications, roles')), 'palettes' => array('1' => array('showitem' => 'starttime,endtime,fe_group'), '2' => array('showitem' => 'test_interval_start_hour,test_interval_stop_hour'), '3' => array('showitem' => 'groups,instances')));
$TCA['tx_caretaker_roles'] = array('ctrl' => $TCA['tx_caretaker_roles']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,id,name'), 'feInterface' => $TCA['tx_caretaker_roles']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'id' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_roles.id', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'unique,trim')), 'name' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_roles.name', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'unique,trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_roles.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'))), 'types' => array('0' => array('showitem' => 'id;;;;1-1-1, name, description')), 'palettes' => array('1' => array('showitem' => 'hidden')));
if ($advancedNotificationsEnabled) {
    $TCA['tx_caretaker_exitpoints'] = array('ctrl' => $TCA['tx_caretaker_exitpoints']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,id,name,description,service,config'), 'feInterface' => $TCA['tx_caretaker_exitpoints']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'id' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.id', 'config' => array('type' => 'input', 'size' => 30, 'eval' => 'required,nospace,unique')), 'name' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.name', 'config' => array('type' => 'input', 'size' => '255')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5')), 'service' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.service', 'config' => array('type' => 'select', 'items' => array_merge(array(0 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.service.select_exitpoint', '')), \tx_caretaker_ServiceHelper::getTcaExitPointServiceItems()), 'size' => 1, 'maxitems' => 1)), 'config' => array('displayCond' => 'FIELD:service:REQ:true', 'label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.config', 'config' => ['type' => 'flex', 'ds_pointerField' => 'service', 'ds' => \tx_caretaker_ServiceHelper::getTcaExitPointConfigDs()])), 'types' => array('0' => array('showitem' => 'id;;;;1-1-1, name, description, service, config')), 'palettes' => array('1' => array('showitem' => 'hidden')));
    $TCA['tx_caretaker_strategies'] = array('ctrl' => $TCA['tx_caretaker_strategies']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,id,name'), 'feInterface' => $TCA['tx_caretaker_strategies']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.disable', 'config' => array('type' => 'check', 'default' => '0')), 'name' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_strategies.name', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'unique,trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_strategies.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5')), 'config' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_strategies.config', 'config' => array('type' => 'text', 'cols' => 50, 'rows' => 50))), 'types' => array('0' => array('showitem' => 'hidden;;;;1-1-1, id;;;;1-1-1, name, description, config')), 'palettes' => array('1' => array()));
}
$GLOBALS['TCA']['tx_caretaker_instancegroup']['ctrl']['searchFields'] = 'title, description';
$GLOBALS['TCA']['tx_caretaker_instance']['ctrl']['searchFields'] = 'title, description, url, host';
$GLOBALS['TCA']['tx_caretaker_testgroup']['ctrl']['searchFields'] = 'title, description';
$GLOBALS['TCA']['tx_caretaker_test']['ctrl']['searchFields'] = 'title, description';
$GLOBALS['TCA']['tx_caretaker_roles']['ctrl']['searchFields'] = 'name, description';
$GLOBALS['TCA']['tx_caretaker_exitpoints']['ctrl']['searchFields'] = 'name, description';
$GLOBALS['TCA']['tx_caretaker_strategies']['ctrl']['searchFields'] = 'name, description';
 /**
  * Send a notification to all registered notification services
  *
  * @param string $event
  * @param tx_caretaker_NodeResult $result
  * @param tx_caretaker_NodeResult $lastResult
  */
 public function notify($event, $result = NULL, $lastResult = NULL)
 {
     // find all registered notification services
     $notificationServices = tx_caretaker_ServiceHelper::getAllCaretakerNotificationServices();
     /** @var tx_caretaker_AbstractNotificationService $notificationService */
     foreach ($notificationServices as $notificationService) {
         $notificationService->addNotification($event, $this, $result, $lastResult);
     }
 }
 public function ajaxNodeSetDue($params, &$ajaxObj)
 {
     $node_id = t3lib_div::_GP('node');
     $node_repository = tx_caretaker_NodeRepository::getInstance();
     if ($node_id && ($node = $node_repository->id2node($node_id, true))) {
         if (is_a($node, 'tx_caretaker_TestNode')) {
             $result = $node->setModeDue();
             $content = array('state' => $result->getState(), 'state_info' => $result->getStateInfo(), 'timestamp' => $result->getTimestamp(), 'message' => $result->getLocallizedInfotext());
             $ajaxObj->setContent($content);
             $ajaxObj->setContentFormat('jsonbody');
         } else {
             echo "please give a testnode id" . $node_id;
         }
     } else {
         echo "please give a valid node id" . $node_id;
     }
     // send aggregated notifications
     $notificationServices = tx_caretaker_ServiceHelper::getAllCaretakerNotificationServices();
     foreach ($notificationServices as $notificationService) {
         $notificationService->sendNotifications();
     }
 }
 /**
  * @return bool
  */
 public function execute()
 {
     $node_repository = tx_caretaker_NodeRepository::getInstance();
     $node = $node_repository->id2node($this->node_id);
     if (!$node) {
         return false;
     }
     if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode'] != 'disable') {
         $lockObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Locking\\Locker', 'tx_caretaker_update_' . $node->getCaretakerNodeId(), $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']);
         // no output during scheduler runs
         tx_caretaker_ServiceHelper::unregisterCaretakerNotificationService('CliNotificationService');
         if ($lockObj->acquire()) {
             $node->updateTestResult();
             $lockObj->release();
         } else {
             return false;
         }
     } else {
         $node->updateTestResult();
     }
     // send aggregated notifications
     $notificationServices = tx_caretaker_ServiceHelper::getAllCaretakerNotificationServices();
     /** @var tx_caretaker_AbstractNotificationService $notificationService */
     foreach ($notificationServices as $notificationService) {
         $notificationService->sendNotifications();
     }
     return true;
 }
Beispiel #10
0
 */
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$extConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker']);
$advancedNotificationsEnabled = $extConfig['notifications.']['advanced.']['enabled'] == '1';
$TCA['tx_caretaker_instancegroup'] = array('ctrl' => $TCA['tx_caretaker_instancegroup']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,tests,name'), 'feInterface' => $TCA['tx_caretaker_instancegroup']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'default' => '0', 'checkbox' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'checkbox' => '0', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020), 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y'))))), 'fe_group' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group', 'config' => array('type' => 'select', 'items' => array(array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')), 'exclusiveKeys' => '-1,-2', 'foreign_table' => 'fe_groups', 'foreign_table_where' => 'ORDER BY fe_groups.title', 'maxitems' => 20, 'size' => 7)), 'title' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.title', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'), 'defaultExtras' => 'richtext'), 'parent_group' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.parent_group', 'config' => array('type' => 'select', 'form_type' => 'user', 'userFunc' => 'tx_ttaddress_treeview->displayGroupTree', 'treeView' => 1, 'foreign_table' => 'tx_caretaker_instancegroup', 'size' => 1, 'autoSizeMax' => 10, 'minitems' => 0, 'maxitems' => 2, 'items' => array(array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.parent_group.select', 0)))), 'contacts' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.contacts', 'config' => array('type' => 'inline', 'foreign_table' => 'tx_caretaker_node_address_mm', 'foreign_field' => 'uid_node', 'foreign_table_field' => 'node_table', 'appearance' => array('collapseAll' => true, 'expandSingle' => true))), 'notification_strategies' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_general.notification_strategies', 'config' => array('type' => 'inline', 'foreign_table' => 'tx_caretaker_node_strategy_mm', 'foreign_field' => 'uid_node', 'foreign_table_field' => 'node_table', 'foreign_selector' => 'uid_strategy', 'appearance' => array('collapseAll' => true, 'expandSingle' => true)))), 'types' => array('0' => array('showitem' => 'title;;1;;1-1-1, parent_group;;;;2-2-2,' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.tab.description, description, ' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.tab.contacts, contacts, ' . ($advancedNotificationsEnabled ? '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.tab.notifications, notification_strategies, ' : '') . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instancegroup.tab.access, hidden, starttime, endtime, fe_group')), 'palettes' => array());
$TCA['tx_caretaker_instance'] = array('ctrl' => $TCA['tx_caretaker_instance']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,instancegroup,testgroups,tests,request_mode,encryption_mode,encryption_key,project_namename,project_manager,domain,additional_domains,contacts,server_type,server_provider,server_customer_id,server_other,cms_url,cms_admin,cms_pwd,cms_install_pwd,accesses,other,request_url,contacts'), 'feInterface' => $TCA['tx_caretaker_instance']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'default' => '0', 'checkbox' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'checkbox' => '0', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020), 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y'))))), 'fe_group' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group', 'config' => array('type' => 'select', 'items' => array(array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')), 'exclusiveKeys' => '-1,-2', 'foreign_table' => 'fe_groups', 'foreign_table_where' => 'ORDER BY fe_groups.title', 'maxitems' => 20, 'size' => 7)), 'title' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.title', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'), 'defaultExtras' => 'richtext'), 'url' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.url', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'host' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.host', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'groups' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.groups', 'config' => array('type' => 'select', 'form_type' => 'user', 'userFunc' => 'tx_ttaddress_treeview->displayGroupTree', 'treeView' => 1, 'foreign_table' => 'tx_caretaker_testgroup', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 50, 'MM' => 'tx_caretaker_instance_testgroup_mm')), 'tests' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tests', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_test', 'MM' => 'tx_caretaker_instance_test_mm', 'MM_opposite_field' => 'instances', 'size' => 5, 'autoSizeMax' => 10, 'minitems' => 0, 'maxitems' => 10000, 'wizards' => array('_PADDING' => 1, '_VERTICAL' => 1, 'edit' => array('type' => 'popup', 'title' => 'Edit Test', 'script' => 'wizard_edit.php', 'icon' => 'edit2.gif', 'popup_onlyOpenIfSelected' => 1, 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1'), 'add' => array('type' => 'script', 'title' => 'Create new Test', 'icon' => 'add.gif', 'params' => array('table' => 'tx_caretaker_test', 'pid' => '###CURRENT_PID###', 'setValue' => 'prepend'), 'script' => 'wizard_add.php')))), 'public_key' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.public_key', 'displayCond' => 'EXT:caretaker_instance:LOADED:true', 'config' => array('type' => 'input', 'eval' => 'trim', 'max' => '1024')), 'instancegroup' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.instancegroup', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_instancegroup', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, 'items' => array(array('', '0')))), 'notifications' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.notifications', 'config' => array('type' => 'group', 'internal_type' => 'db', 'allowed' => 'tt_address', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 50)), 'testconfigurations' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_conf', 'config' => array('type' => 'flex', 'ds' => array('default' => 'FILE:EXT:caretaker/res/flexform/ds.tx_caretaker_instance_testconfiguration.xml'))), 'contacts' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.contacts', 'config' => array('type' => 'inline', 'foreign_table' => 'tx_caretaker_node_address_mm', 'foreign_field' => 'uid_node', 'foreign_table_field' => 'node_table', 'appearance' => array('collapseAll' => true, 'expandSingle' => true))), 'notification_strategies' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_general.notification_strategies', 'config' => array('type' => 'inline', 'foreign_table' => 'tx_caretaker_node_strategy_mm', 'foreign_field' => 'uid_node', 'foreign_table_field' => 'node_table', 'foreign_selector' => 'uid_strategy', 'appearance' => array('collapseAll' => true, 'expandSingle' => true)))), 'types' => array('0' => array('showitem' => 'title;;;;2-2-2, instancegroup, url;;;;3-3-3, host, public_key,' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.description, description, ' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.relations, groups, tests, ' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.contacts, contacts, ' . ($advancedNotificationsEnabled ? '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.notifications, notification_strategies, ' : '') . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.testconfigurations, testconfigurations, ' . '--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_instance.tab.access, hidden, starttime, endtime, fe_group')), 'palettes' => array());
$TCA['tx_caretaker_node_address_mm'] = array('ctrl' => $TCA['tx_caretaker_node_address_mm']['ctrl'], 'interface' => array('showRecordFieldList' => ''), 'columns' => array('uid_address' => array('label' => 'LLL:EXT:tt_address/locallang_tca.xml:tt_address', 'config' => array('type' => 'select', 'foreign_table' => 'tt_address', 'wizards' => array('_PADDING' => 1, '_VERTICAL' => 1, 'edit' => array('type' => 'script', 'title' => 'Create new address', 'icon' => 'add.gif', 'params' => array('table' => 'tt_address', 'pid' => '0', 'setValue' => 'prepend'), 'script' => 'wizard_add.php')))), 'role' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_roles', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_roles', 'items' => array(array('', 0))))), 'types' => array('0' => array('showitem' => 'uid_address;;1;;1-1-1, role')));
if ($advancedNotificationsEnabled) {
    $TCA['tx_caretaker_node_strategy_mm'] = array('ctrl' => $TCA['tx_caretaker_node_strategy_mm']['ctrl'], 'interface' => array('showRecordFieldList' => ''), 'columns' => array('uid_strategy' => array('label' => 'LLL:EXT:tt_address/locallang_tca.xml:tx_caretaker_strategies', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_strategies'))), 'types' => array('0' => array('showitem' => 'uid_strategy;;1;;1-1-1')));
}
$TCA['tx_caretaker_testgroup'] = array('ctrl' => $TCA['tx_caretaker_testgroup']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,tests,name'), 'feInterface' => $TCA['tx_caretaker_testgroup']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'default' => '0', 'checkbox' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'checkbox' => '0', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020), 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y'))))), 'fe_group' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group', 'config' => array('type' => 'select', 'items' => array(array('', 0), array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')), 'foreign_table' => 'fe_groups')), 'title' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.title', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'), 'defaultExtras' => 'richtext'), 'parent_group' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.parent_group', 'config' => array('type' => 'select', 'form_type' => 'user', 'userFunc' => 'tx_ttaddress_treeview->displayGroupTree', 'treeView' => 1, 'foreign_table' => 'tx_caretaker_testgroup', 'size' => 1, 'autoSizeMax' => 10, 'minitems' => 0, 'maxitems' => 2, 'items' => array(array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.parent_group.select', 0)))), 'instances' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.instances', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_instance', 'MM' => 'tx_caretaker_instance_testgroup_mm', 'MM_opposite_field' => 'group', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 10000)), 'tests' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.tests', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_test', 'MM' => 'tx_caretaker_testgroup_test_mm', 'MM_opposite_field' => 'groups', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 10000, 'wizards' => array('_PADDING' => 1, '_VERTICAL' => 1, 'edit' => array('type' => 'popup', 'title' => 'Edit Test', 'script' => 'wizard_edit.php', 'icon' => 'edit2.gif', 'popup_onlyOpenIfSelected' => 1, 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1'), 'add' => array('type' => 'script', 'title' => 'Create new Test', 'icon' => 'add.gif', 'params' => array('table' => 'tx_caretaker_test', 'pid' => '###CURRENT_PID###', 'setValue' => 'prepend'), 'script' => 'wizard_add.php'))))), 'types' => array('0' => array('showitem' => 'hidden;;1;;1-1-1, title;;2;;2-2-2, parent_group;;;;3-3-3,
		--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.tab.description,description,
		--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_testgroup.tab.relations,tests;;;;4-4-4
		')), 'palettes' => array('1' => array('showitem' => 'starttime,endtime,fe_group'), '2' => array('showitem' => 'instances')));
$TCA['tx_caretaker_test'] = array('ctrl' => $TCA['tx_caretaker_test']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,starttime,endtime,fe_group,title,description,test_interval,test_interval_start_hour,test_interval_stop_hour,test_service,test_conf,test_retry,test_due,roles,groups,instances'), 'feInterface' => $TCA['tx_caretaker_test']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'starttime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'default' => '0', 'checkbox' => '0')), 'endtime' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.endtime', 'config' => array('type' => 'input', 'size' => '8', 'max' => '20', 'eval' => 'date', 'checkbox' => '0', 'default' => '0', 'range' => array('upper' => mktime(0, 0, 0, 12, 31, 2020), 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y'))))), 'fe_group' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.fe_group', 'config' => array('type' => 'select', 'items' => array(array('', 0), array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1), array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2), array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')), 'foreign_table' => 'fe_groups')), 'title' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.title', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'), 'defaultExtras' => 'richtext'), 'test_interval' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_interval', 'config' => array('type' => 'select', 'items' => array(array('always', 0), array('1 Minute', 60), array('5 Minutes', 300), array('10 Minutes', 600), array('15 Minutes', 900), array('20 Minutes', 1200), array('30 Minutes', 1800), array('45 Minutes', 2700), array('1 Hour', 3600), array('2 Hours', 7200), array('4 Hours', 14400), array('8 Hours', 28800), array('10 Hours', 36000), array('12 Hours', 43200), array('1 Day', 86400), array('2 Days', 172800), array('3 Days', 259200), array('4 Days', 345600), array('5 Days', 432000), array('6 Days', 518400), array('1 Week', 604800), array('2 Weeks', 1209600), array('4 Weeks', 2419200)), 'default' => 0)), 'test_interval_start_hour' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_interval_start_hour', 'config' => array('type' => 'select', 'items' => array(array('', 0), array(1, 1), array(2, 2), array(3, 3), array(4, 4), array(5, 5), array(6, 6), array(7, 7), array(8, 8), array(9, 9), array(10, 10), array(11, 11), array(12, 12), array(13, 13), array(14, 14), array(15, 15), array(16, 16), array(17, 17), array(18, 18), array(19, 19), array(20, 20), array(21, 21), array(22, 22), array(23, 23), array(24, 24)))), 'test_interval_stop_hour' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_interval_stop_hour', 'config' => array('type' => 'select', 'items' => array(array('', 0), array(1, 1), array(2, 2), array(3, 3), array(4, 4), array(5, 5), array(6, 6), array(7, 7), array(8, 8), array(9, 9), array(10, 10), array(11, 11), array(12, 12), array(13, 13), array(14, 14), array(15, 15), array(16, 16), array(17, 17), array(18, 18), array(19, 19), array(20, 20), array(21, 21), array(22, 22), array(23, 23), array(24, 24)))), 'test_service' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_service', 'config' => array('type' => 'select', 'items' => array_merge(array(0 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_service.select_service', '')), \tx_caretaker_ServiceHelper::getTcaTestServiceItems()), 'size' => 1, 'maxitems' => 1)), 'test_conf' => array('displayCond' => 'FIELD:test_service:REQ:true', 'label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_conf', 'config' => array('type' => 'flex', 'ds_pointerField' => 'test_service', 'ds' => \tx_caretaker_ServiceHelper::getTcaTestConfigDs())), 'test_retry' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry', 'config' => array('type' => 'select', 'items' => array(0 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_0', 0), 2 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_1', 1), 3 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_2', 2), 4 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_3', 3), 5 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_4', 4), 6 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_retry_5', 5)), 'size' => 1, 'maxitems' => 1, 'default' => 0)), 'test_due' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.test_due', 'config' => array('type' => 'check')), 'roles' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.roles', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_roles', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 100, 'MM' => 'tx_caretaker_test_roles_mm')), 'groups' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.groups', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_testgroup', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 50, 'MM' => 'tx_caretaker_testgroup_test_mm')), 'instances' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.instances', 'config' => array('type' => 'select', 'foreign_table' => 'tx_caretaker_instance', 'size' => 5, 'autoSizeMax' => 25, 'minitems' => 0, 'maxitems' => 10000, 'MM' => 'tx_caretaker_instance_test_mm'))), 'types' => array('0' => array('showitem' => 'test_service;;;;1-1-1, hidden;;1;;2-2-2, title;;3;;3-3-3,test_interval;;2,test_retry, test_due, test_conf;;;;4-4-4,
					--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.tab.description, description,
					--div--;LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_test.tab.notifications, roles')), 'palettes' => array('1' => array('showitem' => 'starttime,endtime,fe_group'), '2' => array('showitem' => 'test_interval_start_hour,test_interval_stop_hour'), '3' => array('showitem' => 'groups,instances')));
$TCA['tx_caretaker_roles'] = array('ctrl' => $TCA['tx_caretaker_roles']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,id,name'), 'feInterface' => $TCA['tx_caretaker_roles']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'id' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_roles.id', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'unique,trim')), 'name' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_roles.name', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'unique,trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_roles.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5'))), 'types' => array('0' => array('showitem' => 'id;;;;1-1-1, name, description')), 'palettes' => array('1' => array('showitem' => 'hidden')));
if ($advancedNotificationsEnabled) {
    $TCA['tx_caretaker_exitpoints'] = array('ctrl' => $TCA['tx_caretaker_exitpoints']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,id,name,description,service,config'), 'feInterface' => $TCA['tx_caretaker_exitpoints']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.hidden', 'config' => array('type' => 'check', 'default' => '0')), 'id' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.id', 'config' => array('type' => 'input', 'size' => 30, 'eval' => 'required,nospace,unique')), 'name' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.name', 'config' => array('type' => 'input', 'size' => '255')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5')), 'service' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.service', 'config' => array('type' => 'select', 'items' => array(0 => array('LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.service.select_exitpoint', '')), 'size' => 1, 'maxitems' => 1)), 'config' => array('displayCond' => 'FIELD:service:REQ:true', 'label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_exitpoints.config', 'config' => array('type' => 'flex', 'ds_pointerField' => 'service', 'ds' => array()))), 'types' => array('0' => array('showitem' => 'id;;;;1-1-1, name, description, service, config')), 'palettes' => array('1' => array('showitem' => 'hidden')));
    $TCA['tx_caretaker_strategies'] = array('ctrl' => $TCA['tx_caretaker_strategies']['ctrl'], 'interface' => array('showRecordFieldList' => 'hidden,id,name'), 'feInterface' => $TCA['tx_caretaker_strategies']['feInterface'], 'columns' => array('hidden' => array('label' => 'LLL:EXT:lang/locallang_general.php:LGL.disable', 'config' => array('type' => 'check', 'default' => '0')), 'name' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_strategies.name', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'unique,trim')), 'description' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_strategies.description', 'config' => array('type' => 'text', 'cols' => '50', 'rows' => '5')), 'config' => array('label' => 'LLL:EXT:caretaker/locallang_db.xml:tx_caretaker_strategies.config', 'config' => array('type' => 'text', 'cols' => 50, 'rows' => 50))), 'types' => array('0' => array('showitem' => 'hidden;;;;1-1-1, id;;;;1-1-1, name, description, config')), 'palettes' => array('1' => array()));
}
$GLOBALS['TCA']['tx_caretaker_instancegroup']['ctrl']['searchFields'] = 'title, description';
$GLOBALS['TCA']['tx_caretaker_instance']['ctrl']['searchFields'] = 'title, description, url, host';
$GLOBALS['TCA']['tx_caretaker_testgroup']['ctrl']['searchFields'] = 'title, description';
$GLOBALS['TCA']['tx_caretaker_test']['ctrl']['searchFields'] = 'title, description';
$GLOBALS['TCA']['tx_caretaker_roles']['ctrl']['searchFields'] = 'name, description';
$GLOBALS['TCA']['tx_caretaker_exitpoints']['ctrl']['searchFields'] = 'name, description';
$GLOBALS['TCA']['tx_caretaker_strategies']['ctrl']['searchFields'] = 'name, description';
 /**
  * @param array $params
  * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj
  */
 public function ajaxNodeSetDue($params, &$ajaxObj)
 {
     $node_id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('node');
     $node_repository = tx_caretaker_NodeRepository::getInstance();
     $node = $node_repository->id2node($node_id, true);
     if ($node_id && $node) {
         if ($node instanceof tx_caretaker_TestNode) {
             /** @var tx_caretaker_TestNode $node */
             $result = $node->setModeDue();
             $content = array('state' => $result->getState(), 'state_info' => $result->getStateInfo(), 'timestamp' => $result->getTimestamp(), 'message' => $result->getLocallizedInfotext());
             $ajaxObj->setContent($content);
             $ajaxObj->setContentFormat('jsonbody');
         } else {
             echo "please give a testnode id" . $node_id;
         }
     } else {
         echo "please give a valid node id" . $node_id;
     }
     // send aggregated notifications
     $notificationServices = tx_caretaker_ServiceHelper::getAllCaretakerNotificationServices();
     /** @var tx_caretaker_NotificationServiceInterface $notificationService */
     foreach ($notificationServices as $notificationService) {
         $notificationService->sendNotifications();
     }
 }