Skip to content

Commit

Permalink
fix 2: resolve review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
raviks789 committed Oct 24, 2024
1 parent c69bac1 commit 374cf92
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions library/Icingadb/Widget/Detail/ObjectDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
use Icinga\Module\Icingadb\Util\PluginOutput;
use Icinga\Module\Icingadb\Widget\ItemList\DowntimeList;
use Icinga\Module\Icingadb\Widget\ShowMore;
use ipl\Sql\Select;
use ipl\Web\Widget\CopyToClipboard;
use ipl\Web\Widget\EmptyState;
use ipl\Web\Widget\HorizontalKeyValue;
Expand Down Expand Up @@ -659,14 +658,18 @@ protected function createRootProblems(): ?array
];
}

protected function createAffectedObjects()
/**
* Create a list of objects affected by the object that is a part of failed dependency
*
* @return ?BaseHtmlElement[]
*/
protected function createAffectedObjects(): ?array
{
if (! $this->object->state->affects_children) {
return null;
}

$affectedObjects = DependencyNode::on($this->getDb())
->limit(5)
->with([
'redundancy_group',
'redundancy_group.state',
Expand All @@ -680,7 +683,10 @@ protected function createAffectedObjects()
'service.state.last_comment',
'service.host',
'service.host.state'
])->orderBy([
])
->setResultSetClass(VolatileStateResults::class)
->limit(5)
->orderBy([
'host.state.severity',
'host.state.last_state_change',
'service.state.severity',
Expand Down

0 comments on commit 374cf92

Please sign in to comment.