From: Davide Franco Date: Mon, 17 Jan 2011 16:25:28 +0000 (+0100) Subject: bacula-web: Dynamic jobs per page filter in jobs page X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0a363d42cae595503b517fa6780f50510f4025eb;p=bacula%2Fbacula bacula-web: Dynamic jobs per page filter in jobs page - Jobs per page option list is automaticaly set to current now - More options now (25,50,75,100,150) jobs per page --- diff --git a/gui/bacula-web/jobs.php b/gui/bacula-web/jobs.php index f085d3bf01..4a74a32469 100644 --- a/gui/bacula-web/jobs.php +++ b/gui/bacula-web/jobs.php @@ -27,6 +27,10 @@ $job_status = array( 'Any', 'Waiting', 'Running', 'Completed', 'Failed', 'Canceled' ); $smarty->assign( 'job_status', $job_status ); + // Jobs per page + $jobs_per_page = array( 25,50,75,100,150 ); + $smarty->assign( 'jobs_per_page', $jobs_per_page ); + // Global variables $job_level = array( 'D' => 'Diff', 'I' => 'Incr', 'F' => 'Full' ); @@ -61,10 +65,10 @@ $query .= "ORDER BY Job.JobId DESC "; // Determine how many jobs to display - if( isset($_POST['limit']) ) - $query .= "LIMIT " . $_POST['limit']; + if( isset($_POST['jobs_per_page']) ) + $query .= "LIMIT " . $_POST['jobs_per_page']; else - $query .= "LIMIT 20 "; + $query .= "LIMIT 25 "; //echo $query . '
'; diff --git a/gui/bacula-web/templates/jobs.tpl b/gui/bacula-web/templates/jobs.tpl index b10e010456..cdf00ee474 100644 --- a/gui/bacula-web/templates/jobs.tpl +++ b/gui/bacula-web/templates/jobs.tpl @@ -35,26 +35,17 @@ Jobs / Page - + {foreach from=$jobs_per_page item=nb_jobs} +