mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
Hooks: get rid of legacy pre 2.1 hook classes
In case you already implemented such you have to adjust your implementations. Just replace Director/Web/Hook with Director/Hook. Sorry for the inconvenience. Compat classes would have been possible, but as Director isn't stable yet I'd like to avoid doing so.
This commit is contained in:
parent
2a173b7cd3
commit
7b65efee23
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\DataType;
|
namespace Icinga\Module\Director\DataType;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Hook\DataTypeHook;
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Web\Hook\DataTypeHook;
|
|
||||||
|
|
||||||
class DataTypeDatalist extends DataTypeHook
|
class DataTypeDatalist extends DataTypeHook
|
||||||
{
|
{
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\DataType;
|
namespace Icinga\Module\Director\DataType;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Hook\DataTypeHook;
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Web\Hook\DataTypeHook;
|
|
||||||
|
|
||||||
class DataTypeNumber extends DataTypeHook
|
class DataTypeNumber extends DataTypeHook
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,8 @@ namespace Icinga\Module\Director\DataType;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Icinga\Data\Db\DbConnection;
|
use Icinga\Data\Db\DbConnection;
|
||||||
|
use Icinga\Module\Director\Hook\DataTypeHook;
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Web\Hook\DataTypeHook;
|
|
||||||
use Icinga\Module\Director\Util;
|
use Icinga\Module\Director\Util;
|
||||||
|
|
||||||
class DataTypeSqlQuery extends DataTypeHook
|
class DataTypeSqlQuery extends DataTypeHook
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\DataType;
|
namespace Icinga\Module\Director\DataType;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Hook\DataTypeHook;
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Web\Hook\DataTypeHook;
|
|
||||||
|
|
||||||
class DataTypeString extends DataTypeHook
|
class DataTypeString extends DataTypeHook
|
||||||
{
|
{
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\DataType;
|
namespace Icinga\Module\Director\DataType;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Hook\DataTypeHook;
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Web\Hook\DataTypeHook;
|
|
||||||
|
|
||||||
class DataTypeTime extends DataTypeHook
|
class DataTypeTime extends DataTypeHook
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Icinga\Module\Director\Web\Hook;
|
namespace Icinga\Module\Director\Hook;
|
||||||
|
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Icinga\Module\Director\Web\Hook;
|
namespace Icinga\Module\Director\Hook;
|
||||||
|
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Icinga\Module\Director\Web\Hook;
|
namespace Icinga\Module\Director\Hook;
|
||||||
|
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Icinga\Module\Director\Web\Hook;
|
namespace Icinga\Module\Director\Hook;
|
||||||
|
|
||||||
abstract class ShipConfigFilesHook
|
abstract class ShipConfigFilesHook
|
||||||
{
|
{
|
@ -6,9 +6,9 @@ use Icinga\Application\Config;
|
|||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
use Icinga\Module\Director\Core\CoreApi;
|
use Icinga\Module\Director\Core\CoreApi;
|
||||||
use Icinga\Module\Director\Core\RestApiClient;
|
use Icinga\Module\Director\Core\RestApiClient;
|
||||||
|
use Icinga\Module\Director\Hook\ImportSourceHook;
|
||||||
use Icinga\Module\Director\Util;
|
use Icinga\Module\Director\Util;
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Web\Hook\ImportSourceHook;
|
|
||||||
|
|
||||||
class ImportSourceCoreApi extends ImportSourceHook
|
class ImportSourceCoreApi extends ImportSourceHook
|
||||||
{
|
{
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
namespace Icinga\Module\Director\Import;
|
namespace Icinga\Module\Director\Import;
|
||||||
|
|
||||||
use Icinga\Data\ResourceFactory;
|
use Icinga\Data\ResourceFactory;
|
||||||
|
use Icinga\Module\Director\Hook\ImportSourceHook;
|
||||||
use Icinga\Module\Director\Util;
|
use Icinga\Module\Director\Util;
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Web\Hook\ImportSourceHook;
|
|
||||||
|
|
||||||
class ImportSourceLdap extends ImportSourceHook
|
class ImportSourceLdap extends ImportSourceHook
|
||||||
{
|
{
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
namespace Icinga\Module\Director\Import;
|
namespace Icinga\Module\Director\Import;
|
||||||
|
|
||||||
use Icinga\Data\Db\DbConnection;
|
use Icinga\Data\Db\DbConnection;
|
||||||
|
use Icinga\Module\Director\Hook\ImportSourceHook;
|
||||||
use Icinga\Module\Director\Util;
|
use Icinga\Module\Director\Util;
|
||||||
use Icinga\Module\Director\Web\Form\QuickForm;
|
use Icinga\Module\Director\Web\Form\QuickForm;
|
||||||
use Icinga\Module\Director\Web\Hook\ImportSourceHook;
|
|
||||||
|
|
||||||
class ImportSourceSql extends ImportSourceHook
|
class ImportSourceSql extends ImportSourceHook
|
||||||
{
|
{
|
||||||
|
15
run.php
15
run.php
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
$this->provideHook('monitoring/HostActions');
|
$this->provideHook('monitoring/HostActions');
|
||||||
$this->provideHook('monitoring/ServiceActions');
|
$this->provideHook('monitoring/ServiceActions');
|
||||||
$this->registerHook('Director\\ImportSource', '\\Icinga\\Module\\Director\\Import\\ImportSourceSql', 'sql');
|
|
||||||
$this->registerHook('Director\\ImportSource', '\\Icinga\\Module\\Director\\Import\\ImportSourceLdap', 'ldap');
|
$this->provideHook('director/ImportSource', '\\Icinga\\Module\\Director\\Import\\ImportSourceSql');
|
||||||
|
$this->provideHook('director/ImportSource', '\\Icinga\\Module\\Director\\Import\\ImportSourceLdap');
|
||||||
$this->provideHook('director/ImportSource', '\\Icinga\\Module\\Director\\Import\\ImportSourceCoreApi');
|
$this->provideHook('director/ImportSource', '\\Icinga\\Module\\Director\\Import\\ImportSourceCoreApi');
|
||||||
|
|
||||||
$this->registerHook('Director\\DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeString', 'string');
|
$this->provideHook('director/DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeString');
|
||||||
$this->registerHook('Director\\DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeNumber', 'number');
|
$this->provideHook('director/DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeNumber');
|
||||||
$this->registerHook('Director\\DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeTime', 'time');
|
$this->provideHook('director/DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeTime');
|
||||||
$this->registerHook('Director\\DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeDatalist', 'datalist');
|
$this->provideHook('director/DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeDatalist');
|
||||||
$this->registerHook('Director\\DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeSqlQuery', 'sqlquery');
|
$this->provideHook('director/DataType', '\\Icinga\\Module\\Director\\DataType\\DataTypeSqlQuery');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user