Skip to content
Commits on Source (4)
......@@ -4,6 +4,40 @@ Please make sure to always read our [Upgrading](doc/80-Upgrading.md) documentati
## What's New
### What's New in Version 2.7.3
This is a hotfix release and fixes the following issue:
* Servicegroups for roles with filtered objects not available [#3983](https://github.com/Icinga/icingaweb2/issues/3983)
### What's New in Version 2.7.2
You can find all issues related to this release on our [Roadmap](https://github.com/Icinga/icingaweb2/milestone/57?closed=1).
#### Less Smoky Database Servers
The release of v2.7.1 introduced a change which revealed an inefficient part of our database queries. We made some
general optimizations on our queries and changed the way we utilize them in some views. The result are faster
response times by less work for the database server.
* Consuming more CPU resources since upgraded to 2.7.1 [#3928](https://github.com/Icinga/icingaweb2/issues/3928)
#### Anarchism Infested Dashboards
Recent history already showed signs of anarchism. (Pun intended) A similar mindset now infested default dashboards
which appeared in a different way than before v2.7.0. We taught their dashlets a lesson and order has been reestablished
as previously.
* Recently Recovered Services in dashboard "Current Incidents" seems out of order [#3931](https://github.com/Icinga/icingaweb2/issues/3931)
#### Solitary Downtimes
We improved the host and service distinction with v2.7.0. The downtimes list however got confused by this and didn't
knew anymore how to combine multiple downtimes. If you now instruct the list to select multiple downtimes this works
again as we removed the confusing parts.
* Selection of multiple downtimes fails [#3920](https://github.com/Icinga/icingaweb2/issues/3920)
### What's New in Version 2.7.1
You can find all issues related to this release on our [Roadmap](https://github.com/Icinga/icingaweb2/milestone/56?closed=1).
......
b0bf9c4b0637f6113adb788e78c2bcf619225dd8 2019-08-14 13:10:19 +0200
06cabfe8ba28cf545a42c92f25484383191a4e51 2019-10-18 07:39:24 +0200
icingaweb2 (2.7.1-2) UNRELEASED; urgency=medium
icingaweb2 (2.7.3-1) unstable; urgency=medium
* Team upload.
* New upstream release.
* Bump Standards-Version to 4.4.1, no changes.
-- Bas Couwenberg <sebastic@debian.org> Mon, 30 Sep 2019 20:07:14 +0200
-- Bas Couwenberg <sebastic@debian.org> Sat, 19 Oct 2019 07:35:47 +0200
icingaweb2 (2.7.1-1) unstable; urgency=medium
......
......@@ -43,12 +43,16 @@ class DashboardContainer extends NavigationItemContainer
*
* @param string $name
* @param string $url
* @param int $priority
*
* @return $this
*/
public function add($name, $url)
public function add($name, $url, $priority = null)
{
$this->dashlets[$name] = $url;
$this->dashlets[$name] = [
'url' => $url,
'priority' => $priority
];
return $this;
}
}
......@@ -315,10 +315,11 @@ class Module
foreach ($panes as $pane) {
/** @var DashboardContainer $pane */
$dashlets = [];
foreach ($pane->getDashlets() as $dashletName => $dashletUrl) {
foreach ($pane->getDashlets() as $dashletName => $dashletConfig) {
$dashlets[$dashletName] = [
'label' => $this->translate($dashletName),
'url' => $dashletUrl
'url' => $dashletConfig['url'],
'priority' => $dashletConfig['priority']
];
}
......
......@@ -8,7 +8,7 @@ namespace Icinga\Application;
*/
class Version
{
const VERSION = '2.7.1';
const VERSION = '2.7.3';
/**
* Get the version of this instance of Icinga Web 2
......
......@@ -36,6 +36,13 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
*/
protected $iteratorPosition;
/**
* The amount of rows previously calculated
*
* @var int
*/
protected $cachedCount;
/**
* The target you are going to query
*
......@@ -450,7 +457,7 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
*/
public function hasResult()
{
return $this->iteratorPosition !== null || $this->fetchRow() !== false;
return $this->cachedCount > 0 || $this->iteratorPosition !== null || $this->fetchRow() !== false;
}
/**
......@@ -647,6 +654,7 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
$query->limit(0, 0);
Benchmark::measure('Counting all results started');
$count = $this->ds->count($query);
$this->cachedCount = $count;
Benchmark::measure('Counting all results finished');
return $count;
}
......
Module: doc
Version: 2.7.1
Version: 2.7.3
Description: Documentation module
Extracts, shows and exports documentation for Icinga Web 2 and its modules.
Module: migrate
Version: 2.7.1
Version: 2.7.3
Description: Migrate module
This module was introduced with the domain-aware authentication feature in version 2.5.0.
It helps you migrating users and user configurations according to a given domain.
......@@ -339,7 +339,7 @@ class EventController extends Controller
case 'dt_start':
case 'dt_end':
$details = array(array(
array($this->translate('Entry time'), DateFormatter::formatTime($event->entry_time)),
array($this->translate('Entry time'), DateFormatter::formatDateTime($event->entry_time)),
array($this->translate('Is fixed'), $this->yesOrNo($event->is_fixed)),
array($this->translate('Is in effect'), $this->yesOrNo($event->is_in_effect)),
array($this->translate('Was started'), $this->yesOrNo($event->was_started))
......@@ -352,18 +352,18 @@ class EventController extends Controller
}
$details[] = array(
array($this->translate('Trigger time'), DateFormatter::formatTime($event->trigger_time)),
array($this->translate('Trigger time'), DateFormatter::formatDateTime($event->trigger_time)),
array(
$this->translate('Scheduled start time'),
DateFormatter::formatTime($event->scheduled_start_time)
DateFormatter::formatDateTime($event->scheduled_start_time)
),
array(
$this->translate('Actual start time'),
DateFormatter::formatTime($event->actual_start_time)
DateFormatter::formatDateTime($event->actual_start_time)
),
array(
$this->translate('Scheduled end time'),
DateFormatter::formatTime($event->scheduled_end_time)
DateFormatter::formatDateTime($event->scheduled_end_time)
)
);
......@@ -371,7 +371,7 @@ class EventController extends Controller
$details[] = array(
array(
$this->translate('Actual end time'),
DateFormatter::formatTime($event->actual_end_time)
DateFormatter::formatDateTime($event->actual_end_time)
)
);
}
......@@ -417,14 +417,14 @@ class EventController extends Controller
}
return array(
array($this->translate('Time'), DateFormatter::formatTime($event->comment_time)),
array($this->translate('Time'), DateFormatter::formatDateTime($event->comment_time)),
array($this->translate('Source'), $this->view->escape($commentSource)),
array($this->translate('Entry type'), $this->view->escape($entryType)),
array($this->translate('Author'), $this->contact($event->author_name)),
array($this->translate('Is persistent'), $this->yesOrNo($event->is_persistent)),
array($this->translate('Expires'), $this->yesOrNo($event->expires)),
array($this->translate('Expiration time'), DateFormatter::formatTime($event->expiration_time)),
array($this->translate('Deletion time'), DateFormatter::formatTime($event->deletion_time)),
array($this->translate('Expiration time'), DateFormatter::formatDateTime($event->expiration_time)),
array($this->translate('Deletion time'), DateFormatter::formatDateTime($event->deletion_time)),
array($this->translate('Message'), $this->comment($event->comment_data))
);
case 'flapping':
......@@ -441,7 +441,7 @@ class EventController extends Controller
}
return array(
array($this->translate('Event time'), DateFormatter::formatTime($event->event_time)),
array($this->translate('Event time'), DateFormatter::formatDateTime($event->event_time)),
array($this->translate('Reason'), $this->view->escape($reasonType)),
array($this->translate('State change'), $this->percent($event->percent_state_change)),
array($this->translate('Low threshold'), $this->percent($event->low_threshold)),
......@@ -481,8 +481,8 @@ class EventController extends Controller
}
$details = array(
array($this->translate('Start time'), DateFormatter::formatTime($event->start_time)),
array($this->translate('End time'), DateFormatter::formatTime($event->end_time)),
array($this->translate('Start time'), DateFormatter::formatDateTime($event->start_time)),
array($this->translate('End time'), DateFormatter::formatDateTime($event->end_time)),
array($this->translate('Reason'), $this->view->escape($notificationReason)),
array(
$this->translate('State'),
......@@ -502,7 +502,7 @@ class EventController extends Controller
$isService = $event->service_description !== null;
$details = array(
array($this->translate('State time'), DateFormatter::formatTime($event->state_time)),
array($this->translate('State time'), DateFormatter::formatDateTime($event->state_time)),
array($this->translate('State'), $this->state($isService, $event->state)),
array($this->translate('Check source'), $event->check_source),
array($this->translate('Check attempt'), $this->view->escape(sprintf(
......
......@@ -46,10 +46,47 @@ class TimelineController extends Controller
)
),
array(
'notify' => array(
'notification_ack' => array(
'class' => 'timeline-notification',
'detailUrl' => $detailUrl,
'label' => mt('monitoring', 'Notifications')
'label' => mt('monitoring', 'Notifications'),
'groupBy' => 'notification_*'
),
'notification_flapping' => array(
'class' => 'timeline-notification',
'detailUrl' => $detailUrl,
'label' => mt('monitoring', 'Notifications'),
'groupBy' => 'notification_*'
),
'notification_flapping_end' => array(
'class' => 'timeline-notification',
'detailUrl' => $detailUrl,
'label' => mt('monitoring', 'Notifications'),
'groupBy' => 'notification_*'
),
'notification_dt_start' => array(
'class' => 'timeline-notification',
'detailUrl' => $detailUrl,
'label' => mt('monitoring', 'Notifications'),
'groupBy' => 'notification_*'
),
'notification_dt_end' => array(
'class' => 'timeline-notification',
'detailUrl' => $detailUrl,
'label' => mt('monitoring', 'Notifications'),
'groupBy' => 'notification_*'
),
'notification_custom' => array(
'class' => 'timeline-notification',
'detailUrl' => $detailUrl,
'label' => mt('monitoring', 'Notifications'),
'groupBy' => 'notification_*'
),
'notification_state' => array(
'class' => 'timeline-notification',
'detailUrl' => $detailUrl,
'label' => mt('monitoring', 'Notifications'),
'groupBy' => 'notification_*'
),
'hard_state' => array(
'class' => 'timeline-hard-state',
......
......@@ -80,17 +80,25 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
$options['description'] = $this->translate('changed');
}
if ($formData[$feature] === 2) {
$options['multiOptions'] = array(
$this->translate('disable'),
$this->translate('enable'),
);
$options['separator'] = '';
$elementType = 'radio';
$this->addElement('select', $feature, $options + [
'description' => $this->translate('Multiple Values'),
'filters' => [['Null', ['type' => \Zend_Filter_Null::STRING]]],
'multiOptions' => [
'' => $this->translate('Leave Unchanged'),
$this->translate('Disable All'),
$this->translate('Enable All')
],
'decorators' => array_merge(
array_slice(static::$defaultElementDecorators, 0, 3),
[['Description', ['tag' => 'span']]],
array_slice(static::$defaultElementDecorators, 4, 1),
[['HtmlTag', ['tag' => 'div', 'class' => 'control-group indeterminate']]]
)
]);
} else {
$elementType = 'checkbox';
$options['value'] = $formData[$feature];
$this->addElement('checkbox', $feature, $options);
}
$this->addElement($elementType, $feature, $options);
}
}
......
......@@ -3,20 +3,13 @@
use Icinga\Web\Dom\DomNodeIterator;
use Icinga\Web\View;
use Icinga\Module\Monitoring\Web\Helper\PluginOutputPurifier;
use Icinga\Web\Helper\HtmlPurifier;
/**
* Plugin output renderer
*/
class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
{
/**
* The return value of getPurifier()
*
* @var HTMLPurifier
*/
protected static $purifier;
/**
* Patterns to be replaced in plain text plugin output
*
......@@ -107,7 +100,7 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
$output = preg_replace(
self::$htmlPatterns,
self::$htmlReplacements,
PluginOutputPurifier::process($output)
HtmlPurifier::process($output)
);
$isHtml = true;
} else {
......
......@@ -115,7 +115,7 @@ foreach ($pivotData as $serviceDescription => $_) {
'data-base-target' => '_self'
)
) ?>
<?= ++$i === (int) (count($pivotHeader['rows']) / 2) ? $expandLink : '' ?>
<?= ++$i === (int) ceil(count($pivotHeader['rows']) / 2) ? $expandLink : '' ?>
</td>
<?php endif ?>
</tr>
......
......@@ -15,8 +15,7 @@
$this->translate('Show detailed information for service %s on host %s'),
$comment->service_display_name,
$comment->host_display_name
),
'class' => 'rowaction'
)
]
),
$this->qlink(
......
......@@ -25,8 +25,7 @@
$this->translate('Show detailed information for service %s on host %s'),
$downtime->service_display_name,
$downtime->host_display_name
),
'class' => 'rowaction'
)
]
),
$this->qlink(
......
......@@ -29,19 +29,17 @@ if (! $url->hasParam('page') || ($page = (int) $url->getParam('page')) < 1) {
$history->limit($limit * $page);
?>
<div class="content">
<?php if (! $history->hasResult()): ?>
<p><?= $this->translate('No historical events found matching the filter.') ?></p>
</div>
<?php return; endif ?>
<?php
$dateFormat = $this->translate('%A, %B %e, %Y', 'date.verbose');
$lastDate = null;
$flappingMsg = $this->translate('Flapping with a %.2f%% state change rate');
$rowAction = Url::fromPath('monitoring/event/show');
?>
<?php foreach ($history->peekAhead() as $event): ?>
<?php if ($lastDate === null): ?>
<table class="table-row-selectable state-table" data-base-target="_next">
<tbody>
<?php foreach ($history->peekAhead() as $event):
<?php endif;
$icon = '';
$iconTitle = null;
$isService = isset($event->service_description);
......@@ -240,8 +238,10 @@ $rowAction = Url::fromPath('monitoring/event/show');
</td>
</tr>
<?php endforeach ?>
<?php if ($lastDate !== null): ?>
</tbody>
</table>
<?php endif ?>
<?php if ($history->hasMore()): ?>
<div class="action-links">
<?php if ($this->compact) {
......
......@@ -295,15 +295,18 @@ $section->add(N_('Monitoring Health'), array(
$dashboard = $this->dashboard(N_('Current Incidents'), array('priority' => 50));
$dashboard->add(
N_('Service Problems'),
'monitoring/list/services?service_problem=1&limit=10&sort=service_severity'
'monitoring/list/services?service_problem=1&limit=10&sort=service_severity',
100
);
$dashboard->add(
N_('Recently Recovered Services'),
'monitoring/list/services?service_state=0&limit=10&sort=service_last_state_change&dir=desc'
'monitoring/list/services?service_state=0&limit=10&sort=service_last_state_change&dir=desc',
110
);
$dashboard->add(
N_('Host Problems'),
'monitoring/list/hosts?host_problem=1&sort=host_severity'
'monitoring/list/hosts?host_problem=1&sort=host_severity',
120
);
/*
......@@ -329,19 +332,23 @@ $dashboard->add(
$dashboard = $this->dashboard(N_('Overdue'), array('priority' => 70));
$dashboard->add(
N_('Late Host Check Results'),
'monitoring/list/hosts?host_next_update<now'
'monitoring/list/hosts?host_next_update<now',
100
);
$dashboard->add(
N_('Late Service Check Results'),
'monitoring/list/services?service_next_update<now'
'monitoring/list/services?service_next_update<now',
110
);
$dashboard->add(
N_('Acknowledgements Active For At Least Three Days'),
'monitoring/list/comments?comment_type=Ack&comment_timestamp<-3 days&sort=comment_timestamp&dir=asc'
'monitoring/list/comments?comment_type=Ack&comment_timestamp<-3 days&sort=comment_timestamp&dir=asc',
120
);
$dashboard->add(
N_('Downtimes Active For More Than Three Days'),
'monitoring/list/downtimes?downtime_is_in_effect=1&downtime_scheduled_start<-3%20days&sort=downtime_start&dir=asc'
'monitoring/list/downtimes?downtime_is_in_effect=1&downtime_scheduled_start<-3%20days&sort=downtime_start&dir=asc',
130
);
/*
......@@ -350,27 +357,33 @@ $dashboard->add(
$dashboard = $this->dashboard(N_('Muted'), array('priority' => 80));
$dashboard->add(
N_('Disabled Service Notifications'),
'monitoring/list/services?service_notifications_enabled=0&limit=10'
'monitoring/list/services?service_notifications_enabled=0&limit=10',
100
);
$dashboard->add(
N_('Disabled Host Notifications'),
'monitoring/list/hosts?host_notifications_enabled=0&limit=10'
'monitoring/list/hosts?host_notifications_enabled=0&limit=10',
110
);
$dashboard->add(
N_('Disabled Service Checks'),
'monitoring/list/services?service_active_checks_enabled=0&limit=10'
'monitoring/list/services?service_active_checks_enabled=0&limit=10',
120
);
$dashboard->add(
N_('Disabled Host Checks'),
'monitoring/list/hosts?host_active_checks_enabled=0&limit=10'
'monitoring/list/hosts?host_active_checks_enabled=0&limit=10',
130
);
$dashboard->add(
N_('Acknowledged Problem Services'),
'monitoring/list/services?service_acknowledgement_type=2&service_problem=1&sort=service_state&limit=10'
'monitoring/list/services?service_acknowledgement_type=2&service_problem=1&sort=service_state&limit=10',
140
);
$dashboard->add(
N_('Acknowledged Problem Hosts'),
'monitoring/list/hosts?host_acknowledgement_type=2&host_problem=1&sort=host_severity&limit=10'
'monitoring/list/hosts?host_acknowledgement_type=2&host_problem=1&sort=host_severity&limit=10',
150
);
/*
......