IcingaEndpoint: rename address to host
This commit is contained in:
parent
e8c90ebb6b
commit
cbd09c69f0
|
@ -34,7 +34,7 @@ class IcingaEndpointForm extends DirectorObjectForm
|
|||
));
|
||||
}
|
||||
|
||||
$this->addElement('text', 'address', array(
|
||||
$this->addElement('text', 'host', array(
|
||||
'label' => $this->translate('Endpoint address'),
|
||||
'description' => $this->translate('IP address / hostname of remote node')
|
||||
));
|
||||
|
|
|
@ -15,7 +15,7 @@ class IcingaEndpointTable extends QuickTable
|
|||
return array(
|
||||
'id' => 'e.id',
|
||||
'endpoint' => 'e.object_name',
|
||||
'address' => 'e.address',
|
||||
'host' => "(CASE WHEN e.host IS NULL THEN NULL ELSE CONCAT(e.host || ':' || COALESCE(e.port, 5665)) END)",
|
||||
'zone' => 'z.object_name',
|
||||
);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class IcingaEndpointTable extends QuickTable
|
|||
$view = $this->view();
|
||||
return array(
|
||||
'endpoint' => $view->translate('Endpoint'),
|
||||
'address' => $view->translate('Address'),
|
||||
'host' => $view->translate('Host'),
|
||||
'zone' => $view->translate('Zone'),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ class IcingaEndpoint extends IcingaObject
|
|||
'id' => null,
|
||||
'zone_id' => null,
|
||||
'object_name' => null,
|
||||
'address' => null,
|
||||
'host' => null,
|
||||
'port' => null,
|
||||
'log_duration' => null,
|
||||
'object_type' => null,
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE icinga_endpoint
|
||||
MODIFY object_type ENUM('object', 'template', 'external_object') NOT NULL,
|
||||
ADD COLUMN host VARCHAR(255) DEFAULT NULL COMMENT 'IP address / hostname of remote node' AFTER object_name,
|
||||
DROP column address;
|
||||
|
|
@ -322,10 +322,10 @@ CREATE TABLE icinga_endpoint (
|
|||
id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
|
||||
zone_id INT(10) UNSIGNED DEFAULT NULL,
|
||||
object_name VARCHAR(255) NOT NULL,
|
||||
address VARCHAR(255) DEFAULT NULL COMMENT 'IP address / hostname of remote node',
|
||||
host VARCHAR(255) DEFAULT NULL COMMENT 'IP address / hostname of remote node',
|
||||
port SMALLINT UNSIGNED DEFAULT NULL COMMENT '5665 if not set',
|
||||
log_duration VARCHAR(32) DEFAULT NULL COMMENT '1d if not set',
|
||||
object_type ENUM('object', 'template') NOT NULL,
|
||||
object_type ENUM('object', 'template', 'external_object') NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE INDEX object_name (object_name),
|
||||
CONSTRAINT icinga_endpoint_zone
|
||||
|
|
Loading…
Reference in New Issue