fixed styles

This commit is contained in:
daniel 2023-03-13 19:30:51 +01:00
parent 154c97d653
commit c96ac79726
17 changed files with 102 additions and 92 deletions

View File

@ -25,6 +25,8 @@ if ((bool) is_metaconsole() === true) {
if ($networkmap) {
$networkmap_id = get_parameter('networkmap_id', 0);
$dashboard = get_parameter('dashboard', 0);
$size = get_parameter('size', []);
$x_offset = get_parameter('x_offset', 0);
$y_offset = get_parameter('y_offset', 0);
$zoom_dash = get_parameter('zoom_dash', 0.5);
@ -62,6 +64,15 @@ if ($networkmap) {
global $id_networkmap;
$id_networkmap = $networkmap['id'];
$tab = 'radial_dynamic';
if (empty($size) === false) {
if ($size['width'] > $size['height']) {
$width = $size['height'];
$height = ($size['height'] - 10);
} else {
$width = $size['width'];
$height = ($size['width'] + 50);
}
}
include_once 'operation/agentes/networkmap.dinamic.php';
} else {

View File

@ -1568,7 +1568,7 @@ if (check_login()) {
$value['thresholds']
);
$resultData = '<span style="color:'.$status['color'].'">';
$resultData = '<span class="widget-module-tabs-data" style="color:'.$status['color'].'">';
if ($vdata !== null && $vdata !== '' && $vdata !== false) {
if (isset($formatData) === true
&& (bool) $formatData === true

View File

@ -696,7 +696,7 @@ function get_build_setup_charts($type, $options, $data)
$legend->setAlign($legendAlign);
// Defaults fonts legends.
$legend->labels()->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
$legend->labels()->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
$legend->labels()->getFonts()->setStyle('normal');
$legend->labels()->getFonts()->setWeight(600);
$legend->labels()->getFonts()->setSize(((int) $config['font_size'] + 2));
@ -835,7 +835,7 @@ function get_build_setup_charts($type, $options, $data)
$dataLabel->setFormatter($dataLabelFormatter);
// Defaults fonts datalabel.
$dataLabel->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
$dataLabel->getFonts()->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
$dataLabel->getFonts()->setStyle('normal');
$dataLabel->getFonts()->setWeight(600);
$dataLabel->getFonts()->setSize(((int) $config['font_size'] + 2));
@ -944,14 +944,14 @@ function get_build_setup_charts($type, $options, $data)
// Defaults scalesFont X.
$scalesXFonts = $scales->getX()->ticks()->getFonts();
$scalesXFonts->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
$scalesXFonts->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
$scalesXFonts->setStyle('normal');
$scalesXFonts->setWeight(600);
$scalesXFonts->setSize(((int) $config['font_size'] + 2));
// Defaults scalesFont Y.
$scalesYFonts = $scales->getY()->ticks()->getFonts();
$scalesYFonts->setFamily((empty($config['fontpath']) === true) ? 'Lato' : $config['fontpath']);
$scalesYFonts->setFamily((empty($config['fontpath']) === true) ? 'lato' : $config['fontpath']);
$scalesYFonts->setStyle('normal');
$scalesYFonts->setWeight(600);
$scalesYFonts->setSize(((int) $config['font_size'] + 2));

View File

@ -806,7 +806,9 @@ function dashboardLoadNetworkMap(settings) {
auth_hash: settings.auth_hash,
id_user: settings.id_user,
ignore_acl: 1,
node: settings.node
node: settings.node,
dashboard: 1,
size: settings.size
},
dataType: "html",
success: function(data) {

View File

@ -520,7 +520,7 @@ class DataMatrix extends Widget
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'include/ajax/module',
@ -539,6 +539,7 @@ class DataMatrix extends Widget
'direction' => 'desc',
],
'csv' => 0,
'dom_elements' => 'frtilp',
]
);
} catch (\Exception $e) {
@ -643,7 +644,14 @@ class DataMatrix extends Widget
}
$columns_sort[] = ($key + 1);
$column_names[] = $name;
$column_names[] = \ui_print_truncate_text(
\io_safe_output($name),
'agent_small',
false,
true,
false,
'...'
);
}
$data = [

View File

@ -424,9 +424,9 @@ class AgentModuleWidget extends Widget
array $visualData,
array $allModules
):string {
$style = 'display:flex; width:96%; margin-top: 10px;';
$style = 'display:flex; width:100%; margin-top: 10px;';
$table_data = '<div style="'.$style.'">';
$table_data .= '<table class="widget_agent_module transparent mrgn_0px" cellpadding="1" cellspacing="0" border="0">';
$table_data .= '<table class="info_table transparent" cellpadding="1" cellspacing="0" border="0">';
if (empty($visualData) === false) {
$table_data .= '<th>'.__('Agents').' / '.__('Modules').'</th>';
@ -450,29 +450,24 @@ class AgentModuleWidget extends Widget
switch ($row['agent_status']) {
case AGENT_STATUS_ALERT_FIRED:
$rowcolor = COL_ALERTFIRED;
$textcolor = '#000';
break;
case AGENT_STATUS_CRITICAL:
$rowcolor = COL_CRITICAL;
$textcolor = '#FFF';
break;
case AGENT_STATUS_WARNING:
$rowcolor = COL_WARNING;
$textcolor = '#000';
break;
case AGENT_STATUS_NORMAL:
$rowcolor = COL_NORMAL;
$textcolor = '#FFF';
break;
case AGENT_STATUS_UNKNOWN:
case AGENT_STATUS_ALL:
default:
$rowcolor = COL_UNKNOWN;
$textcolor = '#FFF';
break;
}
@ -484,8 +479,10 @@ class AgentModuleWidget extends Widget
false,
'...'
);
$table_data .= "<td style='background-color: ".$rowcolor.";'>";
$table_data .= '<td>';
$table_data .= '<div class="flex"><div class="div-state-agent" style="background-color: '.$rowcolor.';"></div>';
$table_data .= $file_name;
$table_data .= '</div>';
$table_data .= '</td>';
if ($row['modules'] === null) {
@ -494,7 +491,7 @@ class AgentModuleWidget extends Widget
foreach ($row['modules'] as $module_name => $module) {
if ($this->values['mTypeShow'] === '1') {
$style = 'text-align: center;';
$style = 'text-align: left;';
$style .= ' background-color: transparent;';
$table_data .= "<td style='".$style."'>";
$table_data .= $module;
@ -509,7 +506,7 @@ class AgentModuleWidget extends Widget
continue;
}
} else {
$style = 'text-align: center;';
$style = 'text-align: left;';
$style .= ' background-color: transparent;';
$table_data .= "<td style='".$style."'>";
switch ($module) {

View File

@ -521,7 +521,7 @@ class CustomGraphWidget extends Widget
$params = [
'period' => $this->values['period'],
'width' => ($size['width'] - 10),
'width' => ($size['width']),
'height' => $height,
'only_image' => false,
'homeurl' => $config['homeurl'],

View File

@ -663,7 +663,7 @@ class EventsListWidget extends Widget
[
'id' => $table_id,
'class' => 'info_table events',
'style' => 'width: 100%;',
'style' => 'width: 99%;',
'ajax_url' => 'operation/events/events',
'ajax_data' => [
'get_events' => 1,
@ -697,6 +697,7 @@ class EventsListWidget extends Widget
'ajax_return_operation_function' => 'process_buffers',
'return' => true,
'csv' => 0,
'dom_elements' => 'frtilp',
]
);

View File

@ -492,6 +492,7 @@ class NetworkMapWidget extends Widget
'auth_class' => 'PandoraFMS\Dashboard\Manager',
'auth_hash' => Manager::generatePublicHash(),
'node' => $node,
'size' => $size,
]
);

View File

@ -367,7 +367,7 @@ class ServiceViewWidget extends Widget
'AR'
);
$output .= '<div class="white_box mgn_btt_20px mrgn_top_20px pddng_50px services_table" >';
$output .= '<div class="services_table" >';
$output .= '<div id="table_services_dashboard">';
foreach ($services as $service) {
switch ($service['status']) {
@ -404,40 +404,6 @@ class ServiceViewWidget extends Widget
</div>
</a>';
}
$output .= '</div>';
$output .= '<table cellspacing="0" cellpadding="0">';
$output .= '<tr>';
$output .= '<td>';
$output .= '<div class="service_status" style=" background: '.COL_UNKNOWN.';"></div>';
$output .= '</td>';
$output .= '<td>';
$output .= '<div class="service_status" style="background: '.COL_NORMAL.';"></div>';
$output .= '</td>';
$output .= '<td>';
$output .= '<div class="service_status" style="background: '.COL_WARNING.';"></div>';
$output .= '</td>';
$output .= '<td>';
$output .= '<div class="service_status" style="background: '.COL_CRITICAL.';"></div>';
$output .= '</td>';
$output .= '</tr><tr>';
$output .= '<td>';
$output .= '<div class="pdd_r_15px"><span class="font_12px">Unknown</span></div>';
$output .= '</td>';
$output .= '<td >';
$output .= '<div class="pdd_r_15px"><span class="font_12px">Normal</span></div>';
$output .= '</div>';
$output .= '<td>';
$output .= '<div class="pdd_r_15px"><span class="font_12px">Warning</span></div>';
$output .= '</td>';
$output .= '<td>';
$output .= '<div><span class="font_12px">Critical</span></div>';
$output .= '</td>';
$output .= '</tr>';
$output .= '</table>';
$output .= '</div>';
}
return $output;

View File

@ -477,7 +477,7 @@ class SystemGroupStatusWidget extends Widget
$this->values['groupId'] = $selected_groups;
$this->values['status'] = explode(',', $this->values['status'][0]);
$style = 'font-size: 12px; text-align: center;';
$style = 'font-size: 1.5em; font-weight: bolder;text-align: center;';
$table = new \stdClass();
$table->class = 'group_modules_status_box';

View File

@ -364,21 +364,6 @@ class WuxWidget extends Widget
}
$output .= '<div>';
$output .= '<div>';
$output .= "<p class='font_20px'>";
if ($have_errors === true) {
$output .= __('Global status').': ';
$output .= "<span class='color: #e63c52; font_20px'>";
$output .= __('Failed');
$output .= '</span>';
} else {
$output .= __('Global status').': ';
$output .= "<span class='pandora_green_bg font_20px'>";
$output .= __('Ok');
$output .= '</span>';
}
$output .= '</div>';
$output .= '<div>';
$output .= \ux_console_phases_donut(

View File

@ -127,6 +127,8 @@ h1 {
.grid-stack-item .grid-stack-item-content .header-widget div:first-child {
flex: 1;
text-align: center;
font-family: "lato-bold";
font-size: 14px;
}
.grid-stack-item .grid-stack-item-content .header-widget div:not(:first-child) {
@ -791,3 +793,45 @@ form.modal-dashboard
.select2-selection__rendered {
max-height: 75px !important;
}
.content-widget .info_table {
margin-bottom: 0px;
}
.div-state-agent {
width: 5px;
height: 20px;
border-radius: 3px;
margin-right: 5px;
}
.dataTables_length > label > select {
height: 30px;
min-height: 30px;
margin: 5px;
}
.dataTables_paginate.paging_simple_numbers {
margin-top: 10px;
height: 40px;
}
.info_table.events tr > td {
height: 1em !important;
text-align: initial;
}
.event.flex-row.h100p.nowrap .mini-criticity {
margin-left: 7px;
}
.tree-controller-recipient {
width: -webkit-fill-available !important;
}
.services_table {
padding: 0px;
background-color: #fff;
border: 0px;
width: 90%;
}

View File

@ -3809,7 +3809,7 @@ div.div_groups_status {
background-color: white;
border: 1px solid #ececec;
border-radius: 5px;
margin: 20px;
margin: 5px;
float: left;
}
@ -6548,6 +6548,7 @@ table.table_modal_alternate tr td:first-child {
.flot-text .flot-x-axis div {
white-space: normal;
word-break: break-all;
line-height: 1.3;
}
/*Font header feedback*/

View File

@ -1488,7 +1488,7 @@ ui_require_javascript_file('connection_check');
set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false));
$conn_title = __('Connection with server has been lost');
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/fail@svg.svg');
if ($config['pure'] == 0) {
echo '</div>';

View File

@ -131,24 +131,18 @@ if ($pure == 1) {
}
}
ui_print_page_header(
io_safe_output($networkmap['name']),
'images/bricks.png',
false,
'network_map_enterprise_list',
false,
$buttons,
false,
'',
$config['item_title_size_text']
);
global $width;
global $height;
if (_id_ != '_id_') {
$width = [];
$height = [];
if ($dashboard != 1) {
ui_print_page_header(
io_safe_output($networkmap['name']),
'images/bricks.png',
false,
'network_map_enterprise_list',
false,
$buttons,
false,
'',
$config['item_title_size_text']
);
}
if (empty($width)) {

View File

@ -92,7 +92,7 @@ if (empty($dashboards) === true) {
$table->style['full_screen'] = 'text-align: center;';
$table->size = [];
$table->size['name'] = '75%';
$table->size['name'] = '40%';
$table->size['full_screen'] = '30px';
$table->head = [];