Merge branch 'master' into feature/ldap-ssl-and-tls-support-7771

This commit is contained in:
Johannes Meyer 2015-03-12 15:18:53 +01:00
commit 359a5f54c3
28 changed files with 177 additions and 16 deletions

View File

@ -21,7 +21,7 @@ if (! $this->auth()->isAuthenticated()) {
</li>
</ul>
</div>
<div id="menu" data-last-update="<?= (time() - 14) ?>000" data-base-target="_main" class="container"
<div id="menu" data-last-update="-1" data-base-target="_main" class="container"
data-icinga-url="<?= $this->href('layout/menu') ?>" data-icinga-refresh="15">
<?= $this->partial(
'layout/menu.phtml',

View File

@ -307,20 +307,24 @@ class Web extends ApplicationBootstrap
/**
* Setup internationalization using gettext
*
* Uses the preferred user language or the configured default and system default, respectively.
* Uses the preferred user language or the browser suggested language or our default.
*
* @return self
* @return string Detected locale code
*
* @see Translator::DEFAULT_LOCALE For the the default locale code.
*/
protected function detectLocale()
{
$auth = Manager::getInstance();
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$auth->isAuthenticated()
|| ($locale = $auth->getUser()->getPreferences()->getValue('icingaweb', 'language')) === null
if ($auth->isAuthenticated()
&& ($locale = $auth->getUser()->getPreferences()->getValue('icingaweb', 'language')) !== null
) {
$locale = Translator::getPreferredLocaleCode($_SERVER['HTTP_ACCEPT_LANGUAGE']);
return $locale;
}
return $locale;
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
return Translator::getPreferredLocaleCode($_SERVER['HTTP_ACCEPT_LANGUAGE']);
}
return Translator::DEFAULT_LOCALE;
}
/**

View File

@ -589,7 +589,7 @@ SQL;
{
$this->select->joinLeft(
array('hlcd' => $this->getLastCommentSubQuery(2, 'last_downtime_data')),
'hlcg.object_id = hs.host_object_id',
'hlcd.object_id = hs.host_object_id',
array()
);
}
@ -601,7 +601,7 @@ SQL;
{
$this->select->joinLeft(
array('hlcf' => $this->getLastCommentSubQuery(3, 'last_flapping_data')),
'hlcg.object_id = hs.host_object_id',
'hlcf.object_id = hs.host_object_id',
array()
);
}

View File

@ -0,0 +1,3 @@
PLEASE DO NOT BUILD PACKAGES BASES ON THIS
Packages may still be renamed

View File

@ -0,0 +1,5 @@
icingaweb (2.0.0) stable; urgency=low
* First stable release (Closes: #0001)
-- Thomas Gelf <thomas@gelf.net> Fri, 28 Mar 2014 23:37:31 +0100

1
packages/debian/compat Normal file
View File

@ -0,0 +1 @@
9

68
packages/debian/control Normal file
View File

@ -0,0 +1,68 @@
Source: icingaweb
Section: admin
Maintainer: Icinga Development Team <info@icinga.org>
Priority: optional
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.4
Homepage: https://www.icinga.org
Package: php-icinga
Architecture: any
Depends: php5 (>= 5.3.2)
Recommends: php5-ldap, php5-mysql, php5-json
Suggests: php5-pgsql
Description: Icinga PHP libraries
PHP libraries
Package: icingaweb-common
Architecture: any
Depends: php-icinga
Description: Icinga PHP common libraries
PHP common libraries, application and modules
Package: icingaweb-module-doc
Architecture: any
Depends: icingaweb-common
Description: Icingaweb documentation module
This module renders documentation for Icingaweb and its modules
Package: icingaweb-module-monitoring
Architecture: any
Depends: icingaweb-common
Description: Icingaweb monitoring module
Use this module to visualize your monitoring environment in Icingaweb
Package: icingaweb-module-setup
Architecture: any
Depends: icingaweb-common
Description: Icingaweb setup module
This setup wizard does your initial Icingaweb configuration
Package: icingaweb-module-test
Architecture: any
Depends: icingacli
Description: Icingaweb test module
Use this module to run unit tests against Icingaweb or any of its modules
Package: icingaweb-module-translation
Architecture: any
Depends: icingaweb-common
Description: Icingaweb translation module
This module helps translators to get Icingaweb translations done
Package: icingacli
Architecture: any
Depends: icingaweb-common, php5-cli (>= 5.3.2)
Description: Icinga CLI tool
The Icinga CLI allows one to access its Icinga monitoring
system from a terminal.
.
The CLI is based on the Icinga PHP libraries
Package: icingaweb
Architecture: any
Depends: icingaweb-common, libapache2-mod-php5, zendframework | icingaweb-vendor-zend, icingaweb-vendor-parsedown, icingaweb-vendor-lessphp, icingaweb-vendor-jshrink, icingaweb-vendor-htmlpurifier, icingaweb-module-setup
Recommends: icingaweb-module-monitoring, icingaweb-module-doc
Suggests: php5-ldap
Description: Icingaweb Frontend
Icingaweb is a modular web frontend

View File

@ -0,0 +1 @@
library/Icinga usr/share/php

View File

@ -0,0 +1,3 @@
packages/files/bin/icingacli usr/bin
etc/bash_completion.d etc/bash_completion.d
application/clicommands usr/share/icingaweb/application

View File

@ -0,0 +1 @@
etc/icingaweb

View File

@ -0,0 +1,2 @@
application/locales usr/share/icingaweb/application
modules usr/share/icingaweb

View File

@ -0,0 +1 @@
modules/doc usr/share/icingaweb/modules

View File

@ -0,0 +1 @@
modules/doc usr/share/icingaweb/modules

View File

@ -0,0 +1 @@
modules/setup usr/share/icingaweb/modules

View File

@ -0,0 +1 @@
modules/test usr/share/icingaweb/modules

View File

@ -0,0 +1 @@
modules/translation usr/share/icingaweb/modules

View File

@ -0,0 +1 @@
library/vendor/HTMLPurifier usr/share/icingaweb/library/vendor

View File

@ -0,0 +1 @@
library/vendor/JShrink usr/share/icingaweb/library/vendor

View File

@ -0,0 +1 @@
library/vendor/Zend usr/share/icingaweb/library/vendor

View File

@ -0,0 +1 @@
library/vendor/Parsedown usr/share/icingaweb/library/vendor

View File

@ -0,0 +1 @@
library/vendor/Zend usr/share/icingaweb/library/vendor

View File

@ -0,0 +1,10 @@
public/css usr/share/icingaweb/public
public/img usr/share/icingaweb/public
public/js usr/share/icingaweb/public
public/error_norewrite.html usr/share/icingaweb/public
application/controllers usr/share/icingaweb/application
application/fonts usr/share/icingaweb/application
application/layouts usr/share/icingaweb/application
application/views usr/share/icingaweb/application
packages/files/public/index.php usr/share/icingaweb/public
packages/files/apache/icingaweb.conf etc/apache2/conf.d

35
packages/debian/rules Executable file
View File

@ -0,0 +1,35 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
%:
dh $@
clean:
dh_testdir
dh_clean
build:
dh_testdir
binary:
dh_testroot
dh_prep
dh_installdirs
dh_install
dh_installchangelogs
dh_installexamples
dh_installman
dh_installcron
dh_installdebconf
dh_installinfo
dh_installinit
dpkg-statoverride --force --add root www-data 2770 /etc/icingaweb
dh_compress
dh_fixperms
dh_strip
dh_shlibdeps
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb

View File

@ -0,0 +1 @@
3.0 (git)

View File

@ -0,0 +1 @@
misc:Depends=

View File

@ -163,6 +163,11 @@ html {
.dashboard .content {
padding: 0;
overflow: auto;
}
.dashboard .controls {
display: none;
}
/* Not growing larger than 3840px at 1em=16px right now */

View File

@ -239,14 +239,18 @@
event.stopPropagation();
event.preventDefault();
// activate spinner indicator
if ($button.hasClass('spinner')) {
$button.addClass('active');
}
icinga.logger.debug('Submitting form: ' + method + ' ' + url, method);
$target = self.getLinkTargetFor($button);
if ($button.length) {
// activate spinner indicator
if ($button.hasClass('spinner')) {
$button.addClass('active');
}
$target = self.getLinkTargetFor($button);
} else {
$target = self.getLinkTargetFor($form);
}
if (method === 'GET') {
var dataObj = $form.serializeObject();

View File

@ -718,6 +718,9 @@
initializeControls: function (parent) {
var self = this;
if ($(parent).closest('.dashboard').length) {
return;
}
$('.controls', parent).each(function (idx, el) {
var $el = $(el);
@ -761,6 +764,10 @@
return;
}
if ($parent.closest('.dashboard').length) {
return;
}
// Enable this only in case you want to track down UI problems
// self.icinga.logger.debug('Fixing controls for ', $parent);