Skip to content

Commit

Permalink
CheckStatistics: Show retry_interval if object in `problem && soft_…
Browse files Browse the repository at this point in the history
…state`
  • Loading branch information
sukhwinder33445 committed May 17, 2023
1 parent 9041a64 commit 87f9d58
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/Icingadb/Widget/Detail/CheckStatistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,17 @@ protected function assembleBody(BaseHtmlElement $body)
: t('PENDING'))
)
);

$checkInterval = $this->object->state->is_problem && $this->object->state->state_type === 'soft'
? $this->object->check_retry_interval
: $this->object->check_interval;
$interval = Html::tag(
'li',
['class' => 'interval'],
new VerticalKeyValue(
t('Interval'),
$this->object->check_interval
? Format::seconds($this->object->check_interval)
$checkInterval
? Format::seconds($checkInterval)
: (new EmptyState(t('n. a.')))->setTag('span')
)
);
Expand Down

0 comments on commit 87f9d58

Please sign in to comment.