$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'])) ? JobManager::JOB_RESULT_MODE_OVERVIEW : JobManager::JOB_RESULT_MODE_NORMAL;
$view = ($this->Request->contains('view') && $misc->isValidResultView($this->Request['view'])) ? $this->Request['view'] : JobManager::JOB_RESULT_VIEW_FULL;
+ $priorjobname = $this->Request->contains('priorjobname') && $misc->isValidName($this->Request['priorjobname']) ? $this->Request['priorjobname'] : '';
if (!empty($jobids)) {
/**
}
}
+ if ($view == JobManager::JOB_RESULT_VIEW_ADVANCED) {
+ $params['PriorJob.Name'] = [];
+ $params['PriorJob.Name'][] = [
+ 'vals' => $priorjobname
+ ];
+ }
+
$result = $this->getModule('bconsole')->bconsoleCommand(
$this->director,
['.jobs'],
"schema": {
"type": "boolean"
}
+ },
+ {
+ "name": "view",
+ "in": "query",
+ "required": false,
+ "description": "Set result view type: full (default) - display all job properties, basic - display only base properties, advanced - display all full view properties plus some special like 'priorjobname'.",
+ "schema": {
+ "type": "string",
+ "enum": ["basic", "full", "advanced"]
+ }
+ },
+ {
+ "name": "priorjobname",
+ "in": "query",
+ "required": false,
+ "description": "Prior job name. NOTE: It works only if 'view' parameter is set to 'advanced'.",
+ "schema": {
+ "type": "string",
+ "pattern": "[a-zA-Z0-9:.-_ ]+"
+ }
}
]
}