mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
webrouter: Serve lib assets at lib/<lib-name>/<asset-path>
This commit is contained in:
parent
ed7763c379
commit
220044277c
@ -4,6 +4,7 @@
|
|||||||
namespace Icinga\Application;
|
namespace Icinga\Application;
|
||||||
|
|
||||||
use Icinga\Chart\Inline\PieChart;
|
use Icinga\Chart\Inline\PieChart;
|
||||||
|
use Icinga\Web\Controller\StaticController;
|
||||||
use Icinga\Web\JavaScript;
|
use Icinga\Web\JavaScript;
|
||||||
use Icinga\Web\StyleSheet;
|
use Icinga\Web\StyleSheet;
|
||||||
|
|
||||||
@ -92,6 +93,11 @@ if (in_array($path, $special)) {
|
|||||||
$pie = new PieChart();
|
$pie = new PieChart();
|
||||||
$pie->initFromRequest();
|
$pie->initFromRequest();
|
||||||
$pie->toPng();
|
$pie->toPng();
|
||||||
|
} elseif (substr($path, 0, 4) === 'lib/') {
|
||||||
|
include_once __DIR__ . '/StaticWeb.php';
|
||||||
|
$app = StaticWeb::start();
|
||||||
|
(new StaticController())->handle($app->getRequest());
|
||||||
|
$app->getResponse()->sendResponse();
|
||||||
} elseif (file_exists($baseDir . '/' . $path) && is_file($baseDir . '/' . $path)) {
|
} elseif (file_exists($baseDir . '/' . $path) && is_file($baseDir . '/' . $path)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user