Skip to content

Constant visibility #648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .phpcs.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ToggleObjectFeaturesForm extends CommandForm
{
use Auth;

const LEAVE_UNCHANGED = 'noop';
public const LEAVE_UNCHANGED = 'noop';

protected $features;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,32 @@ class ToggleInstanceFeatureCommand extends IcingaCommand
/**
* Feature for enabling or disabling active host checks on an Icinga instance
*/
const FEATURE_ACTIVE_HOST_CHECKS = 'active_host_checks_enabled';
public const FEATURE_ACTIVE_HOST_CHECKS = 'active_host_checks_enabled';

/**
* Feature for enabling or disabling active service checks on an Icinga instance
*/
const FEATURE_ACTIVE_SERVICE_CHECKS = 'active_service_checks_enabled';
public const FEATURE_ACTIVE_SERVICE_CHECKS = 'active_service_checks_enabled';

/**
* Feature for enabling or disabling host and service event handlers on an Icinga instance
*/
const FEATURE_EVENT_HANDLERS = 'event_handlers_enabled';
public const FEATURE_EVENT_HANDLERS = 'event_handlers_enabled';

/**
* Feature for enabling or disabling host and service flap detection on an Icinga instance
*/
const FEATURE_FLAP_DETECTION = 'flap_detection_enabled';
public const FEATURE_FLAP_DETECTION = 'flap_detection_enabled';

/**
* Feature for enabling or disabling host and service notifications on an Icinga instance
*/
const FEATURE_NOTIFICATIONS = 'notifications_enabled';
public const FEATURE_NOTIFICATIONS = 'notifications_enabled';

/**
* Feature for enabling or disabling the processing of host and service performance data on an Icinga instance
*/
const FEATURE_PERFORMANCE_DATA = 'process_performance_data';
public const FEATURE_PERFORMANCE_DATA = 'process_performance_data';

/**
* Feature that is to be enabled or disabled
Expand Down
12 changes: 6 additions & 6 deletions library/Icingadb/Command/Object/ProcessCheckResultCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@ class ProcessCheckResultCommand extends ObjectCommand
/**
* Host up
*/
const HOST_UP = 0;
public const HOST_UP = 0;

/**
* Host down
*/
const HOST_DOWN = 1;
public const HOST_DOWN = 1;

/**
* Service ok
*/
const SERVICE_OK = 0;
public const SERVICE_OK = 0;

/**
* Service warning
*/
const SERVICE_WARNING = 1;
public const SERVICE_WARNING = 1;

/**
* Service critical
*/
const SERVICE_CRITICAL = 2;
public const SERVICE_CRITICAL = 2;

/**
* Service unknown
*/
const SERVICE_UNKNOWN = 3;
public const SERVICE_UNKNOWN = 3;

/**
* Status code of the host or service check result
Expand Down
10 changes: 5 additions & 5 deletions library/Icingadb/Command/Object/ToggleObjectFeatureCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ class ToggleObjectFeatureCommand extends ObjectCommand
/**
* Feature for enabling or disabling active checks of a host or service
*/
const FEATURE_ACTIVE_CHECKS = 'active_checks_enabled';
public const FEATURE_ACTIVE_CHECKS = 'active_checks_enabled';

/**
* Feature for enabling or disabling passive checks of a host or service
*/
const FEATURE_PASSIVE_CHECKS = 'passive_checks_enabled';
public const FEATURE_PASSIVE_CHECKS = 'passive_checks_enabled';

/**
* Feature for enabling or disabling notifications for a host or service
*
* Notifications will be sent out only if notifications are enabled on a program-wide basis as well.
*/
const FEATURE_NOTIFICATIONS = 'notifications_enabled';
public const FEATURE_NOTIFICATIONS = 'notifications_enabled';

/**
* Feature for enabling or disabling event handler for a host or service
*/
const FEATURE_EVENT_HANDLER = 'event_handler_enabled';
public const FEATURE_EVENT_HANDLER = 'event_handler_enabled';

/**
* Feature for enabling or disabling flap detection for a host or service.
*
* In order to enable flap detection flap detection must be enabled on a program-wide basis as well.
*/
const FEATURE_FLAP_DETECTION = 'flapping_enabled';
public const FEATURE_FLAP_DETECTION = 'flapping_enabled';

/**
* Feature that is to be enabled or disabled
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Command/Transport/ApiCommandTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ApiCommandTransport implements CommandTransportInterface
/**
* Transport identifier
*/
const TRANSPORT = 'api';
public const TRANSPORT = 'api';

/**
* API host
Expand Down
8 changes: 4 additions & 4 deletions library/Icingadb/Common/HostStates.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
*/
class HostStates
{
const UP = 0;
public const UP = 0;

const DOWN = 1;
public const DOWN = 1;

const UNREACHABLE = 2;
public const UNREACHABLE = 2;

const PENDING = 99;
public const PENDING = 99;

/**
* Get the integer value of the given textual host state
Expand Down
22 changes: 11 additions & 11 deletions library/Icingadb/Common/Icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@

class Icons
{
const COMMENT = 'comment';
public const COMMENT = 'comment';

const HOST_DOWN = 'sitemap';
public const HOST_DOWN = 'sitemap';

const IN_DOWNTIME = 'plug';
public const IN_DOWNTIME = 'plug';

const IS_ACKNOWLEDGED = 'check';
public const IS_ACKNOWLEDGED = 'check';

const IS_FLAPPING = 'bolt';
public const IS_FLAPPING = 'bolt';

const IS_PERSISTENT = 'thumbtack';
public const IS_PERSISTENT = 'thumbtack';

const NOTIFICATION = 'bell';
public const NOTIFICATION = 'bell';

const REMOVE = 'trash';
public const REMOVE = 'trash';

const USER = 'user';
public const USER = 'user';

const USERGROUP = 'users';
public const USERGROUP = 'users';

const WARNING = 'exclamation-triangle';
public const WARNING = 'exclamation-triangle';
}
10 changes: 5 additions & 5 deletions library/Icingadb/Common/ServiceStates.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
*/
class ServiceStates
{
const OK = 0;
public const OK = 0;

const WARNING = 1;
public const WARNING = 1;

const CRITICAL = 2;
public const CRITICAL = 2;

const UNKNOWN = 3;
public const UNKNOWN = 3;

const PENDING = 99;
public const PENDING = 99;

/**
* Get the integer value of the given textual service state
Expand Down
12 changes: 6 additions & 6 deletions library/Icingadb/Compat/UrlMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

class UrlMigrator
{
const NO_YES = ['n', 'y'];
const USE_EXPR = 'use-expr';
const SORT_ONLY = 'sort-only';
const LOWER_EXPR = 'lower-expr';
const DROP = 'drop';
public const NO_YES = ['n', 'y'];
public const USE_EXPR = 'use-expr';
public const SORT_ONLY = 'sort-only';
public const LOWER_EXPR = 'lower-expr';
public const DROP = 'drop';

const SUPPORTED_PATHS = [
public const SUPPORTED_PATHS = [
'monitoring/list/hosts' => ['hosts', 'icingadb/hosts'],
'monitoring/hosts/show' => ['multipleHosts', 'icingadb/hosts/details'],
'monitoring/host/show' => ['host', 'icingadb/host'],
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Data/PivotTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class PivotTable
{
const SORT_ASC = 'asc';
public const SORT_ASC = 'asc';

/**
* The query to fetch as pivot table
Expand Down
20 changes: 10 additions & 10 deletions library/Icingadb/Hook/ExtensionHook/BaseExtensionHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@ abstract class BaseExtensionHook
use HookUtils;

/** @var int Used as default return value for {@see BaseExtensionHook::getLocation()} */
const IDENTIFY_LOCATION_BY_SECTION = -1;
public const IDENTIFY_LOCATION_BY_SECTION = -1;

/** @var string Output section, right at the top */
const OUTPUT_SECTION = 'output';
public const OUTPUT_SECTION = 'output';

/** @var string Graph section, below output */
const GRAPH_SECTION = 'graph';
public const GRAPH_SECTION = 'graph';

/** @var string Detail section, below graphs */
const DETAIL_SECTION = 'detail';
public const DETAIL_SECTION = 'detail';

/** @var string Action section, below action and note urls */
const ACTION_SECTION = 'action';
public const ACTION_SECTION = 'action';

/** @var string Problem section, below comments and downtimes */
const PROBLEM_SECTION = 'problem';
public const PROBLEM_SECTION = 'problem';

/** @var string Related section, below groups and notification recipients */
const RELATED_SECTION = 'related';
public const RELATED_SECTION = 'related';

/** @var string State section, below check statistics and performance data */
const STATE_SECTION = 'state';
public const STATE_SECTION = 'state';

/** @var string Config section, below custom variables and feature toggles */
const CONFIG_SECTION = 'config';
public const CONFIG_SECTION = 'config';

/**
* Base locations for all known sections
*
* @var array<string, int>
*/
const BASE_LOCATIONS = [
public const BASE_LOCATIONS = [
self::OUTPUT_SECTION => 1000,
self::GRAPH_SECTION => 1100,
self::DETAIL_SECTION => 1200,
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Hook/IcingadbSupportHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ abstract class IcingadbSupportHook
use HookUtils;

/** @var string key name of preference */
const PREFERENCE_NAME = 'icingadb.as_backend';
public const PREFERENCE_NAME = 'icingadb.as_backend';

/**
* Return whether your module supports IcingaDB or not
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Model/Behavior/ReRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ReRoute implements RewriteFilterBehavior, RewritePathBehavior
*
* @var string[]
*/
const MIXED_TYPE_RELATIONS = ['downtime', 'comment', 'history', 'notification_history'];
public const MIXED_TYPE_RELATIONS = ['downtime', 'comment', 'history', 'notification_history'];

public function __construct(array $routes)
{
Expand Down
4 changes: 2 additions & 2 deletions library/Icingadb/ProvidedHook/Reporting/SlaReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ abstract class SlaReport extends ReportHook
use Database;

/** @var float If an SLA value is lower than the threshold, it is considered not ok */
const DEFAULT_THRESHOLD = 99.5;
public const DEFAULT_THRESHOLD = 99.5;

/** @var int The amount of decimal places for the report result */
const DEFAULT_REPORT_PRECISION = 2;
public const DEFAULT_REPORT_PRECISION = 2;

/**
* Create and return a {@link ReportData} container
Expand Down
6 changes: 3 additions & 3 deletions library/Icingadb/Util/PerfData.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

class PerfData
{
const PERFDATA_OK = 'ok';
const PERFDATA_WARNING = 'warning';
const PERFDATA_CRITICAL = 'critical';
public const PERFDATA_OK = 'ok';
public const PERFDATA_WARNING = 'warning';
public const PERFDATA_CRITICAL = 'critical';

/**
* The performance data value being parsed
Expand Down
8 changes: 4 additions & 4 deletions library/Icingadb/Util/PluginOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class PluginOutput extends HtmlString
{
/** @var string[] Patterns to be replaced in plain text plugin output */
const TEXT_PATTERNS = [
public const TEXT_PATTERNS = [
'~\\\t~',
'~\\\n~',
'~(\[|\()OK(\]|\))~',
Expand All @@ -34,7 +34,7 @@ class PluginOutput extends HtmlString
];

/** @var string[] Replacements for {@see PluginOutput::TEXT_PATTERNS} */
const TEXT_REPLACEMENTS = [
public const TEXT_REPLACEMENTS = [
"\t",
"\n",
'<span class="state-ball ball-size-m state-ok"></span>',
Expand All @@ -47,13 +47,13 @@ class PluginOutput extends HtmlString
];

/** @var string[] Patterns to be replaced in html plugin output */
const HTML_PATTERNS = [
public const HTML_PATTERNS = [
'~\\\t~',
'~\\\n~'
];

/** @var string[] Replacements for {@see PluginOutput::HTML_PATTERNS} */
const HTML_REPLACEMENTS = [
public const HTML_REPLACEMENTS = [
"\t",
"\n"
];
Expand Down
Loading