diff --git a/pandora_console/include/ajax/map_enterprise.ajax.php b/pandora_console/include/ajax/map_enterprise.ajax.php index a0178457f5..4c5738f29a 100644 --- a/pandora_console/include/ajax/map_enterprise.ajax.php +++ b/pandora_console/include/ajax/map_enterprise.ajax.php @@ -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 { diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index ca6d948117..fe9406590f 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -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 diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 46436167d1..db068d2140 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -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)); diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index 7ffafd974f..6fcaf24c16 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -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) { diff --git a/pandora_console/include/lib/Dashboard/Widgets/DataMatrix.php b/pandora_console/include/lib/Dashboard/Widgets/DataMatrix.php index f4b27a5830..1f3ed213c7 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/DataMatrix.php +++ b/pandora_console/include/lib/Dashboard/Widgets/DataMatrix.php @@ -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 = [ diff --git a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php index fbc4165b4d..9d6cb524f7 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php +++ b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php @@ -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) { diff --git a/pandora_console/include/lib/Dashboard/Widgets/custom_graph.php b/pandora_console/include/lib/Dashboard/Widgets/custom_graph.php index b639780490..bc7b891a54 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/custom_graph.php +++ b/pandora_console/include/lib/Dashboard/Widgets/custom_graph.php @@ -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'], diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php index 58c947f4bf..0b090f6988 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php +++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php @@ -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', ] ); diff --git a/pandora_console/include/lib/Dashboard/Widgets/network_map.php b/pandora_console/include/lib/Dashboard/Widgets/network_map.php index 32de5683a9..b291e599c8 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/network_map.php +++ b/pandora_console/include/lib/Dashboard/Widgets/network_map.php @@ -492,6 +492,7 @@ class NetworkMapWidget extends Widget 'auth_class' => 'PandoraFMS\Dashboard\Manager', 'auth_hash' => Manager::generatePublicHash(), 'node' => $node, + 'size' => $size, ] ); diff --git a/pandora_console/include/lib/Dashboard/Widgets/service_view.php b/pandora_console/include/lib/Dashboard/Widgets/service_view.php index 51804e5a61..bbd7c1b9bc 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/service_view.php +++ b/pandora_console/include/lib/Dashboard/Widgets/service_view.php @@ -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; diff --git a/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php b/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php index ac2d5654fd..4b8924d668 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php +++ b/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php @@ -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'; diff --git a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php index 3572844c76..1be52fd052 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php +++ b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php @@ -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( diff --git a/pandora_console/include/styles/dashboards.css b/pandora_console/include/styles/dashboards.css index ec43f4befc..63b4f79b9f 100644 --- a/pandora_console/include/styles/dashboards.css +++ b/pandora_console/include/styles/dashboards.css @@ -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%; +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index a235dda063..4324dc0175 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -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*/ diff --git a/pandora_console/index.php b/pandora_console/index.php index d1ccd099b1..6a67eb8793 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -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>'; diff --git a/pandora_console/operation/agentes/networkmap.dinamic.php b/pandora_console/operation/agentes/networkmap.dinamic.php index bd2ed02160..0d9b139821 100644 --- a/pandora_console/operation/agentes/networkmap.dinamic.php +++ b/pandora_console/operation/agentes/networkmap.dinamic.php @@ -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)) { diff --git a/pandora_console/views/dashboard/list.php b/pandora_console/views/dashboard/list.php index 0eaafd98b5..da902709b8 100644 --- a/pandora_console/views/dashboard/list.php +++ b/pandora_console/views/dashboard/list.php @@ -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 = [];