From f985573750b514c12f1ef766fbc583184fd5181c Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 24 Jul 2024 09:05:02 +0200 Subject: [PATCH] WIP --- library/Icinga/Web/JavaScript.php | 2 +- public/js/icinga.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/JavaScript.php b/library/Icinga/Web/JavaScript.php index 1865136c7..71f9342a9 100644 --- a/library/Icinga/Web/JavaScript.php +++ b/library/Icinga/Web/JavaScript.php @@ -238,7 +238,7 @@ class JavaScript try { $dependencies = $match[2] ? Json::decode($match[2]) : []; foreach ($dependencies as &$dependencyName) { - if ($dependencyName === 'exports') { + if ($dependencyName === 'exports' || $dependencyName === 'Icinga') { // exports is a special keyword and doesn't need optimization continue; } diff --git a/public/js/icinga.js b/public/js/icinga.js index a0e060ecf..eb8a85de6 100644 --- a/public/js/icinga.js +++ b/public/js/icinga.js @@ -91,6 +91,8 @@ return false; } + define('Icinga', [], () => Icinga); + this.timezone = new Icinga.Timezone(); this.utils = new Icinga.Utils(this); this.logger = new Icinga.Logger(this);