Fixed js config not loading

This commit is contained in:
2025-10-23 02:16:09 +01:00
parent c3fd4d9f57
commit 821e20fd76
2 changed files with 3 additions and 10 deletions

View File

@@ -31,7 +31,7 @@ $CONFIG = [
];
// === JavaScript Variables ===
$CONFIG += [
$CONFIG_JS = [
// === Index System Wide ===
'index_admin_status_update_interval' => 50000,

View File

@@ -53,14 +53,7 @@ unset($nav_order,$nav_admin,$nav_hidden);
<title><?= htmlspecialchars($CONFIG['site_name']) ?></title>
<link rel="stylesheet" href="css/style.css">
<script>
const CONFIG = {
options_status_interval: <?= ($CONFIG['options_status_interval'] ?? 30000) ?>,
options_status_services: <?= ($CONFIG['options_status_services'] ?? []) ?>,
shell_print_howto_to_logconsole: <?= ($CONFIG['shell_print_howto_to_logconsole'] ?? false) ?>,
home_chart_color_threshold_high: <?= ($CONFIG['home_chart_color_threshold_high'] ?? 70) ?>,
home_chart_color_threshold_medium: <?= ($CONFIG['home_chart_color_threshold_medium'] ?? 50) ?>,
index_admin_status_update_interval: <?= ($CONFIG['index_admin_status_update_interval'] ?? 50) ?>,
};
const CONFIG = <?= json_encode($CONFIG_JS, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) ?>;
</script>
</head>
<body>