mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 15:54:03 +02:00
Sync: allow notification, dependency, scheduled dt
fixes #925 fixes #1209 fixes #1211 fixes #1212
This commit is contained in:
parent
7d7c4defdf
commit
4fcda464e8
@ -8,20 +8,23 @@ class SyncRuleForm extends DirectorObjectForm
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$availableTypes = array(
|
||||
'host' => $this->translate('Host'),
|
||||
'hostgroup' => $this->translate('Host Group'),
|
||||
'service' => $this->translate('Service'),
|
||||
'servicegroup' => $this->translate('Service Group'),
|
||||
'serviceSet' => $this->translate('Service Set'),
|
||||
'user' => $this->translate('User'),
|
||||
'usergroup' => $this->translate('User Group'),
|
||||
'datalistEntry' => $this->translate('Data List Entry'),
|
||||
'command' => $this->translate('Command'),
|
||||
'timePeriod' => $this->translate('Time Period'),
|
||||
'endpoint' => $this->translate('Endpoint'),
|
||||
'zone' => $this->translate('Zone'),
|
||||
);
|
||||
$availableTypes = [
|
||||
'host' => $this->translate('Host'),
|
||||
'hostgroup' => $this->translate('Host Group'),
|
||||
'service' => $this->translate('Service'),
|
||||
'servicegroup' => $this->translate('Service Group'),
|
||||
'serviceSet' => $this->translate('Service Set'),
|
||||
'user' => $this->translate('User'),
|
||||
'usergroup' => $this->translate('User Group'),
|
||||
'datalistEntry' => $this->translate('Data List Entry'),
|
||||
'command' => $this->translate('Command'),
|
||||
'timePeriod' => $this->translate('Time Period'),
|
||||
'notification' => $this->translate('Notification'),
|
||||
'scheduledDowntime' => $this->translate('Scheduled Downtime'),
|
||||
'dependency' => $this->translate('Dependency'),
|
||||
'endpoint' => $this->translate('Endpoint'),
|
||||
'zone' => $this->translate('Zone'),
|
||||
];
|
||||
|
||||
$this->addElement('text', 'rule_name', array(
|
||||
'label' => $this->translate('Rule name'),
|
||||
|
21
schema/mysql-migrations/upgrade_166.sql
Normal file
21
schema/mysql-migrations/upgrade_166.sql
Normal file
@ -0,0 +1,21 @@
|
||||
ALTER TABLE sync_rule MODIFY object_type enum(
|
||||
'host',
|
||||
'service',
|
||||
'command',
|
||||
'user',
|
||||
'hostgroup',
|
||||
'servicegroup',
|
||||
'usergroup',
|
||||
'datalistEntry',
|
||||
'endpoint',
|
||||
'zone',
|
||||
'timePeriod',
|
||||
'serviceSet',
|
||||
'scheduledDowntime',
|
||||
'notification',
|
||||
'dependency'
|
||||
) NOT NULL;
|
||||
|
||||
INSERT INTO director_schema_migration
|
||||
(schema_version, migration_time)
|
||||
VALUES (166, NOW());
|
@ -1484,7 +1484,10 @@ CREATE TABLE sync_rule (
|
||||
'endpoint',
|
||||
'zone',
|
||||
'timePeriod',
|
||||
'serviceSet'
|
||||
'serviceSet',
|
||||
'scheduledDowntime',
|
||||
'notification',
|
||||
'dependency'
|
||||
) NOT NULL,
|
||||
update_policy ENUM('merge', 'override', 'ignore') NOT NULL,
|
||||
purge_existing ENUM('y', 'n') NOT NULL DEFAULT 'n',
|
||||
|
7
schema/pgsql-migrations/upgrade_166.sql
Normal file
7
schema/pgsql-migrations/upgrade_166.sql
Normal file
@ -0,0 +1,7 @@
|
||||
ALTER TYPE enum_sync_rule_object_type ADD VALUE 'scheduledDowntime';
|
||||
ALTER TYPE enum_sync_rule_object_type ADD VALUE 'notification';
|
||||
ALTER TYPE enum_sync_rule_object_type ADD VALUE 'dependency';
|
||||
|
||||
INSERT INTO director_schema_migration
|
||||
(schema_version, migration_time)
|
||||
VALUES (166, NOW());
|
@ -31,7 +31,10 @@ CREATE TYPE enum_sync_rule_object_type AS ENUM(
|
||||
'endpoint',
|
||||
'zone',
|
||||
'timePeriod',
|
||||
'serviceSet'
|
||||
'serviceSet',
|
||||
'scheduledDowntime',
|
||||
'notification',
|
||||
'dependency'
|
||||
);
|
||||
CREATE TYPE enum_sync_rule_update_policy AS ENUM('merge', 'override', 'ignore');
|
||||
CREATE TYPE enum_sync_property_merge_policy AS ENUM('override', 'merge');
|
||||
|
Loading…
x
Reference in New Issue
Block a user