mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
Merge branch 'master' of git.icinga.org:icingaweb2-module-director
This commit is contained in:
commit
84a3de8336
@ -203,6 +203,11 @@ abstract class DirectorObjectForm extends QuickForm
|
||||
$this->addHidden('id');
|
||||
}
|
||||
$this->setDefaults($this->object->getProperties());
|
||||
|
||||
if ($submit = $this->getElement('submit')) {
|
||||
$this->removeElement('submit');
|
||||
}
|
||||
|
||||
if ($this->object->supportsGroups()) {
|
||||
$this->getElement('groups')->setValue(
|
||||
implode(', ', $this->object->groups()->listGroupNames())
|
||||
@ -229,6 +234,10 @@ abstract class DirectorObjectForm extends QuickForm
|
||||
*/
|
||||
}
|
||||
|
||||
if ($submit) {
|
||||
$this->addElement($submit);
|
||||
}
|
||||
|
||||
if (! $this->hasBeenSubmitted()) {
|
||||
$this->beforeValidation($this->object->getProperties());
|
||||
}
|
||||
|
15
schema/mysql-changes/upgrade_21.sql
Normal file
15
schema/mysql-changes/upgrade_21.sql
Normal file
@ -0,0 +1,15 @@
|
||||
DROP TABLE director_datalist_value;
|
||||
|
||||
CREATE TABLE director_datalist_entry (
|
||||
list_id INT(10) UNSIGNED NOT NULL,
|
||||
entry_name VARCHAR(255) DEFAULT NULL,
|
||||
entry_value TEXT DEFAULT NULL,
|
||||
format enum ('string', 'expression', 'json'),
|
||||
PRIMARY KEY (list_id, entry_name),
|
||||
CONSTRAINT director_datalist_value_datalist
|
||||
FOREIGN KEY datalist (list_id)
|
||||
REFERENCES director_datalist (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
@ -100,12 +100,12 @@ CREATE TABLE director_datalist (
|
||||
UNIQUE KEY list_name (list_name)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE director_datalist_value (
|
||||
CREATE TABLE director_datalist_entry (
|
||||
list_id INT(10) UNSIGNED NOT NULL,
|
||||
value_name VARCHAR(255) DEFAULT NULL,
|
||||
value_expression TEXT DEFAULT NULL,
|
||||
entry_name VARCHAR(255) DEFAULT NULL,
|
||||
entry_value TEXT DEFAULT NULL,
|
||||
format enum ('string', 'expression', 'json'),
|
||||
PRIMARY KEY (list_id, value_name),
|
||||
PRIMARY KEY (list_id, entry_name),
|
||||
CONSTRAINT director_datalist_value_datalist
|
||||
FOREIGN KEY datalist (list_id)
|
||||
REFERENCES director_datalist (id)
|
||||
|
17
schema/pgsql-changes/upgrade_21.sql
Normal file
17
schema/pgsql-changes/upgrade_21.sql
Normal file
@ -0,0 +1,17 @@
|
||||
DROP TABLE director_datalist_value;
|
||||
|
||||
CREATE TABLE director_datalist_entry (
|
||||
list_id integer NOT NULL,
|
||||
entry_name character varying(255) DEFAULT NULL,
|
||||
entry_value text DEFAULT NULL,
|
||||
format enum_property_format,
|
||||
PRIMARY KEY (list_id, entry_name),
|
||||
CONSTRAINT director_datalist_entry_datalist
|
||||
FOREIGN KEY (list_id)
|
||||
REFERENCES director_datalist (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX datalist_entry_datalist ON director_datalist_entry (list_id);
|
||||
|
@ -134,20 +134,20 @@ CREATE TABLE director_datalist (
|
||||
CREATE UNIQUE INDEX datalist_list_name ON director_datalist (list_name);
|
||||
|
||||
|
||||
CREATE TABLE director_datalist_value (
|
||||
CREATE TABLE director_datalist_entry (
|
||||
list_id integer NOT NULL,
|
||||
value_name character varying(255) DEFAULT NULL,
|
||||
value_expression text DEFAULT NULL,
|
||||
entry_name character varying(255) DEFAULT NULL,
|
||||
entry_value text DEFAULT NULL,
|
||||
format enum_property_format,
|
||||
PRIMARY KEY (list_id, value_name),
|
||||
CONSTRAINT director_datalist_value_datalist
|
||||
PRIMARY KEY (list_id, entry_name),
|
||||
CONSTRAINT director_datalist_entry_datalist
|
||||
FOREIGN KEY (list_id)
|
||||
REFERENCES director_datalist (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX datalist_value_datalist ON director_datalist_value (list_id);
|
||||
CREATE INDEX datalist_entry_datalist ON director_datalist_entry (list_id);
|
||||
|
||||
|
||||
CREATE TABLE director_datatype (
|
||||
|
Loading…
x
Reference in New Issue
Block a user