Commit dd0a9726 authored by ataghzout's avatar ataghzout Committed by Laurent Calvet
Browse files

feat(ui): Apply dark mode for widget global health (#56)

parent 2b9afbd1
/vendor
/build
\ No newline at end of file
/build
.idea/
\ No newline at end of file
......@@ -10,7 +10,7 @@
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"squizlabs/php_codesniffer": "^3.5"
"squizlabs/php_codesniffer": "^3.6"
},
"config": {
"secure-http": false,
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "22152f2ff7ef63d970b4bd4aab61e65f",
"content-hash": "5c10a31d894b7d74cddcaaa553b5d53a",
"packages": [],
"packages-dev": [
{
......@@ -1595,16 +1595,16 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.5.8",
"version": "3.6.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "9d583721a7157ee997f235f327de038e7ea6dac4"
"reference": "5e4e71592f69da17871dba6e80dd51bce74a351a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4",
"reference": "9d583721a7157ee997f235f327de038e7ea6dac4",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a",
"reference": "5e4e71592f69da17871dba6e80dd51bce74a351a",
"shasum": ""
},
"require": {
......@@ -1647,7 +1647,7 @@
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"time": "2020-10-23T02:01:07+00:00"
"time": "2021-12-12T21:44:58+00:00"
},
{
"name": "symfony/polyfill-ctype",
......@@ -1842,5 +1842,5 @@
"platform-overrides": {
"php": "7.2"
},
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.2.0"
}
......@@ -60,7 +60,6 @@ try {
if ($autoRefresh === false || $autoRefresh < 5) {
$autoRefresh = 30;
}
$broker = "broker";
$res = $db->query("SELECT `value` FROM `options` WHERE `key` = 'broker'");
if ($res->rowCount()) {
......@@ -69,6 +68,11 @@ try {
} else {
throw new Exception('Unknown broker module');
}
$variablesThemeCSS = match ($centreon->user->theme) {
'light' => "Generic-theme",
'dark' => "Centreon-Dark",
default => throw new Exception('Unknown user theme : ' . $centreon->user->theme),
};
} catch (Exception $e) {
echo $e->getMessage() . "<br/>";
exit;
......@@ -77,9 +81,17 @@ try {
<HTML>
<HEAD>
<TITLE></TITLE>
<link href="../../Themes/Centreon-2/style.css" rel="stylesheet" type="text/css"/>
<link href="../../Themes/Centreon-2/jquery-ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="../../Themes/Centreon-2/jquery-ui/jquery-ui-centreon.css" rel="stylesheet" type="text/css"/>
<link href="../../Themes/Generic-theme/style.css" rel="stylesheet" type="text/css"/>
<link href="../../Themes/Generic-theme/jquery-ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="../../Themes/Generic-theme/jquery-ui/jquery-ui-centreon.css" rel="stylesheet" type="text/css"/>
<link
href="../../Themes/<?php
echo $variablesThemeCSS === "Generic-theme" ? $variablesThemeCSS . "/Variables-css/" :
$variablesThemeCSS . "/"; ?>variables.css"
rel="stylesheet"
type="text/css"
/>
<script type="text/javascript" src="../../include/common/javascript/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../include/common/javascript/jquery/jquery-ui.js"></script>
<script type="text/javascript"
......
<style>
{literal}
.global_health_div_tab td, .global_health_div_tab th
{
padding:0 10px 0 10px;
}
{/literal}
<link href="../../Themes/Generic-theme/style.css" rel="stylesheet" type="text/css"/>
<link href="../../Themes/Generic-theme/color.css" rel="stylesheet" type="text/css"/>
<link href="{($theme === "Generic-theme") ? ($theme|cat:"/Variables-css") : $theme}" rel="stylesheet" type="text/css"/>
</style>
<h3 style="text-align: center;"> Global health of Hosts </h3>
<div id="container" style="text-align:center">
......
<style>
{literal}
.global_health_div_tab td, .global_health_div_tab th
{
padding:0 10px 0 10px;
}
{/literal}
<link href="../../Themes/Generic-theme/style.css" rel="stylesheet" type="text/css"/>
<link href="../../Themes/Generic-theme/color.css" rel="stylesheet" type="text/css"/>
<link href="{($theme === "Generic-theme") ? ($theme|cat:"/Variables-css") : $theme}" rel="stylesheet" type="text/css"/>
</style>
<h3 style="text-align: center;" > Global health of Services </h3>
<div id="container" style="text-align:center;">
......@@ -13,6 +10,7 @@
<table>
<thead>
<th>
<link href="../../Themes/{($theme === "Generic-theme") ? ($theme|cat:"/Variables-css") : $theme}/variables.css">
</th>
<th>
<small>Number</small>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment