Added quick & dirty css.php, file list shall be moved elsewhere
This commit is contained in:
parent
0942a94958
commit
e81543d519
|
@ -2950,7 +2950,7 @@ fi
|
|||
#
|
||||
# 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 public/.htaccess public/index.php public/css.php"
|
||||
|
||||
|
||||
#
|
||||
|
@ -3671,6 +3671,7 @@ do
|
|||
"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" ;;
|
||||
"public/css.php") CONFIG_FILES="$CONFIG_FILES public/css.php" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
|
|
|
@ -442,6 +442,7 @@ AC_CONFIG_FILES([
|
|||
etc/apache/icingaweb.conf
|
||||
public/.htaccess
|
||||
public/index.php
|
||||
public/css.php
|
||||
])
|
||||
|
||||
#
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Application\EmbeddedWeb;
|
||||
use Icinga\Web\LessCompiler;
|
||||
|
||||
require_once dirname(__FILE__). '/../library/Icinga/Application/ApplicationBootstrap.php';
|
||||
require_once dirname(__FILE__). '/../library/Icinga/Application/EmbeddedWeb.php';
|
||||
$app = EmbeddedWeb::start('@icingaweb_config_path@');
|
||||
$less = new LessCompiler();
|
||||
|
||||
header('Content-Type: text/css');
|
||||
// TODO: Cache header
|
||||
|
||||
$lessfiles = array(
|
||||
'css/icinga/defaults.less',
|
||||
'css/icinga/layout-colors.less',
|
||||
'css/icinga/layout-structure.less',
|
||||
'css/icinga/menu.less',
|
||||
'css/icinga/header-elements.less',
|
||||
'css/icinga/main-content.less',
|
||||
'css/icinga/tabs.less',
|
||||
'css/icinga/forms.less',
|
||||
'css/icinga/pagination.less',
|
||||
'css/icinga/monitoring-colors.less',
|
||||
'css/icinga/login.less',
|
||||
);
|
||||
|
||||
$basedir = dirname(__FILE__);
|
||||
foreach ($lessfiles as $file) {
|
||||
$less->addFile($basedir . '/' . $file);
|
||||
}
|
||||
echo $less->addLoadedModules()->compile();
|
Loading…
Reference in New Issue