mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
- Added new constant BEGINNING_OF_TIME
- Added new config entry job_type_permissions_white_list in jqm.php - Added new navigation entry jobsqueueviewer - Added new model application/models/system/JobsQueue_model.php - Added new option in FilterWidget for hours comparison with dates - Added new filter core-jq-lastHour to system/filtersupdate.php - Added new statements to system/dbupdate_3.3.php to create tables system.tbl_jobstatuses, system.tbl_jobtypes and system.tbl_jobstatuses - Added new views application/views/system/jq/jobsQueueViewer.php and application/views/system/jq/jobsQueueViewerData.php
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT jq.jobid AS "JobId",
|
||||
jq.creationtime AS "CreationTime",
|
||||
jq.type AS "Type",
|
||||
jq.status AS "Status",
|
||||
jq.starttime AS "StartTime",
|
||||
jq.endtime AS "EndTime",
|
||||
jq.insertvon AS "UserService"
|
||||
FROM system.tbl_jobsqueue jq
|
||||
ORDER BY jq.creationtime DESC, jq.starttime DESC, jq.endtime DESC
|
||||
',
|
||||
'requiredPermissions' => 'admin',
|
||||
'datasetRepresentation' => 'tablesorter',
|
||||
'columnsAliases' => array(
|
||||
'Job id',
|
||||
'Creation time',
|
||||
'Type',
|
||||
'Status',
|
||||
'Start time',
|
||||
'End time',
|
||||
'User/Service'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->CreationTime = date_format(date_create($datasetRaw->CreationTime), 'd.m.Y H:i:s');
|
||||
$datasetRaw->StartTime = date_format(date_create($datasetRaw->StartTime), 'd.m.Y H:i:s');
|
||||
$datasetRaw->EndTime = date_format(date_create($datasetRaw->EndTime), 'd.m.Y H:i:s');
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
$mark = '';
|
||||
|
||||
if ($datasetRaw->Status == 'Failed')
|
||||
{
|
||||
$mark = 'text-red';
|
||||
}
|
||||
|
||||
if ($datasetRaw->Status == 'Done')
|
||||
{
|
||||
$mark = 'text-green';
|
||||
}
|
||||
|
||||
if ($datasetRaw->Status == 'Running')
|
||||
{
|
||||
$mark = 'text-orange';
|
||||
}
|
||||
|
||||
if ($datasetRaw->Status == 'New')
|
||||
{
|
||||
$mark = 'text-info';
|
||||
}
|
||||
|
||||
return $mark;
|
||||
}
|
||||
);
|
||||
|
||||
$filterWidgetArray['app'] = 'core';
|
||||
$filterWidgetArray['datasetName'] = 'jq';
|
||||
$filterWidgetArray['filter_id'] = $this->input->get('filter_id');
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
Reference in New Issue
Block a user