set default font size on graph modules when is send in mails

This commit is contained in:
marcos 2021-07-05 11:34:32 +02:00
parent 3baae4147a
commit ea57c58f40
6 changed files with 16 additions and 6 deletions

View File

@ -708,7 +708,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '<div id="add_action-div-'.$alert['id'].'" class="invisible left">';
$data[3] .= '<form id="add_action_form-'.$alert['id'].'" method="post">';
$data[3] .= '<table class="databox_color w100p">';
$data[3] .= '<table class="databox_color w100p bg_color222">';
$data[3] .= html_print_input_hidden('add_action', 1, true);
$data[3] .= html_print_input_hidden('id_alert_module', $alert['id'], true);

View File

@ -423,7 +423,7 @@ if ($show_update_action_menu) {
);
$data .= '<form id="update_action-'.$alert['id'].'" method="post">';
$data .= '<table class="databox_color w100p">';
$data .= '<table class="databox_color w100p bg_color222">';
$data .= html_print_input_hidden(
'update_action',
1,

View File

@ -14532,6 +14532,9 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4)
// Graph width (optional).
$width = (!empty($other) && isset($other['data'][4]) && $other['data'][4]) ? $other['data'][4] : '';
// If recive value its from mail call.
$graph_font_size = $other['data'][5];
} else {
// Fixed parameters for _modulegraph_nh_.
$graph_seconds = $other['data'];
@ -14568,6 +14571,7 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4)
'fullscale' => false,
'return_img_base_64' => true,
'image_treshold' => $graph_threshold,
'graph_font_size' => $graph_font_size,
];
// Format MIME RFC 2045 (line break 76 chars).

View File

@ -829,7 +829,11 @@ function grafico_modulo_sparse($params)
$params['stacked'] = 0;
}
$font_size = $config['font_size'];
if (isset($params['graph_font_size']) === true) {
$font_size = $params['graph_font_size'];
} else {
$font_size = $config['font_size'];
}
// If is metaconsole set 10pt size value.
if (is_metaconsole()) {

View File

@ -308,6 +308,7 @@ table.black_table_modal_alternate tr:nth-child(even) td {
.action_buttons input[type="image"],
.action_button_img {
filter: brightness(4.5) contrast(50%);
background-color: transparent !important;
}
a.pandora_pagination {
@ -657,7 +658,8 @@ form ul.form_flex {
.graph_conteiner_inside,
.container_table,
.second_background {
.second_background,
.bg_color222 {
background-color: #222;
}

View File

@ -1424,11 +1424,11 @@ sub pandora_execute_action ($$$$$$$$$;$) {
my $threshold = shift;
my $period = $hours * 3600; # Hours to seconds
if($threshold == 0){
$params->{"other"} = $period . '%7C1%7C0%7C225';
$params->{"other"} = $period . '%7C1%7C0%7C225%7C""%7C14';
$cid = 'module_graph_' . $hours . 'h';
}
else{
$params->{"other"} = $period . '%7C1%7C1%7C225';
$params->{"other"} = $period . '%7C1%7C1%7C225%7C""%7C14';
$cid = 'module_graphth_' . $hours . 'h';
}