Admin - add ability to filter command history on parent

This commit is contained in:
nathangray 2019-03-22 11:59:27 -06:00
parent b8bbe81022
commit 05d60ba27a

View File

@ -512,6 +512,10 @@ abstract class admin_cmd
$query['col_filter'][] = 'cmd_rrule IS NOT NULL'; $query['col_filter'][] = 'cmd_rrule IS NOT NULL';
} }
unset($query['col_filter']['periodic']); unset($query['col_filter']['periodic']);
if($query['parent_id'])
{
$query['col_filter']['parent'] = (int)$query['parent_id'];
}
$total = admin_cmd::$sql->get_rows($query,$rows,$readonlys); $total = admin_cmd::$sql->get_rows($query,$rows,$readonlys);
@ -1113,7 +1117,11 @@ abstract class admin_cmd
// instanciate single periodic execution object // instanciate single periodic execution object
$single = $cmd->as_array(); $single = $cmd->as_array();
$single['parent'] = $single['id']; $single['parent'] = $single['id'];
unset($single['id'], $single['uid'], $single['rrule'], $single['created'], $single['modified'], $single['modifier'], $single['async_job_id']); unset($single['id'], $single['uid'], $single['rrule'], $single['created'],
$single['modified'], $single['modifier'],
// $single['set'], $single['old'],
$single['async_job_id']
);
$periodic = admin_cmd::instanciate($single); $periodic = admin_cmd::instanciate($single);
try { try {