mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-22 13:24:24 +02:00
Setup: show monitoring config summary even with Icinga 2 API as command transport
fixes #13459
This commit is contained in:
parent
5797ce52d7
commit
0665ca387b
Binary file not shown.
@ -8,7 +8,7 @@ msgstr ""
|
|||||||
"Project-Id-Version: Monitoring Module (2.1.2)\n"
|
"Project-Id-Version: Monitoring Module (2.1.2)\n"
|
||||||
"Report-Msgid-Bugs-To: dev@icinga.org\n"
|
"Report-Msgid-Bugs-To: dev@icinga.org\n"
|
||||||
"POT-Creation-Date: 2016-02-29 14:40+0000\n"
|
"POT-Creation-Date: 2016-02-29 14:40+0000\n"
|
||||||
"PO-Revision-Date: 2016-04-26 12:08+0200\n"
|
"PO-Revision-Date: 2016-12-07 17:02+0100\n"
|
||||||
"Last-Translator: Thomas Gelf <thomas@gelf.net>\n"
|
"Last-Translator: Thomas Gelf <thomas@gelf.net>\n"
|
||||||
"Language: de_DE\n"
|
"Language: de_DE\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -16,7 +16,7 @@ msgstr ""
|
|||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"X-Generator: Poedit 1.8.7.1\n"
|
"X-Generator: Poedit 1.8.11\n"
|
||||||
|
|
||||||
#: /vagrant/modules/monitoring/application/controllers/ChartController.php:375
|
#: /vagrant/modules/monitoring/application/controllers/ChartController.php:375
|
||||||
msgid " Down Hosts (Handled)"
|
msgid " Down Hosts (Handled)"
|
||||||
@ -1816,7 +1816,16 @@ msgstr ""
|
|||||||
"Backend mit dem Namen “%s” und die weiter unten spezifizierte Ressourcen "
|
"Backend mit dem Namen “%s” und die weiter unten spezifizierte Ressourcen "
|
||||||
"abrufen:"
|
"abrufen:"
|
||||||
|
|
||||||
#: /vagrant/modules/monitoring/library/Monitoring/TransportStep.php:76
|
#: /vagrant/modules/monitoring/library/Monitoring/TransportStep.php:87
|
||||||
|
msgid ""
|
||||||
|
"Icinga Web 2 will use the Icinga 2 API to send commands to your monitoring "
|
||||||
|
"instance by using the connection details listed below:"
|
||||||
|
msgstr ""
|
||||||
|
"Icinga Web 2 wird die Icinga 2 API verwenden, um Kommandos an Ihre "
|
||||||
|
"Monitoringinstanz zu senden. Dazu werden die folgenden "
|
||||||
|
"Verbindungseinstellungen verwendet:"
|
||||||
|
|
||||||
|
#: /vagrant/modules/monitoring/library/Monitoring/TransportStep.php:49
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Icinga Web 2 will use the named pipe located at \"%s\" to send commands to "
|
"Icinga Web 2 will use the named pipe located at \"%s\" to send commands to "
|
||||||
@ -1919,8 +1928,8 @@ msgstr ""
|
|||||||
#: /vagrant/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:45
|
#: /vagrant/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:45
|
||||||
msgid ""
|
msgid ""
|
||||||
"If you work with other administrators, you may find it useful to share "
|
"If you work with other administrators, you may find it useful to share "
|
||||||
"information about the host or service that is having problems. Make sure "
|
"information about the host or service that is having problems. Make sure you "
|
||||||
"you enter a brief description of what you are doing."
|
"enter a brief description of what you are doing."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Wenn Sie mit anderen Administratoren zusammenarbeiten, werden Sie es "
|
"Wenn Sie mit anderen Administratoren zusammenarbeiten, werden Sie es "
|
||||||
"nützlich finden, Informationen zu Hosts oder Services mit Problemen "
|
"nützlich finden, Informationen zu Hosts oder Services mit Problemen "
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
namespace Icinga\Module\Monitoring;
|
namespace Icinga\Module\Monitoring;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use Icinga\Exception\ProgrammingError;
|
||||||
use Icinga\Module\Setup\Step;
|
use Icinga\Module\Setup\Step;
|
||||||
use Icinga\Application\Config;
|
use Icinga\Application\Config;
|
||||||
use Icinga\Exception\IcingaException;
|
use Icinga\Exception\IcingaException;
|
||||||
@ -40,47 +41,83 @@ class TransportStep extends Step
|
|||||||
|
|
||||||
public function getSummary()
|
public function getSummary()
|
||||||
{
|
{
|
||||||
$pageTitle = '<h2>' . mt('monitoring', 'Command Transport', 'setup.page.title') . '</h2>';
|
switch ($this->data['transportConfig']['transport']) {
|
||||||
|
case 'local':
|
||||||
if (isset($this->data['transportConfig']['host'])) {
|
$details = '<p>' . sprintf(
|
||||||
$pipeHtml = '<p>' . sprintf(
|
mt(
|
||||||
mt(
|
'monitoring',
|
||||||
'monitoring',
|
'Icinga Web 2 will use the named pipe located at "%s"'
|
||||||
'Icinga Web 2 will use the named pipe located on a remote machine at "%s" to send commands'
|
. ' to send commands to your monitoring instance.'
|
||||||
. ' to your monitoring instance by using the connection details listed below:'
|
),
|
||||||
),
|
$this->data['transportConfig']['path']
|
||||||
$this->data['transportConfig']['path']
|
) . '</p>';
|
||||||
) . '</p>';
|
break;
|
||||||
|
case 'remote':
|
||||||
$pipeHtml .= ''
|
$details = '<p>'
|
||||||
. '<table>'
|
. sprintf(
|
||||||
. '<tbody>'
|
mt(
|
||||||
. '<tr>'
|
'monitoring',
|
||||||
. '<td><strong>' . mt('monitoring', 'Remote Host') . '</strong></td>'
|
'Icinga Web 2 will use the named pipe located on a remote machine at "%s" to send commands'
|
||||||
. '<td>' . $this->data['transportConfig']['host'] . '</td>'
|
. ' to your monitoring instance by using the connection details listed below:'
|
||||||
. '</tr>'
|
),
|
||||||
. '<tr>'
|
$this->data['transportConfig']['path']
|
||||||
. '<td><strong>' . mt('monitoring', 'Remote SSH Port') . '</strong></td>'
|
)
|
||||||
. '<td>' . $this->data['transportConfig']['port'] . '</td>'
|
. '</p>'
|
||||||
. '</tr>'
|
. '<table>'
|
||||||
. '<tr>'
|
. '<tbody>'
|
||||||
. '<td><strong>' . mt('monitoring', 'Remote SSH User') . '</strong></td>'
|
. '<tr>'
|
||||||
. '<td>' . $this->data['transportConfig']['user'] . '</td>'
|
. '<td><strong>' . mt('monitoring', 'Remote Host') . '</strong></td>'
|
||||||
. '</tr>'
|
. '<td>' . $this->data['transportConfig']['host'] . '</td>'
|
||||||
. '</tbody>'
|
. '</tr>'
|
||||||
. '</table>';
|
. '<tr>'
|
||||||
} else {
|
. '<td><strong>' . mt('monitoring', 'Remote SSH Port') . '</strong></td>'
|
||||||
$pipeHtml = '<p>' . sprintf(
|
. '<td>' . $this->data['transportConfig']['port'] . '</td>'
|
||||||
mt(
|
. '</tr>'
|
||||||
'monitoring',
|
. '<tr>'
|
||||||
'Icinga Web 2 will use the named pipe located at "%s"'
|
. '<td><strong>' . mt('monitoring', 'Remote SSH User') . '</strong></td>'
|
||||||
. ' to send commands to your monitoring instance.'
|
. '<td>' . $this->data['transportConfig']['user'] . '</td>'
|
||||||
),
|
. '</tr>'
|
||||||
$this->data['transportConfig']['path']
|
. '</tbody>'
|
||||||
) . '</p>';
|
. '</table>';
|
||||||
|
break;
|
||||||
|
case 'api':
|
||||||
|
$details = '<p>'
|
||||||
|
. mt(
|
||||||
|
'monitoring',
|
||||||
|
'Icinga Web 2 will use the Icinga 2 API to send commands'
|
||||||
|
. ' to your monitoring instance by using the connection details listed below:'
|
||||||
|
)
|
||||||
|
. '</p>'
|
||||||
|
. '<table>'
|
||||||
|
. '<tbody>'
|
||||||
|
. '<tr>'
|
||||||
|
. '<td><strong>' . mt('monitoring', 'Host') . '</strong></td>'
|
||||||
|
. '<td>' . $this->data['transportConfig']['host'] . '</td>'
|
||||||
|
. '</tr>'
|
||||||
|
. '<tr>'
|
||||||
|
. '<td><strong>' . mt('monitoring', 'Port') . '</strong></td>'
|
||||||
|
. '<td>' . $this->data['transportConfig']['port'] . '</td>'
|
||||||
|
. '</tr>'
|
||||||
|
. '<tr>'
|
||||||
|
. '<td><strong>' . mt('monitoring', 'Username') . '</strong></td>'
|
||||||
|
. '<td>' . $this->data['transportConfig']['username'] . '</td>'
|
||||||
|
. '</tr>'
|
||||||
|
. '<tr>'
|
||||||
|
. '<td><strong>' . mt('monitoring', 'Password') . '</strong></td>'
|
||||||
|
. '<td>' . str_repeat('*', strlen($this->data['transportConfig']['password'])) . '</td>'
|
||||||
|
. '</tr>'
|
||||||
|
. '</tbody>'
|
||||||
|
. '</table>';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ProgrammingError(
|
||||||
|
'Unknown command transport type: %s',
|
||||||
|
$this->data['transportConfig']['transport']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $pageTitle . '<div class="topic">' . $pipeHtml . '</div>';
|
return '<h2>' . mt('monitoring', 'Command Transport', 'setup.page.title') . '</h2>'
|
||||||
|
. '<div class="topic">' . $details . '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getReport()
|
public function getReport()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user