mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 00:04:05 +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()
|
public function setup()
|
||||||
{
|
{
|
||||||
$availableTypes = array(
|
$availableTypes = [
|
||||||
'host' => $this->translate('Host'),
|
'host' => $this->translate('Host'),
|
||||||
'hostgroup' => $this->translate('Host Group'),
|
'hostgroup' => $this->translate('Host Group'),
|
||||||
'service' => $this->translate('Service'),
|
'service' => $this->translate('Service'),
|
||||||
'servicegroup' => $this->translate('Service Group'),
|
'servicegroup' => $this->translate('Service Group'),
|
||||||
'serviceSet' => $this->translate('Service Set'),
|
'serviceSet' => $this->translate('Service Set'),
|
||||||
'user' => $this->translate('User'),
|
'user' => $this->translate('User'),
|
||||||
'usergroup' => $this->translate('User Group'),
|
'usergroup' => $this->translate('User Group'),
|
||||||
'datalistEntry' => $this->translate('Data List Entry'),
|
'datalistEntry' => $this->translate('Data List Entry'),
|
||||||
'command' => $this->translate('Command'),
|
'command' => $this->translate('Command'),
|
||||||
'timePeriod' => $this->translate('Time Period'),
|
'timePeriod' => $this->translate('Time Period'),
|
||||||
'endpoint' => $this->translate('Endpoint'),
|
'notification' => $this->translate('Notification'),
|
||||||
'zone' => $this->translate('Zone'),
|
'scheduledDowntime' => $this->translate('Scheduled Downtime'),
|
||||||
);
|
'dependency' => $this->translate('Dependency'),
|
||||||
|
'endpoint' => $this->translate('Endpoint'),
|
||||||
|
'zone' => $this->translate('Zone'),
|
||||||
|
];
|
||||||
|
|
||||||
$this->addElement('text', 'rule_name', array(
|
$this->addElement('text', 'rule_name', array(
|
||||||
'label' => $this->translate('Rule name'),
|
'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',
|
'endpoint',
|
||||||
'zone',
|
'zone',
|
||||||
'timePeriod',
|
'timePeriod',
|
||||||
'serviceSet'
|
'serviceSet',
|
||||||
|
'scheduledDowntime',
|
||||||
|
'notification',
|
||||||
|
'dependency'
|
||||||
) NOT NULL,
|
) NOT NULL,
|
||||||
update_policy ENUM('merge', 'override', 'ignore') NOT NULL,
|
update_policy ENUM('merge', 'override', 'ignore') NOT NULL,
|
||||||
purge_existing ENUM('y', 'n') NOT NULL DEFAULT 'n',
|
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',
|
'endpoint',
|
||||||
'zone',
|
'zone',
|
||||||
'timePeriod',
|
'timePeriod',
|
||||||
'serviceSet'
|
'serviceSet',
|
||||||
|
'scheduledDowntime',
|
||||||
|
'notification',
|
||||||
|
'dependency'
|
||||||
);
|
);
|
||||||
CREATE TYPE enum_sync_rule_update_policy AS ENUM('merge', 'override', 'ignore');
|
CREATE TYPE enum_sync_rule_update_policy AS ENUM('merge', 'override', 'ignore');
|
||||||
CREATE TYPE enum_sync_property_merge_policy AS ENUM('override', 'merge');
|
CREATE TYPE enum_sync_property_merge_policy AS ENUM('override', 'merge');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user