mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Translation: use translation for monitoring/views
Just a bunch of translation-helper calls refs #6339
This commit is contained in:
parent
360ac87550
commit
b47cec3e02
@ -1,14 +1,14 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs->render($this); ?>
|
<?= $this->tabs->render($this); ?>
|
||||||
<div style="margin: 1em" class="dontprint">
|
<div style="margin: 1em" class="dontprint">
|
||||||
Sort by <?= $this->sortControl->render($this); ?>
|
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this); ?>
|
||||||
</div>
|
</div>
|
||||||
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?php if (empty($history)): ?>
|
<?php if (empty($history)): ?>
|
||||||
No entries found
|
<?= $this->translate('No entries found') ?>
|
||||||
</div>
|
</div>
|
||||||
<?php return; endif ?>
|
<?php return; endif ?>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ $helper = $this->getHelper('MonitoringState');
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
<div style="margin: 1em;" class="dontprint">
|
<div style="margin: 1em;" class="dontprint">
|
||||||
Sort by <?= $this->sortControl->render($this); ?>
|
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?= $this->paginationControl($hosts, null, null, array('preserve' => $this->preserve)); ?>
|
<?= $this->paginationControl($hosts, null, null, array('preserve' => $this->preserve)); ?>
|
||||||
@ -15,7 +15,7 @@ Sort by <?= $this->sortControl->render($this); ?>
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($hosts->count() === 0) {
|
if ($hosts->count() === 0) {
|
||||||
echo 'No host found</div>';
|
echo $this->translate('No host found') . '</div>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -78,10 +78,10 @@ if ($hosts->count() === 0) {
|
|||||||
|
|
||||||
<strong><?= ucfirst($helper->monitoringState($host, 'host')); ?></strong><br />
|
<strong><?= ucfirst($helper->monitoringState($host, 'host')); ?></strong><br />
|
||||||
<div class="small-row">
|
<div class="small-row">
|
||||||
Since <?= $this->timeSince($host->host_last_state_change); ?>
|
<?= $this->translate('Since') ?> <?= $this->timeSince($host->host_last_state_change); ?>
|
||||||
<?php if ($host->host_state > 0): ?>
|
<?php if ($host->host_state > 0): ?>
|
||||||
<br />
|
<br />
|
||||||
<strong><?= ($host->host_state_type === '1') ? 'Hard' : 'Soft'; ?> </strong> <?= $host->host_current_check_attempt; ?>/<?= $host->host_max_check_attempts; ?>
|
<strong><?= ($host->host_state_type === '1') ? $this->translate('Hard') : $this->translate('Soft') ?> </strong> <?= $host->host_current_check_attempt; ?>/<?= $host->host_max_check_attempts; ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
<div style="margin: 1em" class="dontprint">
|
<div style="margin: 1em" class="dontprint">
|
||||||
Sort by <?= $this->sortControl->render($this) ?>
|
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?>
|
||||||
|
|
||||||
<?= $this->selectionToolbar('single') ?>
|
<?= $this->selectionToolbar('single') ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs; ?>
|
<?= $this->tabs; ?>
|
||||||
<div style="margin: 1em;" class="dontprint">
|
<div style="margin: 1em;" class="dontprint">
|
||||||
<!--<?= $this->filterBox ?>-->Sort by <?= $this->sortControl ?>
|
<?= $this->translate('Sort by') ?> <?= $this->sortControl ?>
|
||||||
</div>
|
</div>
|
||||||
<?= $this->partial(
|
<?= $this->partial(
|
||||||
'pivottablePagination.phtml',
|
'pivottablePagination.phtml',
|
||||||
|
@ -5,7 +5,7 @@ if (!$this->compact): ?>
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
<div style="margin: 1em;" class="dontprint">
|
<div style="margin: 1em;" class="dontprint">
|
||||||
Sort by <?= $this->sortControl ?>
|
<?= $this->translate('Sort by') ?> <?= $this->sortControl ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?= $this->paginationControl($services, null, null, array('preserve' => $this->preserve)) ?>
|
<?= $this->paginationControl($services, null, null, array('preserve' => $this->preserve)) ?>
|
||||||
@ -39,9 +39,9 @@ foreach ($services as $service):
|
|||||||
?>
|
?>
|
||||||
<tr class="state <?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
|
<tr class="state <?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
|
||||||
<td class="state" title="<?= $helper->getStateTitle($service, 'service'); ?>">
|
<td class="state" title="<?= $helper->getStateTitle($service, 'service'); ?>">
|
||||||
<strong><?= strtoupper($helper->monitoringState($service, 'service')); ?></strong><br />
|
<strong><?= $this->translate(strtoupper($helper->monitoringState($service, 'service'))) ?></strong><br />
|
||||||
|
|
||||||
<?php if (!$this->compact): ?>Since <?php endif ?><?= $this->timeSince($service->service_last_state_change); ?>
|
<?php if (!$this->compact): ?><?= $this->translate('Since') ?> <?php endif ?><?= $this->timeSince($service->service_last_state_change); ?>
|
||||||
<?php if ($service->service_state > 0 && (int) $service->service_state_type === 0): ?>
|
<?php if ($service->service_state > 0 && (int) $service->service_state_type === 0): ?>
|
||||||
<br />
|
<br />
|
||||||
<strong>Soft <?= $service->service_attempt ?></strong>
|
<strong>Soft <?= $service->service_attempt ?></strong>
|
||||||
|
@ -22,19 +22,19 @@ if ($object instanceof Host && $object->host_acknowledged
|
|||||||
|| $object instanceof Service && $object->service_acknowledged): ?>
|
|| $object instanceof Service && $object->service_acknowledged): ?>
|
||||||
<th>Issue acknowledged</th>
|
<th>Issue acknowledged</th>
|
||||||
<td data-base-target="_self"><?= $cf->labelSubmitForm(
|
<td data-base-target="_self"><?= $cf->labelSubmitForm(
|
||||||
'Remove Acknowledgement',
|
$this->translate('Remove Acknowledgement'),
|
||||||
'Remove problem acknowledgement',
|
$this->translate('Remove problem acknowledgement'),
|
||||||
'link-like',
|
'link-like',
|
||||||
'removeacknowledgement',
|
'removeacknowledgement',
|
||||||
$data
|
$data
|
||||||
) ?>
|
) ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<th>Not acknowledged</th>
|
<th><?= $this->translate('Not acknowledged') ?></th>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?= $this->href(
|
<a href="<?= $this->href(
|
||||||
'monitoring/command/acknowledgeproblem',
|
'monitoring/command/acknowledgeproblem',
|
||||||
$data
|
$data
|
||||||
) ?>"><?= $this->icon('acknowledgement_petrol.png') ?> Acknowledge</a>
|
) ?>"><?= $this->icon('acknowledgement_petrol.png') ?> <?= $this->translate('Acknowledge') ?></a>
|
||||||
</td>
|
</td>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -5,8 +5,8 @@ $cf = $this->getHelper('CommandForm');
|
|||||||
?><tr>
|
?><tr>
|
||||||
<th><?= $this->translate('Last check') ?></th>
|
<th><?= $this->translate('Last check') ?></th>
|
||||||
<td data-base-target="_self"><?= $this->img('img/icons/refresh_petrol.png') ?> <?= $cf->labelSubmitForm(
|
<td data-base-target="_self"><?= $this->img('img/icons/refresh_petrol.png') ?> <?= $cf->labelSubmitForm(
|
||||||
'Check now',
|
$this->translate('Check now'),
|
||||||
'Reschedule next check immediately',
|
$this->translate('Reschedule next check immediately'),
|
||||||
'link-like',
|
'link-like',
|
||||||
'reschedulenextcheck',
|
'reschedulenextcheck',
|
||||||
array(
|
array(
|
||||||
|
@ -10,7 +10,7 @@ $data = array(
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr class="newsection">
|
<tr class="newsection">
|
||||||
<th>Passive Checks</th>
|
<th><?= $this->translate('Passive Checks') ?></th>
|
||||||
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
||||||
'',
|
'',
|
||||||
$o->passive_checks_enabled,
|
$o->passive_checks_enabled,
|
||||||
@ -21,7 +21,7 @@ $data = array(
|
|||||||
) ?></td>
|
) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Active Checks</th>
|
<th><?= $this->translate('Active Checks') ?></th>
|
||||||
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
||||||
'',
|
'',
|
||||||
$o->active_checks_enabled,
|
$o->active_checks_enabled,
|
||||||
@ -32,7 +32,7 @@ $data = array(
|
|||||||
) ?></td>
|
) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Notifications</th>
|
<th><?= $this->translate('Notifications') ?></th>
|
||||||
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
||||||
'',
|
'',
|
||||||
$o->notifications_enabled,
|
$o->notifications_enabled,
|
||||||
@ -43,7 +43,7 @@ $data = array(
|
|||||||
) ?></td>
|
) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Event Handler</th>
|
<th><?= $this->translate('Event Handler') ?></th>
|
||||||
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
||||||
'',
|
'',
|
||||||
$o->event_handler_enabled,
|
$o->event_handler_enabled,
|
||||||
@ -54,7 +54,7 @@ $data = array(
|
|||||||
) ?></td>
|
) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Flap Detection</th>
|
<th><?= $this->translate('Flap Detection') ?></th>
|
||||||
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
||||||
'',
|
'',
|
||||||
$o->flap_detection_enabled,
|
$o->flap_detection_enabled,
|
||||||
@ -65,7 +65,7 @@ $data = array(
|
|||||||
) ?></td>
|
) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Obsessing</th>
|
<th><?= $this->translate('Obsessing') ?></th>
|
||||||
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
<td data-base-target="_self"><?= $cf->toggleSubmitForm(
|
||||||
'',
|
'',
|
||||||
$o->obsessing,
|
$o->obsessing,
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<table class="objectstate">
|
<table class="objectstate">
|
||||||
<tr class="state <?= $this->monitoringState($object, 'host') ?><?= $object->host_handled ? ' handled' : '' ?>">
|
<tr class="state <?= $this->monitoringState($object, 'host') ?><?= $object->host_handled ? ' handled' : '' ?>">
|
||||||
<td class="state"<?= $showService ? '' : ' rowspan="2"' ?>>
|
<td class="state"<?= $showService ? '' : ' rowspan="2"' ?>>
|
||||||
<?= $this->util()->getHostStateName($object->host_state) ?><br />
|
<?= $this->translate($this->util()->getHostStateName($object->host_state)) ?><br />
|
||||||
since <?= $this->timeSince($object->host_last_state_change) ?>
|
<?= $this->translate('Since') ?> <?= $this->timeSince($object->host_last_state_change) ?>
|
||||||
</td>
|
</td>
|
||||||
<td><b><?= $this->escape($object->host_name) ?></b><?php
|
<td><b><?= $this->escape($object->host_name) ?></b><?php
|
||||||
if ($object->host_address && $object->host_address !== $object->host_name): ?>
|
if ($object->host_address && $object->host_address !== $object->host_name): ?>
|
||||||
@ -17,10 +17,10 @@
|
|||||||
<?php if ($showService): ?>
|
<?php if ($showService): ?>
|
||||||
<tr class="state <?= $this->monitoringState($object, 'service') ?><?= $object->service_handled ? ' handled' : '' ?>">
|
<tr class="state <?= $this->monitoringState($object, 'service') ?><?= $object->service_handled ? ' handled' : '' ?>">
|
||||||
<td class="state">
|
<td class="state">
|
||||||
<?= $this->util()->getServiceStateName($object->service_state); ?><br />
|
<?= $this->translate($this->util()->getServiceStateName($object->service_state)) ?><br />
|
||||||
since <?= $this->timeSince($object->service_last_state_change) ?>
|
<?= $this->translate('Since') ?> <?= $this->timeSince($object->service_last_state_change) ?>
|
||||||
</td>
|
</td>
|
||||||
<td><b>Service: <?= $this->escape($object->service_description) ?></b>
|
<td><b><?= $this->translate('Service') ?>: <?= $this->escape($object->service_description) ?></b>
|
||||||
|
|
||||||
<?= $this->render('show/components/statusIcons.phtml') ?>
|
<?= $this->render('show/components/statusIcons.phtml') ?>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ if (in_array((int) $object->state, array(0, 99))) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Notifications</th>
|
<th><?= $this->translate('Notifications') ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ if ($object->current_notification_number > 0) {
|
|||||||
$this->translate('%s notications have been sent for this issue'),
|
$this->translate('%s notications have been sent for this issue'),
|
||||||
$object->current_notification_number
|
$object->current_notification_number
|
||||||
) . '<br />' . sprintf(
|
) . '<br />' . sprintf(
|
||||||
'The last one occured %s ago',
|
$this->translate('The last one occured %s ago'),
|
||||||
$this->timeSince($object->last_notification)
|
$this->timeSince($object->last_notification)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -33,12 +33,12 @@ $states = array(
|
|||||||
|
|
||||||
?><div class="controls">
|
?><div class="controls">
|
||||||
<?= $this->render('show/components/header.phtml') ?>
|
<?= $this->render('show/components/header.phtml') ?>
|
||||||
<h1>This object's event history</h1>
|
<h1><?= $this->translate("This object's event history") ?></h1>
|
||||||
<?= $this->paginationControl($this->history, null, null, array('preserve' => $this->preserve)); ?>
|
<?= $this->paginationControl($this->history, null, null, array('preserve' => $this->preserve)); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if($this->history->count() === 0): ?>
|
<?php if($this->history->count() === 0): ?>
|
||||||
No History Available For This Object
|
<?= $this->translate('No History Available For This Object' ?>
|
||||||
</div>
|
</div>
|
||||||
<?php return; endif ?>
|
<?php return; endif ?>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->render('show/components/header.phtml') ?>
|
<?= $this->render('show/components/header.phtml') ?>
|
||||||
<h1>This host's current state</h1>
|
<h1><?= $this->translate("This host's current state") ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" data-base-target="_next">
|
<div class="content" data-base-target="_next">
|
||||||
<?= $this->render('show/components/output.phtml') ?>
|
<?= $this->render('show/components/output.phtml') ?>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->render('show/components/header.phtml') ?>
|
<?= $this->render('show/components/header.phtml') ?>
|
||||||
<h1>This service's current state</h1>
|
<h1><?= $this->translate("This service's current state") ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" data-base-target="_next">
|
<div class="content" data-base-target="_next">
|
||||||
<?= $this->render('show/components/output.phtml') ?>
|
<?= $this->render('show/components/output.phtml') ?>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->render('show/components/header.phtml') ?>
|
<?= $this->render('show/components/header.phtml') ?>
|
||||||
<h1>All services configured on this host</h1>
|
<h1><?= $this->translate('All services configured on this host') ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?= preg_replace('~<table data-base-target="_next"~', '<table data-base-target="_self"', $services) /* TODO: find an elegant solution for this */ ?>
|
<?= preg_replace('~<table data-base-target="_next"~', '<table data-base-target="_self"', $services) /* TODO: find an elegant solution for this */ ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user