Merge branch 'ent-4194-Revision-de-CSS-alternativos' into 'develop'
Created black theme - #4194 See merge request artica/pandorafms!2564
This commit is contained in:
commit
96fbca35a4
|
@ -270,6 +270,12 @@ function mainModuleGroups()
|
|||
$table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; min-width: 230px;';
|
||||
$table->width = '100%';
|
||||
|
||||
if ($config['style'] === 'pandora_black') {
|
||||
$background_color = '#333';
|
||||
} else {
|
||||
$background_color = '#fff';
|
||||
}
|
||||
|
||||
$head[0] = __('Groups');
|
||||
$headstyle[0] = 'width: 20%; font-weight: bolder;';
|
||||
foreach ($array_module_group as $key => $value) {
|
||||
|
@ -314,7 +320,7 @@ function mainModuleGroups()
|
|||
$data[$i][$j] .= $array_data[$key][$k]['total_count'];
|
||||
$data[$i][$j] .= '</a></div>';
|
||||
} else {
|
||||
$data[$i][$j] = "<div style='background:white;".$cell_style."'>";
|
||||
$data[$i][$j] = "<div style='background:".$background_color.';'.$cell_style."'>";
|
||||
$data[$i][$j] .= 0;
|
||||
$data[$i][$j] .= '</div>';
|
||||
}
|
||||
|
@ -323,7 +329,7 @@ function mainModuleGroups()
|
|||
}
|
||||
} else {
|
||||
foreach ($value['gm'] as $k => $v) {
|
||||
$data[$i][$j] = "<div style='background:white; min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>";
|
||||
$data[$i][$j] = "<div style='background:".$background_color."; min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>";
|
||||
$data[$i][$j] .= 0;
|
||||
$data[$i][$j] .= '</div>';
|
||||
$j++;
|
||||
|
|
|
@ -362,7 +362,7 @@ if ($console_mode == 1) {
|
|||
true
|
||||
);
|
||||
|
||||
echo "<table width='1000px' border='0' style='border:0px;' class='databox data' cellpadding='4' cellspacing='4'>";
|
||||
echo "<table id='diagnostic_info' width='1000px' border='0' style='border:0px;' class='databox data' cellpadding='4' cellspacing='4'>";
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__('Pandora status info').'</th></tr>';
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,13 @@ function push_table_advanced($row, $id=false)
|
|||
function add_component_selection($id_network_component_type)
|
||||
{
|
||||
global $table_simple;
|
||||
global $config;
|
||||
|
||||
if ($config['style'] === 'pandora_black') {
|
||||
$background_row = 'background-color: #444';
|
||||
} else {
|
||||
$background_row = 'background-color: #cfcfcf';
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Using module component').' ';
|
||||
|
@ -116,7 +123,7 @@ function add_component_selection($id_network_component_type)
|
|||
$data[1] .= '</span>';
|
||||
|
||||
$table_simple->colspan['module_component'][1] = 3;
|
||||
$table_simple->rowstyle['module_component'] = 'background-color: #cfcfcf';
|
||||
$table_simple->rowstyle['module_component'] = $background_row;
|
||||
|
||||
prepend_table_simple($data, 'module_component');
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -3391,11 +3391,22 @@ function agents_get_image_status($status)
|
|||
*/
|
||||
function agents_get_status_animation($up=true)
|
||||
{
|
||||
global $config;
|
||||
|
||||
// Gif with black background or white background
|
||||
if ($config['style'] === 'pandora_black') {
|
||||
$heartbeat_green = 'images/heartbeat_green_black.gif';
|
||||
$heartbeat_red = 'images/heartbeat_red_black.gif';
|
||||
} else {
|
||||
$heartbeat_green = 'images/heartbeat_green.gif';
|
||||
$heartbeat_red = 'images/heartbeat_red.gif';
|
||||
}
|
||||
|
||||
switch ($up) {
|
||||
case true:
|
||||
default:
|
||||
return html_print_image(
|
||||
'images/heartbeat_green.gif',
|
||||
$heartbeat_green,
|
||||
true,
|
||||
[
|
||||
'width' => '170',
|
||||
|
@ -3405,7 +3416,7 @@ function agents_get_status_animation($up=true)
|
|||
|
||||
case false:
|
||||
return html_print_image(
|
||||
'images/heartbeat_red.gif',
|
||||
$heartbeat_red,
|
||||
true,
|
||||
[
|
||||
'width' => '170',
|
||||
|
|
|
@ -107,9 +107,15 @@ function html_do_report_info($report)
|
|||
{
|
||||
global $config;
|
||||
|
||||
if ($config['style'] === 'pandora_black') {
|
||||
$background_color = '#222';
|
||||
} else {
|
||||
$background_color = '#f5f5f5';
|
||||
}
|
||||
|
||||
$date_today = date($config['date_format']);
|
||||
|
||||
$html = '<div style="border: 1px dashed #999; padding: 10px 15px; background: #f5f5f5;margin-top:20px;margin-bottom:20px;"><table>
|
||||
$html = '<div style="border: 1px dashed #999; padding: 10px 15px; background: '.$background_color.';margin-top:20px;margin-bottom:20px;"><table>
|
||||
<tr>
|
||||
<td><b>'.__('Generated').': </b></td><td>'.$date_today.'</td>
|
||||
</tr>
|
||||
|
|
|
@ -1755,6 +1755,12 @@ function ui_process_page_head($string, $bitfield)
|
|||
// Add the dialog styles CSS.
|
||||
$config['css']['dialog'] = 'include/styles/js/introjs.css';
|
||||
|
||||
// If the theme is the default, we don't load it twice.
|
||||
if ($config['style'] !== 'pandora') {
|
||||
// It loads the last of all.
|
||||
$config['css']['theme'] = 'include/styles/'.$config['style'].'.css';
|
||||
}
|
||||
|
||||
// If skin's css files exists then add them.
|
||||
if ($exists_css) {
|
||||
foreach ($skin_styles as $filename => $name) {
|
||||
|
@ -1766,10 +1772,10 @@ function ui_process_page_head($string, $bitfield)
|
|||
// User style should go last so it can rewrite common styles.
|
||||
$config['css'] = array_merge(
|
||||
[
|
||||
'common' => 'include/styles/common.css',
|
||||
'menu' => 'include/styles/menu.css',
|
||||
'tables' => 'include/styles/tables.css',
|
||||
$config['style'] => 'include/styles/'.$config['style'].'.css',
|
||||
'common' => 'include/styles/common.css',
|
||||
'menu' => 'include/styles/menu.css',
|
||||
'tables' => 'include/styles/tables.css',
|
||||
'general' => 'include/styles/pandora.css',
|
||||
],
|
||||
$config['css']
|
||||
);
|
||||
|
|
|
@ -740,6 +740,8 @@ function print_donut_narrow_graph(
|
|||
array $data,
|
||||
$data_total
|
||||
) {
|
||||
global $config;
|
||||
|
||||
if (empty($data)) {
|
||||
return graph_nodata_image($width, $height, 'pie');
|
||||
}
|
||||
|
@ -754,10 +756,31 @@ function print_donut_narrow_graph(
|
|||
|
||||
$graph_id = uniqid('graph_');
|
||||
|
||||
// This is for "Style template" in visual styles.
|
||||
switch ($config['style']) {
|
||||
case 'pandora':
|
||||
$textColor = '#000';
|
||||
$strokeColor = '#fff';
|
||||
break;
|
||||
|
||||
case 'pandora_black':
|
||||
$textColor = '#fff';
|
||||
$strokeColor = '#222';
|
||||
break;
|
||||
|
||||
default:
|
||||
$textColor = '#000';
|
||||
$strokeColor = '#fff';
|
||||
break;
|
||||
}
|
||||
|
||||
$textColor = json_encode($textColor);
|
||||
$strokeColor = json_encode($strokeColor);
|
||||
|
||||
$out = "<div id='$graph_id'></div>";
|
||||
$out .= include_javascript_d3(true);
|
||||
$out .= "<script type='text/javascript'>
|
||||
donutNarrowGraph($colors, $width, $height, $data_total)
|
||||
donutNarrowGraph($colors, $width, $height, $data_total, $textColor, $strokeColor)
|
||||
.donutbody(d3.select($graph_id))
|
||||
.data($data)
|
||||
.render();
|
||||
|
|
|
@ -2762,7 +2762,14 @@ function valueToBytes(value) {
|
|||
return value.toFixed(2) + shorts[pos] + "B";
|
||||
}
|
||||
|
||||
function donutNarrowGraph(colores, width, height, total) {
|
||||
function donutNarrowGraph(
|
||||
colores,
|
||||
width,
|
||||
height,
|
||||
total,
|
||||
textColor,
|
||||
strokeColor
|
||||
) {
|
||||
// Default settings
|
||||
var donutbody = d3.select("body");
|
||||
var data = {};
|
||||
|
@ -2848,7 +2855,7 @@ function donutNarrowGraph(colores, width, height, total) {
|
|||
this._current = d;
|
||||
})
|
||||
.attr("d", arc)
|
||||
.attr("stroke", "white")
|
||||
.attr("stroke", strokeColor)
|
||||
.style("fill", function(d) {
|
||||
return color(d.data.key);
|
||||
});
|
||||
|
@ -2872,7 +2879,7 @@ function donutNarrowGraph(colores, width, height, total) {
|
|||
.attr("y", 0 + radius / 10)
|
||||
.attr("class", "text-tooltip")
|
||||
.style("text-anchor", "middle")
|
||||
//.attr("fill", "#82b92e")
|
||||
.attr("fill", textColor)
|
||||
.style("font-size", function(d) {
|
||||
if (normal_status) {
|
||||
percentage_normal = (normal_status * 100) / total;
|
||||
|
@ -2902,6 +2909,7 @@ function donutNarrowGraph(colores, width, height, total) {
|
|||
/* .attr("fill", function(d) {
|
||||
return color(obj.data.key);
|
||||
})*/
|
||||
.attr("fill", textColor)
|
||||
.style("font-size", function(d) {
|
||||
percentage = (d[obj.data.key] * 100) / total;
|
||||
if (Number.isInteger(percentage)) {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/**
|
||||
* Exclude css from visual styles
|
||||
*
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1217,14 +1217,16 @@ echo "\n<!-- Page generated in $run_time seconds -->\n";
|
|||
// Values from PHP to be recovered from JAVASCRIPT
|
||||
require 'include/php_to_js_values.php';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
// When there are less than 5 rows, all rows must be white
|
||||
if($('table.info_table tr').length < 5){
|
||||
$('table.info_table tbody > tr').css('background-color', '#fff');
|
||||
var theme = "<?php echo $config['style']; ?>";
|
||||
if(theme === 'pandora'){
|
||||
if($('table.info_table tr').length < 5){
|
||||
$('table.info_table tbody > tr').css('background-color', '#fff');
|
||||
}
|
||||
}
|
||||
|
||||
// When the user scrolls down 400px from the top of the document, show the button.
|
||||
|
|
|
@ -22,7 +22,7 @@ $searchReports = check_acl($config['id_user'], 0, 'RR');
|
|||
$searchUsers = check_acl($config['id_user'], 0, 'UM');
|
||||
$searchHelps = true;
|
||||
|
||||
echo '<br><div style="margin:auto; width:90%; padding: 10px; background: #fff">';
|
||||
echo '<br><div style="margin:auto; width:90%; padding: 10px;">';
|
||||
|
||||
$anyfound = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue