Merge branch 'master' into feature/display-documentation-4820
Conflicts: modules/doc/library/Doc/DocParser.php
This commit is contained in:
commit
160a75403d
|
@ -37,3 +37,7 @@ config/preferences/*.ini
|
||||||
|
|
||||||
# Application logfiles
|
# Application logfiles
|
||||||
var/log/*.log
|
var/log/*.log
|
||||||
|
|
||||||
|
/debian
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,23 @@
|
||||||
<Directory "/var/www/html/icingaweb">
|
Alias /icingaweb /vagrant/public
|
||||||
Options -Indexes
|
|
||||||
|
|
||||||
AllowOverride All
|
|
||||||
|
|
||||||
|
<Directory "/vagrant/public/">
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
|
|
||||||
|
# SetEnv ICINGAWEB_CONFIGDIR /etc/icingaweb
|
||||||
|
|
||||||
EnableSendfile Off
|
EnableSendfile Off
|
||||||
|
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteBase /icingaweb/
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
|
RewriteRule ^.*$ - [NC,L]
|
||||||
|
RewriteRule ^.*$ index.php [NC,L]
|
||||||
|
|
||||||
|
php_value xdebug.idekey PHPSTORM
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
/**
|
||||||
|
* This file defines global constants which can be used in
|
||||||
|
* the other configuration files.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* The directory which contains the plugins from the Monitoring Plugins project. */
|
||||||
|
const PluginDir = "/usr/lib64/nagios/plugins"
|
||||||
|
|
||||||
|
/* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`.
|
||||||
|
* This should be the common name from the API certificate.
|
||||||
|
*/
|
||||||
|
const NodeName = "localhost"
|
||||||
|
|
||||||
|
/* Our local zone name. */
|
||||||
|
const ZoneName = NodeName
|
|
@ -1,3 +1,9 @@
|
||||||
|
[autologin]
|
||||||
|
backend = autologin
|
||||||
|
;
|
||||||
|
; If you want to strip the domain
|
||||||
|
; strip_username_regexp = /\@[^$]+$/
|
||||||
|
|
||||||
[internal_ldap_authentication]
|
[internal_ldap_authentication]
|
||||||
backend = ldap
|
backend = ldap
|
||||||
resource = internal_ldap
|
resource = internal_ldap
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
RewriteEngine on
|
|
||||||
RewriteBase /icingaweb
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -d
|
|
||||||
RewriteRule ^.*$ - [NC,L]
|
|
||||||
RewriteRule ^.*$ index.php [NC,L]
|
|
||||||
|
|
||||||
php_flag short_open_tag on
|
|
||||||
|
|
||||||
php_value xdebug.idekey PHPSTORM
|
|
|
@ -6,7 +6,7 @@ include openldap
|
||||||
Exec { path => '/bin:/usr/bin:/sbin' }
|
Exec { path => '/bin:/usr/bin:/sbin' }
|
||||||
|
|
||||||
$icingaVersion = '1.11.2'
|
$icingaVersion = '1.11.2'
|
||||||
$icinga2Version = '0.0.11'
|
$icinga2Version = '2.0.0'
|
||||||
|
|
||||||
exec { 'create-mysql-icinga-db':
|
exec { 'create-mysql-icinga-db':
|
||||||
unless => 'mysql -uicinga -picinga icinga',
|
unless => 'mysql -uicinga -picinga icinga',
|
||||||
|
@ -50,7 +50,7 @@ group { 'icinga-cmd':
|
||||||
|
|
||||||
group { 'icingacmd':
|
group { 'icingacmd':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
require => Exec['install icinga2']
|
require => Package['icinga2']
|
||||||
}
|
}
|
||||||
|
|
||||||
user { 'icinga':
|
user { 'icinga':
|
||||||
|
@ -343,50 +343,95 @@ package { ['cmake', 'boost-devel', 'bison', 'flex']:
|
||||||
ensure => installed
|
ensure => installed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# icinga 2
|
||||||
|
define icinga2::feature ($feature = $title) {
|
||||||
|
exec { "icinga2-feature-${feature}":
|
||||||
|
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
||||||
|
unless => "readlink /etc/icinga2/features-enabled/${feature}.conf",
|
||||||
|
command => "icinga2-enable-feature ${feature}",
|
||||||
|
require => [ Package['icinga2'] ],
|
||||||
|
notify => Service['icinga2']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
yumrepo { 'icinga2-repo':
|
yumrepo { 'icinga2-repo':
|
||||||
baseurl => "http://packages.icinga.org/epel/6/snapshot/",
|
baseurl => "http://packages.icinga.org/epel/6/snapshot/",
|
||||||
enabled => '0',
|
enabled => '1',
|
||||||
gpgcheck => '1',
|
gpgcheck => '1',
|
||||||
gpgkey => 'http://packages.icinga.org/icinga.key',
|
gpgkey => 'http://packages.icinga.org/icinga.key',
|
||||||
descr => "Icinga Repository - ${::architecture}"
|
descr => "Icinga Repository - ${::architecture}"
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'install icinga2':
|
|
||||||
command => 'yum -d 0 -e 0 -y --enablerepo=icinga2-repo install icinga2',
|
|
||||||
unless => 'rpm -qa | grep icinga2',
|
|
||||||
require => Yumrepo['icinga2-repo']
|
|
||||||
}
|
|
||||||
|
|
||||||
exec { 'install icinga2-classicui-config':
|
|
||||||
command => 'yum -d 0 -e 0 -y --enablerepo=icinga2-repo install icinga2-classicui-config',
|
|
||||||
unless => 'rpm -qa | grep icinga2-classicui-config',
|
|
||||||
require => [ Yumrepo['icinga2-repo'], Exec['install icinga2'], Exec['install icinga2-ido-mysql'] ]
|
|
||||||
}
|
|
||||||
|
|
||||||
exec { 'install icinga2-ido-mysql':
|
|
||||||
command => 'yum -d 0 -e 0 -y --enablerepo=icinga2-repo install icinga2-ido-mysql',
|
|
||||||
unless => 'rpm -qa | grep icinga2-ido-mysql',
|
|
||||||
require => [ Yumrepo['icinga2-repo'], Exec['install icinga2'] ],
|
|
||||||
}
|
|
||||||
|
|
||||||
exec { 'install nagios-plugins-all':
|
exec { 'install nagios-plugins-all':
|
||||||
command => 'yum -d 0 -e 0 -y --enablerepo=epel install nagios-plugins-all',
|
command => 'yum -d 0 -e 0 -y --enablerepo=epel install nagios-plugins-all',
|
||||||
unless => 'rpm -qa | grep nagios-plugins-all',
|
unless => 'rpm -qa | grep nagios-plugins-all',
|
||||||
require => [ Class['epel'], Exec['install icinga2'] ],
|
require => [ Class['epel'], Package['icinga2'] ],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/icinga2/features-enabled/':
|
package { 'icinga2':
|
||||||
ensure => directory,
|
ensure => latest,
|
||||||
owner => icinga,
|
require => Yumrepo['icinga2-repo'],
|
||||||
group => icinga,
|
alias => 'icinga2'
|
||||||
require => Exec['install icinga2-ido-mysql']
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package { 'icinga2-bin':
|
||||||
|
ensure => latest,
|
||||||
|
require => [ Yumrepo['icinga2-repo'], Package['icinga2'] ],
|
||||||
|
alias => 'icinga2-bin'
|
||||||
|
}
|
||||||
|
|
||||||
|
package { 'icinga2-doc':
|
||||||
|
ensure => latest,
|
||||||
|
require => Yumrepo['icinga2-repo'],
|
||||||
|
alias => 'icinga2-doc'
|
||||||
|
}
|
||||||
|
|
||||||
|
# icinga 2 classic ui
|
||||||
|
package { 'icinga2-classicui-config':
|
||||||
|
ensure => latest,
|
||||||
|
before => Package["icinga-gui"],
|
||||||
|
require => [ Yumrepo['icinga2-repo'], Package['icinga2'] ],
|
||||||
|
notify => Service['apache']
|
||||||
|
}
|
||||||
|
|
||||||
|
package { 'icinga-gui':
|
||||||
|
ensure => latest,
|
||||||
|
require => Yumrepo['icinga2-repo'],
|
||||||
|
alias => 'icinga-gui'
|
||||||
|
}
|
||||||
|
|
||||||
|
icinga2::feature { 'statusdata':
|
||||||
|
require => Package['icinga2-classicui-config']
|
||||||
|
}
|
||||||
|
|
||||||
|
icinga2::feature { 'command':
|
||||||
|
require => Package['icinga2-classicui-config']
|
||||||
|
}
|
||||||
|
|
||||||
|
icinga2::feature { 'compatlog':
|
||||||
|
require => Package['icinga2-classicui-config']
|
||||||
|
}
|
||||||
|
|
||||||
|
# icinga 2 ido mysql
|
||||||
|
package { 'icinga2-ido-mysql':
|
||||||
|
ensure => latest,
|
||||||
|
require => Yumrepo['icinga2-repo'],
|
||||||
|
alias => 'icinga2-ido-mysql'
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { 'populate-icinga2-mysql-db':
|
||||||
|
unless => 'mysql -uicinga2 -picinga2 icinga2 -e "SELECT * FROM icinga_dbversion;" &> /dev/null',
|
||||||
|
command => "mysql -uroot icinga2 < /usr/share/doc/icinga2-ido-mysql-$icinga2Version/schema/mysql.sql",
|
||||||
|
require => [ Exec['create-mysql-icinga2-db'], Package['icinga2-ido-mysql'] ]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
file { '/etc/icinga2/features-available/ido-mysql.conf':
|
file { '/etc/icinga2/features-available/ido-mysql.conf':
|
||||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/features-available/ido-mysql.conf',
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/features-available/ido-mysql.conf',
|
||||||
owner => 'icinga',
|
owner => 'icinga',
|
||||||
group => 'icinga',
|
group => 'icinga',
|
||||||
require => Exec['install icinga2-ido-mysql']
|
require => Package['icinga2'],
|
||||||
|
notify => Service['icinga2']
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/icinga2/features-enabled/ido-mysql.conf':
|
file { '/etc/icinga2/features-enabled/ido-mysql.conf':
|
||||||
|
@ -394,69 +439,46 @@ file { '/etc/icinga2/features-enabled/ido-mysql.conf':
|
||||||
target => '/etc/icinga2/features-available/ido-mysql.conf',
|
target => '/etc/icinga2/features-available/ido-mysql.conf',
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
require => Exec['install icinga2-ido-mysql']
|
require => Package['icinga2-ido-mysql']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
icinga2::feature { 'ido-mysql':
|
||||||
|
require => Exec['populate-icinga2-mysql-db']
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# icinga 2 test config
|
||||||
file { '/etc/icinga2/conf.d/test-config.conf':
|
file { '/etc/icinga2/conf.d/test-config.conf':
|
||||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/conf.d/test-config.conf',
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/conf.d/test-config.conf',
|
||||||
owner => 'icinga',
|
owner => 'icinga',
|
||||||
group => 'icinga',
|
group => 'icinga',
|
||||||
require => [ Exec['install icinga2'], Exec['create_monitoring_test_config'] ]
|
require => [ Package['icinga2'], Exec['create_monitoring_test_config'] ]
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/icinga2/conf.d/commands.conf':
|
file { '/etc/icinga2/conf.d/commands.conf':
|
||||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/conf.d/commands.conf',
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/conf.d/commands.conf',
|
||||||
owner => 'icinga',
|
owner => 'icinga',
|
||||||
group => 'icinga',
|
group => 'icinga',
|
||||||
require => Exec['install icinga2']
|
require => Package['icinga2']
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/etc/icinga2/constants.conf':
|
||||||
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/constants.conf',
|
||||||
|
owner => 'icinga',
|
||||||
|
group => 'icinga',
|
||||||
|
require => Package['icinga2']
|
||||||
}
|
}
|
||||||
|
|
||||||
service { 'icinga2':
|
service { 'icinga2':
|
||||||
ensure => running,
|
ensure => running,
|
||||||
require => [
|
require => [
|
||||||
Exec['install icinga2'],
|
Package['icinga2'],
|
||||||
File['/etc/icinga2/features-enabled/ido-mysql.conf'],
|
File['/etc/icinga2/features-enabled/ido-mysql.conf'],
|
||||||
File['/etc/icinga2/conf.d/test-config.conf'],
|
File['/etc/icinga2/conf.d/test-config.conf'],
|
||||||
File['/etc/icinga2/conf.d/commands.conf']
|
File['/etc/icinga2/conf.d/commands.conf']
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'populate-icinga2-mysql-db':
|
|
||||||
unless => 'mysql -uicinga2 -picinga2 icinga2 -e "SELECT * FROM icinga_dbversion;" &> /dev/null',
|
|
||||||
command => "mysql -uroot icinga2 < /usr/share/doc/icinga2-ido-mysql-$icinga2Version/schema/mysql.sql",
|
|
||||||
require => [ Exec['create-mysql-icinga2-db'], Exec['install icinga2-ido-mysql'] ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# cmmi { 'icinga2':
|
|
||||||
# url => "https://github.com/Icinga/icinga2/releases/download/v${icinga2Version}/icinga2-${icinga2Version}.tar.gz",
|
|
||||||
# output => "icinga2-${icinga2Version}.tar.gz",
|
|
||||||
# configure_command => 'mkdir build &> /dev/null || true && cd build && sudo cmake ..',
|
|
||||||
# creates => '/usr/local/sbin/icinga2',
|
|
||||||
# make => 'true && cd build/ && make && make install',
|
|
||||||
# require => Package[ ['cmake', 'boost-devel', 'bison', 'flex'] ],
|
|
||||||
# make_timeout => 900
|
|
||||||
# }
|
|
||||||
|
|
||||||
#configure { 'icingaweb':
|
|
||||||
# path => '/vagrant',
|
|
||||||
# flags => '--prefix=/vagrant \
|
|
||||||
# --with-icinga-commandpipe="/usr/local/icinga-mysql/var/rw/icinga.cmd" \
|
|
||||||
# --with-statusdat-file="/usr/local/icinga-mysql/var/status.dat" \
|
|
||||||
# --with-objects-cache-file=/usr/local/icinga-mysql/var/objects.cache \
|
|
||||||
# --with-icinga-backend=ido \
|
|
||||||
# --with-httpd-config-path="/etc/httpd/conf.d" \
|
|
||||||
# --with-ldap-authentication \
|
|
||||||
# --with-internal-authentication \
|
|
||||||
# --with-livestatus-socket="/usr/local/icinga-mysql/var/rw/live"',
|
|
||||||
# require => Exec['install php-ZendFramework']
|
|
||||||
#}
|
|
||||||
|
|
||||||
#file { 'icingaweb-public':
|
|
||||||
# ensure => '/vagrant/public',
|
|
||||||
# path => '/var/www/html/icingaweb',
|
|
||||||
# require => Class['apache']
|
|
||||||
#}
|
|
||||||
|
|
||||||
exec { 'install php-ZendFramework-Db-Adapter-Pdo-Mysql':
|
exec { 'install php-ZendFramework-Db-Adapter-Pdo-Mysql':
|
||||||
command => 'yum -d 0 -e 0 -y --enablerepo=epel install php-ZendFramework-Db-Adapter-Pdo-Mysql',
|
command => 'yum -d 0 -e 0 -y --enablerepo=epel install php-ZendFramework-Db-Adapter-Pdo-Mysql',
|
||||||
unless => 'rpm -qa | grep php-ZendFramework-Db-Adapter-Pdo-Mysql',
|
unless => 'rpm -qa | grep php-ZendFramework-Db-Adapter-Pdo-Mysql',
|
||||||
|
@ -664,63 +686,10 @@ exec { 'populate-icinga_web-mysql-db':
|
||||||
require => [ Exec['create-mysql-icinga_web-db'], Cmmi['icinga-web'] ]
|
require => [ Exec['create-mysql-icinga_web-db'], Cmmi['icinga-web'] ]
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# Development environment (Feature #5554)
|
|
||||||
#
|
|
||||||
file { '/var/www/html/icingaweb':
|
file { '/var/www/html/icingaweb':
|
||||||
ensure => 'directory',
|
|
||||||
owner => 'apache',
|
|
||||||
group => 'apache'
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/var/www/html/icingaweb/css':
|
|
||||||
ensure => 'link',
|
|
||||||
target => '/vagrant/public/css',
|
|
||||||
owner => 'apache',
|
|
||||||
group => 'apache',
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/var/www/html/icingaweb/svg':
|
|
||||||
ensure => 'link',
|
|
||||||
target => '/vagrant/public/svg',
|
|
||||||
owner => 'apache',
|
|
||||||
group => 'apache',
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/var/www/html/icingaweb/img':
|
|
||||||
ensure => 'link',
|
|
||||||
target => '/vagrant/public/img',
|
|
||||||
owner => 'apache',
|
|
||||||
group => 'apache',
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/var/www/html/icingaweb/js':
|
|
||||||
ensure => 'link',
|
|
||||||
target => '/vagrant/public/js',
|
|
||||||
owner => 'apache',
|
|
||||||
group => 'apache',
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/var/www/html/icingaweb/index.php':
|
|
||||||
source => 'puppet:////vagrant/.vagrant-puppet/files/var/www/html/icingaweb/index.php',
|
|
||||||
owner => 'apache',
|
|
||||||
group => 'apache',
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/var/www/html/icingaweb/js.php':
|
|
||||||
ensure => absent,
|
ensure => absent,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/var/www/html/icingaweb/css.php':
|
|
||||||
ensure => absent,
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/var/www/html/icingaweb/.htaccess':
|
|
||||||
source => 'puppet:////vagrant/.vagrant-puppet/files/var/www/html/icingaweb/.htaccess',
|
|
||||||
owner => 'apache',
|
|
||||||
group => 'apache',
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/etc/httpd/conf.d/icingaweb.conf':
|
file { '/etc/httpd/conf.d/icingaweb.conf':
|
||||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf',
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf',
|
||||||
require => Package['apache'],
|
require => Package['apache'],
|
||||||
|
|
|
@ -10,11 +10,6 @@ installJquery () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mountIcinga2webConfd () {
|
|
||||||
# Remount /vagrant/config/ with appropriate permissions since the group apache is missing initially
|
|
||||||
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g apache`,dmode=775,fmode=775 /vagrant/config/ /vagrant/config/
|
|
||||||
}
|
|
||||||
|
|
||||||
startServicesWithNonLSBCompliantExitStatusCodes () {
|
startServicesWithNonLSBCompliantExitStatusCodes () {
|
||||||
# Unfortunately the ido2db init script is not LSB compliant and hence not started via puppet
|
# Unfortunately the ido2db init script is not LSB compliant and hence not started via puppet
|
||||||
service ido2db-mysql start || true
|
service ido2db-mysql start || true
|
||||||
|
@ -22,12 +17,16 @@ startServicesWithNonLSBCompliantExitStatusCodes () {
|
||||||
}
|
}
|
||||||
|
|
||||||
mountIcinga2webVarLog () {
|
mountIcinga2webVarLog () {
|
||||||
# Remount /vagrant/var/log/ with appropriate permissions since the group apache is missing initially
|
if ! $(/bin/mount | /bin/grep -q "/vagrant/var/log"); then
|
||||||
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g apache`,dmode=775,fmode=775 /vagrant/var/log/ /vagrant/var/log/
|
# Remount /vagrant/var/log/ with appropriate permissions since the group apache is missing initially
|
||||||
|
/bin/mount -t vboxsf -o \
|
||||||
|
uid=`id -u vagrant`,gid=`id -g apache`,dmode=775,fmode=664 \
|
||||||
|
/vagrant/var/log/ \
|
||||||
|
/vagrant/var/log/
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
installJquery
|
installJquery
|
||||||
mountIcinga2webConfd
|
|
||||||
startServicesWithNonLSBCompliantExitStatusCodes
|
startServicesWithNonLSBCompliantExitStatusCodes
|
||||||
mountIcinga2webVarLog
|
mountIcinga2webVarLog
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@ clean:
|
||||||
# Installs/copies all static files (executables, scripts, html, etc)
|
# Installs/copies all static files (executables, scripts, html, etc)
|
||||||
#
|
#
|
||||||
install-static-files: install-application copy-web-files-public copy-web-files-modules
|
install-static-files: install-application copy-web-files-public copy-web-files-modules
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) "./public/.htaccess" $(DESTDIR)$(prefix)/public/.htaccess;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Installs all configuration files
|
# Installs all configuration files
|
||||||
|
|
|
@ -1,7 +1,20 @@
|
||||||
# -*- mode: ruby -*-
|
# -*- mode: ruby -*-
|
||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
VAGRANTFILE_API_VERSION = "2"
|
||||||
|
VAGRANT_REQUIRED_VERSION = "1.2.0"
|
||||||
|
|
||||||
|
# Require 1.2.x at least
|
||||||
|
if ! defined? Vagrant.require_version
|
||||||
|
if Gem::Version.new(Vagrant::VERSION) < Gem::Version.new(VAGRANT_REQUIRED_VERSION)
|
||||||
|
puts "Vagrant >= " + VAGRANT_REQUIRED_VERSION + " required. Your version is " + Vagrant::VERSION
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Vagrant.require_version ">= " + VAGRANT_REQUIRED_VERSION
|
||||||
|
end
|
||||||
|
|
||||||
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
# All Vagrant configuration is done here. The most common configuration
|
# All Vagrant configuration is done here. The most common configuration
|
||||||
# options are documented and commented below. For a complete reference,
|
# options are documented and commented below. For a complete reference,
|
||||||
# please see the online documentation at vagrantup.com.
|
# please see the online documentation at vagrantup.com.
|
||||||
|
|
|
@ -54,7 +54,7 @@ class ModuleCommand extends Command
|
||||||
$modules = $this->modules->listInstalledModules();
|
$modules = $this->modules->listInstalledModules();
|
||||||
}
|
}
|
||||||
if (empty($modules)) {
|
if (empty($modules)) {
|
||||||
echo "There are no modules installed\n";
|
echo "There are no $type modules\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->isVerbose) {
|
if ($this->isVerbose) {
|
||||||
|
@ -67,7 +67,7 @@ class ModuleCommand extends Command
|
||||||
if ($this->isVerbose) {
|
if ($this->isVerbose) {
|
||||||
$dir = ' ' . $this->modules->getModuleDir($module);
|
$dir = ' ' . $this->modules->getModuleDir($module);
|
||||||
} else {
|
} else {
|
||||||
$dir = $mod->getShortDescription();
|
$dir = $mod->getTitle();
|
||||||
}
|
}
|
||||||
printf(
|
printf(
|
||||||
"%-14s %-9s %-9s %s\n",
|
"%-14s %-9s %-9s %s\n",
|
||||||
|
|
|
@ -29,7 +29,7 @@ class WebCommand extends Command
|
||||||
// throw new Exception('Socket is required');
|
// throw new Exception('Socket is required');
|
||||||
}
|
}
|
||||||
if ($basedir === null) {
|
if ($basedir === null) {
|
||||||
$basedir = dirname(ICINGA_APPDIR) . '/public';
|
$basedir = dirname(ICINGAWEB_APPDIR) . '/public';
|
||||||
if (! file_exists($basedir) || ! is_dir($basedir)) {
|
if (! file_exists($basedir) || ! is_dir($basedir)) {
|
||||||
throw new Exception('Basedir is required');
|
throw new Exception('Basedir is required');
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,12 +30,14 @@
|
||||||
|
|
||||||
# namespace Icinga\Application\Controllers;
|
# namespace Icinga\Application\Controllers;
|
||||||
|
|
||||||
|
use Icinga\Authentication\Backend\AutoLoginBackend;
|
||||||
use Icinga\Web\Controller\ActionController;
|
use Icinga\Web\Controller\ActionController;
|
||||||
use Icinga\Authentication\Manager as AuthManager;
|
use Icinga\Authentication\Manager as AuthManager;
|
||||||
use Icinga\Form\Authentication\LoginForm;
|
use Icinga\Form\Authentication\LoginForm;
|
||||||
use Icinga\Authentication\AuthChain;
|
use Icinga\Authentication\AuthChain;
|
||||||
use Icinga\Application\Config;
|
use Icinga\Application\Config;
|
||||||
use Icinga\Logger\Logger;
|
use Icinga\Logger\Logger;
|
||||||
|
use Icinga\Exception\AuthenticationException;
|
||||||
use Icinga\Exception\NotReadableError;
|
use Icinga\Exception\NotReadableError;
|
||||||
use Icinga\Exception\ConfigurationError;
|
use Icinga\Exception\ConfigurationError;
|
||||||
use Icinga\User;
|
use Icinga\User;
|
||||||
|
@ -60,7 +62,9 @@ class AuthenticationController extends ActionController
|
||||||
{
|
{
|
||||||
$this->view->form = new LoginForm();
|
$this->view->form = new LoginForm();
|
||||||
$this->view->form->setRequest($this->_request);
|
$this->view->form->setRequest($this->_request);
|
||||||
$this->view->title = 'Icinga Web Login';
|
$this->view->title = $this->translate('Icingaweb Login');
|
||||||
|
$user = new User('');
|
||||||
|
$password = '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$redirectUrl = Url::fromPath($this->_request->getParam('redirect', 'dashboard'));
|
$redirectUrl = Url::fromPath($this->_request->getParam('redirect', 'dashboard'));
|
||||||
|
@ -70,52 +74,76 @@ class AuthenticationController extends ActionController
|
||||||
}
|
}
|
||||||
|
|
||||||
$auth = AuthManager::getInstance();
|
$auth = AuthManager::getInstance();
|
||||||
|
|
||||||
if ($auth->isAuthenticated()) {
|
if ($auth->isAuthenticated()) {
|
||||||
$this->redirectNow($redirectUrl);
|
$this->redirectNow($redirectUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->view->form->isSubmittedAndValid()) {
|
try {
|
||||||
$user = new User($this->view->form->getValue('username'));
|
$config = Config::app('authentication');
|
||||||
|
} catch (NotReadableError $e) {
|
||||||
|
Logger::error(
|
||||||
|
new Exception('Cannot load authentication configuration. An exception was thrown:', 0, $e)
|
||||||
|
);
|
||||||
|
throw new ConfigurationError(
|
||||||
|
'No authentication methods available. It seems that none authentication method has been set'
|
||||||
|
. ' up. Please check the system log or Icinga Web 2 log for more information'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
$chain = new AuthChain($config);
|
||||||
$config = Config::app('authentication');
|
|
||||||
} catch (NotReadableError $e) {
|
|
||||||
Logger::error(
|
if ($this->getRequest()->isGet()) {
|
||||||
new Exception('Cannot load authentication configuration. An exception was thrown:', 0, $e)
|
foreach ($chain as $backend) {
|
||||||
);
|
if ($backend instanceof AutoLoginBackend) {
|
||||||
throw new ConfigurationError(
|
$authenticated = $backend->authenticate($user, $password);
|
||||||
'No authentication methods available. It seems that none authentication method has been set'
|
if ($authenticated === true) {
|
||||||
. ' up. Please contact your Icinga Web administrator'
|
$auth->setAuthenticated($user);
|
||||||
);
|
$this->redirectNow($redirectUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} elseif ($this->view->form->isSubmittedAndValid()) {
|
||||||
// TODO(el): Currently the user is only notified about authentication backend problems when all backends
|
$user = new User($this->view->form->getValue('username'));
|
||||||
// have errors. It may be the case that the authentication backend which provides the user has errors
|
$password = $this->view->form->getValue('password');
|
||||||
// but other authentication backends work. In that scenario the user is presented an error message
|
|
||||||
// saying "Incorrect username or password". We must inform the user that not all authentication methods
|
|
||||||
// are available.
|
|
||||||
$backendsTried = 0;
|
$backendsTried = 0;
|
||||||
$backendsWithError = 0;
|
$backendsWithError = 0;
|
||||||
$chain = new AuthChain($config);
|
|
||||||
foreach ($chain as $backend) {
|
foreach ($chain as $backend) {
|
||||||
$authenticated = $backend->authenticate($user, $this->view->form->getValue('password'));
|
if ($backend instanceof AutoLoginBackend) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
++$backendsTried;
|
||||||
|
try {
|
||||||
|
$authenticated = $backend->authenticate($user, $password);
|
||||||
|
} catch (AuthenticationException $e) {
|
||||||
|
Logger::error($e);
|
||||||
|
++$backendsWithError;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($authenticated === true) {
|
if ($authenticated === true) {
|
||||||
$auth->setAuthenticated($user);
|
$auth->setAuthenticated($user);
|
||||||
$this->redirectNow($redirectUrl);
|
$this->redirectNow($redirectUrl);
|
||||||
} elseif ($authenticated === null) {
|
|
||||||
$backendsWithError += 1;
|
|
||||||
}
|
}
|
||||||
$backendsTried += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($backendsWithError === $backendsTried) {
|
if ($backendsWithError === $backendsTried) {
|
||||||
throw new ConfigurationError(
|
throw new ConfigurationError(
|
||||||
'No authentication methods available. It seems that all set up authentication methods have'
|
$this->translate(
|
||||||
. ' errors. Please contact your Icinga Web administrator'
|
'No authentication methods available. It seems that all set up authentication methods have'
|
||||||
|
. ' errors. Please check the system log or Icinga Web 2 log for more information'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if ($backendsWithError) {
|
||||||
$this->view->form->getElement('password')->addError(t('Incorrect username or password'));
|
$this->view->form->addNote(
|
||||||
|
$this->translate(
|
||||||
|
'Note that not all authentication backends are available for authentication because they'
|
||||||
|
. ' have errors. Please check the system log or Icinga Web 2 log for more information'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$this->view->form->getElement('password')->addError($this->translate('Incorrect username or password'));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->view->errorInfo = $e->getMessage();
|
$this->view->errorInfo = $e->getMessage();
|
||||||
|
|
|
@ -46,6 +46,11 @@ use Icinga\Web\Controller\ActionController;
|
||||||
*/
|
*/
|
||||||
class DashboardController extends ActionController
|
class DashboardController extends ActionController
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Default configuration
|
||||||
|
*/
|
||||||
|
const DEFAULT_CONFIG = 'dashboard/dashboard';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a dashboard from the provided config
|
* Retrieve a dashboard from the provided config
|
||||||
*
|
*
|
||||||
|
@ -53,14 +58,18 @@ class DashboardController extends ActionController
|
||||||
*
|
*
|
||||||
* @return \Icinga\Web\Widget\Dashboard
|
* @return \Icinga\Web\Widget\Dashboard
|
||||||
*/
|
*/
|
||||||
private function getDashboard($config = 'dashboard/dashboard')
|
private function getDashboard($config = self::DEFAULT_CONFIG)
|
||||||
{
|
{
|
||||||
$dashboard = new Dashboard();
|
$dashboard = new Dashboard();
|
||||||
try {
|
try {
|
||||||
$dashboardConfig = IcingaConfig::app($config);
|
$dashboardConfig = IcingaConfig::app($config);
|
||||||
|
if (count($dashboardConfig) === 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$dashboard->readConfig($dashboardConfig);
|
$dashboard->readConfig($dashboardConfig);
|
||||||
} catch (NotReadableError $e) {
|
} catch (NotReadableError $e) {
|
||||||
Logger::error(new Exception('Cannot load dashboard configuration. An exception was thrown:', 0, $e));
|
Logger::error(new Exception('Cannot load dashboard configuration. An exception was thrown:', 0, $e));
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return $dashboard;
|
return $dashboard;
|
||||||
}
|
}
|
||||||
|
@ -133,18 +142,28 @@ class DashboardController extends ActionController
|
||||||
$pane = $this->_getParam('pane');
|
$pane = $this->_getParam('pane');
|
||||||
$dashboard->activate($pane);
|
$dashboard->activate($pane);
|
||||||
}
|
}
|
||||||
$this->view->title = $dashboard->getActivePane()->getTitle() . ' :: Dashboard';
|
|
||||||
$this->view->tabs = $dashboard->getTabs();
|
$this->view->configPath = IcingaConfig::resolvePath(self::DEFAULT_CONFIG);
|
||||||
/* Temporarily removed
|
|
||||||
$this->view->tabs->add(
|
if ($dashboard === null) {
|
||||||
'Add',
|
$this->view->title = 'Dashboard';
|
||||||
array(
|
} else {
|
||||||
'title' => '+',
|
$this->view->title = $dashboard->getActivePane()->getTitle() . ' :: Dashboard';
|
||||||
'url' => Url::fromPath('dashboard/addurl')
|
$this->view->tabs = $dashboard->getTabs();
|
||||||
)
|
|
||||||
);
|
/* Temporarily removed
|
||||||
*/
|
$this->view->tabs->add(
|
||||||
$this->view->dashboard = $dashboard;
|
'Add',
|
||||||
|
array(
|
||||||
|
'title' => '+',
|
||||||
|
'url' => Url::fromPath('dashboard/addurl')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->view->dashboard = $dashboard;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,22 +16,35 @@ class SearchController extends ActionController
|
||||||
$this->setAutorefreshInterval(10);
|
$this->setAutorefreshInterval(10);
|
||||||
$search = $this->_request->getParam('q');
|
$search = $this->_request->getParam('q');
|
||||||
if (! $search) {
|
if (! $search) {
|
||||||
$this->view->hint = $this->translate('Ready to search, waiting for your input');
|
$this->view->tabs = Widget::create('tabs')->add(
|
||||||
|
'search',
|
||||||
|
array(
|
||||||
|
'title' => $this->translate('Search'),
|
||||||
|
'url' => '/search',
|
||||||
|
)
|
||||||
|
)->activate('search');
|
||||||
|
$this->render('hint');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$dashboard = Widget::create('dashboard')->createPane('Search');
|
$dashboard = Widget::create('dashboard')->createPane($this->translate('Search'));
|
||||||
$pane = $dashboard->getPane('Search');
|
$pane = $dashboard->getPane($this->translate('Search'));
|
||||||
$suffix = strlen($search) ? ': ' . rtrim($search, '*') . '*' : '';
|
$suffix = strlen($search) ? ': ' . rtrim($search, '*') . '*' : '';
|
||||||
$pane->addComponent('Hosts' . $suffix, Url::fromPath('monitoring/list/hosts', array(
|
$pane->addComponent(
|
||||||
'host_name' => $search . '*',
|
$this->translate('Hosts') . $suffix,
|
||||||
'sort' => 'host_severity',
|
Url::fromPath('monitoring/list/hosts', array(
|
||||||
'limit' => 10,
|
'host_name' => $search . '*',
|
||||||
)));
|
'sort' => 'host_severity',
|
||||||
$pane->addComponent('Services' . $suffix, Url::fromPath('monitoring/list/services', array(
|
'limit' => 10,
|
||||||
'service_description' => $search . '*',
|
)
|
||||||
'sort' => 'service_severity',
|
));
|
||||||
'limit' => 10,
|
$pane->addComponent(
|
||||||
)));
|
$this->translate('Services') . $suffix,
|
||||||
|
Url::fromPath('monitoring/list/services', array(
|
||||||
|
'service_description' => $search . '*',
|
||||||
|
'sort' => 'service_severity',
|
||||||
|
'limit' => 10,
|
||||||
|
)
|
||||||
|
));
|
||||||
$pane->addComponent('Hostgroups' . $suffix, Url::fromPath('monitoring/list/hostgroups', array(
|
$pane->addComponent('Hostgroups' . $suffix, Url::fromPath('monitoring/list/hostgroups', array(
|
||||||
'hostgroup' => $search . '*',
|
'hostgroup' => $search . '*',
|
||||||
'limit' => 10,
|
'limit' => 10,
|
||||||
|
@ -40,7 +53,7 @@ class SearchController extends ActionController
|
||||||
'servicegroup' => $search . '*',
|
'servicegroup' => $search . '*',
|
||||||
'limit' => 10,
|
'limit' => 10,
|
||||||
)));
|
)));
|
||||||
$dashboard->activate('Search');
|
$dashboard->activate($this->translate('Search'));
|
||||||
$this->view->dashboard = $dashboard;
|
$this->view->dashboard = $dashboard;
|
||||||
$this->view->tabs = $dashboard->getTabs();
|
$this->view->tabs = $dashboard->getTabs();
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,7 @@ class GeneralForm extends Form
|
||||||
'helptext' => 'Contains the directories that will be searched for available modules, separated by ' .
|
'helptext' => 'Contains the directories that will be searched for available modules, separated by ' .
|
||||||
' colons. Modules that don\'t exist in these directories can still be symlinked in the module ' .
|
' colons. Modules that don\'t exist in these directories can still be symlinked in the module ' .
|
||||||
' folder, but won\'t show up in the list of disabled modules.',
|
' folder, but won\'t show up in the list of disabled modules.',
|
||||||
'value' => $cfg->get('modulePath', realpath(ICINGA_APPDIR . '/../modules'))
|
'value' => $cfg->get('modulePath', realpath(ICINGAWEB_APPDIR . '/../modules'))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ class GeneralForm extends Form
|
||||||
'label' => 'User Preference Filepath',
|
'label' => 'User Preference Filepath',
|
||||||
'required' => $backend === 'ini',
|
'required' => $backend === 'ini',
|
||||||
'condition' => $backend === 'ini',
|
'condition' => $backend === 'ini',
|
||||||
'value' => $cfg->get('configPath')
|
'value' => $cfg->get('config_path')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ class GeneralForm extends Form
|
||||||
|
|
||||||
$cfg->preferences->type = $values['preferences_type'];
|
$cfg->preferences->type = $values['preferences_type'];
|
||||||
if ($cfg->preferences->type === 'ini') {
|
if ($cfg->preferences->type === 'ini') {
|
||||||
$cfg->preferences->configPath = $values['preferences_ini_path'];
|
$cfg->preferences->config_path = $values['preferences_ini_path'];
|
||||||
} elseif ($cfg->preferences->type === 'db') {
|
} elseif ($cfg->preferences->type === 'db') {
|
||||||
$cfg->preferences->resource = $values['preferences_db_resource'];
|
$cfg->preferences->resource = $values['preferences_db_resource'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,10 +261,10 @@ class GeneralForm extends Form
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'checkbox',
|
'checkbox',
|
||||||
'showBenchmark',
|
'show_benchmark',
|
||||||
array(
|
array(
|
||||||
'label' => 'Use benchmark',
|
'label' => 'Use benchmark',
|
||||||
'value' => $this->getUserPreferences()->get('app.showBenchmark')
|
'value' => $this->getUserPreferences()->get('app.show_benchmark')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -278,11 +278,11 @@ class GeneralForm extends Form
|
||||||
{
|
{
|
||||||
$values = $this->getValues();
|
$values = $this->getValues();
|
||||||
return array(
|
return array(
|
||||||
'app.language' => $values['default_language'] ? null : $values['language'],
|
'app.language' => $values['default_language'] ? null : $values['language'],
|
||||||
'app.timezone' => $values['default_timezone'] ? null : $values['timezone'],
|
'app.timezone' => $values['default_timezone'] ? null : $values['timezone'],
|
||||||
'app.dateFormat' => $values['default_date_format'] ? null : $values['date_format'],
|
'app.dateFormat' => $values['default_date_format'] ? null : $values['date_format'],
|
||||||
'app.timeFormat' => $values['default_time_format'] ? null : $values['time_format'],
|
'app.timeFormat' => $values['default_time_format'] ? null : $values['time_format'],
|
||||||
'app.showBenchmark' => $values['showBenchmark'] === '1' ? true : false
|
'app.show_benchmark' => $values['show_benchmark'] === '1' ? true : false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,12 @@ $isIframe = isset($_GET['_render']) && $_GET['_render'] === 'iframe';
|
||||||
<!-- TODO: viewport and scale settings make no sense for us, fix this -->
|
<!-- TODO: viewport and scale settings make no sense for us, fix this -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
<link rel="stylesheet" href="<?= $this->href($cssfile) ?>" media="screen" type="text/css" />
|
<link rel="stylesheet" href="<?= $this->href($cssfile) ?>" media="screen" type="text/css" />
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function() {
|
||||||
|
var html = document.getElementsByTagName('html')[0];
|
||||||
|
html.className = html.className.replace(/no-js/, 'js');
|
||||||
|
}());
|
||||||
|
</script>
|
||||||
<? if ($isIframe): ?>
|
<? if ($isIframe): ?>
|
||||||
<base target="_parent"/>
|
<base target="_parent"/>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
|
@ -47,7 +53,7 @@ $isIframe = isset($_GET['_render']) && $_GET['_render'] === 'iframe';
|
||||||
<script type="text/javascript" src="<?= $this->href($jsfile) ?>"></script>
|
<script type="text/javascript" src="<?= $this->href($jsfile) ?>"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var icinga = new Icinga({
|
var icinga = new Icinga({
|
||||||
baseUrl: '<?= $this->href('/') ?>',
|
baseUrl: '<?= $this->href('/') ?>'
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -14,7 +14,7 @@ $menu = Menu::fromConfig();
|
||||||
?>
|
?>
|
||||||
<div id="menu" data-base-target="_main">
|
<div id="menu" data-base-target="_main">
|
||||||
<form action="<?= $this->href('search') ?>" method="get">
|
<form action="<?= $this->href('search') ?>" method="get">
|
||||||
<input type="text" name="q" class="search autofocus" placeholder="Search..." autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
<input type="text" name="q" class="search autofocus" placeholder="<?= $this->translate('Search...') ?>" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
||||||
</form>
|
</form>
|
||||||
<?= $this->partial('parts/menu.phtml', array(
|
<?= $this->partial('parts/menu.phtml', array(
|
||||||
'items' => $menu->getChildren(),
|
'items' => $menu->getChildren(),
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,487 @@
|
||||||
|
# Icinga Web 2 - Head for multiple monitoring backends.
|
||||||
|
# Copyright (C) 2014 Icinga Development Team
|
||||||
|
# This file is distributed under the same license as Icinga Web 2.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Icinga Web 2 (0.1)\n"
|
||||||
|
"Report-Msgid-Bugs-To: dev@icinga.org\n"
|
||||||
|
"POT-Creation-Date: 2014-05-29 11:12+0000\n"
|
||||||
|
"PO-Revision-Date: 2014-05-29 13:19+0100\n"
|
||||||
|
"Last-Translator: Thomas Gelf <thomas@gelf.net>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/mixedPagination.phtml:15
|
||||||
|
#, php-format
|
||||||
|
msgid "%d to %d of %d"
|
||||||
|
msgstr "%d bis %d von %d"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/pivottablePagination.phtml:9
|
||||||
|
#, php-format
|
||||||
|
msgid "%s: %d to %d of %d"
|
||||||
|
msgstr "%s: %d bis %d von %d"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:117
|
||||||
|
msgid "Application Prefix"
|
||||||
|
msgstr "Anwendungspräfix"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/DbBackendForm.php:78
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:80
|
||||||
|
msgid "Backend Name"
|
||||||
|
msgstr "Backend-Name"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:282
|
||||||
|
msgid "Bind DN"
|
||||||
|
msgstr "Bind DN"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:294
|
||||||
|
msgid "Bind Password"
|
||||||
|
msgstr "Bind Kennwort"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:358
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/BaseBackendForm.php:139
|
||||||
|
msgid "Check this box to enforce changes without connectivity validation"
|
||||||
|
msgstr "Aktiviere dieses Häkchen um die Änderungen ohne Validierung der Verbindung zu speichern"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:73
|
||||||
|
msgid "Check this to enable logging."
|
||||||
|
msgstr "Aktiviere dieses Häkchen um das Logging zu aktivieren."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:187
|
||||||
|
msgid "Connection Validation Failed: "
|
||||||
|
msgstr "Überprüfung der Verbindung fehlgeschlagen: "
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:477
|
||||||
|
msgid "Connectivity validation failed, connection to the given resource not possible."
|
||||||
|
msgstr "Überprüfung fehlgeschlagen, konnte keine Verbindung zu der angegebenen Ressource herstellen."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:454
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:470
|
||||||
|
msgid "Connectivity validation failed, the provided file does not exist."
|
||||||
|
msgstr "Überprüfung fehlgeschlagen, die angegebene Datei existiert nicht."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/DbBackendForm.php:90
|
||||||
|
msgid "Database Connection"
|
||||||
|
msgstr "Datenbankverbindung"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:183
|
||||||
|
msgid "Database Name"
|
||||||
|
msgstr "Datenbankname"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:144
|
||||||
|
msgid "Database Type"
|
||||||
|
msgstr "Datenbanktyp"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:89
|
||||||
|
msgid "Debug"
|
||||||
|
msgstr "Debug"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/GeneralForm.php:185
|
||||||
|
msgid "Default Language"
|
||||||
|
msgstr "Standardsprache"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/ErrorController.php:62
|
||||||
|
#, php-format
|
||||||
|
msgid "Enabling the \"%s\" module might help!"
|
||||||
|
msgstr "Das Modul \"%s\" zu aktivieren könnte helfen!"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:86
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Fehler"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:139
|
||||||
|
msgid "Facility"
|
||||||
|
msgstr "Facility"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:102
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:383
|
||||||
|
msgid "File"
|
||||||
|
msgstr "Datei"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:155
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:220
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:231
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:308
|
||||||
|
msgid "Filepath"
|
||||||
|
msgstr "Dateipfad"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:357
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/BaseBackendForm.php:138
|
||||||
|
msgid "Force Changes"
|
||||||
|
msgstr "Änderungen erzwingen"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/search/hint.phtml:7
|
||||||
|
msgid "Hint"
|
||||||
|
msgstr "Hinweis"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:160
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:260
|
||||||
|
msgid "Host"
|
||||||
|
msgstr "Host"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/SearchController.php:33
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/pivottablePagination.phtml:28
|
||||||
|
msgid "Hosts"
|
||||||
|
msgstr "Hosts"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/search/hint.phtml:6
|
||||||
|
msgid "I'm ready to search, waiting for your input"
|
||||||
|
msgstr "Ich bin bereit zur Suche, warte auf deine Eingabe"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/AuthenticationController.php:63
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/authentication/login.phtml:8
|
||||||
|
msgid "Icingaweb Login"
|
||||||
|
msgstr "Icingaweb Anmeldung"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/authentication/logout.phtml:17
|
||||||
|
msgid "If this message does not disappear, it might be necessary to quit the current session manually by clearing the cache, or by closing the current browser session."
|
||||||
|
msgstr "Wenn diese Nachricht nicht verschwindet könnte es nötig sein die aktuelle Sitzung manuell zu beenden indem der Cache gelöscht order die Browsersitzung geschlossen wird."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/AuthenticationController.php:118
|
||||||
|
msgid "Incorrect username or password"
|
||||||
|
msgstr "Benutzername oder Kennwort ungültig"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:88
|
||||||
|
msgid "Information"
|
||||||
|
msgstr "Information"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Web/Wizard/Wizard.php:337
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Web/Wizard/Wizard.php:380
|
||||||
|
msgid "Install"
|
||||||
|
msgstr "Installieren"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/install/index.phtml:29
|
||||||
|
msgid "Installation"
|
||||||
|
msgstr "Installation"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:92
|
||||||
|
msgid "LDAP Resource"
|
||||||
|
msgstr "LDAP Ressource"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:115
|
||||||
|
msgid "LDAP User Name Attribute"
|
||||||
|
msgstr "LDAP-Attribut für Benutzername"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:104
|
||||||
|
msgid "LDAP User Object Class"
|
||||||
|
msgstr "LDAP Objektklasse für Benutzer"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:232
|
||||||
|
msgid "Location of your icinga objects.cache file"
|
||||||
|
msgstr "Pfad zur Datei objects.cache von Icinga"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:221
|
||||||
|
msgid "Location of your icinga status.dat file"
|
||||||
|
msgstr "Pfad zur Datei status.dat von Icinga"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/InstallController.php:69
|
||||||
|
msgid "Logging"
|
||||||
|
msgstr "Logging"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:72
|
||||||
|
msgid "Logging Enabled"
|
||||||
|
msgstr "Logging aktiv"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:82
|
||||||
|
msgid "Logging Level"
|
||||||
|
msgstr "Log-Level"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:98
|
||||||
|
msgid "Logging Type"
|
||||||
|
msgstr "Logging-Typ"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/authentication/logout.phtml:15
|
||||||
|
msgid "Logging out..."
|
||||||
|
msgstr "Abmelden..."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/authentication/logout.phtml:28
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Anmelden"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/layouts/scripts/body.phtml:39
|
||||||
|
#: /usr/local/src/bugfix.master/application/layouts/scripts/parts/topbar.phtml:35
|
||||||
|
msgid "Logout"
|
||||||
|
msgstr "Abmelden"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/authentication/logout.phtml:64
|
||||||
|
msgid "Logout not possible, it may be necessary to quit the session manually by clearing the cache, or closing the current browser session. Error: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/authentication/logout.phtml:69
|
||||||
|
msgid "Logout successful!"
|
||||||
|
msgstr "Abmelden erfolgreich!"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/ReorderForm.php:137
|
||||||
|
msgid "Move down in authentication order"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/ReorderForm.php:111
|
||||||
|
msgid "Move up in authentication order"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/pivottablePagination.phtml:16
|
||||||
|
msgid "Navigation"
|
||||||
|
msgstr "Navigation"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/mixedPagination.phtml:83
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/mixedPagination.phtml:86
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Web/Wizard/Wizard.php:337
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Web/Wizard/Wizard.php:380
|
||||||
|
msgid "Next"
|
||||||
|
msgstr "Weiter"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/DbBackendForm.php:144
|
||||||
|
msgid "No users found under the specified database backend"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/ErrorController.php:59
|
||||||
|
msgid "Page not found."
|
||||||
|
msgstr "Seite nicht gefunden."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Authentication/LoginForm.php:65
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:206
|
||||||
|
msgid "Password"
|
||||||
|
msgstr "Kennwort"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:319
|
||||||
|
msgid "Pattern"
|
||||||
|
msgstr "Muster"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Web/Form/Element/Number.php:61
|
||||||
|
msgid "Please enter a number."
|
||||||
|
msgstr "Bitte eine Nummer eingeben."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/search/hint.phtml:8
|
||||||
|
msgid "Please use the asterisk (*) as a placeholder for wildcard searches. For convenience I'll always add a wildcard after the last character you typed."
|
||||||
|
msgstr "Bitte benutze das Sternchen (*) als Jokerzeichen für eine Suche mit Platzhaltern. Der Einfachheit halber hänge ich immer einen Platzhalter hinter das letzte von dir getippte Zeichen."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:171
|
||||||
|
msgid "Port"
|
||||||
|
msgstr "Port"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/layouts/scripts/body.phtml:38
|
||||||
|
#: /usr/local/src/bugfix.master/application/layouts/scripts/parts/topbar.phtml:32
|
||||||
|
msgid "Preferences"
|
||||||
|
msgstr "Einstellungen"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/mixedPagination.phtml:45
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/mixedPagination.phtml:48
|
||||||
|
msgid "Prev"
|
||||||
|
msgstr "Zurück"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Web/Wizard/Wizard.php:326
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Web/Wizard/Wizard.php:367
|
||||||
|
msgid "Previous"
|
||||||
|
msgstr "Vorheriges"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:333
|
||||||
|
msgid "Resource Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:375
|
||||||
|
msgid "Resource Type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:271
|
||||||
|
msgid "Root DN"
|
||||||
|
msgstr "Wurzel-DN"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:379
|
||||||
|
msgid "SQL Database"
|
||||||
|
msgstr "SQL Datenbank"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/SearchController.php:22
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/SearchController.php:29
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/SearchController.php:30
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/SearchController.php:56
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Suche"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/layouts/scripts/parts/navigation.phtml:17
|
||||||
|
msgid "Search..."
|
||||||
|
msgstr "Suche..."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/GeneralForm.php:189
|
||||||
|
msgid "Select the language to use by default. Can be overwritten by a user in his preferences."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/controllers/SearchController.php:41
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/pivottablePagination.phtml:34
|
||||||
|
msgid "Services"
|
||||||
|
msgstr "Services"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:245
|
||||||
|
msgid "Socket"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:140
|
||||||
|
msgid "The Syslog facility to utilize."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:116
|
||||||
|
msgid "The attribute name used for storing the user name on the ldap server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/DbBackendForm.php:91
|
||||||
|
msgid "The database connection to use for authenticating with this provider"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:309
|
||||||
|
msgid "The filename to fetch information from"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:161
|
||||||
|
msgid "The hostname of the database."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:261
|
||||||
|
msgid "The hostname or address of the LDAP server to use for authentication"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:156
|
||||||
|
msgid "The logfile to write messages to."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:83
|
||||||
|
msgid "The maximum loglevel to emit."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:118
|
||||||
|
msgid "The name of the application by which to prefix syslog messages."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:184
|
||||||
|
msgid "The name of the database to use"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:81
|
||||||
|
msgid "The name of this authentication backend"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/DbBackendForm.php:79
|
||||||
|
msgid "The name of this authentication provider"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:105
|
||||||
|
msgid "The object class used for storing users on the ldap server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:207
|
||||||
|
msgid "The password to use for authentication"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:295
|
||||||
|
msgid "The password to use for querying the ldap server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:246
|
||||||
|
msgid "The path to your livestatus socket used for querying monitoring data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:272
|
||||||
|
msgid "The path where users can be found on the ldap server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:172
|
||||||
|
msgid "The port to use."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:320
|
||||||
|
msgid "The regular expression by which to identify columns"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:93
|
||||||
|
msgid "The resource to use for authenticating with this provider"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:145
|
||||||
|
msgid "The type of SQL database you want to create."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:99
|
||||||
|
msgid "The type of logging to utilize."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:376
|
||||||
|
msgid "The type of resource"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:334
|
||||||
|
msgid "The unique name of this resource"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:283
|
||||||
|
msgid "The user dn to use for querying the ldap server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:195
|
||||||
|
msgid "The user name to use for authentication."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/config/module.phtml:6
|
||||||
|
msgid "There is no such module installed."
|
||||||
|
msgstr "Gegenwärtig ist kein solches Modul installiert."
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/views/scripts/config/module.phtml:32
|
||||||
|
msgid "This module has no dependencies"
|
||||||
|
msgstr "Dieses Modul hat keine Abhängigkeiten"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Application/Modules/Module.php:383
|
||||||
|
msgid "This module has no description"
|
||||||
|
msgstr "Dieses Modul hat keine Beschreibung"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Preference/GeneralForm.php:100
|
||||||
|
msgid "Use Default Language"
|
||||||
|
msgstr "Standardsprache verwenden"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Preference/GeneralForm.php:109
|
||||||
|
msgid "Use the following language to display texts and messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Authentication/LoginForm.php:57
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:194
|
||||||
|
msgid "Username"
|
||||||
|
msgstr "Benutzername"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/LdapBackendForm.php:169
|
||||||
|
msgid "Using ldap is not possible, the php extension \"ldap\" is not installed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/Authentication/DbBackendForm.php:148
|
||||||
|
#, php-format
|
||||||
|
msgid "Using the specified backend failed: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/LoggingForm.php:87
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Warnung"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:435
|
||||||
|
msgid "You need to install the php extension \"mysql\" and the Zend_Pdo_Mysql classes to use MySQL database resources."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Config/ResourceForm.php:442
|
||||||
|
msgid "You need to install the php extension \"pgsql\" and the Zend_Pdo_Pgsql classes to use PostgreSQL database resources."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/application/forms/Preference/GeneralForm.php:106
|
||||||
|
msgid "Your Current Language"
|
||||||
|
msgstr "Deine aktuelle Sprache"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Util/Format.php:108
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Util/Format.php:114
|
||||||
|
msgid "for"
|
||||||
|
msgstr "für"
|
||||||
|
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Util/Format.php:112
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Util/Format.php:131
|
||||||
|
#: /usr/local/src/bugfix.master/library/Icinga/Util/Format.php:133
|
||||||
|
msgid "since"
|
||||||
|
msgstr "seit"
|
||||||
|
|
||||||
|
#~ msgid "Icinga Users Login"
|
||||||
|
#~ msgstr "Icinga Benutzeranmeldung"
|
Binary file not shown.
|
@ -0,0 +1,559 @@
|
||||||
|
# Icinga Web 2 - Head for multiple monitoring backends.
|
||||||
|
# Copyright (C) 2014 Icinga Development Team
|
||||||
|
# This file is distributed under the same license as Icinga Web 2.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Icinga Web 2 (0.1)\n"
|
||||||
|
"Report-Msgid-Bugs-To: dev@icinga.org\n"
|
||||||
|
"POT-Creation-Date: 2014-06-03 15:23+0200\n"
|
||||||
|
"PO-Revision-Date: 2014-06-03 12:09-0300\n"
|
||||||
|
"Last-Translator: Carlos Cesario <carloscesario@gmail.com>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Language: pt_BR\n"
|
||||||
|
"X-Generator: Poedit 1.5.4\n"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/mixedPagination.phtml:15
|
||||||
|
#, php-format
|
||||||
|
msgid "%d to %d of %d"
|
||||||
|
msgstr "%d para %d de %d"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/pivottablePagination.phtml:9
|
||||||
|
#, php-format
|
||||||
|
msgid "%s: %d to %d of %d"
|
||||||
|
msgstr "%s: %d para %d de %d"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:117
|
||||||
|
msgid "Application Prefix"
|
||||||
|
msgstr "Prefixo da aplicação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/DbBackendForm.php:78
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:80
|
||||||
|
msgid "Backend Name"
|
||||||
|
msgstr "Nome do backend"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:282
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:282
|
||||||
|
msgid "Bind DN"
|
||||||
|
msgstr "Bind DN"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:294
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:294
|
||||||
|
msgid "Bind Password"
|
||||||
|
msgstr "Senha Bind"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:358
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:358
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/BaseBackendForm.php:139
|
||||||
|
msgid "Check this box to enforce changes without connectivity validation"
|
||||||
|
msgstr "Marque esta caixa para aplicar as mudanças sem validação conectividade"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:73
|
||||||
|
msgid "Check this to enable logging."
|
||||||
|
msgstr "Marque esta opção para ativar o registro log."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:187
|
||||||
|
msgid "Connection Validation Failed: "
|
||||||
|
msgstr "Validação de conexão falhou:"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:477
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:457
|
||||||
|
msgid ""
|
||||||
|
"Connectivity validation failed, connection to the given resource not "
|
||||||
|
"possible."
|
||||||
|
msgstr ""
|
||||||
|
"A validação de conectividade falhou, a conexão com o recurso selecionado não "
|
||||||
|
"é possível."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:454
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:470
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:434
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:450
|
||||||
|
msgid "Connectivity validation failed, the provided file does not exist."
|
||||||
|
msgstr "A validação de conectividade falhou, o arquivo fornecido não existe."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/DbBackendForm.php:90
|
||||||
|
msgid "Database Connection"
|
||||||
|
msgstr "Conexão com o banco de dados"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:183
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:183
|
||||||
|
msgid "Database Name"
|
||||||
|
msgstr "Nome do banco de dados"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:144
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:144
|
||||||
|
msgid "Database Type"
|
||||||
|
msgstr "Tipo do banco de dados"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:89
|
||||||
|
msgid "Debug"
|
||||||
|
msgstr "Depurar"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/GeneralForm.php:185
|
||||||
|
msgid "Default Language"
|
||||||
|
msgstr "Idioma padrão"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/controllers/ErrorController.php:62
|
||||||
|
#, php-format
|
||||||
|
msgid "Enabling the \"%s\" module might help!"
|
||||||
|
msgstr "Habilitando o módulo \"%s\" pode ajudar!"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:86
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Erro"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:139
|
||||||
|
msgid "Facility"
|
||||||
|
msgstr "Facilidade"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:102
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:383
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:383
|
||||||
|
msgid "File"
|
||||||
|
msgstr "Arquivo"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:155
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:220
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:231
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:308
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:220
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:231
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:308
|
||||||
|
msgid "Filepath"
|
||||||
|
msgstr "Caminho do arquivo"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:357
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:357
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/BaseBackendForm.php:138
|
||||||
|
msgid "Force Changes"
|
||||||
|
msgstr "Forçar mudanças"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/search/hint.phtml:7
|
||||||
|
msgid "Hint"
|
||||||
|
msgstr "Sugestão"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:160
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:260
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:160
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:260
|
||||||
|
msgid "Host"
|
||||||
|
msgstr "Host"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/pivottablePagination.phtml:28
|
||||||
|
#: /usr/local/icingaweb/application/controllers/SearchController.php:33
|
||||||
|
msgid "Hosts"
|
||||||
|
msgstr "Hosts"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/search/hint.phtml:6
|
||||||
|
msgid "I'm ready to search, waiting for your input"
|
||||||
|
msgstr "Estou pronto para pesquisar, aguardando sua entrada"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/authentication/login.phtml:8
|
||||||
|
#: /usr/local/icingaweb/application/controllers/AuthenticationController.php:63
|
||||||
|
msgid "Icingaweb Login"
|
||||||
|
msgstr "Login no Icingaweb"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/authentication/logout.phtml:17
|
||||||
|
msgid ""
|
||||||
|
"If this message does not disappear, it might be necessary to quit the "
|
||||||
|
"current session manually by clearing the cache, or by closing the current "
|
||||||
|
"browser session."
|
||||||
|
msgstr ""
|
||||||
|
"Se esta mensagem não desaparecer, pode ser necessário sair da sessão atual "
|
||||||
|
"manualmente, limpando o cache ou fechando a sessão atual do navegador. "
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/controllers/AuthenticationController.php:118
|
||||||
|
msgid "Incorrect username or password"
|
||||||
|
msgstr "Usuário ou senha inválido"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:88
|
||||||
|
msgid "Information"
|
||||||
|
msgstr "Informação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/library/Icinga/Web/Wizard/Wizard.php:337
|
||||||
|
#: /usr/local/icingaweb/library/Icinga/Web/Wizard/Wizard.php:380
|
||||||
|
msgid "Install"
|
||||||
|
msgstr "Instalar"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/install/index.phtml:29
|
||||||
|
msgid "Installation"
|
||||||
|
msgstr "Instalação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:92
|
||||||
|
msgid "LDAP Resource"
|
||||||
|
msgstr "Recurso LDAP"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:115
|
||||||
|
msgid "LDAP User Name Attribute"
|
||||||
|
msgstr "Atributo LDAP Nome de usuário"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:104
|
||||||
|
msgid "LDAP User Object Class"
|
||||||
|
msgstr "Classe LDAP Objeto de usuário"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:232
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:232
|
||||||
|
msgid "Location of your icinga objects.cache file"
|
||||||
|
msgstr "Localização do arquivo objects.cache do seu icinga"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:221
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:221
|
||||||
|
msgid "Location of your icinga status.dat file"
|
||||||
|
msgstr "Localização do arquivo status.dat do seu icinga"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/controllers/InstallController.php:69
|
||||||
|
msgid "Logging"
|
||||||
|
msgstr "Registro de log"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:72
|
||||||
|
msgid "Logging Enabled"
|
||||||
|
msgstr "Registro de log habilitado"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:82
|
||||||
|
msgid "Logging Level"
|
||||||
|
msgstr "Nível do registro de log"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:98
|
||||||
|
msgid "Logging Type"
|
||||||
|
msgstr "Tipo do registro de log"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/authentication/logout.phtml:15
|
||||||
|
msgid "Logging out..."
|
||||||
|
msgstr "Saída do registro de log..."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/authentication/logout.phtml:28
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Login"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/layouts/scripts/body.phtml:39
|
||||||
|
#: /usr/local/icingaweb/application/layouts/scripts/parts/topbar.phtml:35
|
||||||
|
msgid "Logout"
|
||||||
|
msgstr "Sair"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/authentication/logout.phtml:64
|
||||||
|
msgid ""
|
||||||
|
"Logout not possible, it may be necessary to quit the session manually by "
|
||||||
|
"clearing the cache, or closing the current browser session. Error: "
|
||||||
|
msgstr ""
|
||||||
|
"Não foi possível, é necessário sair da sessão manualmente, limpando o cache "
|
||||||
|
"ou fechando a sessão atual do navegador. Erro:"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/authentication/logout.phtml:69
|
||||||
|
msgid "Logout successful!"
|
||||||
|
msgstr "Sucesso na saída!"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/ReorderForm.php:137
|
||||||
|
msgid "Move down in authentication order"
|
||||||
|
msgstr "Mover para baixo na ordem de autenticação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/ReorderForm.php:111
|
||||||
|
msgid "Move up in authentication order"
|
||||||
|
msgstr "Mover para cima na ordem de autenticação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/pivottablePagination.phtml:16
|
||||||
|
msgid "Navigation"
|
||||||
|
msgstr "Navegação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/mixedPagination.phtml:83
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/mixedPagination.phtml:86
|
||||||
|
#: /usr/local/icingaweb/library/Icinga/Web/Wizard/Wizard.php:337
|
||||||
|
#: /usr/local/icingaweb/library/Icinga/Web/Wizard/Wizard.php:380
|
||||||
|
msgid "Next"
|
||||||
|
msgstr "Próximo"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/DbBackendForm.php:144
|
||||||
|
msgid "No users found under the specified database backend"
|
||||||
|
msgstr "Nenhum usuário encontrado no backend do banco de dados especificado"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/controllers/ErrorController.php:59
|
||||||
|
msgid "Page not found."
|
||||||
|
msgstr "Página não encontrada."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Authentication/LoginForm.php:65
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:206
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:206
|
||||||
|
msgid "Password"
|
||||||
|
msgstr "Senha"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:319
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:319
|
||||||
|
msgid "Pattern"
|
||||||
|
msgstr "Padrão"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/library/Icinga/Web/Form/Element/Number.php:61
|
||||||
|
msgid "Please enter a number."
|
||||||
|
msgstr "Por favor entre com um número."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/search/hint.phtml:8
|
||||||
|
msgid ""
|
||||||
|
"Please use the asterisk (*) as a placeholder for wildcard searches. For "
|
||||||
|
"convenience I'll always add a wildcard after the last character you typed."
|
||||||
|
msgstr ""
|
||||||
|
"Por favor utilize o asterisco (*) como caractere curinga nas pesquisas. Para "
|
||||||
|
"maior comodidade vou sempre adicionar um curinga após o último caractere "
|
||||||
|
"digitado."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:171
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:171
|
||||||
|
msgid "Port"
|
||||||
|
msgstr "Porta"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/layouts/scripts/body.phtml:38
|
||||||
|
#: /usr/local/icingaweb/application/layouts/scripts/parts/topbar.phtml:32
|
||||||
|
msgid "Preferences"
|
||||||
|
msgstr "Preferências"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/mixedPagination.phtml:45
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/mixedPagination.phtml:48
|
||||||
|
msgid "Prev"
|
||||||
|
msgstr "Ant"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/library/Icinga/Web/Wizard/Wizard.php:326
|
||||||
|
#: /usr/local/icingaweb/library/Icinga/Web/Wizard/Wizard.php:367
|
||||||
|
msgid "Previous"
|
||||||
|
msgstr "Anterior"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:333
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:333
|
||||||
|
msgid "Resource Name"
|
||||||
|
msgstr "Nome do recurso"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:375
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:375
|
||||||
|
msgid "Resource Type"
|
||||||
|
msgstr "Tipo do recurso"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:271
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:271
|
||||||
|
msgid "Root DN"
|
||||||
|
msgstr "DN Root"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:379
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:379
|
||||||
|
msgid "SQL Database"
|
||||||
|
msgstr "Banco de dados SQL"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/controllers/SearchController.php:22
|
||||||
|
#: /usr/local/icingaweb/application/controllers/SearchController.php:29
|
||||||
|
#: /usr/local/icingaweb/application/controllers/SearchController.php:30
|
||||||
|
#: /usr/local/icingaweb/application/controllers/SearchController.php:56
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Pesquisar"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/layouts/scripts/parts/navigation.phtml:17
|
||||||
|
msgid "Search..."
|
||||||
|
msgstr "Pesquisar..."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/GeneralForm.php:189
|
||||||
|
msgid ""
|
||||||
|
"Select the language to use by default. Can be overwritten by a user in his "
|
||||||
|
"preferences."
|
||||||
|
msgstr ""
|
||||||
|
"Selecione o idioma padrão a ser utilizado. Pode ser substituído por um "
|
||||||
|
"usuário em suas preferências."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/pivottablePagination.phtml:34
|
||||||
|
#: /usr/local/icingaweb/application/controllers/SearchController.php:41
|
||||||
|
msgid "Services"
|
||||||
|
msgstr "Serviços"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:245
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:245
|
||||||
|
msgid "Socket"
|
||||||
|
msgstr "Soquete"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:140
|
||||||
|
msgid "The Syslog facility to utilize."
|
||||||
|
msgstr "A facilidade do SysLog a ser utilizada"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:116
|
||||||
|
msgid "The attribute name used for storing the user name on the ldap server"
|
||||||
|
msgstr ""
|
||||||
|
"O nome do atributo utilizado para armazenar o nome do usuário no servidor "
|
||||||
|
"ldap"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/DbBackendForm.php:91
|
||||||
|
msgid "The database connection to use for authenticating with this provider"
|
||||||
|
msgstr ""
|
||||||
|
"A conexão com o banco a ser utilizada para autenticar com este provedor"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:309
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:309
|
||||||
|
msgid "The filename to fetch information from"
|
||||||
|
msgstr "O nome do arquivo a ser consultado"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:161
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:161
|
||||||
|
msgid "The hostname of the database."
|
||||||
|
msgstr "O nome do host do banco de dados."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:261
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:261
|
||||||
|
msgid "The hostname or address of the LDAP server to use for authentication"
|
||||||
|
msgstr ""
|
||||||
|
"O nome do host ou endereço do servidor LDAP a ser utilizado para a "
|
||||||
|
"autenticação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:156
|
||||||
|
msgid "The logfile to write messages to."
|
||||||
|
msgstr "O arquivo de log para salvar as mensagens."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:83
|
||||||
|
msgid "The maximum loglevel to emit."
|
||||||
|
msgstr "O nível máximo de log a ser emitido."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:118
|
||||||
|
msgid "The name of the application by which to prefix syslog messages."
|
||||||
|
msgstr ""
|
||||||
|
"O nome da aplicação que será adicionado como prefixo nas mensagens do syslog."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:184
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:184
|
||||||
|
msgid "The name of the database to use"
|
||||||
|
msgstr "O nome do banco de dados a ser utilizado"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:81
|
||||||
|
msgid "The name of this authentication backend"
|
||||||
|
msgstr "O nome deste backend de autenticação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/DbBackendForm.php:79
|
||||||
|
msgid "The name of this authentication provider"
|
||||||
|
msgstr "O nome deste provedor de autenticação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:105
|
||||||
|
msgid "The object class used for storing users on the ldap server"
|
||||||
|
msgstr ""
|
||||||
|
"A classe de objeto a ser utilizada para armazenar os usuários no servidor "
|
||||||
|
"ldap"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:207
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:207
|
||||||
|
msgid "The password to use for authentication"
|
||||||
|
msgstr "A senha a ser utilizada para a autenticação"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:295
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:295
|
||||||
|
msgid "The password to use for querying the ldap server"
|
||||||
|
msgstr "A senha a ser utilizada para consultar o servidor ldap"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:246
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:246
|
||||||
|
msgid "The path to your livestatus socket used for querying monitoring data"
|
||||||
|
msgstr ""
|
||||||
|
"O caminho para o socket do livestatus utilizado para consultar os dados de "
|
||||||
|
"monitoramento"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:272
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:272
|
||||||
|
msgid "The path where users can be found on the ldap server"
|
||||||
|
msgstr "O caminho onde os usuários possam ser encontrados no servidor ldap"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:172
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:172
|
||||||
|
msgid "The port to use."
|
||||||
|
msgstr "A porta utilizada."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:320
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:320
|
||||||
|
msgid "The regular expression by which to identify columns"
|
||||||
|
msgstr "A expressão regular para identificar as colunas"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:93
|
||||||
|
msgid "The resource to use for authenticating with this provider"
|
||||||
|
msgstr "O recurso a ser utilizado para autenticação com este provedor"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:145
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:145
|
||||||
|
msgid "The type of SQL database you want to create."
|
||||||
|
msgstr "O tipo do banco de dados SQL que você quer criar."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:99
|
||||||
|
msgid "The type of logging to utilize."
|
||||||
|
msgstr "O tipo do registro de log a ser utilizado."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:376
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:376
|
||||||
|
msgid "The type of resource"
|
||||||
|
msgstr "O tipo do recurso"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:334
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:334
|
||||||
|
msgid "The unique name of this resource"
|
||||||
|
msgstr "O nome único deste recurso"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:283
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:283
|
||||||
|
msgid "The user dn to use for querying the ldap server"
|
||||||
|
msgstr "O usuário DN a ser utilizado para consultar o servidor ldap."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:195
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:195
|
||||||
|
msgid "The user name to use for authentication."
|
||||||
|
msgstr "O nome do usuário a ser utilizado para a autenticação."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/config/module.phtml:6
|
||||||
|
msgid "There is no such module installed."
|
||||||
|
msgstr "Não existe nenhum módulo instalado."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/views/scripts/config/module.phtml:32
|
||||||
|
msgid "This module has no dependencies"
|
||||||
|
msgstr "Este módulo não tem dependências"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/library/Icinga/Application/Modules/Module.php:383
|
||||||
|
msgid "This module has no description"
|
||||||
|
msgstr "Este módulo não tem descrição"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Preference/GeneralForm.php:100
|
||||||
|
msgid "Use Default Language"
|
||||||
|
msgstr "Utilizar idioma padrão"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Preference/GeneralForm.php:109
|
||||||
|
msgid "Use the following language to display texts and messages"
|
||||||
|
msgstr "Utilizar o seguinte idioma para exibir textos e mensagens"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Authentication/LoginForm.php:57
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:194
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Resource/ResourceForm.php:194
|
||||||
|
msgid "Username"
|
||||||
|
msgstr "Nome do usuário"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/LdapBackendForm.php:169
|
||||||
|
msgid ""
|
||||||
|
"Using ldap is not possible, the php extension \"ldap\" is not installed."
|
||||||
|
msgstr ""
|
||||||
|
"A utilização do ldap não é possível, a extensão php \"ldap\" não está "
|
||||||
|
"instalada."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/Authentication/DbBackendForm.php:148
|
||||||
|
#, php-format
|
||||||
|
msgid "Using the specified backend failed: %s"
|
||||||
|
msgstr "A utilização do backend especificado falhou: %s"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/LoggingForm.php:87
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Atenção"
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:435
|
||||||
|
msgid ""
|
||||||
|
"You need to install the php extension \"mysql\" and the Zend_Pdo_Mysql "
|
||||||
|
"classes to use MySQL database resources."
|
||||||
|
msgstr ""
|
||||||
|
"Você precisa instalar a extensão php \"mysql\" e as classes Zend_Pdo_Mysql "
|
||||||
|
"para usar o recurso de banco de dados MySQL."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Config/ResourceForm.php:442
|
||||||
|
msgid ""
|
||||||
|
"You need to install the php extension \"pgsql\" and the Zend_Pdo_Pgsql "
|
||||||
|
"classes to use PostgreSQL database resources."
|
||||||
|
msgstr ""
|
||||||
|
"Você precisa instalar a extensão php \"pgsql\" e as classes Zend_Pdo_Pgsql "
|
||||||
|
"para usar o recurso de banco de dados PostgreSQL."
|
||||||
|
|
||||||
|
#: /usr/local/icingaweb/application/forms/Preference/GeneralForm.php:106
|
||||||
|
msgid "Your Current Language"
|
||||||
|
msgstr "Seu idioma atual"
|
|
@ -5,7 +5,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form" data-base-target="layout">
|
<div class="form" data-base-target="layout">
|
||||||
<h1>Icinga Users Login</h1>
|
<h1><?= $this->translate('Icingaweb Login') ?></h1>
|
||||||
<?php
|
<?php
|
||||||
/* TODO: remove this as soon as notifications and forms are ready */
|
/* TODO: remove this as soon as notifications and forms are ready */
|
||||||
if (isset($this->errorInfo)): ?>
|
if (isset($this->errorInfo)): ?>
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
<div class="controls">
|
||||||
|
<?= $this->tabs ?>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php if (! $module): ?>
|
||||||
|
<?= $this->translate('There is no such module installed.') ?>
|
||||||
|
<? return; endif ?>
|
||||||
|
<?php
|
||||||
|
$dependencies = $module->getDependencies();
|
||||||
|
$restrictions = $module->getProvidedRestrictions();
|
||||||
|
$permissions = $module->getProvidedPermissions();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<h1><?= $this->escape($module->getTitle()) ?></h1>
|
||||||
|
<table class="avp">
|
||||||
|
<tr>
|
||||||
|
<th><?= $this->escape('Name') ?></th>
|
||||||
|
<td><?= $this->escape($module->getName()) ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><?= $this->escape('Version') ?></th>
|
||||||
|
<td><?= $this->escape($module->getVersion()) ?></td></tr>
|
||||||
|
<tr>
|
||||||
|
<th><?= $this->escape('Description') ?></th>
|
||||||
|
<td><?= nl2br($this->escape($module->getDescription())) ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><?= $this->escape('Dependencies') ?></th>
|
||||||
|
<td><?php
|
||||||
|
|
||||||
|
if (empty($dependencies)):
|
||||||
|
echo $this->translate('This module has no dependencies');
|
||||||
|
|
||||||
|
else: foreach ($dependencies as $name => $versionString): ?>
|
||||||
|
<strong><?= $this->escape($name) ?></strong><?php if ($versionString !== true): ?>: <?= $this->escape($versionString) ?><?php endif ?><br />
|
||||||
|
<?php endforeach; endif ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php if (! empty($permissions)): ?>
|
||||||
|
<tr>
|
||||||
|
<th><?= $this->escape('Permissions') ?></th>
|
||||||
|
<td><?php foreach ($permissions as $permission): ?>
|
||||||
|
<strong><?= $this->escape($permission->name) ?></strong>: <?= $this->escape($permission->description) ?><br />
|
||||||
|
<?php endforeach ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php if (! empty($restrictions)): ?>
|
||||||
|
<tr>
|
||||||
|
<th><?= $this->escape('Restrictions') ?></th>
|
||||||
|
<td><?php foreach ($restrictions as $restriction): ?>
|
||||||
|
<strong><?= $this->escape($restriction->name) ?></strong>: <?= $this->escape($restriction->description) ?><br />
|
||||||
|
<?php endforeach ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endif ?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
|
@ -1,18 +0,0 @@
|
||||||
<table >
|
|
||||||
<thead>
|
|
||||||
<tr style="text-align:left">
|
|
||||||
<th width="70%">Module</th>
|
|
||||||
<th width="15%">Type</th>
|
|
||||||
<th width="15%">Active</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach($this->modules as $module): ?>
|
|
||||||
<tr>
|
|
||||||
<td><?= $module["name"]; ?></td>
|
|
||||||
<td><?= $module["type"]; ?></td>
|
|
||||||
<td><?= $module["active"]; ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
|
$this->modules->limit(10);
|
||||||
|
$modules = $this->modules->paginate();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="controls">
|
||||||
|
<?= $this->tabs->render($this); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<h3>Installed Modules</h3>
|
||||||
|
|
||||||
|
<?php if (isset($this->messageBox)): ?>
|
||||||
|
<?= $this->messageBox->render() ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?= $this->paginationControl($modules, null, null, array(
|
||||||
|
'preserve' => $this->preserve
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
<table class="action" data-base-target="_next">
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($modules as $module): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php if ($module->enabled): ?>
|
||||||
|
<?= $this->icon('success.png', 'Module is enabled') ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?= $this->icon('remove.png', 'Module is disabled') ?>
|
||||||
|
<? endif ?>
|
||||||
|
<a href="<?= $this->url('config/module/', array('name' => $module->name)) ?>"><?= $this->escape($module->name); ?></a>
|
||||||
|
(<?=
|
||||||
|
$module->enabled ? ($module->loaded ? 'enabled' : 'failed') : 'disabled' ?>)
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<? endforeach ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
|
@ -1,6 +1,22 @@
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard content">
|
<?php if ($this->dashboard): ?>
|
||||||
<?= $this->dashboard ?>
|
<div class="dashboard content">
|
||||||
</div>
|
<?= $this->dashboard ?>
|
||||||
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="content">
|
||||||
|
<h1>No dashboard configuration found!</h1>
|
||||||
|
<p>
|
||||||
|
<?=
|
||||||
|
$this->translate('We tried to load a dashboard configuration with no success.'
|
||||||
|
. ' Please have look that the configuration does exist:');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<code>
|
||||||
|
<?= $this->escape($this->configPath) ?>.ini
|
||||||
|
</code>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
|
@ -12,7 +12,7 @@ if ($this->pageCount <= 1) return;
|
||||||
?><ul class="pagination"
|
?><ul class="pagination"
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$fromto = $this->translate('%d to %d of %d');
|
$fromto = t('%d to %d of %d');
|
||||||
$total = $this->totalItemCount;
|
$total = $this->totalItemCount;
|
||||||
$limit = $this->itemCountPerPage;
|
$limit = $this->itemCountPerPage;
|
||||||
$title_prev = sprintf(
|
$title_prev = sprintf(
|
||||||
|
@ -42,10 +42,10 @@ if (isset($this->previous)) {
|
||||||
array('page' => $this->previous)
|
array('page' => $this->previous)
|
||||||
)->getAbsoluteUrl(),
|
)->getAbsoluteUrl(),
|
||||||
$title_prev,
|
$title_prev,
|
||||||
'« ' . $this->translate('Prev')
|
'« ' . t('Prev')
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
echo ' ><li class="disabled"><span>« ' . $this->translate('Prev') . '</span></li';
|
echo ' ><li class="disabled"><span>« ' . t('Prev') . '</span></li';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->pagesInRange as $page) {
|
foreach ($this->pagesInRange as $page) {
|
||||||
|
@ -80,10 +80,10 @@ if (isset($this->next)) {
|
||||||
array('page' => $this->next)
|
array('page' => $this->next)
|
||||||
)->getAbsoluteUrl(),
|
)->getAbsoluteUrl(),
|
||||||
$title_next,
|
$title_next,
|
||||||
$this->translate('Next') . ' »'
|
t('Next') . ' »'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
echo ' ><li class="disabled"><span>' . $this->translate('Next') . ' »</span></li';
|
echo ' ><li class="disabled"><span>' . t('Next') . ' »</span></li';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -6,14 +6,14 @@ if ($xAxisPaginator->count() <= 1 && $yAxisPaginator->count() <= 1) {
|
||||||
return; // Display this pagination only if there are multiple pages
|
return; // Display this pagination only if there are multiple pages
|
||||||
}
|
}
|
||||||
|
|
||||||
$fromTo = $this->translate('%s: %d to %d of %d');
|
$fromTo = t('%s: %d to %d of %d');
|
||||||
$xAxisPages = $xAxisPaginator->getPages('all');
|
$xAxisPages = $xAxisPaginator->getPages('all');
|
||||||
$yAxisPages = $yAxisPaginator->getPages('all');
|
$yAxisPages = $yAxisPaginator->getPages('all');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="pivot-pagination">
|
<div class="pivot-pagination">
|
||||||
<span><?= $this->translate('Navigation'); ?></span>
|
<span><?= t('Navigation'); ?></span>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($yAxisPages->pagesInRange as $yAxisPage): ?>
|
<?php foreach ($yAxisPages->pagesInRange as $yAxisPage): ?>
|
||||||
|
@ -25,13 +25,13 @@ $yAxisPages = $yAxisPaginator->getPages('all');
|
||||||
array('page' => $xAxisPage . ',' . $yAxisPage)
|
array('page' => $xAxisPage . ',' . $yAxisPage)
|
||||||
)->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
)->getAbsoluteUrl(); ?>" title="<?= sprintf(
|
||||||
$fromTo,
|
$fromTo,
|
||||||
$this->translate('Hosts'),
|
t('Hosts'),
|
||||||
($yAxisPage - 1) * $yAxisPages->itemCountPerPage + 1,
|
($yAxisPage - 1) * $yAxisPages->itemCountPerPage + 1,
|
||||||
$yAxisPage === $yAxisPages->last ? $yAxisPages->totalItemCount : $yAxisPage * $yAxisPages->itemCountPerPage,
|
$yAxisPage === $yAxisPages->last ? $yAxisPages->totalItemCount : $yAxisPage * $yAxisPages->itemCountPerPage,
|
||||||
$yAxisPages->totalItemCount
|
$yAxisPages->totalItemCount
|
||||||
) . '; ' . sprintf(
|
) . '; ' . sprintf(
|
||||||
$fromTo,
|
$fromTo,
|
||||||
$this->translate('Services'),
|
t('Services'),
|
||||||
($xAxisPage - 1) * $xAxisPages->itemCountPerPage + 1,
|
($xAxisPage - 1) * $xAxisPages->itemCountPerPage + 1,
|
||||||
$xAxisPage === $xAxisPages->last ? $xAxisPages->totalItemCount : $xAxisPage * $xAxisPages->itemCountPerPage,
|
$xAxisPage === $xAxisPages->last ? $xAxisPages->totalItemCount : $xAxisPage * $xAxisPages->itemCountPerPage,
|
||||||
$xAxisPages->totalItemCount
|
$xAxisPages->totalItemCount
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
<div class="controls">
|
||||||
|
<?= $this->tabs ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<h1><?= $this->translate("I'm ready to search, waiting for your input") ?></h1>
|
||||||
|
<p><strong><?= $this->translate('Hint') ?>: </strong><?= $this->translate(
|
||||||
|
'Please use the asterisk (*) as a placeholder for wildcard searches.'
|
||||||
|
. " For convenience I'll always add a wildcard after the last character"
|
||||||
|
. ' you typed.'
|
||||||
|
) ?></p>
|
||||||
|
</div>
|
|
@ -2,12 +2,6 @@
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($this->dashboard): ?>
|
|
||||||
<div class="content dashboard">
|
<div class="content dashboard">
|
||||||
<?= $this->dashboard ?>
|
<?= $this->dashboard ?>
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
|
||||||
<div class="content">
|
|
||||||
<strong><?= $this->hint ?></strong>
|
|
||||||
</div>
|
|
||||||
<?php endif ?>
|
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
; The backends will be processed from top to bottom using the first backend for authentication which reports that
|
; The backends will be processed from top to bottom using the first backend for authentication which reports that
|
||||||
; the user trying to log in is available.
|
; the user trying to log in is available.
|
||||||
|
|
||||||
|
[autologin]
|
||||||
|
backend = autologin
|
||||||
|
;
|
||||||
|
; If you want to strip the domain
|
||||||
|
; strip_username_regexp = /\@[^$]+$/
|
||||||
|
|
||||||
[internal_ldap_authentication]
|
[internal_ldap_authentication]
|
||||||
@ldap_auth_disabled@
|
@ldap_auth_disabled@
|
||||||
|
|
|
@ -11,10 +11,6 @@ timeFormat = "g:i A"
|
||||||
; won't show up in the list of disabled modules
|
; won't show up in the list of disabled modules
|
||||||
; modulePath = "/vagrant/modules:/usr/share/icingaweb/modules"
|
; modulePath = "/vagrant/modules:/usr/share/icingaweb/modules"
|
||||||
|
|
||||||
; The used authentication-mode can be either "internal" to handle the authentication in IcingaWeb
|
|
||||||
; or "external" to delegate the authentication to the used WebServer
|
|
||||||
authenticationMode = "internal"
|
|
||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
enable = true
|
enable = true
|
||||||
; Writing to a Stream
|
; Writing to a Stream
|
||||||
|
@ -43,8 +39,8 @@ level = 1
|
||||||
|
|
||||||
[preferences]
|
[preferences]
|
||||||
; Use INI file storage to save preferences to a local disk
|
; Use INI file storage to save preferences to a local disk
|
||||||
type = "ini"
|
type = "ini"
|
||||||
configPath = "@icingaweb_config_path@/preferences"
|
config_path = "@icingaweb_config_path@/preferences"
|
||||||
|
|
||||||
; Use database storage to save preferences in either a MySQL or PostgreSQL database
|
; Use database storage to save preferences in either a MySQL or PostgreSQL database
|
||||||
;type = db
|
;type = db
|
||||||
|
|
|
@ -2950,7 +2950,7 @@ fi
|
||||||
#
|
#
|
||||||
# Create config files
|
# Create config files
|
||||||
#
|
#
|
||||||
ac_config_files="$ac_config_files Makefile config/authentication.ini config/config.ini config/resources.ini config/modules/monitoring/backends.ini config/modules/monitoring/instances.ini etc/apache/icingaweb.conf public/.htaccess public/index.php"
|
ac_config_files="$ac_config_files Makefile config/authentication.ini config/config.ini config/resources.ini config/modules/monitoring/backends.ini config/modules/monitoring/instances.ini etc/apache/icingaweb.conf"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -3669,8 +3669,6 @@ do
|
||||||
"config/modules/monitoring/backends.ini") CONFIG_FILES="$CONFIG_FILES config/modules/monitoring/backends.ini" ;;
|
"config/modules/monitoring/backends.ini") CONFIG_FILES="$CONFIG_FILES config/modules/monitoring/backends.ini" ;;
|
||||||
"config/modules/monitoring/instances.ini") CONFIG_FILES="$CONFIG_FILES config/modules/monitoring/instances.ini" ;;
|
"config/modules/monitoring/instances.ini") CONFIG_FILES="$CONFIG_FILES config/modules/monitoring/instances.ini" ;;
|
||||||
"etc/apache/icingaweb.conf") CONFIG_FILES="$CONFIG_FILES etc/apache/icingaweb.conf" ;;
|
"etc/apache/icingaweb.conf") CONFIG_FILES="$CONFIG_FILES etc/apache/icingaweb.conf" ;;
|
||||||
"public/.htaccess") CONFIG_FILES="$CONFIG_FILES public/.htaccess" ;;
|
|
||||||
"public/index.php") CONFIG_FILES="$CONFIG_FILES public/index.php" ;;
|
|
||||||
|
|
||||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -440,8 +440,6 @@ AC_CONFIG_FILES([
|
||||||
config/modules/monitoring/backends.ini
|
config/modules/monitoring/backends.ini
|
||||||
config/modules/monitoring/instances.ini
|
config/modules/monitoring/instances.ini
|
||||||
etc/apache/icingaweb.conf
|
etc/apache/icingaweb.conf
|
||||||
public/.htaccess
|
|
||||||
public/index.php
|
|
||||||
])
|
])
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
Alias @web_path@ @prefix@/public
|
Alias @web_path@ "@prefix@/public"
|
||||||
|
|
||||||
<Directory "@prefix@/public">
|
<Directory "@prefix@/public">
|
||||||
Options -Indexes
|
Options SymLinksIfOwnerMatch
|
||||||
|
AllowOverride None
|
||||||
AllowOverride All
|
|
||||||
|
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
|
|
||||||
|
SetEnv ICINGAWEB_CONFIGDIR @icingaweb_config_path@
|
||||||
|
|
||||||
EnableSendfile Off
|
EnableSendfile Off
|
||||||
|
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteBase @web_path@/
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
|
RewriteRule ^.*$ - [NC,L]
|
||||||
|
RewriteRule ^.*$ index.php [NC,L]
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,21 @@
|
||||||
%define sharedir %{_datadir}/icingaweb
|
%define sharedir %{_datadir}/icingaweb
|
||||||
%define prefixdir %{_datadir}/icingaweb
|
%define prefixdir %{_datadir}/icingaweb
|
||||||
%define logdir %{sharedir}/log
|
%define logdir %{sharedir}/log
|
||||||
|
%define usermodparam -a -G
|
||||||
#%define logdir %{_localstatedir}/log/icingaweb
|
#%define logdir %{_localstatedir}/log/icingaweb
|
||||||
|
|
||||||
%if "%{_vendor}" == "suse"
|
%if "%{_vendor}" == "suse"
|
||||||
%define phpname php5
|
%define phpname php5
|
||||||
%define phpzendname php5-ZendFramework
|
%define phpzendname php5-ZendFramework
|
||||||
|
%define apache2modphpname apache2-mod_php5
|
||||||
%endif
|
%endif
|
||||||
%if "%{_vendor}" == "redhat"
|
# SLE 11 = 1110
|
||||||
|
%if 0%{?suse_version} == 1110
|
||||||
|
%define apache2modphpname apache2-mod_php53
|
||||||
|
%define usermodparam -A
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{_vendor}" == "redhat" || 0%{?suse_version} == 1110
|
||||||
%define phpname php
|
%define phpname php
|
||||||
%define phpzendname php-ZendFramework
|
%define phpzendname php-ZendFramework
|
||||||
%endif
|
%endif
|
||||||
|
@ -53,7 +61,7 @@ BuildArch: noarch
|
||||||
AutoReqProv: Off
|
AutoReqProv: Off
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Source0: icingaweb2-%{version}.tar.gz
|
Source0: icingaweb2-%{version}.tar.gz
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
|
|
||||||
|
@ -62,9 +70,11 @@ BuildRequires: %{phpname}-devel >= 5.3.0
|
||||||
BuildRequires: %{phpname}-ldap
|
BuildRequires: %{phpname}-ldap
|
||||||
BuildRequires: %{phpname}-pdo
|
BuildRequires: %{phpname}-pdo
|
||||||
BuildRequires: %{phpzendname}
|
BuildRequires: %{phpzendname}
|
||||||
|
%if "%{_vendor}" != "suse"
|
||||||
BuildRequires: %{phpzendname}-Db-Adapter-Pdo
|
BuildRequires: %{phpzendname}-Db-Adapter-Pdo
|
||||||
BuildRequires: %{phpzendname}-Db-Adapter-Pdo-Mysql
|
BuildRequires: %{phpzendname}-Db-Adapter-Pdo-Mysql
|
||||||
BuildRequires: %{phpzendname}-Db-Adapter-Pdo-Pgsql
|
BuildRequires: %{phpzendname}-Db-Adapter-Pdo-Pgsql
|
||||||
|
%endif
|
||||||
|
|
||||||
%if "%{_vendor}" == "redhat"
|
%if "%{_vendor}" == "redhat"
|
||||||
%endif
|
%endif
|
||||||
|
@ -76,11 +86,13 @@ BuildRequires: %{phpname}-dom
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: %{phpname} >= 5.3.0
|
Requires: %{phpname} >= 5.3.0
|
||||||
Requires: %{phpzendname}
|
Requires: %{phpzendname}
|
||||||
Requires: %{phpname}-ldap
|
Requires: %{phpname}-ldap
|
||||||
Requires: %{phpname}-pdo
|
Requires: %{phpname}-pdo
|
||||||
%if "%{_vendor}" == "redhat"
|
%if "%{_vendor}" == "redhat"
|
||||||
Requires: %{phpname}-common
|
Requires: %{phpname}-common
|
||||||
|
Requires: %{phpzendname}-Db-Adapter-Pdo
|
||||||
|
Requires: %{phpzendname}-Db-Adapter-Pdo-Mysql
|
||||||
Requires: php-pear
|
Requires: php-pear
|
||||||
%endif
|
%endif
|
||||||
%if "%{_vendor}" == "suse"
|
%if "%{_vendor}" == "suse"
|
||||||
|
@ -90,12 +102,9 @@ Requires: %{phpname}-tokenizer
|
||||||
Requires: %{phpname}-gettext
|
Requires: %{phpname}-gettext
|
||||||
Requires: %{phpname}-ctype
|
Requires: %{phpname}-ctype
|
||||||
Requires: %{phpname}-json
|
Requires: %{phpname}-json
|
||||||
Requires: apache2-mod_php5
|
Requires: %{apache2modphpname}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: %{phpzendname}-Db-Adapter-Pdo
|
|
||||||
Requires: %{phpzendname}-Db-Adapter-Pdo-Mysql
|
|
||||||
|
|
||||||
Requires: php-Icinga
|
Requires: php-Icinga
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,7 +146,7 @@ IcingaWeb for RHEL and SUSE
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
Please check ./doc/installation.md
|
Please check ./doc/installation.md
|
||||||
for requirements and database setup.
|
for requirements and database setup.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
@ -155,9 +164,8 @@ install -D -m0644 packages/rhel/etc/httpd/conf.d/icingaweb.conf %{buildroot}/%{a
|
||||||
|
|
||||||
%{__cp} -r application library modules public %{buildroot}/%{sharedir}/
|
%{__cp} -r application library modules public %{buildroot}/%{sharedir}/
|
||||||
|
|
||||||
# install index.php, .htaccess
|
# install index.php
|
||||||
install -m0644 packages/rhel/usr/share/icingaweb/public/index.php %{buildroot}/%{sharedir}/public/index.php
|
install -m0644 packages/rhel/usr/share/icingaweb/public/index.php %{buildroot}/%{sharedir}/public/index.php
|
||||||
install -m0644 packages/rhel/usr/share/icingaweb/public/.htaccess %{buildroot}/%{sharedir}/public/.htaccess
|
|
||||||
|
|
||||||
# use the vagrant config for configuration for now - TODO
|
# use the vagrant config for configuration for now - TODO
|
||||||
%{__cp} -r .vagrant-puppet/files/etc/icingaweb %{buildroot}/%{_sysconfdir}/
|
%{__cp} -r .vagrant-puppet/files/etc/icingaweb %{buildroot}/%{_sysconfdir}/
|
||||||
|
@ -174,8 +182,6 @@ install -D -m0755 bin/icingacli %{buildroot}/usr/bin/icingacli
|
||||||
# install sql schema files as example
|
# install sql schema files as example
|
||||||
|
|
||||||
# delete all *.in files
|
# delete all *.in files
|
||||||
rm -f %{buildroot}/%{_datadir}/%{name}/public/index.php.in
|
|
||||||
rm -f %{buildroot}/%{_datadir}/%{name}/public/.htaccess.in
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
# Add apacheuser in the icingacmd group
|
# Add apacheuser in the icingacmd group
|
||||||
|
@ -187,7 +193,7 @@ rm -f %{buildroot}/%{_datadir}/%{name}/public/.htaccess.in
|
||||||
getent group icingacmd > /dev/null
|
getent group icingacmd > /dev/null
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
%{_sbindir}/usermod -a -G icingacmd %{apacheuser}
|
%{_sbindir}/usermod %{usermodparam} icingacmd %{apacheuser}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# uncomment if building from git
|
# uncomment if building from git
|
||||||
|
|
|
@ -133,18 +133,21 @@ abstract class ApplicationBootstrap
|
||||||
define('ICINGA_LIBDIR', $this->libDir);
|
define('ICINGA_LIBDIR', $this->libDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Make appdir configurable for packagers
|
if (defined('ICINGAWEB_APPDIR')) {
|
||||||
$this->appDir = realpath($this->libDir. '/../application');
|
$this->appDir = ICINGAWEB_APPDIR;
|
||||||
|
} elseif (array_key_exists('ICINGAWEB_APPDIR', $_SERVER)) {
|
||||||
|
$this->appDir = $_SERVER['ICINGAWEB_APPDIR'];
|
||||||
|
} else {
|
||||||
|
$this->appDir = realpath($this->libDir. '/../application');
|
||||||
|
}
|
||||||
|
|
||||||
if (!defined('ICINGA_APPDIR')) {
|
if (!defined('ICINGAWEB_APPDIR')) {
|
||||||
define('ICINGA_APPDIR', $this->appDir);
|
define('ICINGAWEB_APPDIR', $this->appDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($configDir === null) {
|
if ($configDir === null) {
|
||||||
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
|
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
|
||||||
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
|
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
|
||||||
} else if (array_key_exists('ICINGAWEB_CONFIGDIR', $_ENV)) {
|
|
||||||
$configDir = $_ENV['ICINGAWEB_CONFIGDIR'];
|
|
||||||
} else {
|
} else {
|
||||||
$configDir = '/etc/icingaweb';
|
$configDir = '/etc/icingaweb';
|
||||||
}
|
}
|
||||||
|
@ -298,7 +301,6 @@ abstract class ApplicationBootstrap
|
||||||
|
|
||||||
$this->loader = new Loader();
|
$this->loader = new Loader();
|
||||||
$this->loader->registerNamespace('Icinga', $this->libDir. '/Icinga');
|
$this->loader->registerNamespace('Icinga', $this->libDir. '/Icinga');
|
||||||
$this->loader->registerNamespace('Icinga\\Form', $this->appDir. '/forms');
|
|
||||||
$this->loader->register();
|
$this->loader->register();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -339,8 +341,8 @@ abstract class ApplicationBootstrap
|
||||||
explode(
|
explode(
|
||||||
':',
|
':',
|
||||||
$this->config->global !== null
|
$this->config->global !== null
|
||||||
? $this->config->global->get('modulePath', ICINGA_APPDIR . '/../modules')
|
? $this->config->global->get('modulePath', ICINGAWEB_APPDIR . '/../modules')
|
||||||
: ICINGA_APPDIR . '/../modules'
|
: ICINGAWEB_APPDIR . '/../modules'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -124,6 +124,13 @@ class Cli extends ApplicationBootstrap
|
||||||
return $this->params;
|
return $this->params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function dispatchModule($name, $basedir = null)
|
||||||
|
{
|
||||||
|
$this->getModuleManager()->loadModule($name, $basedir);
|
||||||
|
$this->cliLoader()->setModuleName($name);
|
||||||
|
$this->dispatch();
|
||||||
|
}
|
||||||
|
|
||||||
public function dispatch()
|
public function dispatch()
|
||||||
{
|
{
|
||||||
Benchmark::measure('Dispatching CLI command');
|
Benchmark::measure('Dispatching CLI command');
|
||||||
|
@ -138,7 +145,7 @@ class Cli extends ApplicationBootstrap
|
||||||
|
|
||||||
protected function dispatchOnce()
|
protected function dispatchOnce()
|
||||||
{
|
{
|
||||||
$loader = new Loader($this);
|
$loader = $this->cliLoader();
|
||||||
$loader->parseParams();
|
$loader->parseParams();
|
||||||
$loader->dispatch();
|
$loader->dispatch();
|
||||||
Benchmark::measure('All done');
|
Benchmark::measure('All done');
|
||||||
|
@ -149,7 +156,7 @@ class Cli extends ApplicationBootstrap
|
||||||
|
|
||||||
protected function dispatchEndless()
|
protected function dispatchEndless()
|
||||||
{
|
{
|
||||||
$loader = new Loader($this);
|
$loader = $this->cliLoader();
|
||||||
$loader->parseParams();
|
$loader->parseParams();
|
||||||
$screen = Screen::instance();
|
$screen = Screen::instance();
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class Config extends Zend_Config
|
||||||
$filepath = realpath($filename);
|
$filepath = realpath($filename);
|
||||||
if ($filepath === false) {
|
if ($filepath === false) {
|
||||||
$this->configFile = $filename;
|
$this->configFile = $filename;
|
||||||
} else if (is_readable($filepath)) {
|
} elseif (is_readable($filepath)) {
|
||||||
$this->configFile = $filepath;
|
$this->configFile = $filepath;
|
||||||
$this->merge(new Zend_Config_Ini($filepath));
|
$this->merge(new Zend_Config_Ini($filepath));
|
||||||
} else {
|
} else {
|
||||||
|
@ -102,8 +102,7 @@ class Config extends Zend_Config
|
||||||
public static function app($configname = 'config', $fromDisk = false)
|
public static function app($configname = 'config', $fromDisk = false)
|
||||||
{
|
{
|
||||||
if (!isset(self::$app[$configname]) || $fromDisk) {
|
if (!isset(self::$app[$configname]) || $fromDisk) {
|
||||||
$filename = self::$configDir . '/' . $configname . '.ini';
|
self::$app[$configname] = new Config(self::resolvePath($configname . '.ini'));
|
||||||
self::$app[$configname] = new Config($filename);
|
|
||||||
}
|
}
|
||||||
return self::$app[$configname];
|
return self::$app[$configname];
|
||||||
}
|
}
|
||||||
|
@ -125,7 +124,7 @@ class Config extends Zend_Config
|
||||||
$moduleConfigs = self::$modules[$modulename];
|
$moduleConfigs = self::$modules[$modulename];
|
||||||
if (!isset($moduleConfigs[$configname]) || $fromDisk) {
|
if (!isset($moduleConfigs[$configname]) || $fromDisk) {
|
||||||
$moduleConfigs[$configname] = new Config(
|
$moduleConfigs[$configname] = new Config(
|
||||||
self::$configDir . '/modules/' . $modulename . '/' . $configname . '.ini'
|
self::resolvePath('modules/' . $modulename . '/' . $configname . '.ini')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $moduleConfigs[$configname];
|
return $moduleConfigs[$configname];
|
||||||
|
@ -159,21 +158,17 @@ class Config extends Zend_Config
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the input path with resolved path variables
|
* Prepend configuration base dir if input is relative
|
||||||
*
|
*
|
||||||
* Currently only %app% is considered a path variable and points to the application paths
|
* @param string $path Input path
|
||||||
*
|
* @return string Absolute path
|
||||||
* @param string $path The path to resolve
|
|
||||||
*
|
|
||||||
* @return string The resolved path
|
|
||||||
*/
|
*/
|
||||||
public static function resolvePath($path)
|
public static function resolvePath($path)
|
||||||
{
|
{
|
||||||
try {
|
if (strpos($path, DIRECTORY_SEPARATOR) === 0) {
|
||||||
$appDir = realpath(Icinga::app()->getApplicationDir() . '/..');
|
return $path;
|
||||||
} catch (ProgrammingError $appNotStarted) {
|
|
||||||
$appDir = realpath(__DIR__ . '/../../..');
|
|
||||||
}
|
}
|
||||||
return str_replace('{app}', $appDir, $path);
|
|
||||||
|
return self::$configDir . DIRECTORY_SEPARATOR . $path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace Icinga\Application;
|
namespace Icinga\Application;
|
||||||
|
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Exception;
|
||||||
|
|
||||||
class Loader
|
class Loader
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,11 @@ class Loader
|
||||||
public function registerNamespace($namespace, $directory)
|
public function registerNamespace($namespace, $directory)
|
||||||
{
|
{
|
||||||
if (!is_dir($directory)) {
|
if (!is_dir($directory)) {
|
||||||
throw new ProgrammingError('Directory does not exist: ' . $directory);
|
throw new Exception(sprintf(
|
||||||
|
'Namespace directory "%s" for "%s" does not exist',
|
||||||
|
$namespace,
|
||||||
|
$directory
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->namespaces[$namespace] = $directory;
|
$this->namespaces[$namespace] = $directory;
|
||||||
|
|
|
@ -196,23 +196,22 @@ class Manager
|
||||||
/**
|
/**
|
||||||
* Try to load the module and register it in the application
|
* Try to load the module and register it in the application
|
||||||
*
|
*
|
||||||
* @param string $name The name of the module to load
|
* @param string $name The name of the module to load
|
||||||
* @param mixed $moduleBase Alternative class to use instead of \Icinga\Application\Modules\Module for
|
* @param mixed $basedir Optional module base directory
|
||||||
* instantiating modules, used for testing
|
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function loadModule($name, $moduleBase = null)
|
public function loadModule($name, $basedir = null)
|
||||||
{
|
{
|
||||||
if ($this->hasLoaded($name)) {
|
if ($this->hasLoaded($name)) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
$module = null;
|
$module = null;
|
||||||
if ($moduleBase === null) {
|
if ($basedir === null) {
|
||||||
$module = new Module($this->app, $name, $this->getModuleDir($name));
|
$module = new Module($this->app, $name, $this->getModuleDir($name));
|
||||||
} else {
|
} else {
|
||||||
$module = new $moduleBase($this->app, $name, $this->getModuleDir($name));
|
$module = new Module($this->app, $name, $basedir);
|
||||||
}
|
}
|
||||||
$module->register();
|
$module->register();
|
||||||
$this->loadedModules[$name] = $module;
|
$this->loadedModules[$name] = $module;
|
||||||
|
@ -332,6 +331,10 @@ class Manager
|
||||||
*/
|
*/
|
||||||
public function getModuleDir($name, $subdir = '')
|
public function getModuleDir($name, $subdir = '')
|
||||||
{
|
{
|
||||||
|
if ($this->hasLoaded($name)) {
|
||||||
|
return $this->getModule($name)->getBaseDir() . $subdir;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->hasEnabled($name)) {
|
if ($this->hasEnabled($name)) {
|
||||||
return $this->enabledDirs[$name]. $subdir;
|
return $this->enabledDirs[$name]. $subdir;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
|
||||||
/**
|
|
||||||
* This file is part of Icinga Web 2.
|
|
||||||
*
|
|
||||||
* Icinga Web 2 - Head for multiple monitoring backends.
|
|
||||||
* Copyright (C) 2013 Icinga Development Team
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
* @copyright 2013 Icinga Development Team <info@icinga.org>
|
|
||||||
* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
|
|
||||||
* @author Icinga Development Team <info@icinga.org>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Icingaweb 2
|
||||||
|
*
|
||||||
|
* @link https://git.icinga.org/icingaweb2.git/ for the official source repository
|
||||||
|
* @copyright Copyright (c) 2013-2014 Icinga Development Team (https://www.icinga.org)
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2
|
||||||
|
*/
|
||||||
namespace Icinga\Application\Modules;
|
namespace Icinga\Application\Modules;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
@ -211,9 +191,9 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Test for an enabled module by name
|
* Test for an enabled module by name
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function exists($name)
|
public static function exists($name)
|
||||||
{
|
{
|
||||||
|
@ -223,12 +203,12 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Get module by name
|
* Get module by name
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param bool $autoload
|
* @param bool $autoload
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*
|
*
|
||||||
* @throws \Icinga\Exception\ProgrammingError When the module is not yet loaded
|
* @throws ProgrammingError When the module is not yet loaded
|
||||||
*/
|
*/
|
||||||
public static function get($name, $autoload = false)
|
public static function get($name, $autoload = false)
|
||||||
{
|
{
|
||||||
|
@ -303,13 +283,23 @@ class Module
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get short description
|
* Get module description
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getShortDescription()
|
public function getDescription()
|
||||||
{
|
{
|
||||||
return $this->metadata()->shortDescription;
|
return $this->metadata()->description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get module title (short description)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->metadata()->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -319,7 +309,6 @@ class Module
|
||||||
*/
|
*/
|
||||||
public function getDependencies()
|
public function getDependencies()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->metadata()->depends;
|
return $this->metadata()->depends;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,11 +321,11 @@ class Module
|
||||||
{
|
{
|
||||||
if ($this->metadata === null) {
|
if ($this->metadata === null) {
|
||||||
$metadata = (object) array(
|
$metadata = (object) array(
|
||||||
'name' => $this->getName(),
|
'name' => $this->getName(),
|
||||||
'version' => '0.0.0',
|
'version' => '0.0.0',
|
||||||
'shortDescription' => '',
|
'title' => null,
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'depends' => array(),
|
'depends' => array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (file_exists($this->metadataFile)) {
|
if (file_exists($this->metadataFile)) {
|
||||||
|
@ -347,15 +336,21 @@ class Module
|
||||||
while (false !== ($line = fgets($fh))) {
|
while (false !== ($line = fgets($fh))) {
|
||||||
$line = rtrim($line);
|
$line = rtrim($line);
|
||||||
|
|
||||||
if ($key === 'description' && $line[0] === ' ') {
|
if ($key === 'description') {
|
||||||
$metadata->{$key} .= "\n" . ltrim($line);
|
if (empty($line)) {
|
||||||
continue;
|
$metadata->description .= "\n";
|
||||||
|
continue;
|
||||||
|
} elseif ($line[0] === ' ') {
|
||||||
|
$metadata->description .= $line;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list($key, $val) = preg_split('/:\s+/', $line, 2);
|
list($key, $val) = preg_split('/:\s+/', $line, 2);
|
||||||
$key = lcfirst($key);
|
$key = lcfirst($key);
|
||||||
|
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
|
|
||||||
case 'depends':
|
case 'depends':
|
||||||
if (strpos($val, ' ') === false) {
|
if (strpos($val, ' ') === false) {
|
||||||
$metadata->depends[$val] = true;
|
$metadata->depends[$val] = true;
|
||||||
|
@ -372,9 +367,15 @@ class Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'description':
|
case 'description':
|
||||||
$metadata->shortDescription = $val;
|
if ($metadata->title === null) {
|
||||||
// YES, no break here
|
$metadata->title = $val;
|
||||||
|
} else {
|
||||||
|
$metadata->description = $val;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$metadata->{$key} = $val;
|
$metadata->{$key} = $val;
|
||||||
|
|
||||||
|
@ -382,6 +383,18 @@ class Module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($metadata->title === null) {
|
||||||
|
$metadata->title = $this->getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($metadata->description === '') {
|
||||||
|
// TODO: Check whether the translation module is able to
|
||||||
|
// extract this
|
||||||
|
$metadata->description = t(
|
||||||
|
'This module has no description'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->metadata = $metadata;
|
$this->metadata = $metadata;
|
||||||
}
|
}
|
||||||
return $this->metadata;
|
return $this->metadata;
|
||||||
|
@ -407,6 +420,11 @@ class Module
|
||||||
return $this->basedir;
|
return $this->basedir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the controller directory
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getControllerDir()
|
public function getControllerDir()
|
||||||
{
|
{
|
||||||
return $this->controllerdir;
|
return $this->controllerdir;
|
||||||
|
@ -445,21 +463,20 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Getter for module config object
|
* Getter for module config object
|
||||||
*
|
*
|
||||||
* @param string $file
|
* @param string $file
|
||||||
*
|
*
|
||||||
* @return Config
|
* @return Config
|
||||||
*/
|
*/
|
||||||
public function getConfig($file = null)
|
public function getConfig($file = null)
|
||||||
{
|
{
|
||||||
return $this->app
|
return $this->app->getConfig()->module($this->name, $file);
|
||||||
->getConfig()
|
|
||||||
->module($this->name, $file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve provided permissions
|
* Retrieve provided permissions
|
||||||
*
|
*
|
||||||
* @param string $name Permission name
|
* @param string $name Permission name
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getProvidedPermissions()
|
public function getProvidedPermissions()
|
||||||
|
@ -483,7 +500,8 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Whether the given permission name is supported
|
* Whether the given permission name is supported
|
||||||
*
|
*
|
||||||
* @param string $name Permission name
|
* @param string $name Permission name
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function providesPermission($name)
|
public function providesPermission($name)
|
||||||
|
@ -495,7 +513,8 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Whether the given restriction name is supported
|
* Whether the given restriction name is supported
|
||||||
*
|
*
|
||||||
* @param string $name Restriction name
|
* @param string $name Restriction name
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function providesRestriction($name)
|
public function providesRestriction($name)
|
||||||
|
@ -507,9 +526,10 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Provide a named permission
|
* Provide a named permission
|
||||||
*
|
*
|
||||||
* @param string $name Unique permission name
|
* @param string $name Unique permission name
|
||||||
* @param string $name Permission description
|
* @param string $name Permission description
|
||||||
* @return void
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function providePermission($name, $description)
|
protected function providePermission($name, $description)
|
||||||
{
|
{
|
||||||
|
@ -527,9 +547,10 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Provide a named restriction
|
* Provide a named restriction
|
||||||
*
|
*
|
||||||
* @param string $name Unique restriction name
|
* @param string $name Unique restriction name
|
||||||
* @param string $name Restriction description
|
* @param string $description Restriction description
|
||||||
* @return void
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function provideRestriction($name, $description)
|
protected function provideRestriction($name, $description)
|
||||||
{
|
{
|
||||||
|
@ -654,9 +675,9 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Include a php script if it is readable
|
* Include a php script if it is readable
|
||||||
*
|
*
|
||||||
* @param string $file File to include
|
* @param string $file File to include
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
protected function includeScript($file)
|
protected function includeScript($file)
|
||||||
{
|
{
|
||||||
|
@ -686,11 +707,11 @@ class Module
|
||||||
/**
|
/**
|
||||||
* Register hook
|
* Register hook
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $class
|
* @param string $class
|
||||||
* @param string $key
|
* @param string $key
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
protected function registerHook($name, $class, $key = null)
|
protected function registerHook($name, $class, $key = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -124,6 +124,7 @@ class Web extends ApplicationBootstrap
|
||||||
->setupInternationalization()
|
->setupInternationalization()
|
||||||
->setupRequest()
|
->setupRequest()
|
||||||
->setupZendMvc()
|
->setupZendMvc()
|
||||||
|
->setupFormNamespace()
|
||||||
->setupModuleManager()
|
->setupModuleManager()
|
||||||
->loadEnabledModules()
|
->loadEnabledModules()
|
||||||
->setupRoute()
|
->setupRoute()
|
||||||
|
@ -201,30 +202,18 @@ class Web extends ApplicationBootstrap
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create user object and inject preference interface
|
* Create user object
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
* @throws ConfigurationError
|
|
||||||
*/
|
*/
|
||||||
private function setupUser()
|
private function setupUser()
|
||||||
{
|
{
|
||||||
try {
|
$authenticationManager = AuthenticationManager::getInstance();
|
||||||
$config = Config::app('authentication');
|
|
||||||
} catch (NotReadableError $e) {
|
|
||||||
Logger::error(
|
|
||||||
new Exception('Cannot load authentication configuration. An exception was thrown:', 0, $e)
|
|
||||||
);
|
|
||||||
$config = null;
|
|
||||||
}
|
|
||||||
$authenticationManager = AuthenticationManager::getInstance($config);
|
|
||||||
if ($config !== null && $config->global !== null &&
|
|
||||||
$config->global->get('authenticationMode', 'internal') === 'external'
|
|
||||||
) {
|
|
||||||
$authenticationManager->authenticateFromRemoteUser();
|
|
||||||
}
|
|
||||||
if ($authenticationManager->isAuthenticated() === true) {
|
if ($authenticationManager->isAuthenticated() === true) {
|
||||||
$this->user = $authenticationManager->getUser();
|
$this->user = $authenticationManager->getUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,5 +360,19 @@ class Web extends ApplicationBootstrap
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup an autoloader namespace for Icinga\Form
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
private function setupFormNamespace()
|
||||||
|
{
|
||||||
|
$this->getLoader()->registerNamespace(
|
||||||
|
'Icinga\\Form',
|
||||||
|
$this->getApplicationDir('forms')
|
||||||
|
);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
|
|
|
@ -7,40 +7,81 @@ use Zend_Config;
|
||||||
use Icinga\Logger\Logger;
|
use Icinga\Logger\Logger;
|
||||||
use Icinga\Exception\ConfigurationError;
|
use Icinga\Exception\ConfigurationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterate user backends created from config
|
||||||
|
*/
|
||||||
class AuthChain implements Iterator
|
class AuthChain implements Iterator
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* User backends configuration
|
||||||
|
*
|
||||||
|
* @var Zend_Config
|
||||||
|
*/
|
||||||
private $config;
|
private $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The consecutive user backend while looping
|
||||||
|
*
|
||||||
|
* @var UserBackend
|
||||||
|
*/
|
||||||
private $currentBackend;
|
private $currentBackend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new authentication chain from config
|
||||||
|
*
|
||||||
|
* @param Zend_Config $config User backends configuration
|
||||||
|
*/
|
||||||
public function __construct(Zend_Config $config)
|
public function __construct(Zend_Config $config)
|
||||||
{
|
{
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rewind the chain
|
||||||
|
*/
|
||||||
public function rewind()
|
public function rewind()
|
||||||
{
|
{
|
||||||
$this->config->rewind();
|
$this->config->rewind();
|
||||||
|
$this->currentBackend = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current user backend
|
||||||
|
*
|
||||||
|
* @return UserBackend
|
||||||
|
*/
|
||||||
public function current()
|
public function current()
|
||||||
{
|
{
|
||||||
return $this->currentBackend;
|
return $this->currentBackend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the key of the current user backend config
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function key()
|
public function key()
|
||||||
{
|
{
|
||||||
return $this->config->key();
|
return $this->config->key();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move forward to the next user backend config
|
||||||
|
*/
|
||||||
public function next()
|
public function next()
|
||||||
{
|
{
|
||||||
$this->config->next();
|
$this->config->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the current user backend is valid, i.e. it's enabled and the config's valid
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function valid()
|
public function valid()
|
||||||
{
|
{
|
||||||
if (!$this->config->valid()) {
|
if (!$this->config->valid()) {
|
||||||
|
// Stop when there are no more backends to check
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$backendConfig = $this->config->current();
|
$backendConfig = $this->config->current();
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
<?php
|
||||||
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
|
namespace Icinga\Authentication\Backend;
|
||||||
|
|
||||||
|
use Icinga\Authentication\UserBackend;
|
||||||
|
use Icinga\User;
|
||||||
|
use \Zend_Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test login with external authentication mechanism, e.g. Apache
|
||||||
|
*/
|
||||||
|
class AutoLoginBackend extends UserBackend
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Regexp expression to strip values from a username
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $stripUsernameRegexp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create new autologin backend
|
||||||
|
*
|
||||||
|
* @param Zend_Config $config
|
||||||
|
*/
|
||||||
|
public function __construct(Zend_Config $config)
|
||||||
|
{
|
||||||
|
$this->stripUsernameRegexp = $config->get('strip_username_regexp');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (PHP 5 >= 5.1.0)<br/>
|
||||||
|
* Count elements of an object
|
||||||
|
* @link http://php.net/manual/en/countable.count.php
|
||||||
|
* @return int The custom count as an integer.
|
||||||
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* The return value is cast to an integer.
|
||||||
|
*/
|
||||||
|
public function count()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test whether the given user exists
|
||||||
|
*
|
||||||
|
* @param User $user
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function hasUser(User $user)
|
||||||
|
{
|
||||||
|
if (isset($_SERVER['PHP_AUTH_USER'])
|
||||||
|
&& isset($_SERVER['AUTH_TYPE'])
|
||||||
|
&& in_array($_SERVER['AUTH_TYPE'], array('Basic', 'Digest')) === true
|
||||||
|
) {
|
||||||
|
$username = filter_var(
|
||||||
|
$_SERVER['PHP_AUTH_USER'],
|
||||||
|
FILTER_SANITIZE_STRING,
|
||||||
|
FILTER_FLAG_ENCODE_HIGH|FILTER_FLAG_ENCODE_LOW
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($username !== false) {
|
||||||
|
if ($this->stripUsernameRegexp !== null) {
|
||||||
|
$username = preg_replace($this->stripUsernameRegexp, '', $username);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authenticate
|
||||||
|
*
|
||||||
|
* @param User $user
|
||||||
|
* @param string $password
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authenticate(User $user, $password)
|
||||||
|
{
|
||||||
|
return $this->hasUser($user);
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,8 +34,8 @@ use \Zend_Db_Expr;
|
||||||
use \Zend_Db_Select;
|
use \Zend_Db_Select;
|
||||||
use Icinga\Authentication\UserBackend;
|
use Icinga\Authentication\UserBackend;
|
||||||
use Icinga\Data\Db\Connection;
|
use Icinga\Data\Db\Connection;
|
||||||
use Icinga\Logger\Logger;
|
|
||||||
use Icinga\User;
|
use Icinga\User;
|
||||||
|
use Icinga\Exception\AuthenticationException;
|
||||||
|
|
||||||
class DbUserBackend extends UserBackend
|
class DbUserBackend extends UserBackend
|
||||||
{
|
{
|
||||||
|
@ -75,6 +75,7 @@ class DbUserBackend extends UserBackend
|
||||||
* @param string $password
|
* @param string $password
|
||||||
*
|
*
|
||||||
* @return bool|null
|
* @return bool|null
|
||||||
|
* @throws AuthenticationException
|
||||||
*/
|
*/
|
||||||
public function authenticate(User $user, $password)
|
public function authenticate(User $user, $password)
|
||||||
{
|
{
|
||||||
|
@ -96,13 +97,14 @@ class DbUserBackend extends UserBackend
|
||||||
|
|
||||||
return ($row !== false) ? true : false;
|
return ($row !== false) ? true : false;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Logger::error(
|
throw new AuthenticationException(
|
||||||
sprintf(
|
sprintf(
|
||||||
'Failed to authenticate user "%s" with backend "%s". Exception occured: %s',
|
'Failed to authenticate user "%s" against backend "%s". An exception was thrown:',
|
||||||
$user->getUsername(),
|
$user->getUsername(),
|
||||||
$this->getName(),
|
$this->getName()
|
||||||
$e->getMessage()
|
),
|
||||||
)
|
0,
|
||||||
|
$e
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,9 @@ namespace Icinga\Authentication\Backend;
|
||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
use Icinga\User;
|
use Icinga\User;
|
||||||
use Icinga\Logger\Logger;
|
|
||||||
use Icinga\Authentication\UserBackend;
|
use Icinga\Authentication\UserBackend;
|
||||||
use Icinga\Protocol\Ldap\Connection;
|
use Icinga\Protocol\Ldap\Connection;
|
||||||
|
use Icinga\Exception\AuthenticationException;
|
||||||
|
|
||||||
class LdapUserBackend extends UserBackend
|
class LdapUserBackend extends UserBackend
|
||||||
{
|
{
|
||||||
|
@ -95,6 +95,7 @@ class LdapUserBackend extends UserBackend
|
||||||
* @param string $password
|
* @param string $password
|
||||||
*
|
*
|
||||||
* @return bool|null
|
* @return bool|null
|
||||||
|
* @throws AuthenticationException
|
||||||
*/
|
*/
|
||||||
public function authenticate(User $user, $password)
|
public function authenticate(User $user, $password)
|
||||||
{
|
{
|
||||||
|
@ -104,13 +105,14 @@ class LdapUserBackend extends UserBackend
|
||||||
$password
|
$password
|
||||||
);
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Logger::error(
|
throw new AuthenticationException(
|
||||||
sprintf(
|
sprintf(
|
||||||
'Failed to authenticate user "%s" with backend "%s". Exception occured: %s',
|
'Failed to authenticate user "%s" against backend "%s". An exception was thrown:',
|
||||||
$user->getUsername(),
|
$user->getUsername(),
|
||||||
$this->getName(),
|
$this->getName()
|
||||||
$e->getMessage()
|
),
|
||||||
)
|
0,
|
||||||
|
$e
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
namespace Icinga\Authentication;
|
namespace Icinga\Authentication;
|
||||||
|
|
||||||
use Countable;
|
use Countable;
|
||||||
|
use Icinga\Authentication\Backend\AutoLoginBackend;
|
||||||
use Zend_Config;
|
use Zend_Config;
|
||||||
use Icinga\Authentication\Backend\DbUserBackend;
|
use Icinga\Authentication\Backend\DbUserBackend;
|
||||||
use Icinga\Authentication\Backend\LdapUserBackend;
|
use Icinga\Authentication\Backend\LdapUserBackend;
|
||||||
|
@ -84,6 +85,11 @@ abstract class UserBackend implements Countable
|
||||||
}
|
}
|
||||||
return new $backendConfig->class($backendConfig);
|
return new $backendConfig->class($backendConfig);
|
||||||
}
|
}
|
||||||
|
if ($name === 'autologin') {
|
||||||
|
$backend = new AutoLoginBackend($backendConfig);
|
||||||
|
$backend->setName($name);
|
||||||
|
return $backend;
|
||||||
|
}
|
||||||
if ($backendConfig->resource === null) {
|
if ($backendConfig->resource === null) {
|
||||||
throw new ConfigurationError(
|
throw new ConfigurationError(
|
||||||
'Authentication configuration for backend "' . $name
|
'Authentication configuration for backend "' . $name
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Documentation
|
||||||
. " --debug Show debug output\n"
|
. " --debug Show debug output\n"
|
||||||
. " --help Show help\n"
|
. " --help Show help\n"
|
||||||
. " --benchmark Show benchmark summary\n"
|
. " --benchmark Show benchmark summary\n"
|
||||||
. " --watch [s] Refresh output each <s> seconds (default: 5)\n"
|
. " --watch [s] Refresh output every <s> seconds (default: 5)\n"
|
||||||
;
|
;
|
||||||
$d .= "\nShow help on a specific command : icingacli help <command>"
|
$d .= "\nShow help on a specific command : icingacli help <command>"
|
||||||
. "\nShow help on a specific module : icingacli help <module>"
|
. "\nShow help on a specific module : icingacli help <module>"
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Loader
|
||||||
public function __construct(App $app)
|
public function __construct(App $app)
|
||||||
{
|
{
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
$this->coreAppDir = ICINGA_APPDIR . '/clicommands';
|
$this->coreAppDir = ICINGAWEB_APPDIR . '/clicommands';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -109,6 +109,12 @@ class Loader
|
||||||
return $this->moduleName;
|
return $this->moduleName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setModuleName($name)
|
||||||
|
{
|
||||||
|
$this->moduleName = $name;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCommandName()
|
public function getCommandName()
|
||||||
{
|
{
|
||||||
return $this->commandName;
|
return $this->commandName;
|
||||||
|
@ -176,11 +182,16 @@ class Loader
|
||||||
if ($params === null) {
|
if ($params === null) {
|
||||||
$params = $this->app->getParams();
|
$params = $this->app->getParams();
|
||||||
}
|
}
|
||||||
$first = $params->shift();
|
|
||||||
if (! $first) {
|
if ($this->moduleName === null) {
|
||||||
return;
|
$first = $params->shift();
|
||||||
|
if (! $first) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$found = $this->resolveName($first);
|
||||||
|
} else {
|
||||||
|
$found = $this->moduleName;
|
||||||
}
|
}
|
||||||
$found = $this->resolveName($first);
|
|
||||||
if (! $found) {
|
if (! $found) {
|
||||||
$msg = "There is no such module or command: '$first'";
|
$msg = "There is no such module or command: '$first'";
|
||||||
printf("%s: %s\n", $this->screen()->colorize('ERROR', 'red'), $msg);
|
printf("%s: %s\n", $this->screen()->colorize('ERROR', 'red'), $msg);
|
||||||
|
@ -419,8 +430,10 @@ class Loader
|
||||||
{
|
{
|
||||||
if ($this->modules === null) {
|
if ($this->modules === null) {
|
||||||
$this->modules = array();
|
$this->modules = array();
|
||||||
$this->modules = $this->app->getModuleManager()->listEnabledModules();
|
$this->modules = array_unique(array_merge(
|
||||||
sort($this->modules);
|
$this->app->getModuleManager()->listEnabledModules(),
|
||||||
|
$this->app->getModuleManager()->listLoadedModules()
|
||||||
|
));
|
||||||
}
|
}
|
||||||
return $this->modules;
|
return $this->modules;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
|
namespace Icinga\Exception;
|
||||||
|
|
||||||
|
use RuntimeException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exception thrown if an error occurs during authentication
|
||||||
|
*/
|
||||||
|
class AuthenticationException extends RuntimeException
|
||||||
|
{
|
||||||
|
}
|
|
@ -11,7 +11,7 @@ use Icinga\Web\StyleSheet;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
|
|
||||||
require_once 'vendor/dompdf/dompdf_config.inc.php';
|
require_once 'IcingaVendor/dompdf/dompdf_config.inc.php';
|
||||||
|
|
||||||
spl_autoload_register('DOMPDF_autoload');
|
spl_autoload_register('DOMPDF_autoload');
|
||||||
|
|
||||||
|
@ -60,4 +60,4 @@ class Pdf extends DOMPDF
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ class FileWriter extends LogWriter
|
||||||
*/
|
*/
|
||||||
public function __construct(Zend_Config $config)
|
public function __construct(Zend_Config $config)
|
||||||
{
|
{
|
||||||
$this->path = Config::resolvePath($config->target);
|
$this->path = $config->target;
|
||||||
$this->setup();
|
$this->setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ use Icinga\Application\Config as IcingaConfig;
|
||||||
* $store = PreferencesStore::create(
|
* $store = PreferencesStore::create(
|
||||||
* new Zend_Config(
|
* new Zend_Config(
|
||||||
* 'type' => 'ini',
|
* 'type' => 'ini',
|
||||||
* 'configPath' => '/path/to/preferences'
|
* 'config_path' => '/path/to/preferences'
|
||||||
* ),
|
* ),
|
||||||
* $user // Instance of \Icinga\User
|
* $user // Instance of \Icinga\User
|
||||||
* );
|
* );
|
||||||
|
@ -132,7 +132,7 @@ abstract class PreferencesStore
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type === 'Ini') {
|
if ($type === 'Ini') {
|
||||||
$config->location = IcingaConfig::resolvePath($config->configPath);
|
$config->location = $config->config_path;
|
||||||
} elseif ($type === 'Db') {
|
} elseif ($type === 'Db') {
|
||||||
$config->connection = new DbConnection(ResourceFactory::getResourceConfig($config->resource));
|
$config->connection = new DbConnection(ResourceFactory::getResourceConfig($config->resource));
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,20 +101,20 @@ class Format
|
||||||
return self::showHourMin($duration);
|
return self::showHourMin($duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function showHourMin($sec)
|
protected static function showHourMin($sec, $includePrefix = false)
|
||||||
{
|
{
|
||||||
$min = floor($sec / 60);
|
$min = floor($sec / 60);
|
||||||
if ($min < 60) {
|
if ($min < 60) {
|
||||||
return $min . 'm ' . ($sec % 60) . 's';
|
return ($includePrefix ? t('for') . ' ' : '') . $min . 'm ' . ($sec % 60) . 's';
|
||||||
}
|
}
|
||||||
$hour = floor($min / 60);
|
$hour = floor($min / 60);
|
||||||
if ($hour < 24) {
|
if ($hour < 24) {
|
||||||
return date('H:i', time() - $sec);
|
return ($includePrefix ? t('since') . ' ' : '') . date('H:i', time() - $sec);
|
||||||
}
|
}
|
||||||
return floor($hour / 24) . 'd ' . ($hour % 24) . 'h';
|
return ($includePrefix ? t('for') . ' ' : '') . floor($hour / 24) . 'd ' . ($hour % 24) . 'h';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function smartTimeDiff($diff, $timestamp)
|
protected static function smartTimeDiff($diff, $timestamp, $includePrefix = false)
|
||||||
{
|
{
|
||||||
if ($timestamp === null || $timestamp === false) {
|
if ($timestamp === null || $timestamp === false) {
|
||||||
return '-';
|
return '-';
|
||||||
|
@ -125,15 +125,14 @@ class Format
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
if ($diff < 0) {
|
if ($diff < 0) {
|
||||||
$prefix = '-';
|
$prefix = '-';
|
||||||
$diff *= -1;
|
|
||||||
}
|
}
|
||||||
if ($diff > 3600 * 24 * 3) {
|
if (abs($diff) > 3600 * 24 * 3) {
|
||||||
if (date('Y') === date('Y', $timestamp)) {
|
if (date('Y') === date('Y', $timestamp)) {
|
||||||
return date('d.m.', $timestamp);
|
return ($includePrefix ? t('since') . ' ' : '') . date('d.m.', $timestamp);
|
||||||
}
|
}
|
||||||
return date('m.Y', $timestamp);
|
return ($includePrefix ? t('since') . ' ' : '') . date('m.Y', $timestamp);
|
||||||
}
|
}
|
||||||
return $prefix . self::showHourMin($diff);
|
return $prefix . self::showHourMin(abs($diff), $includePrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function timeSince($timestamp)
|
public static function timeSince($timestamp)
|
||||||
|
@ -141,11 +140,29 @@ class Format
|
||||||
return self::smartTimeDiff(time() - $timestamp, $timestamp);
|
return self::smartTimeDiff(time() - $timestamp, $timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function prefixedTimeSince($timestamp, $ucfirst = false)
|
||||||
|
{
|
||||||
|
$result = self::smartTimeDiff(time() - $timestamp, $timestamp, true);
|
||||||
|
if ($ucfirst) {
|
||||||
|
$result = ucfirst($result);
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
public static function timeUntil($timestamp)
|
public static function timeUntil($timestamp)
|
||||||
{
|
{
|
||||||
return self::smartTimeDiff($timestamp - time(), $timestamp);
|
return self::smartTimeDiff($timestamp - time(), $timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function prefixedTimeUntil($timestamp, $ucfirst)
|
||||||
|
{
|
||||||
|
$result = self::smartTimeDiff($timestamp - time(), $timestamp, true);
|
||||||
|
if ($ucfirst) {
|
||||||
|
$result = ucfirst($result);
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
protected static function formatForUnits($value, & $units, $base)
|
protected static function formatForUnits($value, & $units, $base)
|
||||||
{
|
{
|
||||||
$sign = '';
|
$sign = '';
|
||||||
|
|
|
@ -81,6 +81,8 @@ class ActionController extends Zend_Controller_Action
|
||||||
|
|
||||||
private $windowId;
|
private $windowId;
|
||||||
|
|
||||||
|
protected $isRedirect = false;
|
||||||
|
|
||||||
// TODO: This would look better if we had a ModuleActionController
|
// TODO: This would look better if we had a ModuleActionController
|
||||||
public function Config($file = null)
|
public function Config($file = null)
|
||||||
{
|
{
|
||||||
|
@ -126,6 +128,9 @@ class ActionController extends Zend_Controller_Action
|
||||||
$this->windowId = $this->_request->getHeader('X-Icinga-WindowId', null);
|
$this->windowId = $this->_request->getHeader('X-Icinga-WindowId', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$module = $request->getModuleName();
|
||||||
|
$this->view->translationDomain = $module === 'default' ? 'icinga' : $module;
|
||||||
|
|
||||||
if ($this->requiresConfig() === false) {
|
if ($this->requiresConfig() === false) {
|
||||||
if ($this->requiresLogin() === false) {
|
if ($this->requiresLogin() === false) {
|
||||||
$this->view->tabs = new Tabs();
|
$this->view->tabs = new Tabs();
|
||||||
|
@ -365,12 +370,16 @@ class ActionController extends Zend_Controller_Action
|
||||||
**/
|
**/
|
||||||
public function redirectNow($url)
|
public function redirectNow($url)
|
||||||
{
|
{
|
||||||
if ($url instanceof Url) {
|
$url = Url::fromPath(preg_replace('~&~', '&', $url));
|
||||||
$url = $url->getRelativeUrl();
|
if ($this->_request->isXmlHttpRequest()) {
|
||||||
|
header('X-Icinga-Redirect: ' . rawurlencode($url));
|
||||||
|
// $this->getResponse()->sendHeaders() ??
|
||||||
|
// Session shutdown
|
||||||
|
exit; // Really?
|
||||||
} else {
|
} else {
|
||||||
$url = Url::fromPath($url)->getRelativeUrl();
|
$this->_helper->Redirector->gotoUrlAndExit($url->getRelativeUrl());
|
||||||
}
|
}
|
||||||
$this->_helper->Redirector->gotoUrlAndExit(preg_replace('~&~', '&', $url));
|
$this->isRedirect = true; // pretty useless right now
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -393,9 +402,9 @@ class ActionController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user = $this->getRequest()->getUser()) {
|
if ($user = $this->getRequest()->getUser()) {
|
||||||
// Cast preference app.showBenchmark to bool because preferences loaded from a preferences storage are
|
// Cast preference app.show_benchmark to bool because preferences loaded from a preferences storage are
|
||||||
// always strings
|
// always strings
|
||||||
if ((bool) $user->getPreferences()->get('app.showBenchmark', false) === true) {
|
if ((bool) $user->getPreferences()->get('app.show_benchmark', false) === true) {
|
||||||
Benchmark::measure('Response ready');
|
Benchmark::measure('Response ready');
|
||||||
$layout->benchmark = $this->renderBenchmark();
|
$layout->benchmark = $this->renderBenchmark();
|
||||||
}
|
}
|
||||||
|
@ -412,9 +421,9 @@ class ActionController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$notifications = Notification::getInstance();
|
$notifications = Notification::getInstance();
|
||||||
if ($isXhr && $notifications->hasMessages()) {
|
if ($isXhr && ! $this->isRedirect && $notifications->hasMessages()) {
|
||||||
foreach ($notifications->getMessages() as $m) {
|
foreach ($notifications->getMessages() as $m) {
|
||||||
header('X-Icinga-Notification: ' . $m->type . ' ' . $m->message);
|
header('X-Icinga-Notification: ' . rawurlencode($m->type . ' ' . $m->message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -436,7 +445,7 @@ class ActionController extends Zend_Controller_Action
|
||||||
// TODO: Innocent exception and error log for hack attempts
|
// TODO: Innocent exception and error log for hack attempts
|
||||||
throw new Exception('No way, guy');
|
throw new Exception('No way, guy');
|
||||||
}
|
}
|
||||||
header('X-Icinga-Title: ' . $this->view->title . ' :: Icinga Web');
|
header('X-Icinga-Title: ' . rawurlencode($this->view->title . ' :: Icinga Web'));
|
||||||
}
|
}
|
||||||
// TODO: _render=layout?
|
// TODO: _render=layout?
|
||||||
if ($this->getParam('_render') === 'layout') {
|
if ($this->getParam('_render') === 'layout') {
|
||||||
|
|
|
@ -81,7 +81,6 @@ class WritablePathValidator extends Zend_Validate_Abstract
|
||||||
$value = (string) $value;
|
$value = (string) $value;
|
||||||
|
|
||||||
$this->_setValue($value);
|
$this->_setValue($value);
|
||||||
$value = IcingaConfig::resolvePath($value);
|
|
||||||
if ($this->requireExistence && !file_exists($value)) {
|
if ($this->requireExistence && !file_exists($value)) {
|
||||||
$this->_error('DOES_NOT_EXIST');
|
$this->_error('DOES_NOT_EXIST');
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -74,7 +74,7 @@ class JavaScript
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($minified) {
|
if ($minified) {
|
||||||
require_once ICINGA_LIBDIR . '/vendor/JShrink/Minifier.php';
|
require_once 'IcingaVendor/JShrink/Minifier.php';
|
||||||
$out .= Minifier::minify($js, array('flaggedComments' => false));
|
$out .= Minifier::minify($js, array('flaggedComments' => false));
|
||||||
} else {
|
} else {
|
||||||
$out .= $js;
|
$out .= $js;
|
||||||
|
|
|
@ -67,7 +67,7 @@ class LessCompiler
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
require_once 'vendor/lessphp/lessc.inc.php';
|
require_once 'IcingaVendor/lessphp/lessc.inc.php';
|
||||||
$this->lessc = new lessc();
|
$this->lessc = new lessc();
|
||||||
|
|
||||||
$this->lessc->setVariables(
|
$this->lessc->setVariables(
|
||||||
|
|
|
@ -112,6 +112,7 @@ class Notification
|
||||||
$msgs = $session->messages;
|
$msgs = $session->messages;
|
||||||
$msgs[] = $mo;
|
$msgs[] = $mo;
|
||||||
$session->messages = $msgs;
|
$session->messages = $msgs;
|
||||||
|
$session->write();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasMessages()
|
public function hasMessages()
|
||||||
|
@ -125,6 +126,7 @@ class Notification
|
||||||
$session = Session::getSession();
|
$session = Session::getSession();
|
||||||
$msgs = $session->messages;
|
$msgs = $session->messages;
|
||||||
$session->messages = array();
|
$session->messages = array();
|
||||||
|
$session->write();
|
||||||
return $msgs;
|
return $msgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,6 +298,11 @@ class Url
|
||||||
return $this->path . '?' . http_build_query($params, '', '&') . $this->anchor;
|
return $this->path . '?' . http_build_query($params, '', '&') . $this->anchor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getQueryString()
|
||||||
|
{
|
||||||
|
return http_build_query($this->params, '', '&');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the absolute url with query parameters as a string
|
* Return the absolute url with query parameters as a string
|
||||||
*
|
*
|
||||||
|
@ -493,6 +498,11 @@ class Url
|
||||||
* @return Url
|
* @return Url
|
||||||
*/
|
*/
|
||||||
public function getUrlWithout($keyOrArrayOfKeys)
|
public function getUrlWithout($keyOrArrayOfKeys)
|
||||||
|
{
|
||||||
|
return $this->without($keyOrArrayOfKeys);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function without($keyOrArrayOfKeys)
|
||||||
{
|
{
|
||||||
$url = clone($this);
|
$url = clone($this);
|
||||||
$url->remove($keyOrArrayOfKeys);
|
$url->remove($keyOrArrayOfKeys);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
namespace Icinga\Web;
|
namespace Icinga\Web;
|
||||||
|
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
|
use Icinga\Util\Translator;
|
||||||
use Zend_View_Abstract;
|
use Zend_View_Abstract;
|
||||||
use Closure;
|
use Closure;
|
||||||
|
|
||||||
|
@ -154,6 +155,11 @@ class View extends Zend_View_Abstract
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function translate($text)
|
||||||
|
{
|
||||||
|
return Translator::translate($text, $this->translationDomain);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load helpers
|
* Load helpers
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,10 +15,22 @@ $this->addHelperFunction('timeSince', function ($timestamp) {
|
||||||
. '</span>';
|
. '</span>';
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->addHelperFunction('timeUnless', function ($timestamp) {
|
$this->addHelperFunction('prefixedTimeSince', function ($timestamp, $ucfirst = false) {
|
||||||
|
return '<span class="timesince">'
|
||||||
|
. Format::prefixedTimeSince($timestamp, $ucfirst)
|
||||||
|
. '</span>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$this->addHelperFunction('timeUntil', function ($timestamp) {
|
||||||
if (! $timestamp) return '';
|
if (! $timestamp) return '';
|
||||||
return '<span class="timeunless">'
|
return '<span class="timeuntil">'
|
||||||
. Format::timeUntil($timestamp)
|
. Format::timeUntil($timestamp)
|
||||||
. '</span>';
|
. '</span>';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$this->addHelperFunction('prefixedTimeUntil', function ($timestamp, $ucfirst = false) {
|
||||||
|
if (! $timestamp) return '';
|
||||||
|
return '<span class="timeuntil">'
|
||||||
|
. Format::prefixedTimeUntil($timestamp, $ucfirst)
|
||||||
|
. '</span>';
|
||||||
|
});
|
||||||
|
|
|
@ -220,12 +220,17 @@ EOD;
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
$template = $this->template;
|
$template = $this->template;
|
||||||
|
// Locale-ignorant string cast:
|
||||||
|
$data = array();
|
||||||
|
foreach ($this->data as $dat) {
|
||||||
|
$data[] = sprintf('%F', $dat);
|
||||||
|
}
|
||||||
$template = preg_replace('{{url}}', $this->url, $template);
|
$template = preg_replace('{{url}}', $this->url, $template);
|
||||||
$template = preg_replace('{{width}}', $this->width, $template);
|
$template = preg_replace('{{width}}', $this->width, $template);
|
||||||
$template = preg_replace('{{height}}', $this->height, $template);
|
$template = preg_replace('{{height}}', $this->height, $template);
|
||||||
$template = preg_replace('{{title}}', $this->title, $template);
|
$template = preg_replace('{{title}}', $this->title, $template);
|
||||||
$template = preg_replace('{{style}}', $this->style, $template);
|
$template = preg_replace('{{style}}', $this->style, $template);
|
||||||
$template = preg_replace('{{data}}', implode(',', $this->data), $template);
|
$template = preg_replace('{{data}}', implode(',', $data), $template);
|
||||||
$template = preg_replace('{{colors}}', implode(',', $this->colors), $template);
|
$template = preg_replace('{{colors}}', implode(',', $this->colors), $template);
|
||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace Icinga\Web\Widget;
|
||||||
|
|
||||||
use Icinga\Application\Icinga;
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Application\Config as IcingaConfig;
|
use Icinga\Application\Config as IcingaConfig;
|
||||||
|
use Icinga\Exception\ConfigurationError;
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
use Icinga\Web\Widget\AbstractWidget;
|
use Icinga\Web\Widget\AbstractWidget;
|
||||||
use Icinga\Web\Widget\Dashboard\Pane;
|
use Icinga\Web\Widget\Dashboard\Pane;
|
||||||
|
@ -305,7 +306,12 @@ class Dashboard extends AbstractWidget
|
||||||
$active = $this->setDefaultPane();
|
$active = $this->setDefaultPane();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->panes[$active];
|
|
||||||
|
if (isset($this->panes[$active])) {
|
||||||
|
return $this->panes[$active];
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new ConfigurationError('Could not determine active pane');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue