mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
State: Add native is_overdue column
This commit is contained in:
parent
f0aa99064f
commit
7958eda837
1 changed files with 2 additions and 7 deletions
|
|
@ -13,8 +13,6 @@ use ipl\Orm\Model;
|
|||
*/
|
||||
abstract class State extends Model
|
||||
{
|
||||
protected $accessorsAndMutatorsEnabled = true;
|
||||
|
||||
public function getColumns()
|
||||
{
|
||||
return [
|
||||
|
|
@ -33,6 +31,7 @@ abstract class State extends Model
|
|||
'is_handled',
|
||||
'is_reachable',
|
||||
'is_flapping',
|
||||
'is_overdue',
|
||||
'is_acknowledged',
|
||||
'acknowledgement_comment_id',
|
||||
'in_downtime',
|
||||
|
|
@ -55,6 +54,7 @@ abstract class State extends Model
|
|||
'is_handled',
|
||||
'is_reachable',
|
||||
'is_flapping',
|
||||
'is_overdue',
|
||||
'is_acknowledged',
|
||||
'in_downtime'
|
||||
]));
|
||||
|
|
@ -67,9 +67,4 @@ abstract class State extends Model
|
|||
'next_update'
|
||||
]));
|
||||
}
|
||||
|
||||
public function mutateIsOverdueProperty()
|
||||
{
|
||||
return $this->properties['next_update'] < time();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue