From 0db42b32e6d4ed8bfb6592d50be725660f4f3b62 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 30 May 2022 11:10:10 +0200 Subject: [PATCH] Remove not in use class `Icinga\Module\Monitoring\Environment.php` --- doc/80-Upgrading.md | 1 + .../library/Monitoring/Environment.php | 57 ------------------- 2 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 modules/monitoring/library/Monitoring/Environment.php diff --git a/doc/80-Upgrading.md b/doc/80-Upgrading.md index a563308e5..7a266e8d8 100644 --- a/doc/80-Upgrading.md +++ b/doc/80-Upgrading.md @@ -51,6 +51,7 @@ v2.6 to v2.8 requires to follow the instructions for v2.7 too. + `Icinga\Module\Migrate\Clicommands\DashboardCommand` + `Icinga\Web\Hook\TicketHook`: Use `Icinga\Application\Hook\TicketHook` instead. + `Icinga\Web\Hook\GrapherHook`: Use `Icinga\Application\Hook\GrapherHook` instead. ++ `Icinga\Module\Monitoring\Environment`: Not in use. * All the following deprecated js classes and methods are removed: diff --git a/modules/monitoring/library/Monitoring/Environment.php b/modules/monitoring/library/Monitoring/Environment.php deleted file mode 100644 index 0dee83ae4..000000000 --- a/modules/monitoring/library/Monitoring/Environment.php +++ /dev/null @@ -1,57 +0,0 @@ - array( - 'backend' => null, - 'grapher' => null, - 'configBackend' => null, - 'commandPipe' => null, - ) - ); - - public static function defaultName() - { - // TODO: Check session - reset(self::$envs); - return key(self::$envs); - } - - protected static function config($env, $what) - { - return self::$config[self::getName($env)][$what]; - } - - protected static function getName($env) - { - return $env === null ? self::defaultName() : $env; - } - - public static function backend($env = null) - { - return Backend::getInstance(self::config($env, 'backend')); - } - - public static function grapher($env = null) - { - return Hook::createInstance('grapher', null, self::config($env, 'grapher')); - } - - public static function configBackend($env = null) - { - return Hook::createInstance( - 'configBackend', - null, - self::config($env, 'configBackend') - ); - } - - public static function commandPipe($env = null) - { - return CommandPipe::getInstance(self::config($env, 'commandPipe')); - } -}