This commit is contained in:
Gianluca Piccolo 2023-04-05 10:37:34 +02:00 committed by Johannes Meyer
parent 59fc7dd745
commit db9888b1f1
4 changed files with 12 additions and 3 deletions

View File

@ -29,7 +29,9 @@ class HostdowntimeendhistoryQuery extends HostdowntimestarthistoryQuery
protected function joinBaseTables()
{
parent::joinBaseTables(true);
$this->select->where("hdh.actual_end_time > '1970-01-02 00:00:00'");
$this->select->where(
"hdh.actual_end_time > '1970-01-02 00:00:00' AND hdh.was_started = 1 AND hdh.was_cancelled = 0"
);
$this->columnMap['downtimehistory']['type'] = "('dt_end')";
$this->columnMap['downtimehistory']['timestamp'] = str_replace(
'actual_start_time',

View File

@ -102,7 +102,9 @@ class HostdowntimestarthistoryQuery extends IdoQuery
"hdh.actual_start_time > '1970-01-02 00:00:00'"
);
}
$this->select->where(
"hdh.was_started = 1 AND hdh.was_cancelled = 0"
);
$this->joinedVirtualTables['downtimehistory'] = true;
}

View File

@ -29,7 +29,9 @@ class ServicedowntimeendhistoryQuery extends ServicedowntimestarthistoryQuery
protected function joinBaseTables()
{
parent::joinBaseTables(true);
$this->select->where("sdh.actual_end_time > '1970-01-02 00:00:00'");
$this->select->where(
"sdh.actual_end_time > '1970-01-02 00:00:00' AND sdh.was_started = 1 AND sdh.was_cancelled = 0"
);
$this->columnMap['downtimehistory']['type'] = "('dt_end')";
$this->columnMap['downtimehistory']['timestamp'] = str_replace(
'actual_start_time',

View File

@ -103,6 +103,9 @@ class ServicedowntimestarthistoryQuery extends IdoQuery
"sdh.actual_start_time > '1970-01-02 00:00:00'"
);
}
$this->select->where(
"sdh.was_started = 1 AND sdh.was_cancelled = 0"
);
$this->joinedVirtualTables['downtimehistory'] = true;
}