[icinga-checkins] icinga.org: icinga-web/mhein/default: * Updated configure scripts, added sla parameters, user configs now contain configure vars
git at icinga.org
git at icinga.org
Mon Nov 21 17:26:43 CET 2011
Module: icinga-web
Branch: mhein/default
Commit: 0815190a0be2dc81136fbef80773d826fc7c02c7
URL: https://git.icinga.org/?p=icinga-web.git;a=commit;h=0815190a0be2dc81136fbef80773d826fc7c02c7
Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date: Mon Nov 21 13:35:07 2011 +0100
* Updated configure scripts, added sla parameters, user configs now contain configure vars
---
.gitignore | 2 +
app/modules/Api/config/module.xml.in | 4 +-
configure | 36 ++++++++++++++++++++++-
configure.ac | 19 ++++++++++++
etc/sitecfg/{databases.xml => databases.xml.in} | 7 ++--
etc/sitecfg/{sla.xml => sla.xml.in} | 6 ++--
6 files changed, 65 insertions(+), 9 deletions(-)
diff --git a/.gitignore b/.gitignore
index 1eca57d..adacbf0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,8 @@ app/modules/Web/config/module.site.xml
app/modules/Cronks/config/module.site.xml
app/modules/Reporting/data/tmp
etc/sitecfg/access.xml
+etc/sitecfg/sla.xml
+etc/sitecfg/databases.xml
bin/clearcache.sh
icinga-web.session
icinga-web.webprj
diff --git a/app/modules/Api/config/module.xml.in b/app/modules/Api/config/module.xml.in
index a6ac56a..8b539a5 100644
--- a/app/modules/Api/config/module.xml.in
+++ b/app/modules/Api/config/module.xml.in
@@ -14,8 +14,8 @@
This mostly affects the 'quick overview' values like
the tackle overview (not host details)
-->
- <ae:parameter name="default_timespan">-1 month</ae:parameter>
- <ae:parameter name="enabled">true</ae:parameter>
+ <ae:parameter name="default_timespan">@sla_default_timespan@</ae:parameter>
+ <ae:parameter name="enabled">@enable_sla@</ae:parameter>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="@web_conf_dir@/sla.xml" xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(ac=http://agavi.org/agavi/config/parts/module/1.0) xpointer(//ae:configurations//ae:configuration/ac:settings/node())">
<xi:fallback></xi:fallback>
</xi:include>
diff --git a/configure b/configure
index 2cc9028..02d0aa2 100755
--- a/configure
+++ b/configure
@@ -570,6 +570,8 @@ INSTALL_OPTS_WEB
INSTALL_OPTS
CFLAGS
icinga_api
+sla_default_timespan
+enable_sla
api_cmd_instance
api_cmd_file
api_db_prefix
@@ -679,6 +681,8 @@ with_api_db_prefix
with_api_cmd_file
with_api_cmd_instance
with_devel_mode
+with_sla_default_timespan
+with_enable_sla
with_conf_folder
with_conf_dir
with_log_folder
@@ -1337,6 +1341,9 @@ Optional Packages:
Icinga default command instance name (default
"default")
--with-devel-mode Web devel mode (disable caching)
+ --with-sla-default-timespan=TIMESPAN
+ The timespan used for non-detailed sla overviews
+ --with-enable-sla Enable SLA support
--with-conf-folder=PATH DEPRECATED, please use --with-conf-dir instead
--with-conf-dir=PATH Folder where to store custom user configurations
(default etc/conf.d/)
@@ -2543,6 +2550,28 @@ else
fi
+
+# Check whether --with-sla_default_timespan was given.
+if test "${with_sla_default_timespan+set}" = set; then :
+ withval=$with_sla_default_timespan; sla_default_timespan=$withval
+else
+ sla_default_timespan="-1 month"
+
+fi
+
+
+
+
+# Check whether --with-enable_sla was given.
+if test "${with_enable_sla+set}" = set; then :
+ withval=$with_enable_sla; enable_sla=$withval
+else
+ enable_sla=false
+
+fi
+
+
+
# Configuration location
# DEPRECATED
@@ -2795,7 +2824,10 @@ fi
-ac_config_files="$ac_config_files Makefile lib/Makefile lib/icingaScheduler/config.php pub/Makefile etc/Makefile bin/Makefile doc/Makefile app/Makefile etc/sitecfg/Makefile app/config.php app/config/databases.xml app/config/icinga.xml app/config/logging.xml app/config/settings.xml app/config/translation.xml app/modules/Api/config/access.xml etc/sitecfg/access.xml app/modules/Api/config/module.xml app/modules/AppKit/config/module.xml app/modules/AppKit/config/auth.xml app/modules/Cronks/config/module.xml app/modules/Reporting/config/module.xml etc/build.properties tests/phpunit/test.properties etc/apache2/icinga-web.conf etc/scheduler/icingaCron bin/clearcache.sh pub/.htaccess pub/soap/.htaccess"
+
+
+
+ac_config_files="$ac_config_files Makefile lib/Makefile lib/icingaScheduler/config.php pub/Makefile etc/Makefile bin/Makefile doc/Makefile app/Makefile etc/sitecfg/Makefile app/config.php app/config/databases.xml app/config/icinga.xml app/config/logging.xml app/config/settings.xml app/config/translation.xml app/modules/Api/config/access.xml etc/sitecfg/access.xml etc/sitecfg/databases.xml etc/sitecfg/sla.xml app/modules/Api/config/module.xml app/modules/AppKit/config/module.xml app/modules/AppKit/config/auth.xml app/modules/Cronks/config/module.xml app/modules/Reporting/config/module.xml etc/build.properties tests/phpunit/test.properties etc/apache2/icinga-web.conf etc/scheduler/icingaCron bin/clearcache.sh pub/.htaccess pub/soap/.htaccess"
cat >confcache <<\_ACEOF
@@ -3514,6 +3546,8 @@ do
"app/config/translation.xml") CONFIG_FILES="$CONFIG_FILES app/config/translation.xml" ;;
"app/modules/Api/config/access.xml") CONFIG_FILES="$CONFIG_FILES app/modules/Api/config/access.xml" ;;
"etc/sitecfg/access.xml") CONFIG_FILES="$CONFIG_FILES etc/sitecfg/access.xml" ;;
+ "etc/sitecfg/databases.xml") CONFIG_FILES="$CONFIG_FILES etc/sitecfg/databases.xml" ;;
+ "etc/sitecfg/sla.xml") CONFIG_FILES="$CONFIG_FILES etc/sitecfg/sla.xml" ;;
"app/modules/Api/config/module.xml") CONFIG_FILES="$CONFIG_FILES app/modules/Api/config/module.xml" ;;
"app/modules/AppKit/config/module.xml") CONFIG_FILES="$CONFIG_FILES app/modules/AppKit/config/module.xml" ;;
"app/modules/AppKit/config/auth.xml") CONFIG_FILES="$CONFIG_FILES app/modules/AppKit/config/auth.xml" ;;
diff --git a/configure.ac b/configure.ac
index b9157c4..7df5ed9 100755
--- a/configure.ac
+++ b/configure.ac
@@ -225,6 +225,20 @@ AC_ARG_WITH([devel_mode],
devel_mode=no
)
+AC_ARG_WITH([sla_default_timespan],
+ AS_HELP_STRING([--with-sla-default-timespan=TIMESPAN], [The timespan used for non-detailed sla overviews]),
+ sla_default_timespan=$withval,
+ sla_default_timespan="-1 month"
+)
+
+
+AC_ARG_WITH([enable_sla],
+ AS_HELP_STRING([--with-enable-sla], [Enable SLA support]),
+ enable_sla=$withval,
+ enable_sla=false
+)
+
+
# Configuration location
# DEPRECATED
AC_ARG_WITH([conf_folder],
@@ -319,6 +333,9 @@ AC_SUBST(api_db_prefix)
AC_SUBST(api_cmd_file)
AC_SUBST(api_cmd_instance)
+AC_SUBST(enable_sla)
+AC_SUBST(sla_default_timespan)
+
AC_SUBST(icinga_api)
AC_SUBST(CFLAGS)
@@ -355,6 +372,8 @@ AC_CONFIG_FILES([
app/config/translation.xml
app/modules/Api/config/access.xml
etc/sitecfg/access.xml
+ etc/sitecfg/databases.xml
+ etc/sitecfg/sla.xml
app/modules/Api/config/module.xml
app/modules/AppKit/config/module.xml
app/modules/AppKit/config/auth.xml
diff --git a/etc/sitecfg/databases.xml b/etc/sitecfg/databases.xml.in
similarity index 90%
rename from etc/sitecfg/databases.xml
rename to etc/sitecfg/databases.xml.in
index ac727d1..de964ea 100644
--- a/etc/sitecfg/databases.xml
+++ b/etc/sitecfg/databases.xml.in
@@ -13,7 +13,8 @@
-->
<!--
<db:database name="icinga_web" class="AppKitDoctrineDatabase">
- <ae:parameter name="dsn">mysql://icinga_web:icinga_web@localhost:3306/icinga_web</ae:parameter>
+ <ae:parameter name="dsn">@db_type@://@db_user@:@db_pass@@@db_host@:@db_port@/@db_name@</ae:parameter>
+
<ae:parameter name="charset">utf8</ae:parameter>
<ae:parameter name="manager_attributes">
<ae:parameter name="Doctrine_Core::ATTR_MODEL_LOADING">CONSERVATIVE</ae:parameter>
@@ -42,8 +43,8 @@
-->
<!--
<db:database xmlns="http://agavi.org/agavi/config/parts/databases/1.0" name="icinga" class="IcingaDoctrineDatabase">
- <ae:parameter name="dsn">mysql://icinga:icinga@localhost:3306/icinga</ae:parameter>
- <ae:parameter name="prefix">icinga_</ae:parameter>
+ <ae:parameter name="dsn">@api_subtype@://@api_db_user@:@api_db_pass@@@api_host@:@api_port@/@api_db_name@</ae:parameter>
+ <ae:parameter name="prefix">@api_db_prefix@</ae:parameter>
<ae:parameter name="charset">utf8</ae:parameter>
<ae:parameter name="use_retained">true</ae:parameter>
<ae:parameter name="date_format"><![CDATA[YYYY-MM-DD HH24:MI:SS]]></ae:parameter>
diff --git a/etc/sitecfg/sla.xml b/etc/sitecfg/sla.xml.in
similarity index 60%
rename from etc/sitecfg/sla.xml
rename to etc/sitecfg/sla.xml.in
index b5405db..6752845 100644
--- a/etc/sitecfg/sla.xml
+++ b/etc/sitecfg/sla.xml.in
@@ -2,8 +2,8 @@
<ae:configurations xmlns="http://agavi.org/agavi/config/parts/module/1.0" xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0">
<ae:configuration>
<settings>
- <ae:parameter name="default_timespan">-1 month</ae:parameter>
- <ae:parameter name="enabled">false</ae:parameter>
+ <ae:parameter name="default_timespan">@sla_default_timespan@</ae:parameter>
+ <ae:parameter name="enabled">@enable_sla@</ae:parameter>
</settings>
</ae:configuration>
-</ae:configurations>
\ No newline at end of file
+</ae:configurations>
More information about the icinga-checkins
mailing list