summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/list.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2020-04-21 18:16:36 +0200
committerSimon Rettberg2020-04-21 18:16:36 +0200
commitd6bbb4d57a086dfaf5f0a1ebf8913577568ae887 (patch)
tree95f7c80a38bfb02b1dd5c1c796e9d333d26d0ff5 /modules-available/statistics/pages/list.inc.php
parent[statistics] New filter UI (diff)
downloadslx-admin-d6bbb4d57a086dfaf5f0a1ebf8913577568ae887.tar.gz
slx-admin-d6bbb4d57a086dfaf5f0a1ebf8913577568ae887.tar.xz
slx-admin-d6bbb4d57a086dfaf5f0a1ebf8913577568ae887.zip
[statistics] Refactor filter creation (Part 1)
Filter classes are now instances of their respective classes, to move more logic into those classes. A bind method is used for assigning actual operator and argument values. renderFilterBox() is still a little too messy, maybe a clever class for mapping a (bound) filter to data for mustache will come in handy here.
Diffstat (limited to 'modules-available/statistics/pages/list.inc.php')
-rw-r--r--modules-available/statistics/pages/list.inc.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php
index a709ab3d..7b8e8f5f 100644
--- a/modules-available/statistics/pages/list.inc.php
+++ b/modules-available/statistics/pages/list.inc.php
@@ -15,7 +15,6 @@ class SubPage
$filters = StatisticsFilter::parseQuery();
$filterSet = new StatisticsFilterSet($filters);
- $filterSet->setSort($sortColumn, $sortDirection);
if (!$filterSet->setAllowedLocationsFromPermission('view.list')) {
Message::addError('main.no-permission');
@@ -32,7 +31,7 @@ class SubPage
private static function showMachineList($filterSet)
{
Module::isAvailable('js_stupidtable');
- $filterSet->makeFragments($where, $join, $sort, $args);
+ $filterSet->makeFragments($where, $join, $args);
$xtra = '';
if ($filterSet->isNoId44Filter()) {
$xtra .= ', data';
@@ -47,7 +46,7 @@ class SubPage
m.logintime, m.state, m.currentuser, m.realcores, m.mbram, m.kvmstate, m.cpumodel, m.id44mb, m.hostname, m.notes IS NOT NULL AS hasnotes,
m.badsectors, Count(s.machineuuid) AS confvars $xtra FROM machine m
LEFT JOIN setting_machine s USING (machineuuid)
- $join WHERE $where GROUP BY m.machineuuid $sort", $args);
+ $join WHERE $where GROUP BY m.machineuuid", $args);
$rows = array();
$singleMachine = 'none';
// TODO: Cannot disable checkbox for those where user has no permission, since we got multiple actions now