3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * Page for displaying list of jobs.
21 class CRM_Admin_Page_JobLog
extends CRM_Core_Page_Basic
{
24 * The action links that we need to display for the browse screen.
28 public static $_links = NULL;
36 public function getBAOName() {
37 return 'CRM_Core_BAO_Job';
44 * (reference) of action links
46 public function &links() {
53 * This method is called after the page is created. It checks for the
54 * type of action and executes that action.
55 * Finally it calls the parent's run method.
57 public function run() {
58 // set title and breadcrumb
59 CRM_Utils_System
::setTitle(ts('Settings - Scheduled Jobs Log'));
62 'title' => ts('Administration'),
63 'url' => CRM_Utils_System
::url('civicrm/admin',
68 CRM_Utils_System
::appendBreadCrumb($breadCrumb);
75 public function browse() {
76 $jid = CRM_Utils_Request
::retrieve('jid', 'Positive');
78 $sj = new CRM_Core_JobManager();
81 $jobName = CRM_Core_DAO
::getFieldValue('CRM_Core_DAO_Job', $jid);
82 $this->assign('jobName', $jobName);
83 $jobRunUrl = CRM_Utils_System
::url('civicrm/admin/job', 'action=view&reset=1&context=joblog&id=' . $jid);
84 $this->assign('jobRunUrl', $jobRunUrl);
87 $dao = new CRM_Core_DAO_JobLog();
88 $dao->orderBy('id desc');
90 // limit to last 1000 records
99 while ($dao->fetch()) {
101 CRM_Core_DAO
::storeValues($dao, $row);
102 $rows[$dao->id
] = $row;
104 $this->assign('rows', $rows);
106 $this->assign('jobId', $jid);
110 * Get name of edit form.
113 * Classname of edit form.
115 public function editForm() {
116 return 'CRM_Admin_Form_Job';
120 * Get edit form name.
125 public function editName() {
126 return 'Scheduled Jobs';
137 public function userContext($mode = NULL) {
138 return 'civicrm/admin/job';