Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Log Details
Browse files Browse the repository at this point in the history
Log details skeleton implemented.
  • Loading branch information
fbergkemper committed Nov 6, 2013
1 parent bc703da commit 1dbb6b5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
2 changes: 0 additions & 2 deletions module/Job/view/job/job/index.phtml
Expand Up @@ -47,7 +47,6 @@ $this->headTitle($title);
<th>Type</th>
<th>Level</th>
<th>Start</th>
<th>End</th>
<th>Duration</th>
<th>Status</th>
<th>Log</th>
Expand All @@ -64,7 +63,6 @@ $this->headTitle($title);
<td><?php echo $this->printJobType($job->type); ?></td>
<td><?php echo $this->printJobLevel($job->level); ?></td>
<td><?php echo $this->escapeHtml($job->starttime); ?></td>
<td><?php echo $this->escapeHtml($job->endtime); ?></td>
<td><?php echo $this->printJobDuration($job->starttime, $job->endtime); ?></td>
<td><?php echo $this->printJobStatus($job->jobstatus); ?></td>
<td><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $job->jobid)); ?>">View</a></td>
Expand Down
12 changes: 12 additions & 0 deletions module/Log/src/Log/Model/LogTable.php
Expand Up @@ -50,7 +50,18 @@ public function getLog($logid)

public function getLogsByJob($id)
{

$jobid = (int) $id;

$select = new Select();
$select->from('log');
$select->where('jobid = ' . $jobid);
$select->order('logid DESC');

$resultSet = $this->tableGateway->selectWith($select);

return $resultSet;

}

public function getLogNum()
Expand All @@ -69,3 +80,4 @@ public function getLogNum()
}

}

28 changes: 27 additions & 1 deletion module/Log/view/log/log/job.phtml
@@ -1,11 +1,37 @@
<?php

$title = 'Logs for job ...';
$title = 'Logs for job ...'; // TODO
$this->headTitle($title);

?>

<h2><?php echo $title; ?></h2>
<hr />

<div class="panel panel-default">
<div class="panel-body">

<table class="table table-striped table-hover" style="font-size: 9pt;">

<tr>
<th>Timestamp</th>
<th>Log</th>
<th>Job</th>
<th>Message</th>
</tr>

<?php foreach($this->log as $logitem) : ?>

<tr>
<td><?php echo $this->escapeHtml($logitem->time); ?></td>
<td><?php echo $this->escapeHtml($logitem->logid); ?></td>
<td><?php echo $this->escapeHtml($logitem->jobid); ?></td>
<td><?php echo $this->escapeHtml($logitem->logtext); ?></td>
</tr>

<?php endforeach; ?>

</table>

</div>
</div>

0 comments on commit 1dbb6b5

Please sign in to comment.