From d04eceaeb24c9da5f5a3633c4032c087730d0cd9 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 28 Oct 2014 13:50:42 +0100 Subject: [PATCH] monitoring: Remove 'Remote' prefix from the remote instance form elements' labels The 'Remote' prefix of the remote instance form elements' labels is superfluous because the instance's type already tells that it's remote. --- .../Config/Instance/RemoteInstanceForm.php | 73 ++++++++++--------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php b/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php index 80bacee248..fbd2ff14b8 100644 --- a/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php +++ b/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php @@ -9,60 +9,65 @@ class RemoteInstanceForm extends Form { + /** + * (non-PHPDoc) + * @see Form::init() For the method documentation. + */ public function init() { $this->setName('form_config_monitoring_instance_remote'); } /** - * @see Form::createElements() + * (non-PHPDoc) + * @see Form::createElements() For the method documentation. */ - public function createElements(array $formData) + public function createElements(array $formData = array()) { - $this->addElement( - 'text', - 'host', + $this->addElements(array( array( - 'required' => true, - 'label' => mt('monitoring', 'Remote Host'), - 'description' => mt('monitoring', - 'Enter the hostname or address of the machine on which the icinga instance is running' + 'text', + 'host', + array( + 'required' => true, + 'label' => mt('monitoring', 'Host'), + 'description' => mt('monitoring', + 'Hostname or address of the remote Icinga instance' + ) ) - ) - ); - $this->addElement( + ), new Number( array( 'required' => true, 'name' => 'port', - 'label' => mt('monitoring', 'Remote SSH Port'), - 'description' => mt('monitoring', 'Enter the ssh port to use for connecting to the remote icinga instance'), + 'label' => mt('monitoring', 'Port'), + 'description' => mt('monitoring', 'SSH port to connect to on the remote Icinga instance'), 'value' => 22 ) - ) - ); - $this->addElement( - 'text', - 'user', + ), array( - 'required' => true, - 'label' => mt('monitoring', 'Remote SSH User'), - 'description' => mt('monitoring', - 'Enter the username to use for connecting to the remote machine or leave blank for default' + 'text', + 'user', + array( + 'required' => true, + 'label' => mt('monitoring', 'User'), + 'description' => mt('monitoring', + 'User to log in as on the remote Icinga instance. Please note that key-based SSH login must be' + . ' possible for this user' + ) ) - ) - ); - $this->addElement( - 'text', - 'path', + ), array( - 'required' => true, - 'label' => mt('monitoring', 'Remote Filepath'), - 'value' => '/usr/local/icinga/var/rw/icinga.cmd', - 'description' => mt('monitoring', 'The file path where the icinga commandpipe can be found') + 'text', + 'path', + array( + 'required' => true, + 'label' => mt('monitoring', 'Command File'), + 'value' => '/usr/local/icinga/var/rw/icinga.cmd', + 'description' => mt('monitoring', 'Path to the Icinga command file on the remote Icinga instance') + ) ) - ); - + )); return $this; } }