ProvidedHook/Monitoring: translate links

fixes #1945
This commit is contained in:
Thomas Gelf 2019-09-25 15:55:23 +02:00
parent c0998e18b3
commit dad3b76d50
2 changed files with 3 additions and 3 deletions

View File

@ -31,14 +31,14 @@ class HostActions extends HostActionsHook
} }
$hostname = $host->host_name; $hostname = $host->host_name;
if (Util::hasPermission('director/inspect')) { if (Util::hasPermission('director/inspect')) {
$actions['Inspect'] = Url::fromPath( $actions[mt('director', 'Inspect')] = Url::fromPath(
'director/inspect/object', 'director/inspect/object',
array('type' => 'host', 'plural' => 'hosts', 'name' => $hostname) array('type' => 'host', 'plural' => 'hosts', 'name' => $hostname)
); );
} }
if (Util::hasPermission('director/hosts') && IcingaHost::exists($hostname, $db)) { if (Util::hasPermission('director/hosts') && IcingaHost::exists($hostname, $db)) {
$actions['Modify'] = Url::fromPath( $actions[mt('director', 'Modify')] = Url::fromPath(
'director/host/edit', 'director/host/edit',
array('name' => $hostname) array('name' => $hostname)
); );

View File

@ -37,7 +37,7 @@ class ServiceActions extends ServiceActionsHook
$hostname = $service->host_name; $hostname = $service->host_name;
if (Util::hasPermission('director/inspect')) { if (Util::hasPermission('director/inspect')) {
$actions['Inspect'] = Url::fromPath('director/inspect/object', [ $actions[mt('director', 'Inspect')] = Url::fromPath('director/inspect/object', [
'type' => 'service', 'type' => 'service',
'plural' => 'services', 'plural' => 'services',
'name' => sprintf( 'name' => sprintf(