#10194 adjust max height divs

This commit is contained in:
Daniel Cebrian 2023-10-05 18:15:33 +02:00
parent c2bc53bbd9
commit 1a89761727
4 changed files with 108 additions and 85 deletions

View File

@ -51,6 +51,22 @@ $(document).ready(function() {
$("#events-status-pending-validate").html(data); $("#events-status-pending-validate").html(data);
} }
}); });
$.ajax({
url: "ajax.php",
data: {
page: "include/ajax/general_tactical_view.ajax",
method: "getStatusHeatMap",
class: "Groups",
width: $("#heatmap-group").width() - 50,
height:
$("#heatmap-group").height() < 280 ? 280 : $("#heatmap-group").height()
},
type: "POST",
success: function(data) {
$("#heatmap-group").html(data);
}
});
}); });
function autoRefresh(interval, id, method, php_class) { function autoRefresh(interval, id, method, php_class) {

View File

@ -45,6 +45,7 @@ class Groups extends Element
parent::__construct(); parent::__construct();
include_once $config['homedir'].'/include/functions_users.php'; include_once $config['homedir'].'/include/functions_users.php';
include_once 'include/functions_groupview.php'; include_once 'include/functions_groupview.php';
$this->ajaxMethods = ['getStatusHeatMap'];
ui_require_css_file('heatmap'); ui_require_css_file('heatmap');
$this->title = __('Groups'); $this->title = __('Groups');
$this->total = $this->calculateTotalGroups(); $this->total = $this->calculateTotalGroups();
@ -71,12 +72,12 @@ class Groups extends Element
public function getStatusHeatMap():string public function getStatusHeatMap():string
{ {
global $config; global $config;
$width = get_parameter('width', 350);
$height = get_parameter('height', 275);
// ACL Check. // ACL Check.
$agent_a = check_acl($config['id_user'], 0, 'AR'); $agent_a = check_acl($config['id_user'], 0, 'AR');
$agent_w = check_acl($config['id_user'], 0, 'AW'); $agent_w = check_acl($config['id_user'], 0, 'AW');
$width = 350;
$height = 275;
$groups_list = groupview_get_groups_list( $groups_list = groupview_get_groups_list(
$config['id_user'], $config['id_user'],

View File

@ -20,6 +20,7 @@
.row { .row {
display: flex; display: flex;
width: 100%; width: 100%;
align-items: stretch;
} }
.col-12 { .col-12 {
width: 100%; width: 100%;
@ -55,7 +56,7 @@
background-color: white; background-color: white;
border: 1px solid #e5e9ed; border: 1px solid #e5e9ed;
border-radius: 10px; border-radius: 10px;
margin: 5px; height: 100%;
max-width: 100%; max-width: 100%;
} }
.br-l { .br-l {
@ -192,10 +193,6 @@ a.pandora_pagination:first-child {
color: #8a96a6; color: #8a96a6;
} }
#Alerts {
padding-bottom: 20px;
}
.mini-criticity { .mini-criticity {
width: 6px !important; width: 6px !important;
min-width: auto !important; min-width: auto !important;
@ -245,12 +242,17 @@ table.dataTable thead th {
width: 21%; width: 21%;
} }
.col-4 { .col-4 {
width: 30%; width: 33%;
} }
.row { .row {
flex-wrap: wrap; flex-wrap: wrap;
} }
.col-7 {
width: 56%;
}
.col-5 {
width: 41%;
}
.flex-nowrap { .flex-nowrap {
flex-wrap: nowrap !important; flex-wrap: nowrap !important;
} }

View File

@ -5,7 +5,7 @@
<div class="row"> <div class="row">
<div class="col-xl-6"> <div class="col-xl-6">
<div id="general-overview"> <div id="general-overview" class="pdd_5px">
<div class="container"> <div class="container">
<div class="title"> <div class="title">
<?php echo $Overview->title; ?> <?php echo $Overview->title; ?>
@ -23,14 +23,14 @@
</div> </div>
</div> </div>
<?php if ($Overview->wuxIsEnabled() === true) : ?> <?php if ($Overview->wuxIsEnabled() === true) : ?>
<div class="col-6 br-l"> <div class="col-6 br-l">
<div class="padding10"> <div class="padding10">
<span class="subtitle"> <span class="subtitle">
<?php echo __('Wux server status'); ?> <?php echo __('Wux server status'); ?>
</span> </span>
<?php echo $Overview->getWuxServerStatus(); ?> <?php echo $Overview->getWuxServerStatus(); ?>
</div>
</div> </div>
</div>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="br-t"> <div class="br-t">
@ -53,7 +53,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-7"> <div class="col-7 pdd_5px">
<div class="container"> <div class="container">
<div class="title"> <div class="title">
<?php echo $MonitoringElements->title; ?> <?php echo $MonitoringElements->title; ?>
@ -91,7 +91,7 @@
</div> </div>
</div> </div>
<div class="col-5"> <div class="col-5 pdd_5px">
<div class="container" id="database"> <div class="container" id="database">
<div class="title"> <div class="title">
<?php echo $Database->title; ?> <?php echo $Database->title; ?>
@ -144,7 +144,7 @@
</div> </div>
</div> </div>
<div class="col-xl-6"> <div class="col-xl-6">
<div class="container"> <div class="container mrgn_5px">
<div class="title"> <div class="title">
<?php echo $NewsBoard->title; ?> <?php echo $NewsBoard->title; ?>
</div> </div>
@ -152,7 +152,7 @@
</div> </div>
<div class="row"> <div class="row">
<?php if ($Groups->total < 200) : ?> <?php if ($Groups->total < 200) : ?>
<div class="<?php echo (($SnmpTraps->isEnabled() === true && $LogStorage->isEnabled() === true)) ? 'col-6' : 'col-12'; ?>"> <div class="<?php echo (($SnmpTraps->isEnabled() === true && $LogStorage->isEnabled() === true)) ? 'col-6 pdd_5px' : 'col-12 pdd_5px'; ?>">
<div class="container"> <div class="container">
<div class="title br-b"> <div class="title br-b">
<?php echo $Groups->title; ?> <?php echo $Groups->title; ?>
@ -160,79 +160,81 @@
<div class="subtitle link padding10 padding2"> <div class="subtitle link padding10 padding2">
<?php echo __('Status'); ?> <a href=""><?php echo __('Info'); ?></a> <?php echo __('Status'); ?> <a href=""><?php echo __('Info'); ?></a>
</div> </div>
<?php echo $Groups->getStatusHeatMap(); ?> <div id="heatmap-group">
<?php echo $Groups->loading(); ?>
</div>
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ($LogStorage->isEnabled() === true && $SnmpTraps->isEnabled() === true) : ?> <?php if ($LogStorage->isEnabled() === true && $SnmpTraps->isEnabled() === true) : ?>
<div class="col-6"> <div class="col-6">
<?php if ($LogStorage->isEnabled() === true) : ?> <?php if ($LogStorage->isEnabled() === true) : ?>
<div class="container" id="logStorage"> <div class="container mrgn_5px" id="logStorage">
<div class="title br-b"> <div class="title br-b">
<?php echo $LogStorage->title; ?> <?php echo $LogStorage->title; ?>
</div>
<div class="row">
<div class="col-6 br-r br-b">
<div class="subtitle">
<?php echo __('Log storage status'); ?>
</div> </div>
<?php echo $LogStorage->getStatus(); ?> <div class="row">
</div> <div class="col-6 br-r br-b">
<div class="col-6 br-b"> <div class="subtitle">
<div class="subtitle"> <?php echo __('Log storage status'); ?>
<?php echo __('Total sources'); ?> </div>
<?php echo $LogStorage->getStatus(); ?>
</div>
<div class="col-6 br-b">
<div class="subtitle">
<?php echo __('Total sources'); ?>
</div>
<?php echo $LogStorage->getTotalSources(); ?>
</div>
</div> </div>
<?php echo $LogStorage->getTotalSources(); ?> <div class="row">
</div> <div class="col-6 br-r">
</div> <div class="subtitle">
<div class="row"> <?php echo __('Stored data'); ?>
<div class="col-6 br-r"> </div>
<div class="subtitle"> <?php echo $LogStorage->getStoredData(); ?>
<?php echo __('Stored data'); ?> <span class="indicative-text"><?php echo __('Lines'); ?></span>
</div>
<div class="col-6">
<div class="subtitle">
<?php echo __('Age of stored data'); ?>
</div>
<?php echo $LogStorage->getAgeOfStoredData(); ?>
<span class="indicative-text"><?php echo __('Days'); ?></span>
</div>
</div> </div>
<?php echo $LogStorage->getStoredData(); ?>
<span class="indicative-text"><?php echo __('Lines'); ?></span>
</div> </div>
<div class="col-6"> <?php endif; ?>
<div class="subtitle"> <?php if ($SnmpTraps->isEnabled() === true) : ?>
<?php echo __('Age of stored data'); ?> <div class="container mrgn_5px" id="SNMPTraps">
<div class="title br-b">
<?php echo $SnmpTraps->title; ?>
</div>
<div class="row">
<div class="col-6 br-r">
<div class="subtitle">
<?php echo __('Trap queues'); ?>
</div>
<?php echo $SnmpTraps->getQueues(); ?>
</div>
<div class="col-6">
<div class="subtitle">
<?php echo __('Total sources'); ?>
</div>
<?php echo $SnmpTraps->getTotalSources(); ?>
</div>
</div> </div>
<?php echo $LogStorage->getAgeOfStoredData(); ?>
<span class="indicative-text"><?php echo __('Days'); ?></span>
</div> </div>
</div> <?php endif; ?>
</div> </div>
<?php endif; ?>
<?php if ($SnmpTraps->isEnabled() === true) : ?>
<div class="container" id="SNMPTraps">
<div class="title br-b">
<?php echo $SnmpTraps->title; ?>
</div>
<div class="row">
<div class="col-6 br-r">
<div class="subtitle">
<?php echo __('Trap queues'); ?>
</div>
<?php echo $SnmpTraps->getQueues(); ?>
</div>
<div class="col-6">
<div class="subtitle">
<?php echo __('Total sources'); ?>
</div>
<?php echo $SnmpTraps->getTotalSources(); ?>
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3 pdd_5px">
<div class="container" id="Alerts"> <div class="container" id="Alerts">
<div class="title br-b"> <div class="title br-b">
<?php echo $Alerts->title; ?> <?php echo $Alerts->title; ?>
</div> </div>
@ -250,13 +252,15 @@
<?php echo $Alerts->getActiveCorrelation(); ?> <?php echo $Alerts->getActiveCorrelation(); ?>
</div> </div>
</div> </div>
<div class="subtitle link padding10 padding2 br-t"> <div id="list-users">
<b><?php echo __('Logged in users (24 hrs)'); ?></b> <a href=""><?php echo __('More details'); ?></a> <div class="subtitle link padding10 padding2 br-t">
<b><?php echo __('Logged in users (24 hrs)'); ?></b> <a href=""><?php echo __('More details'); ?></a>
</div>
<?php echo $Alerts->getDataTableUsers(); ?>
</div> </div>
<?php echo $Alerts->getDataTableUsers(); ?> </div>
</div>
</div> </div>
<div class="col-md-9"> <div class="col-md-9 pdd_5px">
<div class="container overflow_hidden" id="Events"> <div class="container overflow_hidden" id="Events">
<div class="title br-b"> <div class="title br-b">
<?php echo $Events->title; ?> <?php echo $Events->title; ?>
@ -301,7 +305,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-xl-6"> <div class="col-xl-6 pdd_5px">
<div class="container" id="Agents"> <div class="container" id="Agents">
<div class="title br-b"> <div class="title br-b">
<?php echo $Agents->title; ?> <?php echo $Agents->title; ?>
@ -341,7 +345,7 @@
</div> </div>
</div> </div>
<div class="col-xl-6"> <div class="col-xl-6">
<div class="container" id="Agents"> <div class="container mrgn_5px" id="Agents">
<div class="title br-b"> <div class="title br-b">
<?php echo $Configurations->title; ?> <?php echo $Configurations->title; ?>
</div> </div>
@ -371,7 +375,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="container"> <div class="container mrgn_5px">
<div class="title br-b"> <div class="title br-b">
<?php echo $ScheduledDowntime->title; ?> <?php echo $ScheduledDowntime->title; ?>
</div> </div>