Add check_ prefix everywhere where attempt & timeout is used

This commit is contained in:
Yonas Habteab 2022-06-24 10:36:20 +02:00 committed by Johannes Meyer
parent 6e14ac1cd2
commit dd3be8d0e1
7 changed files with 11 additions and 9 deletions

View file

@ -42,7 +42,7 @@ class CompatHost extends Host
'host_check_latency' => ['path' => ['state', 'latency']],
'host_check_source' => ['path' => ['state', 'check_source']],
'host_check_timeperiod' => ['path' => ['check_timeperiod_name']],
'host_current_check_attempt' => ['path' => ['state', 'attempt']],
'host_current_check_attempt' => ['path' => ['state', 'check_attempt']],
'host_current_notification_number' => null,
'host_event_handler_enabled' => [
'path' => ['event_handler_enabled'],

View file

@ -312,7 +312,7 @@ class UrlMigrator
'host.check_timeperiod_name' => self::USE_EXPR
],
'host_current_check_attempt' => [
'host.state.attempt' => self::USE_EXPR
'host.state.check_attempt' => self::USE_EXPR
],
'host_current_notification_number' => self::DROP,
'host_display_name' => [
@ -602,7 +602,7 @@ class UrlMigrator
],
'service_active_checks_enabled_changed' => self::DROP,
'service_attempt' => [
'service.state.attempt' => self::USE_EXPR
'service.state.check_attempt' => self::USE_EXPR
],
'service_check_command' => [
'service.checkcommand_name' => self::USE_EXPR
@ -614,7 +614,7 @@ class UrlMigrator
'service.check_timeperiod_name' => self::USE_EXPR
],
'service_current_check_attempt' => [
'service.state.attempt' => self::USE_EXPR
'service.state.check_attempt' => self::USE_EXPR
],
'service_current_notification_number' => self::DROP,
'service_display_name' => [

View file

@ -172,7 +172,7 @@ class CheckStatistics extends Card
new VerticalKeyValue(t('Command'), $this->object->checkcommand_name),
new VerticalKeyValue(
t('Attempts'),
new CheckAttempt((int) $this->object->state->attempt, (int) $this->object->max_check_attempts)
new CheckAttempt((int) $this->object->state->check_attempt, (int) $this->object->max_check_attempts)
),
new VerticalKeyValue(t('Check Source'), $checkSource),
new VerticalKeyValue(

View file

@ -216,7 +216,7 @@ class EventDetail extends BaseHtmlElement
if ($stateChange->state_type === 'soft') {
$eventInfo[] = new HorizontalKeyValue(t('Check Attempt'), sprintf(
t('%d of %d'),
$stateChange->attempt,
$stateChange->check_attempt,
$stateChange->max_check_attempts
));
}

View file

@ -203,7 +203,7 @@ abstract class BaseHistoryListItem extends BaseListItem
}
$visual->addHtml(new CheckAttempt(
(int) $this->item->state->attempt,
(int) $this->item->state->check_attempt,
(int) $this->item->state->max_check_attempts
));
} else {

View file

@ -84,7 +84,9 @@ abstract class StateListItem extends BaseListItem
$visual->addHtml($stateBall);
if ($this->state->state_type === 'soft') {
$visual->addHtml(new CheckAttempt((int) $this->state->attempt, (int) $this->item->max_check_attempts));
$visual->addHtml(
new CheckAttempt((int) $this->state->check_attempt, (int) $this->item->max_check_attempts)
);
}
}

View file

@ -55,7 +55,7 @@ abstract class StateRowItem extends BaseRowItem
$visual->addHtml($stateBall);
if ($this->item->state->state_type === 'soft') {
$visual->addHtml(new CheckAttempt(
(int) $this->item->state->attempt,
(int) $this->item->state->check_attempt,
(int) $this->item->max_check_attempts
));
}