mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-10 15:34:56 +02:00
Satellite agent management
This commit is contained in:
parent
2c8b9b3aa5
commit
db72108b0e
@ -150,10 +150,10 @@ class SatelliteAgent extends HTML
|
|||||||
'server_remote' => $this->satellite_server,
|
'server_remote' => $this->satellite_server,
|
||||||
],
|
],
|
||||||
'ajax_postprocces' => 'process_datatables_item(item)',
|
'ajax_postprocces' => 'process_datatables_item(item)',
|
||||||
'no_sortable_columns' => [-1],
|
'no_sortable_columns' => [
|
||||||
'order' => [
|
0,
|
||||||
'field' => 'date',
|
1,
|
||||||
'direction' => 'asc',
|
2,
|
||||||
],
|
],
|
||||||
'search_button_class' => 'sub filter float-right',
|
'search_button_class' => 'sub filter float-right',
|
||||||
'form' => [
|
'form' => [
|
||||||
@ -239,6 +239,12 @@ class SatelliteAgent extends HTML
|
|||||||
$agent['name'] = $matches[2][0];
|
$agent['name'] = $matches[2][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($filters['filter_search']) === false) {
|
||||||
|
if (empty(preg_grep('/'.$filters['filter_search'].'?/mi', array_values($agent))) === true) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
array_push($data, $agent);
|
array_push($data, $agent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,11 +274,14 @@ class SatelliteAgent extends HTML
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$data = array_slice($data, $start, $length, true);
|
||||||
|
$total = count($data);
|
||||||
|
|
||||||
echo json_encode(
|
echo json_encode(
|
||||||
[
|
[
|
||||||
'data' => $data,
|
'data' => $data,
|
||||||
'recordsTotal' => $count,
|
'recordsTotal' => $total,
|
||||||
'recordsFiltered' => $count,
|
'recordsFiltered' => $total,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
// Capture output.
|
// Capture output.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user