$order_by = $this->Request->contains('order_by') && $misc->isValidColumn($this->Request['order_by']) ? $this->Request['order_by']: null;
$order_direction = $this->Request->contains('order_direction') && $misc->isValidOrderDirection($this->Request['order_direction']) ? $this->Request['order_direction']: 'DESC';
$mode = ($this->Request->contains('overview') && $misc->isValidBooleanTrue($this->Request['overview'])) ? SourceManager::SOURCE_RESULT_MODE_OVERVIEW : SourceManager::SOURCE_RESULT_MODE_NORMAL;
+ $joberrors = null;
+ if ($this->Request->contains('joberrors') && $misc->isValidBoolean($this->Request['joberrors'])) {
+ $joberrors = $misc->isValidBooleanTrue($this->Request['joberrors']) ? true : false;
+ }
$allowed_sort_fields = ['job', 'client', 'fileset', 'starttime', 'endtime', 'jobid', 'content', 'type', 'jobstatus', 'joberrors'];
if (is_string($order_by) && !in_array($order_by, $allowed_sort_fields)) {
}
}
+ if (!is_null($joberrors)) {
+ if ($joberrors === true) {
+ $params['jres.JobErrors'] = [];
+ $params['jres.JobErrors'][] = [
+ 'operator' => '>',
+ 'vals' => 0
+ ];
+ } elseif ($joberrors === false) {
+ $params['jres.JobErrors'] = [];
+ $params['jres.JobErrors'][] = [
+ 'vals' => 0
+ ];
+ }
+ }
+
$sources = $this->getModule('source')->getSources(
$params,
$props,
"enum": ["C", "R", "B", "T", "W", "E", "e", "f", "D", "A", "I", "F", "S", "m", "M", "s", "j", "c", "d", "t", "p", "i", "a", "l", "L"]
}
},
+ {
+ "name": "joberrors",
+ "in": "query",
+ "required": false,
+ "description": "Show objects from jobs that contain or that do not contain errors.",
+ "schema": {
+ "type": "boolean"
+ }
+ },
{
"name": "hasobject",
"in": "query",