コード例 #1
0
ファイル: Tracker.php プロジェクト: SystemEd-Jacob/nethgui
 private function applyTaskUiDefaults($ui, $context)
 {
     extract($context, EXTR_REFS);
     return array_replace_recursive(array('conditions' => array('running' => array('dialog' => array('action' => 'open', 'title' => $view->translate('Tracker_title_taskRunning')), 'location' => array('url' => function ($data) use($view) {
         return $view->getModuleUrl($data['taskInfo']['id']);
     }, 'sleep' => 4000, 'freeze' => FALSE), 'message' => function ($data) {
         return trim($data['last']['title'] . "\n" . $data['last']['message']);
     }, 'notification' => FALSE), 'success' => array('dialog' => array('action' => 'close', 'title' => ''), 'location' => FALSE, 'message' => "", 'notification' => FALSE), 'failure' => array('dialog' => array('action' => 'close', 'title' => ''), 'location' => FALSE, 'message' => "", 'notification' => array('data' => function ($data) {
         return \Nethgui\Module\Tracker::findFailures($data);
     }, 'template' => 'trackerError')))), is_array($ui) ? $ui : array());
 }
コード例 #2
0
 private function notifyEvent(\Symfony\Component\Process\Process $process)
 {
     if ($process->getExitCode() !== 0) {
         $this->notifications->trackerError(array('failedTasks' => \Nethgui\Module\Tracker::findFailures($this->systemTasks->getTaskStatus($process->taskId))));
     }
 }