diff --git a/module/Dashboard/src/Dashboard/Controller/DashboardController.php b/module/Dashboard/src/Dashboard/Controller/DashboardController.php
index bd153afa..dcb61510 100644
--- a/module/Dashboard/src/Dashboard/Controller/DashboardController.php
+++ b/module/Dashboard/src/Dashboard/Controller/DashboardController.php
@@ -23,6 +23,8 @@ public function indexAction()
'lastSuccessfulJobs' => $this->getJobTable()->getLast24HoursSuccessfulJobs(),
'lastUnsuccessfulJobs' => $this->getJobTable()->getLast24HoursUnsuccessfulJobs(),
+ 'waitingJobs' => $this->getJobTable()->getWaitingJobs(),
+ 'runningJobs' => $this->getJobTable()->getRunningJobs(),
'jobsCreatedNotRunning' => $this->getJobTable()->getJobCountLast24HoursByStatus("C"),
'jobsBlocked' => $this->getJobTable()->getJobCountLast24HoursByStatus("B"),
diff --git a/module/Dashboard/view/dashboard/dashboard/index.phtml b/module/Dashboard/view/dashboard/dashboard/index.phtml
index 1be111bf..747125ac 100644
--- a/module/Dashboard/view/dashboard/dashboard/index.phtml
+++ b/module/Dashboard/view/dashboard/dashboard/index.phtml
@@ -85,9 +85,58 @@ $flash->setMessageOpenFormat('
runningJobs) > 0) : ?>
-
+
+
+
+
+
+
+
+
translate('Running jobs') ?>
+
+
+
+
+
+
+
+ Job |
+ Name |
+ Client |
+ Type |
+ Level |
+ Start |
+ Duration |
+ Status |
+ Log |
+
+
+ runningJobs as $item) : ?>
+
+
+
+ escapeHtml($item->jobid); ?> |
+ escapeHtml($item->jobname); ?> |
+ escapeHtml($item->clientname); ?> |
+ printJobType($item->type); ?> |
+ printJobLevel($item->level); ?> |
+ escapeHtml($item->starttime); ?> |
+ printJobDuration($item->starttime, $item->endtime); ?> |
+ printJobStatus($item->jobstatus); ?> |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
runningJobs) == 0) : ?>
@@ -101,9 +150,58 @@ $flash->setMessageOpenFormat('
waitingJobs) > 0) : ?>
-
+
+
+
+
+
+
+
+
translate('Waiting jobs') ?>
+
+
+
+
+
+
+
+ Job |
+ Name |
+ Client |
+ Type |
+ Level |
+ Start |
+ Duration |
+ Status |
+ Log |
+
+
+ waitingJobs as $item) : ?>
+
+
+
+ escapeHtml($item->jobid); ?> |
+ escapeHtml($item->jobname); ?> |
+ escapeHtml($item->clientname); ?> |
+ printJobType($item->type); ?> |
+ printJobLevel($item->level); ?> |
+ escapeHtml($item->starttime); ?> |
+ printJobDuration($item->starttime, $item->endtime); ?> |
+ printJobStatus($item->jobstatus); ?> |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
waitingJobs) == 0) : ?>
diff --git a/module/Job/src/Job/Model/JobTable.php b/module/Job/src/Job/Model/JobTable.php
index 0988bce6..f5a7f8f2 100644
--- a/module/Job/src/Job/Model/JobTable.php
+++ b/module/Job/src/Job/Model/JobTable.php
@@ -56,6 +56,41 @@ public function getJob($jobid)
return $row;
}
+ public function getRunningJobs()
+ {
+ $select = new Select();
+ $select->from('job');
+ $select->join('client', 'job.clientid = client.clientid', array('clientname' => 'name'));
+ $select->order('job.jobid DESC');
+ $select->where("jobstatus = 'R'");
+
+ $resultSet = $this->tableGateway->selectWith($select);
+
+ return $resultSet;
+ }
+
+ public function getWaitingJobs()
+ {
+ $select = new Select();
+ $select->from('job');
+ $select->join('client', 'job.clientid = client.clientid', array('clientname' => 'name'));
+ $select->order('job.jobid DESC');
+ $select->where("jobstatus = 'F' OR
+ jobstatus = 'S' OR
+ jobstatus = 'm' OR
+ jobstatus = 'M' OR
+ jobstatus = 's' OR
+ jobstatus = 'j' OR
+ jobstatus = 'c' OR
+ jobstatus = 'd' OR
+ jobstatus = 't' OR
+ jobstatus = 'p'");
+
+ $resultSet = $this->tableGateway->selectWith($select);
+
+ return $resultSet;
+ }
+
public function getLast24HoursSuccessfulJobs()
{
$current_time = date("Y-m-d H:i:s",time());