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

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Jan 20, 2014
1 parent cd906a2 commit 5f8eb76
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -7,5 +7,5 @@ barbossa

## Requirements

* PHP 5.3 or higher
* Zend Framework 2
* PHP 5.3.3 or later; we recommend using the latest PHP version whenever possible
* Zend Framework 2.x
Binary file modified composer.phar
Binary file not shown.
25 changes: 25 additions & 0 deletions module/Job/src/Job/Model/JobTable.php
Expand Up @@ -299,4 +299,29 @@ public function getLastSuccessfulClientJob($id)
return $row;
}

public function getStoredBytes7Days()
{
$end = date("Y-m-d H:i:s",time());
$start = date("Y-m-d H:i:s",time() - (60*60*23*7));

$select = new Select();
$select->from('job');
$select->columns(array('endtime','jobbytes'), true);
$select->where("endtime >= '" . $start . "' AND endtime <= '" . $end . "'");
$select->order('endtime ASC');

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

public function getStoredBytes14Days()
{
$select = new Select();
$select->from('job');


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

}
Expand Up @@ -67,6 +67,8 @@ public function storedAction()
{
return new ViewModel(
array(
'stored7days' => $this->getJobTable()->getStoredBytes7Days(),
'stored14days' => $this->getJobTable()->getStoredBytes14Days(),
)
);
}
Expand Down
8 changes: 4 additions & 4 deletions module/Statistics/view/statistics/statistics/stored.phtml
Expand Up @@ -10,8 +10,8 @@

function chart1() {

var data = [500,500,500,500,1500,1500,500];
var ticks = ['1','2','3','4','5','6','7'];
var data = [];
var ticks = [];

var plot1 = jQuery.jqplot('chart1', [data],
{
Expand Down Expand Up @@ -40,8 +40,8 @@

function chart2() {

var data = [500,500,500,10000,1500,1500,500,500,500,500,500,1500,1500,500];
var ticks = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14'];
var data = [];
var ticks = [];

var plot1 = jQuery.jqplot('chart2', [data],
{
Expand Down
Binary file not shown.

0 comments on commit 5f8eb76

Please sign in to comment.