mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 14:24:41 +02:00
Merge branch 'feature/dope-layout-5543' of git.icinga.org:icingaweb2 into feature/dope-layout-5543
This commit is contained in:
commit
67011b14ef
@ -19,12 +19,28 @@
|
||||
<?php endif ?>
|
||||
<?= $this->form ?>
|
||||
<div class="footer">
|
||||
Icinga Web 2 © 2013-2015<br><br>
|
||||
<a href="https://www.icinga.org"><?= $this->translate('The Icinga Project'); ?></a>
|
||||
|
|
||||
<a href="http://www.twitter.com/icinga"><?= $this->translate('Icinga on Twitter'); ?></a>
|
||||
|
|
||||
<a href="http://www.facebook.com/icinga"><?= $this->translate('Icinga on Facebook'); ?></a>
|
||||
Icinga Web 2 © 2013-<?= date('Y'); ?><br><br>
|
||||
<?= $this->qlink($this->translate('The Icinga Project'), 'https://www.icinga.org'); ?>
|
||||
<?= $this->qlink(
|
||||
null,
|
||||
'http://www.twitter.com/icinga',
|
||||
null,
|
||||
array(
|
||||
'target' => '_blank',
|
||||
'icon' => 'twitter',
|
||||
'title' => $this->translate('Icinga on Twitter')
|
||||
)
|
||||
); ?>
|
||||
<?= $this->qlink(
|
||||
null,
|
||||
'http://www.facebook.com/icinga',
|
||||
null,
|
||||
array(
|
||||
'target' => '_blank',
|
||||
'icon' => 'facebook-squared',
|
||||
'title' => $this->translate('Icinga on Facebook')
|
||||
)
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -36,11 +36,7 @@ class RemoveAcknowledgementCommandForm extends ObjectsCommandForm
|
||||
),
|
||||
'escape' => false,
|
||||
'ignore' => true,
|
||||
'label' => $this->getView()->icon('cancel') . $this->translatePlural(
|
||||
'Remove problem acknowledgement',
|
||||
'Remove problem acknowledgements',
|
||||
count($this->objects)
|
||||
),
|
||||
'label' => $this->getView()->icon('cancel'),
|
||||
'title' => $this->translatePlural(
|
||||
'Remove problem acknowledgement',
|
||||
'Remove problem acknowledgements',
|
||||
|
@ -26,7 +26,7 @@
|
||||
data-icinga-multiselect-data="comment_id">
|
||||
<tbody>
|
||||
<?php foreach ($comments->peekAhead($this->compact) as $comment): ?>
|
||||
<tr>
|
||||
<tr href="<?= $this->href('monitoring/comment/show', array('comment_id' => $comment->id)) ?>">
|
||||
<td class="icon-col">
|
||||
<?= $this->partial('partials/comment/comment-description.phtml', array('comment' => $comment)); ?>
|
||||
</td>
|
||||
|
@ -40,7 +40,7 @@ if (! $this->compact): ?>
|
||||
$this->downtime = $downtime;
|
||||
$this->displayComment = true;
|
||||
?>
|
||||
<tr>
|
||||
<tr href="<?= $this->href('monitoring/downtime/show', array('downtime_id' => $downtime->id)) ?>">
|
||||
<?= $this->render('partials/downtime/downtime-header.phtml'); ?>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
|
@ -36,7 +36,7 @@ if (! $this->compact): ?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($hostgroups->peekAhead($this->compact) as $hostgroup): ?>
|
||||
<tr href="<?= $this->href('monitoring/list/hosts', array('hostgroup_name' => $hostgroup->hostgroup_name)) ?>">
|
||||
<tr>
|
||||
<td class="count-col">
|
||||
<span class="badge"><?= $hostgroup->hosts_total ?></span>
|
||||
</td>
|
||||
|
@ -40,7 +40,7 @@ if (! $this->compact): ?>
|
||||
<?php foreach($hosts->peekAhead($this->compact) as $host):
|
||||
$hostStateName = Host::getStateText($host->host_state);
|
||||
$hostLink = $this->href('monitoring/host/show', array('host' => $host->host_name)); ?>
|
||||
<tr href="<?= $hostLink ?>">
|
||||
<tr>
|
||||
<td class="state-col state-<?= $hostStateName ?><?= $host->host_handled ? ' handled' : '' ?>">
|
||||
<p>
|
||||
<span class="state-label"><?= Host::getStateText($host->host_state, true) ?></span>
|
||||
|
@ -30,7 +30,7 @@ if (! $this->compact): ?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($servicegroups->peekAhead($this->compact) as $serviceGroup): ?>
|
||||
<tr href="<?= $this->href('monitoring/list/services', array('servicegroup_name' => $serviceGroup->servicegroup_name)) ?>">
|
||||
<tr>
|
||||
<td class="count-col">
|
||||
<span class="badge"><?= $serviceGroup->services_total ?></span>
|
||||
</td>
|
||||
|
@ -53,7 +53,7 @@ if (! $this->compact): ?>
|
||||
)
|
||||
);
|
||||
$serviceStateName = Service::getStateText($service->service_state); ?>
|
||||
<tr href="<?= $serviceLink ?>">
|
||||
<tr>
|
||||
<td class="state-col state-<?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
|
||||
<p>
|
||||
<span class="state-label"><?= Service::getStateText($service->service_state, true) ?></span>
|
||||
|
@ -2,28 +2,29 @@
|
||||
<?php if ($comment->objecttype === 'service'): ?>
|
||||
<?= $this->icon('service', $this->translate('Service')) ?> <?= $this->qlink(
|
||||
$this->escape($comment->host_display_name) . ': ' . $this->escape($comment->service_display_name),
|
||||
'monitoring/comment/show',
|
||||
array('comment_id' => $comment->id),
|
||||
'monitoring/service/show',
|
||||
array(
|
||||
'host' => $comment->host_name,
|
||||
'service' => $comment->service_description
|
||||
),
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translate('Show detailed information for this comment about service %s on host %s'),
|
||||
$comment->service_display_name,
|
||||
$comment->host_display_name
|
||||
),
|
||||
'class' => 'rowaction'
|
||||
)
|
||||
)
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('host', $this->translate('Host')) ?> <?= $this->qlink(
|
||||
$this->escape($comment->host_display_name),
|
||||
'monitoring/comment/show',
|
||||
array('comment_id' => $comment->id),
|
||||
'monitoring/host/show',
|
||||
array('host' => $comment->host_name),
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translate('Show detailed information for this comment about host %s'),
|
||||
$comment->host_display_name
|
||||
),
|
||||
'class' => 'rowaction'
|
||||
)
|
||||
)
|
||||
) ?>
|
||||
<?php endif ?>
|
||||
|
@ -12,28 +12,30 @@
|
||||
<?php if ($isService): ?>
|
||||
<?= $this->icon('service', $this->translate('Service')); ?> <?= $this->qlink(
|
||||
$this->escape($downtime->host_display_name) . ': ' . $this->escape($downtime->service_display_name),
|
||||
'monitoring/downtime/show',
|
||||
array('downtime_id' => $downtime->id),
|
||||
'monitoring/service/show',
|
||||
array(
|
||||
'host' => $downtime->host_name,
|
||||
'service' => $downtime->service_description
|
||||
),
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translate('Show detailed information for this downtime scheduled for service %s on host %s'),
|
||||
$downtime->service_display_name,
|
||||
$downtime->host_display_name
|
||||
),
|
||||
'class' => 'rowaction'
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= $this->icon('host', $this->translate('host')); ?> <?= $this->qlink(
|
||||
$this->escape($downtime->host_display_name),
|
||||
'monitoring/downtime/show',
|
||||
'monitoring/host/show',
|
||||
array('host' => $downtime->host_name),
|
||||
array('downtime_id' => $downtime->id),
|
||||
array(
|
||||
'title' => sprintf(
|
||||
$this->translate('Show detailed information for this downtime scheduled for host %s'),
|
||||
$downtime->host_display_name
|
||||
),
|
||||
'class' => 'rowaction'
|
||||
)
|
||||
)
|
||||
); ?>
|
||||
<?php endif ?>
|
||||
|
@ -105,7 +105,7 @@ $section = $this->menuSection(N_('Problems'), array(
|
||||
'icon' => 'block',
|
||||
'priority' => 20
|
||||
));
|
||||
$section->add(N_('Unhandled Hosts'), array(
|
||||
$section->add(N_('Host Problems'), array(
|
||||
'renderer' => array(
|
||||
'MonitoringBadgeNavigationItemRenderer',
|
||||
'columns' => array(
|
||||
@ -114,10 +114,10 @@ $section->add(N_('Unhandled Hosts'), array(
|
||||
'state' => 'critical',
|
||||
'dataView' => 'statussummary'
|
||||
),
|
||||
'url' => 'monitoring/list/hosts?host_problem=1&host_handled=0',
|
||||
'priority' => 30
|
||||
'url' => 'monitoring/list/hosts?host_problem=1&sort=host_severity',
|
||||
'priority' => 50
|
||||
));
|
||||
$section->add(N_('Unhandled Services'), array(
|
||||
$section->add(N_('Service Problems'), array(
|
||||
'renderer' => array(
|
||||
'MonitoringBadgeNavigationItemRenderer',
|
||||
'columns' => array(
|
||||
@ -126,14 +126,6 @@ $section->add(N_('Unhandled Services'), array(
|
||||
'state' => 'critical',
|
||||
'dataView' => 'statussummary'
|
||||
),
|
||||
'url' => 'monitoring/list/services?service_problem=1&service_handled=0&sort=service_severity',
|
||||
'priority' => 40
|
||||
));
|
||||
$section->add(N_('Host Problems'), array(
|
||||
'url' => 'monitoring/list/hosts?host_problem=1&sort=host_severity',
|
||||
'priority' => 50
|
||||
));
|
||||
$section->add(N_('Service Problems'), array(
|
||||
'url' => 'monitoring/list/services?service_problem=1&sort=service_severity&dir=desc',
|
||||
'priority' => 60
|
||||
));
|
||||
|
@ -84,7 +84,7 @@
|
||||
* @returns {jQuery}
|
||||
*/
|
||||
rowActions: function() {
|
||||
return this.$el.find('tr a.rowaction');
|
||||
return this.$el.find('tr[href]');
|
||||
},
|
||||
|
||||
/**
|
||||
@ -416,14 +416,20 @@
|
||||
var container = evt.target;
|
||||
var self = evt.data.self;
|
||||
|
||||
// initialize all rows with the correct link
|
||||
// initialize all rows with the correct row action
|
||||
$('table.action tr, table.action-table tr', container).each(function(idx, el) {
|
||||
|
||||
// decide which row action to use: links declared with the class rowaction take
|
||||
// the highest precedence before hrefs defined in the tr itself and regular links
|
||||
var $a = $('a[href].rowaction', el).first();
|
||||
if ($a.length) {
|
||||
// TODO: Find out whether we leak memory on IE with this:
|
||||
$(el).attr('href', $a.attr('href'));
|
||||
return;
|
||||
}
|
||||
if ($(el).attr('href') && $(el).attr('href').length) {
|
||||
return;
|
||||
}
|
||||
$a = $('a[href]', el).first();
|
||||
if ($a.length) {
|
||||
$(el).attr('href', $a.attr('href'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user