"; + endif; + echo $this->__('Job Code: ') . $_jobCode . "
"; + if ($_groups !== $_jobCode): + echo $this->__('Crongroups: ') . $_groups; + endif; + ?>
diff --git a/.gitignore b/.gitignore index 76067e6..3162bcd 100755 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -phpunit*.phar \ No newline at end of file +phpunit*.phar +.idea/* \ No newline at end of file diff --git a/app/code/community/Aoe/Scheduler/Block/Adminhtml/Timeline.php b/app/code/community/Aoe/Scheduler/Block/Adminhtml/Timeline.php index e8722af..59e6d3e 100644 --- a/app/code/community/Aoe/Scheduler/Block/Adminhtml/Timeline.php +++ b/app/code/community/Aoe/Scheduler/Block/Adminhtml/Timeline.php @@ -138,13 +138,13 @@ public function getNowline() /** - * Get all available job codes + * Get all available jobs * * @return array */ - public function getAvailableJobCodes() + public function getAvailableJobs() { - return array_keys($this->schedules); + return $this->schedules; } diff --git a/app/code/community/Aoe/Scheduler/Model/Job.php b/app/code/community/Aoe/Scheduler/Model/Job.php index 0bc0838..d37ef22 100755 --- a/app/code/community/Aoe/Scheduler/Model/Job.php +++ b/app/code/community/Aoe/Scheduler/Model/Job.php @@ -17,9 +17,7 @@ * @method Aoe_Scheduler_Model_Job setParameters($parameters) * @method string getParameters() * @method Aoe_Scheduler_Model_Job setGroups($groups) - * @method string getGroups() - * @method Aoe_Scheduler_Model_Job setOnSuccess($onSuccess) - * @method string getOnSuccess() + * @method array getGroups() * @method Aoe_Scheduler_Model_Job load($jobCode) * @method Aoe_Scheduler_Model_Resource_Job getResource() * @method Aoe_Scheduler_Model_Resource_Job_Collection getCollection() @@ -55,6 +53,15 @@ public function getName() return $name; } + public function getGroups() + { + $groups = $this->getData('groups'); + if (empty($groups)) { + $groups = $this->getJobCode(); + } + return $groups; + } + /** * @param bool $flag * diff --git a/app/design/adminhtml/default/default/template/aoe_scheduler/timeline.phtml b/app/design/adminhtml/default/default/template/aoe_scheduler/timeline.phtml index d390430..0322c75 100644 --- a/app/design/adminhtml/default/default/template/aoe_scheduler/timeline.phtml +++ b/app/design/adminhtml/default/default/template/aoe_scheduler/timeline.phtml @@ -2,7 +2,7 @@ /* @var $this Aoe_Scheduler_Block_Adminhtml_Timeline */ $_helper = $this->helper('aoe_scheduler/data'); /* @var $_helper Aoe_Scheduler_Helper_Data */ -$_jobCodes = $this->getAvailableJobCodes(); /* @var $_jobCodes array */ +$_jobs = $this->getAvailableJobs(); /* @var $_jobs array */ ?>