IcingaHost: add display_name
This commit is contained in:
parent
461fbe6b92
commit
8711e877ab
|
@ -14,6 +14,11 @@ class IcingaHostForm extends DirectorObjectForm
|
|||
'required' => true,
|
||||
'description' => $this->translate('Icinga object name for this host')
|
||||
));
|
||||
|
||||
$this->addElement('text', 'display_name', array(
|
||||
'label' => $this->translate('Display name'),
|
||||
'description' => $this->translate('Alternative name for this host')
|
||||
));
|
||||
|
||||
$this->addElement('text', 'address', array(
|
||||
'label' => $this->translate('Host address'),
|
||||
|
|
|
@ -11,6 +11,7 @@ class IcingaHost extends IcingaObject
|
|||
protected $defaultProperties = array(
|
||||
'id' => null,
|
||||
'object_name' => null,
|
||||
'display_name' => null,
|
||||
'address' => null,
|
||||
'address6' => null,
|
||||
'check_command_id' => null,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
ALTER TABLE icinga_host
|
||||
ADD COLUMN display_name VARCHAR(255) DEFAULT NULL,
|
||||
ADD INDEX search_idx (display_name);
|
||||
|
|
@ -349,6 +349,7 @@ CREATE TABLE icinga_endpoint_inheritance (
|
|||
CREATE TABLE icinga_host (
|
||||
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
object_name VARCHAR(255) NOT NULL,
|
||||
display_name VARCHAR(255) DEFAULT NULL,
|
||||
address VARCHAR(64) DEFAULT NULL,
|
||||
address6 VARCHAR(45) DEFAULT NULL,
|
||||
check_command_id INT(10) UNSIGNED DEFAULT NULL,
|
||||
|
@ -375,6 +376,7 @@ CREATE TABLE icinga_host (
|
|||
object_type ENUM('object', 'template') NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE INDEX object_name (object_name, zone_id),
|
||||
KEY search_idx (display_name),
|
||||
CONSTRAINT icinga_host_zone
|
||||
FOREIGN KEY zone (zone_id)
|
||||
REFERENCES icinga_zone (id)
|
||||
|
|
Loading…
Reference in New Issue