Skip to content

Commit

Permalink
Use current filter to highlight active rows instead of storing active…
Browse files Browse the repository at this point in the history
… rows in JS

Clean up selection code and move it into separate behavior and parse filter query to fetch selectable rows.

refs #9054
refs #9346
  • Loading branch information
majentsch committed Jun 29, 2015
1 parent 2e375dd commit aec59d9
Show file tree
Hide file tree
Showing 8 changed files with 369 additions and 207 deletions.
3 changes: 2 additions & 1 deletion library/Icinga/Web/JavaScript.php
Expand Up @@ -26,7 +26,8 @@ class JavaScript
'js/icinga/behavior/sparkline.js',
'js/icinga/behavior/tristate.js',
'js/icinga/behavior/navigation.js',
'js/icinga/behavior/form.js'
'js/icinga/behavior/form.js',
'js/icinga/behavior/selection.js'
);

protected static $vendorFiles = array(
Expand Down
13 changes: 8 additions & 5 deletions modules/monitoring/application/views/scripts/list/comments.phtml
Expand Up @@ -43,11 +43,14 @@ if (count($comments) === 0) {
),
'monitoring/comment/show',
array('comment_id' => $comment->id),
array('title' => sprintf(
$this->translate('Show detailed information for comment on %s for %s'),
$comment->service_display_name,
$comment->host_display_name
))) ?>
array(
'title' => sprintf(
$this->translate('Show detailed information for comment on %s for %s'),
$comment->service_display_name,
$comment->host_display_name
),
'class' => 'rowaction'
)) ?>
<?php else: ?>
<?= $this->icon('host', $this->translate('Host')); ?>

Expand Down
Expand Up @@ -57,11 +57,14 @@ if (count($downtimes) === 0) {
sprintf('%s: %s', $downtime->host_display_name, $downtime->service_display_name),
'monitoring/downtime/show',
array('downtime_id' => $downtime->id),
array('title' => sprintf(
$this->translate('Show detailed information for downtime on %s for %s'),
$downtime->service_display_name,
$downtime->host_display_name
))) ?>
array(
'title' => sprintf(
$this->translate('Show detailed information for downtime on %s for %s'),
$downtime->service_display_name,
$downtime->host_display_name
),
'class' => 'rowaction'
)) ?>
<br>
<?= $this->icon('comment', $this->translate('Comment')); ?> [<?= $this->escape($downtime->author_name) ?>] <?= $this->escape($downtime->comment) ?>
<br>
Expand Down
Expand Up @@ -60,7 +60,8 @@ if (count($hosts) === 0) {
$hostLink,
null,
array(
'title' => sprintf($this->translate('Show detailed information for host %s'), $host->host_display_name)
'title' => sprintf($this->translate('Show detailed information for host %s'), $host->host_display_name),
'class' => 'rowaction'
)
); ?>
<?php if (isset($host->host_unhandled_services) && $host->host_unhandled_services > 0): ?>
Expand Down

0 comments on commit aec59d9

Please sign in to comment.