.
This commit is contained in:
@@ -47,26 +47,9 @@
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="container-fluid">
|
||||
<!-- MODAL WAIT -->
|
||||
<div class="modal fade bs-example-modal-sm" id="wait" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="padding-top: 15%;">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title mb-1 text-dark text-uppercase">
|
||||
<center><i class="bi bi-hourglass-split"></i><br> Work in progress ...</center>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-secondary progress-bar-striped progress-bar-animated" style="width: 100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TABLE -->
|
||||
<div>
|
||||
<table class='table table-bordered table-hover table-sm' id='t1' data-height="620" data-toggle="table" data-search="true" data-show-columns="true" data-export-types="['xlsx','csv','json']" data-show-export="true" data-sortable="true" data-sort-name="vm">
|
||||
<table class='table table-bordered table-hover table-sm' id='t1' data-height="820" data-toggle="table" data-search="true" data-show-columns="true" data-export-types="['xlsx','csv','json']" data-show-export="true" data-sortable="true" data-sort-name="vm">
|
||||
<thead> <!-- Header -->
|
||||
<th data-field='vm' data-sortable='true'>VM</th>
|
||||
<th data-field='owner' data-sortable='true'>Owner</th>
|
||||
@@ -95,6 +78,9 @@
|
||||
if($row['WWPNs'] != ""){
|
||||
echo '<span class="badge rounded-pill bg-primary text-light">LUN(s)</span> ';
|
||||
}
|
||||
if($row['DynamicVHD'] == "Y"){
|
||||
echo '<span class="badge rounded-pill bg-secondary text-warning">Dyn. VHDX</span> ';
|
||||
}
|
||||
echo "</td>";
|
||||
# Prefered Owner
|
||||
if($row['Owner'] == $row['PreferredOwner']){
|
||||
@@ -124,7 +110,7 @@
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
</div>
|
||||
@@ -138,28 +124,30 @@
|
||||
</HTML>
|
||||
|
||||
<SCRIPT>
|
||||
$(document).ready(function() {
|
||||
$('#t1').DataTable({
|
||||
scrollY: '50vh',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
|
||||
$(function() {
|
||||
// Exécution initiale pour définir la hauteur
|
||||
adjustTableHeight();
|
||||
|
||||
// Événement de redimensionnement
|
||||
$(window).on('resize', function() {
|
||||
adjustTableHeight();
|
||||
});
|
||||
|
||||
function adjustTableHeight() {
|
||||
var windowHeight = $(window).height();
|
||||
var tableTop = $('#t1').offset().top;
|
||||
var footerHeight = 50; // Hauteur estimée pour d'éventuels éléments en bas
|
||||
var availableHeight = windowHeight - tableTop - footerHeight;
|
||||
|
||||
// Définir une hauteur minimale
|
||||
availableHeight = Math.max(availableHeight, 400);
|
||||
|
||||
$('#t1').bootstrapTable('refreshOptions', {
|
||||
height: availableHeight
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
var options = $('#t1').bootstrapTable('getOptions');
|
||||
options.height= document.getElementById('content').clientHeight-170;
|
||||
$('#t1').bootstrapTable('refreshOptions',options);
|
||||
});
|
||||
|
||||
function tableresize() {
|
||||
var options = $('#t1').bootstrapTable('getOptions');
|
||||
options.height= document.getElementById('content').clientHeight-170;
|
||||
$('#t1').bootstrapTable('refreshOptions',options);
|
||||
};
|
||||
|
||||
window.addEventListener("resize", tableresize);
|
||||
|
||||
document.getElementById("ERR").innerHTML = "<?php echo $ERR ; ?>";
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user