summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/summary.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/statistics/pages/summary.inc.php')
-rw-r--r--modules-available/statistics/pages/summary.inc.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/modules-available/statistics/pages/summary.inc.php b/modules-available/statistics/pages/summary.inc.php
index c2e3ac80..ead62a26 100644
--- a/modules-available/statistics/pages/summary.inc.php
+++ b/modules-available/statistics/pages/summary.inc.php
@@ -17,7 +17,6 @@ class SubPage
$filters = StatisticsFilter::parseQuery();
$filterSet = new StatisticsFilterSet($filters);
- $filterSet->setSort($sortColumn, $sortDirection);
if (!$filterSet->setAllowedLocationsFromPermission('view.summary')) {
Message::addError('main.no-permission');
@@ -47,7 +46,7 @@ class SubPage
*/
private static function showSummary($filterSet)
{
- $filterSet->makeFragments($where, $join, $sort, $args);
+ $filterSet->makeFragments($where, $join, $args);
$known = Database::queryFirst("SELECT Count(*) AS val FROM machine m $join WHERE $where", $args);
$on = Database::queryFirst("SELECT Count(*) AS val FROM machine m $join WHERE state IN ('IDLE', 'OCCUPIED') AND ($where)", $args);
$used = Database::queryFirst("SELECT Count(*) AS val FROM machine m $join WHERE state = 'OCCUPIED' AND ($where)", $args);
@@ -100,7 +99,7 @@ class SubPage
*/
private static function showSystemModels($filterSet)
{
- $filterSet->makeFragments($where, $join, $sort, $args);
+ $filterSet->makeFragments($where, $join, $args);
$res = Database::simpleQuery('SELECT systemmodel, Round(AVG(realcores)) AS cores, Count(*) AS `count` FROM machine m'
. " $join WHERE $where GROUP BY systemmodel ORDER BY `count` DESC, systemmodel ASC", $args);
$lines = array();
@@ -130,8 +129,9 @@ class SubPage
*/
private static function showMemory($filterSet)
{
- $filterSet->makeFragments($where, $join, $sort, $args);
- $res = Database::simpleQuery("SELECT mbram, Count(*) AS `count` FROM machine m $join WHERE $where GROUP BY mbram", $args);
+ $filterSet->makeFragments($where, $join, $args);
+ $res = Database::simpleQuery("SELECT mbram, Count(*) AS `count` FROM machine m $join
+ WHERE $where GROUP BY mbram", $args);
$lines = array();
while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
$gb = (int)ceil($row['mbram'] / 1024);
@@ -174,9 +174,10 @@ class SubPage
*/
private static function showKvmState($filterSet)
{
- $filterSet->makeFragments($where, $join, $sort, $args);
+ $filterSet->makeFragments($where, $join, $args);
$colors = array('UNKNOWN' => '#666', 'UNSUPPORTED' => '#ea5', 'DISABLED' => '#e55', 'ENABLED' => '#6d6');
- $res = Database::simpleQuery("SELECT kvmstate, Count(*) AS `count` FROM machine m $join WHERE $where GROUP BY kvmstate ORDER BY `count` DESC", $args);
+ $res = Database::simpleQuery("SELECT kvmstate, Count(*) AS `count` FROM machine m $join
+ WHERE $where GROUP BY kvmstate ORDER BY `count` DESC", $args);
$lines = array();
$json = array();
while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
@@ -195,7 +196,7 @@ class SubPage
*/
private static function showId44($filterSet)
{
- $filterSet->makeFragments($where, $join, $sort, $args);
+ $filterSet->makeFragments($where, $join, $args);
$res = Database::simpleQuery("SELECT id44mb, Count(*) AS `count` FROM machine m $join WHERE $where GROUP BY id44mb", $args);
$lines = array();
$total = 0;
@@ -245,7 +246,7 @@ class SubPage
*/
private static function showLatestMachines($filterSet)
{
- $filterSet->makeFragments($where, $join, $sort, $args);
+ $filterSet->makeFragments($where, $join, $args);
$args['cutoff'] = ceil(time() / 3600) * 3600 - 86400 * 10;
$res = Database::simpleQuery("SELECT machineuuid, clientip, hostname, firstseen, mbram, kvmstate, id44mb FROM machine m $join"