Esempio n. 1
0
    // ===============================================================
    $graph = new CGraph("clientreport-graph01.jpg");
    foreach ($days as $day) {
        $stored_bytes = Jobs_Model::getStoredBytes($dbSql->db_link, array($day['start'], $day['end']), 'ALL', $clientid);
        $days_stored_bytes[] = array(date("m-d", $day['start']), $stored_bytes);
    }
    $graph->SetData($days_stored_bytes, 'bars', true);
    // Graph rendering
    $view->assign('graph_stored_bytes', $graph->Render());
    unset($graph);
    // ===============================================================
    // Getting last n days stored files graph
    // ===============================================================
    $graph = new CGraph("clientreport-graph03.jpg");
    foreach ($days as $day) {
        $stored_files = Jobs_Model::getStoredFiles($dbSql->db_link, array($day['start'], $day['end']), 'ALL', $clientid);
        $days_stored_files[] = array(date("m-d", $day['start']), $stored_files);
    }
    $graph->SetData($days_stored_files, 'bars');
    $graph->SetYTitle("Files");
    // Graph rendering
    $view->assign('graph_stored_files', $graph->Render());
    unset($graph);
} catch (Exception $e) {
    CErrorHandler::displayError($e);
}
$view->assign('period', $period);
$view->assign('client_name', $client['name']);
$view->assign('client_os', $client['os']);
$view->assign('client_arch', $client['arch']);
$view->assign('client_version', $client['version']);
Esempio n. 2
0
 // ===============================================================
 $graph = new CGraph("backupjobreport-graph01.jpg");
 foreach ($days as $day) {
     $stored_bytes = Jobs_Model::getStoredBytes($dbSql->db_link, array($day['start'], $day['end']), $backupjob_name);
     $days_stored_bytes[] = array(date("m-d", $day['start']), $stored_bytes);
 }
 $graph->SetData($days_stored_bytes, 'bars', true);
 // Graph rendering
 $view->assign('graph_stored_bytes', $graph->Render());
 unset($graph);
 // ===============================================================
 // Getting last 7 days stored files graph
 // ===============================================================
 $graph = new CGraph("backupjobreport-graph02.jpg");
 foreach ($days as $day) {
     $stored_files = Jobs_Model::getStoredFiles($dbSql->db_link, array($day['start'], $day['end']), $backupjob_name);
     $days_stored_files[] = array(date("m-d", $day['start']), $stored_files);
 }
 $graph->SetData($days_stored_files, 'bars');
 $graph->SetYTitle("Files");
 // Graph rendering
 $view->assign('graph_stored_files', $graph->Render());
 unset($graph);
 // Get last 10 jobs list
 $query = "SELECT JobId, Level, JobFiles, JobBytes, ReadBytes, JobStatus, StartTime, EndTime, Name ";
 $query .= "FROM Job ";
 $query .= "WHERE Name = '{$backupjob_name}' ";
 $query .= "ORDER BY EndTime DESC ";
 $query .= "LIMIT 7 ";
 $jobs = array();
 $joblevel = array('I' => 'Incr', 'D' => 'Diff', 'F' => 'Full');
Esempio n. 3
0
 $days_stored_bytes = array();
 $days = DateTimeUtil::getLastDaysIntervals(7);
 foreach ($days as $day) {
     $days_stored_bytes[] = array(date("m-d", $day['start']), Jobs_Model::getStoredBytes($dbSql->db_link, array($day['start'], $day['end'])));
 }
 $graph = new CGraph("dashboard-graph03.jpg");
 $graph->SetData($days_stored_bytes, 'bars', true);
 // Graph rendering
 $view->assign('graph_stored_bytes', $graph->Render());
 // ==============================================================
 // Last 7 days Stored Files widget
 // ==============================================================
 $days_stored_files = array();
 $days = DateTimeUtil::getLastDaysIntervals(7);
 foreach ($days as $day) {
     $days_stored_files[] = array(date("m-d", $day['start']), Jobs_Model::getStoredFiles($dbSql->db_link, array($day['start'], $day['end'])));
 }
 unset($graph);
 $graph = new CGraph("dashboard-graph04.jpg");
 $graph->SetData($days_stored_files, 'bars');
 // Graph rendering
 $view->assign('graph_stored_files', $graph->Render());
 unset($graph);
 // ==============================================================
 // Last used volumes widget
 // ==============================================================
 $last_volumes = array();
 // Building SQL statment
 $where = array();
 $tmp = "(Media.Volstatus != 'Disabled') ";
 switch (CDB::getDriverName()) {