From f0fc8b8e901ab741071ca5c15cdae6f287bbff50 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 24 Jul 2015 14:33:06 +0200 Subject: [PATCH 01/17] Vagrant: slapd must be running, add provision hint to docs For some reason the initial ldap provisioning might fail even after ensuring that slapd is running. Yet another `vagrant provision` will fix the issue. refs #9453 --- .puppet/modules/openldap/manifests/init.pp | 2 +- doc/vagrant.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.puppet/modules/openldap/manifests/init.pp b/.puppet/modules/openldap/manifests/init.pp index 11cc2b42a..62b9d1e34 100644 --- a/.puppet/modules/openldap/manifests/init.pp +++ b/.puppet/modules/openldap/manifests/init.pp @@ -28,7 +28,7 @@ class openldap { exec { "slapd-schema-${schema}": command => "ldapadd -Y EXTERNAL -H ldapi:// -f /etc/openldap/schema/${schema}.ldif", group => 'root', - require => Package['openldap-servers'], + require => [ Package['openldap-servers'], Service['slapd'] ], unless => "test -n \"$(find /etc/openldap/slapd.d/cn=config/cn=schema/ -name cn={*}${schema}.ldif -print -quit)\"", user => 'root', } diff --git a/doc/vagrant.md b/doc/vagrant.md index b1b98b436..148e6aeb8 100644 --- a/doc/vagrant.md +++ b/doc/vagrant.md @@ -24,6 +24,8 @@ vagrant up > you'll download a plain CentOS base box and Vagrant will automatically > provision the environment on the first go. +If the LDAP schema import fails, rerun `vagrant provision`. + After you should be able to browse [localhost:8080/icingaweb2](http://localhost:8080/icingaweb2). ## Log into Icinga Web 2 From bba7cb14633c092a6fd5a8478f453f78489ca439 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 24 Jul 2015 14:34:13 +0200 Subject: [PATCH 02/17] Vagrant: Use centos71 base box from icinga.org refs #9453 --- Vagrantfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 11b5e2b9c..7d026fc83 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -22,9 +22,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provision :shell, :path => ".puppet/manifests/puppet.sh" config.vm.provider :virtualbox do |v, override| - override.vm.box = "puppetlabs/centos-7.0-64-puppet" + override.vm.box = "centos-71-x64-vbox" + override.vm.box_url = "http://boxes.icinga.org/centos-71-x64-vbox.box" v.customize ["modifyvm", :id, "--memory", "1024"] + v.customize ["modifyvm", :id, "--cpus", "2"] end config.vm.provider :parallels do |p, override| From 5a3401cc28c579214fcfa0a9e4ac90827f26a6c9 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 31 Jul 2015 15:15:13 +0200 Subject: [PATCH 03/17] monitoring: Reduce amount of default quick search columns Entering an arbitrary pattern in the quick search field will now only search for a host's and service's display name or a group's / contact's alias. fixes #9751 --- .../monitoring/library/Monitoring/DataView/Comment.php | 2 +- .../monitoring/library/Monitoring/DataView/Contact.php | 10 +--------- .../library/Monitoring/DataView/Contactgroup.php | 2 +- .../library/Monitoring/DataView/Downtime.php | 2 +- .../library/Monitoring/DataView/Eventhistory.php | 2 +- .../library/Monitoring/DataView/Hostgroupsummary.php | 2 +- .../library/Monitoring/DataView/Hoststatus.php | 2 +- .../library/Monitoring/DataView/Notification.php | 2 +- .../Monitoring/DataView/Servicegroupsummary.php | 2 +- .../library/Monitoring/DataView/Servicestatus.php | 2 +- 10 files changed, 10 insertions(+), 18 deletions(-) diff --git a/modules/monitoring/library/Monitoring/DataView/Comment.php b/modules/monitoring/library/Monitoring/DataView/Comment.php index 18d518bd3..9b3be8061 100644 --- a/modules/monitoring/library/Monitoring/DataView/Comment.php +++ b/modules/monitoring/library/Monitoring/DataView/Comment.php @@ -62,7 +62,7 @@ class Comment extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name', 'service', 'service_display_name', 'comment_author'); + return array('host_display_name', 'service_display_name'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Contact.php b/modules/monitoring/library/Monitoring/DataView/Contact.php index 42c6806ac..d64a80e86 100644 --- a/modules/monitoring/library/Monitoring/DataView/Contact.php +++ b/modules/monitoring/library/Monitoring/DataView/Contact.php @@ -79,14 +79,6 @@ class Contact extends DataView */ public function getSearchColumns() { - return array( - 'contact', - 'contact_alias', - 'contact_email', - 'host', - 'host_display_name', - 'service', - 'service_display_name' - ); + return array('contact_alias'); } } diff --git a/modules/monitoring/library/Monitoring/DataView/Contactgroup.php b/modules/monitoring/library/Monitoring/DataView/Contactgroup.php index 4e5684d43..8560b55fb 100644 --- a/modules/monitoring/library/Monitoring/DataView/Contactgroup.php +++ b/modules/monitoring/library/Monitoring/DataView/Contactgroup.php @@ -84,6 +84,6 @@ class Contactgroup extends DataView */ public function getSearchColumns() { - return array('contactgroup', 'contactgroup_alias', 'contact', 'contact_alias', 'contact_email'); + return array('contactgroup_alias'); } } diff --git a/modules/monitoring/library/Monitoring/DataView/Downtime.php b/modules/monitoring/library/Monitoring/DataView/Downtime.php index c5324a22d..767fc577d 100644 --- a/modules/monitoring/library/Monitoring/DataView/Downtime.php +++ b/modules/monitoring/library/Monitoring/DataView/Downtime.php @@ -69,7 +69,7 @@ class Downtime extends DataView */ public function getSearchColumns() { - return array('downtime_author', 'host', 'host_display_name', 'service', 'service_display_name'); + return array('host_display_name', 'service_display_name'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Eventhistory.php b/modules/monitoring/library/Monitoring/DataView/Eventhistory.php index ad6c384cb..a99790a38 100644 --- a/modules/monitoring/library/Monitoring/DataView/Eventhistory.php +++ b/modules/monitoring/library/Monitoring/DataView/Eventhistory.php @@ -72,6 +72,6 @@ class EventHistory extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name', 'service', 'service_display_name', 'type'); + return array('host_display_name', 'service_display_name'); } } diff --git a/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php b/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php index 9fd58fc31..7f10d072e 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php @@ -60,7 +60,7 @@ class Hostgroupsummary extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name', 'hostgroup', 'hostgroup_alias'); + return array('hostgroup_alias'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php index a9d6be771..9c2848618 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php @@ -84,7 +84,7 @@ class HostStatus extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name'); + return array('host_display_name'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Notification.php b/modules/monitoring/library/Monitoring/DataView/Notification.php index 7f17769b8..5c2500843 100644 --- a/modules/monitoring/library/Monitoring/DataView/Notification.php +++ b/modules/monitoring/library/Monitoring/DataView/Notification.php @@ -90,6 +90,6 @@ class Notification extends DataView */ public function getSearchColumns() { - return array('contact', 'host', 'host_display_name', 'service', 'service_display_name'); + return array('host_display_name', 'service_display_name'); } } diff --git a/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php b/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php index 39fa74932..205aa56de 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php @@ -55,7 +55,7 @@ class Servicegroupsummary extends DataView */ public function getSearchColumns() { - return array('service', 'service_display_name', 'servicegroup', 'servicegroup_alias'); + return array('servicegroup_alias'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php index 10d65c48a..a4516a93a 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php @@ -191,6 +191,6 @@ class ServiceStatus extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name', 'service', 'service_display_name'); + return array('host_display_name', 'service_display_name'); } } From dafa722cec8055fa83d8edc9ddc6a5b9d62696d1 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 31 Jul 2015 15:56:13 +0200 Subject: [PATCH 04/17] Hide non-essential form fields when configuring LDAP user group backends resolves #9780 --- .../UserGroup/LdapUserGroupBackendForm.php | 29 +++++-------------- .../forms/UserGroupBackendPage.php | 25 ++++++++++++---- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php b/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php index a426393c6..0e7b63b5b 100644 --- a/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php +++ b/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php @@ -75,10 +75,12 @@ class LdapUserGroupBackendForm extends Form : $resourceNames[0] ); - $userBackends = array('none' => $this->translate('None', 'usergroupbackend.ldap.user_backend')); $userBackendNames = $this->getLdapUserBackendNames($resource); if (! empty($userBackendNames)) { - $userBackends = array_merge($userBackends, array_combine($userBackendNames, $userBackendNames)); + $userBackends = array_combine($userBackendNames, $userBackendNames); + $userBackends['none'] = $this->translate('None', 'usergroupbackend.ldap.user_backend'); + } else { + $userBackends = array('none' => $this->translate('None', 'usergroupbackend.ldap.user_backend')); } $this->addElement( 'select', @@ -101,20 +103,10 @@ class LdapUserGroupBackendForm extends Form $groupConfigDisabled = $userConfigDisabled = true; } - $dnDisabled = null; // MUST BE null - if (isset($formData['user_backend']) && $formData['user_backend'] !== 'none') { - $userBackend = UserBackend::create($formData['user_backend']); - $defaults->merge(array( - 'user_base_dn' => $userBackend->getBaseDn(), - 'user_class' => $userBackend->getUserClass(), - 'user_name_attribute' => $userBackend->getUserNameAttribute(), - 'user_filter' => $userBackend->getFilter() - )); - $userConfigDisabled = $dnDisabled = true; - } - $this->createGroupConfigElements($defaults, $groupConfigDisabled); - $this->createUserConfigElements($defaults, $userConfigDisabled, $dnDisabled); + if (count($userBackends) === 1 || (isset($formData['user_backend']) && $formData['user_backend'] === 'none')) { + $this->createUserConfigElements($defaults, $userConfigDisabled); + } $this->addElement( 'hidden', @@ -212,9 +204,8 @@ class LdapUserGroupBackendForm extends Form * * @param ConfigObject $defaults * @param null|bool $disabled - * @param null|bool $dnDisabled */ - protected function createUserConfigElements(ConfigObject $defaults, $disabled, $dnDisabled) + protected function createUserConfigElements(ConfigObject $defaults, $disabled) { $this->addElement( 'text', @@ -234,8 +225,6 @@ class LdapUserGroupBackendForm extends Form array( 'preserveDefault' => true, 'allowEmpty' => true, - 'ignore' => $dnDisabled, - 'disabled' => $dnDisabled, 'label' => $this->translate('LDAP User Filter'), 'description' => $this->translate( 'An additional filter to use when looking up users using the specified connection. ' @@ -281,8 +270,6 @@ class LdapUserGroupBackendForm extends Form 'user_base_dn', array( 'preserveDefault' => true, - 'ignore' => $dnDisabled, - 'disabled' => $dnDisabled, 'label' => $this->translate('LDAP User Base DN'), 'description' => $this->translate( 'The path where users can be found on the LDAP server. Leave ' . diff --git a/modules/setup/application/forms/UserGroupBackendPage.php b/modules/setup/application/forms/UserGroupBackendPage.php index fbc2d44f0..272949d54 100644 --- a/modules/setup/application/forms/UserGroupBackendPage.php +++ b/modules/setup/application/forms/UserGroupBackendPage.php @@ -104,15 +104,30 @@ class UserGroupBackendPage extends Form ResourceFactory::setConfig($this->createResourceConfiguration()); UserBackend::setConfig($this->createBackendConfiguration()); - $formData['type'] = 'ldap'; - $formData['user_backend'] = $this->backendConfig['name']; // We're forcing the linkage anyway.. $backendForm = new LdapUserGroupBackendForm(); + $formData['type'] = 'ldap'; $backendForm->create($formData); - $userBackendOptions = $backendForm->getElement('user_backend')->getMultiOptions(); - unset($userBackendOptions['none']); $backendForm->getElement('name')->setValue('icingaweb2'); - $backendForm->getElement('user_backend')->setMultiOptions($userBackendOptions); $this->addSubForm($backendForm, 'backend_form'); + + $backendForm->addElement( + 'hidden', + 'resource', + array( + 'required' => true, + 'value' => $this->resourceConfig['name'], + 'decorators' => array('ViewHelper') + ) + ); + $backendForm->addElement( + 'hidden', + 'user_backend', + array( + 'required' => true, + 'value' => $this->backendConfig['name'], + 'decorators' => array('ViewHelper') + ) + ); } /** From cc1b26be0ce794e58c8b7da1a8057379a6b8c66f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 31 Jul 2015 15:56:49 +0200 Subject: [PATCH 05/17] Revert "Vagrant: slapd must be running, add provision hint to docs" This reverts commit f0fc8b8e901ab741071ca5c15cdae6f287bbff50. I'll fix this by introducing dependencies for the schema import. refs #9453 --- .puppet/modules/openldap/manifests/init.pp | 2 +- doc/vagrant.md | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.puppet/modules/openldap/manifests/init.pp b/.puppet/modules/openldap/manifests/init.pp index 62b9d1e34..11cc2b42a 100644 --- a/.puppet/modules/openldap/manifests/init.pp +++ b/.puppet/modules/openldap/manifests/init.pp @@ -28,7 +28,7 @@ class openldap { exec { "slapd-schema-${schema}": command => "ldapadd -Y EXTERNAL -H ldapi:// -f /etc/openldap/schema/${schema}.ldif", group => 'root', - require => [ Package['openldap-servers'], Service['slapd'] ], + require => Package['openldap-servers'], unless => "test -n \"$(find /etc/openldap/slapd.d/cn=config/cn=schema/ -name cn={*}${schema}.ldif -print -quit)\"", user => 'root', } diff --git a/doc/vagrant.md b/doc/vagrant.md index 148e6aeb8..b1b98b436 100644 --- a/doc/vagrant.md +++ b/doc/vagrant.md @@ -24,8 +24,6 @@ vagrant up > you'll download a plain CentOS base box and Vagrant will automatically > provision the environment on the first go. -If the LDAP schema import fails, rerun `vagrant provision`. - After you should be able to browse [localhost:8080/icingaweb2](http://localhost:8080/icingaweb2). ## Log into Icinga Web 2 From df38e127e157259ee7e2581bcc9a3376e332d501 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 31 Jul 2015 16:23:22 +0200 Subject: [PATCH 06/17] Puppet: Require php in phpd not vice versa refs #9453 --- .puppet/modules/php/manifests/init.pp | 4 +--- .puppet/modules/php/manifests/phpd.pp | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.puppet/modules/php/manifests/init.pp b/.puppet/modules/php/manifests/init.pp index 788ad5df1..d9d111b71 100644 --- a/.puppet/modules/php/manifests/init.pp +++ b/.puppet/modules/php/manifests/init.pp @@ -24,7 +24,5 @@ class php { require => Package['apache'], } - php::phpd { ['error_reporting', 'timezone', 'xdebug_settings' ]: - require => Package['php'], - } + php::phpd { ['error_reporting', 'timezone', 'xdebug_settings' ]: } } diff --git a/.puppet/modules/php/manifests/phpd.pp b/.puppet/modules/php/manifests/phpd.pp index 4d59223cb..dab28aec1 100644 --- a/.puppet/modules/php/manifests/phpd.pp +++ b/.puppet/modules/php/manifests/phpd.pp @@ -17,5 +17,6 @@ define php::phpd { file { "/etc/php.d/$name.ini": content => template("php/$name.ini.erb"), notify => Service['apache'], + require => Package['php'], } } From 9379faf9ebc0cc7a6f43a40405a688f55e17bfcd Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 31 Jul 2015 16:23:51 +0200 Subject: [PATCH 07/17] Puppet: Add openldap::schema for installing a schema refs #9453 --- .puppet/modules/openldap/manifests/schema.pp | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .puppet/modules/openldap/manifests/schema.pp diff --git a/.puppet/modules/openldap/manifests/schema.pp b/.puppet/modules/openldap/manifests/schema.pp new file mode 100644 index 000000000..a98239379 --- /dev/null +++ b/.puppet/modules/openldap/manifests/schema.pp @@ -0,0 +1,24 @@ +# define: openldap::schema +# +# Install a schema. +# +# Parameters: +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +define openldap::schema { + + include openldap + + exec { "openldap-schema-${name}": + command => "ldapadd -Y EXTERNAL -H ldapi:// -f /etc/openldap/schema/${name}.ldif", + group => 'root', + require => Service['slapd'], + unless => "test -n \"$(find /etc/openldap/slapd.d/cn=config/cn=schema/ -name cn={*}${name}.ldif -print -quit)\"", + user => 'root', + } +} From 222b91dfd1e5451b25d47a80b524fa0900faa9d9 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 31 Jul 2015 16:24:21 +0200 Subject: [PATCH 08/17] Puppet: Fix that openldap core schemas are not correctly installed on Red Hat Linux 7 refs #9453 --- .puppet/modules/openldap/manifests/init.pp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.puppet/modules/openldap/manifests/init.pp b/.puppet/modules/openldap/manifests/init.pp index 11cc2b42a..a0480632e 100644 --- a/.puppet/modules/openldap/manifests/init.pp +++ b/.puppet/modules/openldap/manifests/init.pp @@ -24,14 +24,11 @@ class openldap { } if versioncmp($::operatingsystemmajrelease, '7') >= 0 { - ['core', 'cosine', 'inetorgperson', 'nis', 'misc', 'openldap'].each |String $schema| { - exec { "slapd-schema-${schema}": - command => "ldapadd -Y EXTERNAL -H ldapi:// -f /etc/openldap/schema/${schema}.ldif", - group => 'root', - require => Package['openldap-servers'], - unless => "test -n \"$(find /etc/openldap/slapd.d/cn=config/cn=schema/ -name cn={*}${schema}.ldif -print -quit)\"", - user => 'root', - } - } + openldap::schema{ 'core': } + -> openldap::schema{ 'cosine': } + -> openldap::schema{ 'inetorgperson': } + -> openldap::schema{ 'nis': } + -> openldap::schema{ 'misc': } + -> openldap::schema{ 'openldap': } } } From c06ef8dfed4cb03215871850bc060db0f49eed2d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 3 Aug 2015 10:38:24 +0200 Subject: [PATCH 09/17] Puppet: Use hiera variables in icingaweb2::config::general --- .puppet/modules/icingaweb2/manifests/config/general.pp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.puppet/modules/icingaweb2/manifests/config/general.pp b/.puppet/modules/icingaweb2/manifests/config/general.pp index 200a4f79e..2a10ac1c8 100644 --- a/.puppet/modules/icingaweb2/manifests/config/general.pp +++ b/.puppet/modules/icingaweb2/manifests/config/general.pp @@ -1,6 +1,11 @@ define icingaweb2::config::general ( $source, $config = hiera('icingaweb2::config'), + $log = hiera('icingaweb2::log'), + $web_path = hiera('icingaweb2::web_path'), + $db_user = hiera('icingaweb2::db_user'), + $db_pass = hiera('icingaweb2::db_pass'), + $db_name = hiera('icingaweb2::db_name'), $web_group = hiera('icingaweb2::group'), $replace = true ) { From 863330e50d3aa79baed55915f237bb028e10be70 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Mon, 3 Aug 2015 12:37:09 +0200 Subject: [PATCH 10/17] components/downtime: Add downtime end time information in view fixes #8845 --- .../views/scripts/show/components/downtime.phtml | 7 ++++++- modules/monitoring/public/css/module.less | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 46b0f5a3a..e4341d45a 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -103,7 +103,12 @@ if (isset($delDowntimeForm)) {
  • escape($downtime->author_name) ?> - timeAgo($downtime->entry_time) ?> + + translate('Added %s.'), $this->timeAgo($downtime->entry_time)) ?> + is_in_effect) { + printf($this->translate('Expires %s.'), $this->timeUntil($downtime->end)); + } ?> +

    translate('Downtime'); ?> - ', $commentText); ?>

    diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 406031c19..0aa5ddb66 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -263,7 +263,7 @@ td.state { margin: 0; font-size: 0.857em; - .time-ago { + .info { font-style: italic; color: #919191; } From 139baffdc61f05f8093d71b52fb4610aed1d681b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 3 Aug 2015 12:58:58 +0200 Subject: [PATCH 11/17] lib: Make Dashboard::$tabs protected The SearchDashboard has to override Dashboard::getTabs() in order to set up the correct tab. --- library/Icinga/Web/Widget/Dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Web/Widget/Dashboard.php b/library/Icinga/Web/Widget/Dashboard.php index 0bb7ce2e5..758ec8267 100644 --- a/library/Icinga/Web/Widget/Dashboard.php +++ b/library/Icinga/Web/Widget/Dashboard.php @@ -36,7 +36,7 @@ class Dashboard extends AbstractWidget * * @var Tabs */ - private $tabs; + protected $tabs; /** * The parameter that will be added to identify panes From ea5db51213eede39e19ae30617eee7429a7c26e9 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 3 Aug 2015 13:00:03 +0200 Subject: [PATCH 12/17] Fix "Try to get an inexistent pane." when clicking on the "Search" tab --- library/Icinga/Web/Widget/SearchDashboard.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/library/Icinga/Web/Widget/SearchDashboard.php b/library/Icinga/Web/Widget/SearchDashboard.php index c394e32fa..0ca759919 100644 --- a/library/Icinga/Web/Widget/SearchDashboard.php +++ b/library/Icinga/Web/Widget/SearchDashboard.php @@ -19,6 +19,25 @@ class SearchDashboard extends Dashboard */ const SEARCH_PANE = 'search'; + /** + * {@inheritdoc} + */ + public function getTabs() + { + if ($this->tabs === null) { + $this->tabs = new Tabs(); + $this->tabs->add( + 'search', + array( + 'title' => t('Show Search', 'dashboard.pane.tooltip'), + 'label' => t('Search'), + 'url' => Url::fromRequest() + ) + ); + } + return $this->tabs; + } + /** * Load all available search dashlets from modules * From 95ea0e616dc418feda46cd4adb2022a94eaef8e3 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Mon, 3 Aug 2015 13:05:41 +0200 Subject: [PATCH 13/17] components/downtime: Add the missing php script tag refs #8845 --- .../application/views/scripts/show/components/downtime.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index e4341d45a..889ec0508 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -104,8 +104,8 @@ if (isset($delDowntimeForm)) {

    escape($downtime->author_name) ?> - translate('Added %s.'), $this->timeAgo($downtime->entry_time)) ?> - is_in_effect) { + translate('Added %s.'), $this->timeAgo($downtime->entry_time)) ?> + is_in_effect) { printf($this->translate('Expires %s.'), $this->timeUntil($downtime->end)); } ?> From 1652f1e1ae0f8a8da7ea5a2882dde70920e924b9 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Mon, 3 Aug 2015 13:38:49 +0200 Subject: [PATCH 14/17] Revert "components/downtime: Add the missing php script tag" This reverts commit 95ea0e616dc418feda46cd4adb2022a94eaef8e3. refs #8845 --- .../application/views/scripts/show/components/downtime.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 889ec0508..e4341d45a 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -104,8 +104,8 @@ if (isset($delDowntimeForm)) {

    escape($downtime->author_name) ?> - translate('Added %s.'), $this->timeAgo($downtime->entry_time)) ?> - is_in_effect) { + translate('Added %s.'), $this->timeAgo($downtime->entry_time)) ?> + is_in_effect) { printf($this->translate('Expires %s.'), $this->timeUntil($downtime->end)); } ?> From 8860181bcc884846c9c72174dfbb9171d3c36d32 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Mon, 3 Aug 2015 13:40:32 +0200 Subject: [PATCH 15/17] Revert "components/downtime: Add downtime end time information in view" This reverts commit 863330e50d3aa79baed55915f237bb028e10be70. refs #8845 --- .../views/scripts/show/components/downtime.phtml | 7 +------ modules/monitoring/public/css/module.less | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index e4341d45a..46b0f5a3a 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -103,12 +103,7 @@ if (isset($delDowntimeForm)) {
  • escape($downtime->author_name) ?> - - translate('Added %s.'), $this->timeAgo($downtime->entry_time)) ?> - is_in_effect) { - printf($this->translate('Expires %s.'), $this->timeUntil($downtime->end)); - } ?> - + timeAgo($downtime->entry_time) ?>

    translate('Downtime'); ?> - ', $commentText); ?>

    diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 0aa5ddb66..406031c19 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -263,7 +263,7 @@ td.state { margin: 0; font-size: 0.857em; - .info { + .time-ago { font-style: italic; color: #919191; } From a63b69f4a1588a56aa5169b913036b4ec3e2f9f1 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Mon, 3 Aug 2015 13:44:41 +0200 Subject: [PATCH 16/17] components/downtime: Add downtime end time information in view fixes #8845 --- .../application/views/scripts/show/components/downtime.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 46b0f5a3a..f6d9647bd 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -67,8 +67,8 @@ if (empty($object->comments) && ! $addLink) { if ((bool) $downtime->is_in_effect) { $state = sprintf( - $this->translate('in downtime %s', 'Last format parameter represents the time in downtime'), - $this->timeSince($downtime->start) + $this->translate('expires %s', 'Last format parameter represents the downtime expire time'), + $this->timeUntil($downtime->end) ); } else { if ((bool) $downtime->is_fixed) { From 6a17d7cb26d31a32817344922f27388477e44226 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Mon, 3 Aug 2015 13:19:49 +0200 Subject: [PATCH 17/17] Do not target next pane in multiview detail controls fixes #9815 --- modules/monitoring/application/views/scripts/hosts/show.phtml | 2 +- .../monitoring/application/views/scripts/services/show.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/hosts/show.phtml b/modules/monitoring/application/views/scripts/hosts/show.phtml index 1abc2d21d..3dbb0673f 100644 --- a/modules/monitoring/application/views/scripts/hosts/show.phtml +++ b/modules/monitoring/application/views/scripts/hosts/show.phtml @@ -1,4 +1,4 @@ -
    +
    compact): ?> diff --git a/modules/monitoring/application/views/scripts/services/show.phtml b/modules/monitoring/application/views/scripts/services/show.phtml index fc2e87ad2..d2ad21bca 100644 --- a/modules/monitoring/application/views/scripts/services/show.phtml +++ b/modules/monitoring/application/views/scripts/services/show.phtml @@ -1,4 +1,4 @@ -
    +
    compact): ?>