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 */ ?>
@@ -16,7 +16,7 @@ $_jobCodes = $this->getAvailableJobCodes(); /* @var $_jobCodes array */
- 0): ?> + 0): ?>
@@ -33,10 +33,9 @@ $_jobCodes = $this->getAvailableJobCodes(); /* @var $_jobCodes array */
- - getSchedulesForCode($jobCode); ?> + $_schedules): /* @var $_jobCode string */ /* @var $_schedules array */ ?>
-
+
getGanttDivAttributes($_schedule); ?> getLayout()->createBlock('aoe_scheduler/adminhtml_timelineDetail')->setSchedule($_schedule)->toHtml(); ?> @@ -58,10 +57,21 @@ $_jobCodes = $this->getAvailableJobCodes(); /* @var $_jobCodes array */ - decorateTime($this->getEndtime(), true, 'Y-m-d H:i'); ?>
- + $_schedules): /* @var $_jobCode string */ /* @var $_schedules array */ ?>
-
- +
+ getJob()->getName(); + $_groups = $_schedule->getJob()->getGroups(); + if ($_name !== $_jobCode): + echo $this->__('Name: ') . $_name . "
"; + endif; + echo $this->__('Job Code: ') . $_jobCode . "
"; + if ($_groups !== $_jobCode): + echo $this->__('Crongroups: ') . $_groups; + endif; + ?>
@@ -72,4 +82,4 @@ $_jobCodes = $this->getAvailableJobCodes(); /* @var $_jobCodes array */ __('No tasks found.'); ?> -
\ No newline at end of file +
diff --git a/doc/images/groups-and-names-in-timeline.png b/doc/images/groups-and-names-in-timeline.png new file mode 100644 index 0000000..1e5a74a Binary files /dev/null and b/doc/images/groups-and-names-in-timeline.png differ diff --git a/readme.md b/readme.md index 37c294f..d5ecb74 100755 --- a/readme.md +++ b/readme.md @@ -1,3 +1,11 @@ +#Forked + +Add the Name and the Crongroup Name in the Timelineview. Better overview, if you have many jobs and groups. + +![Groups and Names in Timeline](doc/images/groups-and-names-in-timeline.png) + +### + # AOE Scheduler for Magento diff --git a/skin/adminhtml/default/default/aoe_scheduler/StyleSheet/timeline.css b/skin/adminhtml/default/default/aoe_scheduler/StyleSheet/timeline.css index aa36f02..398cd61 100755 --- a/skin/adminhtml/default/default/aoe_scheduler/StyleSheet/timeline.css +++ b/skin/adminhtml/default/default/aoe_scheduler/StyleSheet/timeline.css @@ -13,19 +13,18 @@ margin-left: -100%; } -.configuration { - padding: 5px; -} - #leftcolumn .row { background-color: #F6F6F6; border-right: 1px solid #DADFE0; + height: 40px; + padding: 5px; } #leftcolumn .row.hours { background-color: transparent; + height: 20px; text-align: right; - padding-right: 5px; + padding: 0 5px; font-size: 10px; } @@ -49,7 +48,7 @@ div.row { border-bottom: 1px solid #DADFE0; padding: 0; margin: 0; - height: 40px; + height: 50px; } div.timeline-box { @@ -66,6 +65,11 @@ div.timeline { position: relative; } +.timeline-row-info { + font-size: 10px; + line-height: 12px; +} + div.hours { height: 20px; } @@ -128,7 +132,7 @@ div.hours { .task, .estimation { position: absolute; - height: 24px; + height: 34px; top: 8px; cursor: default; } @@ -141,15 +145,12 @@ div.hours { .details-headline.error, .task.error, .details-headline.killed, .task.killed, -.details-headline.died, .task.died, .details-headline.gone, .task.gone { background-color: #E41300; } -.details-headline.success, .task.success, -.details-headline.repeat, .task.repeat { background-color: #36B963; } +.details-headline.success, .task.success { background-color: #36B963; } .details-headline.nothing, .task.nothing { background-color: #92D6A9; } .details-headline.pending, .task.pending { background-color: #A9ABA8; } .details-headline.missed, .task.missed { background-color: #F75300; } -.details-headline.skipped, .task.skipped { background-color: #F75300; } .details-headline.running, .task.running { background-color: #FE9D00 !important; } .details-headline.running, .task.running { background-image: url(../Images/animation.gif); background-position: center; background-repeat: repeat-x; } @@ -157,4 +158,4 @@ div.hours { .estimation { background-image: url(../Images/animation2.gif); background-position: center; background-repeat: repeat-x; } -div.task.active, div.task:hover { background-color: #00A2FA; } +div.task.active, div.task:hover { background-color: #00A2FA; } \ No newline at end of file