mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
- Added new constant OPT_MINUTES to FilterWidgetLib
- Now is it possible to use minutes and hours in the FilterWidget - LogsViewer tool now displays milliseconds for execution time column - Changed filters for LogsViewer tool
This commit is contained in:
@@ -93,6 +93,7 @@ class FilterWidgetLib
|
||||
const OP_NOT_SET = 'nset';
|
||||
|
||||
// Filter options values
|
||||
const OPT_MINUTES = 'minutes';
|
||||
const OPT_HOURS = 'hours';
|
||||
const OPT_DAYS = 'days';
|
||||
const OPT_MONTHS = 'months';
|
||||
@@ -887,7 +888,8 @@ class FilterWidgetLib
|
||||
&& isset($filterDefinition->option)
|
||||
&& ($filterDefinition->option == self::OPT_HOURS
|
||||
|| $filterDefinition->option == self::OPT_DAYS
|
||||
|| $filterDefinition->option == self::OPT_MONTHS))
|
||||
|| $filterDefinition->option == self::OPT_MONTHS
|
||||
|| $filterDefinition->option == self::OPT_MINUTES))
|
||||
{
|
||||
$condition = '< (NOW() - \''.$filterDefinition->condition.' '.$filterDefinition->option.'\'::interval)';
|
||||
}
|
||||
@@ -903,7 +905,8 @@ class FilterWidgetLib
|
||||
&& isset($filterDefinition->option)
|
||||
&& ($filterDefinition->option == self::OPT_HOURS
|
||||
|| $filterDefinition->option == self::OPT_DAYS
|
||||
|| $filterDefinition->option == self::OPT_MONTHS))
|
||||
|| $filterDefinition->option == self::OPT_MONTHS
|
||||
|| $filterDefinition->option == self::OPT_MINUTES))
|
||||
{
|
||||
$condition = '> (NOW() - \''.$filterDefinition->condition.' '.$filterDefinition->option.'\'::interval)';
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->ExecutionTime = date_format(date_create($datasetRaw->ExecutionTime), 'd.m.Y H:i:s');
|
||||
$datasetRaw->ExecutionTime = date_format(date_create($datasetRaw->ExecutionTime), 'd.m.Y H:i:s:u');
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
@@ -33,22 +33,22 @@
|
||||
|
||||
$mark = '';
|
||||
|
||||
if ($datasetRaw->RequestId == 'Cronjob error')
|
||||
if (strpos($datasetRaw->RequestId, 'error') != false)
|
||||
{
|
||||
$mark = 'text-red';
|
||||
}
|
||||
|
||||
if ($datasetRaw->RequestId == 'Cronjob info')
|
||||
if (strpos($datasetRaw->RequestId, 'info') != false)
|
||||
{
|
||||
$mark = 'text-green';
|
||||
}
|
||||
|
||||
if ($datasetRaw->RequestId == 'Cronjob warning')
|
||||
if (strpos($datasetRaw->RequestId, 'warning') != false)
|
||||
{
|
||||
$mark = 'text-orange';
|
||||
}
|
||||
|
||||
if ($datasetRaw->RequestId == 'Cronjob debug')
|
||||
if (strpos($datasetRaw->RequestId, 'debug') != false)
|
||||
{
|
||||
$mark = 'text-info';
|
||||
}
|
||||
@@ -63,3 +63,4 @@
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user