Skip to content

Commit

Permalink
fix(Detail): revert changes introduced by 49c3608
Browse files Browse the repository at this point in the history
Related change: #155
  • Loading branch information
ncosta-ic committed May 3, 2024
1 parent 03b4256 commit d62c9b4
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions library/Notifications/Widget/Detail/IncidentDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Icinga\Module\Notifications\Widget\Detail;

use Icinga\Module\Notifications\Common\Database;
use Icinga\Module\Notifications\Model\Incident;
use Icinga\Module\Notifications\Model\Objects;
use Icinga\Module\Notifications\Widget\EventSourceBadge;
Expand All @@ -15,8 +14,6 @@
use ipl\Html\Html;
use ipl\Html\HtmlElement;
use ipl\Html\Table;
use ipl\Orm\Query;
use ipl\Sql\Select;
use ipl\Web\Widget\Link;
use ipl\Web\Widget\StateBall;

Expand Down Expand Up @@ -93,28 +90,22 @@ protected function createRelatedObject()

protected function createHistory()
{
$history = $this->incident->incident_history
->with([
'event',
'incident.object',
'incident.object.source',
'contact',
'rule',
'rule_escalation',
'contactgroup',
'schedule',
'channel'
]);

$history
->withColumns('incident.object.id_tags')
->on(Query::ON_SELECT_ASSEMBLED, function (Select $select) use ($history) {
Database::registerGroupBy($history, $select);
});

return [
Html::tag('h2', t('Incident History')),
new IncidentHistoryList($history)
new IncidentHistoryList(
$this->incident->incident_history
->with([
'event',
'event.object',
'event.object.source',
'contact',
'rule',
'rule_escalation',
'contactgroup',
'schedule',
'channel'
])
)
];
}

Expand Down

0 comments on commit d62c9b4

Please sign in to comment.