- Introduced `Storage/VIO.php` for monitoring VIO Fibre Channel status with client balancing checks and table sorting. - Updated `/include/en.php` and `/include/fr.php` to include new translations for ServiceNow and VIO-related navigation elements. - Improved SQL query and filtering logic in `/X/Inventory.php` to exclude VIO entries and add XenSam version data. - Enhanced `/reports/heartbeat.php` with a new mechanism for handling server heartbeat status, allowing better granularity and readability.
33 lines
1.0 KiB
JavaScript
33 lines
1.0 KiB
JavaScript
const $table = $('#t1');
|
|
|
|
// Function to calculate and apply the perfect height
|
|
function updateTableHeight() {
|
|
// baseHeight uses the window inner height to stay stable
|
|
const availableHeight = window.innerHeight - 170;
|
|
|
|
// Ensure we don't drop below a minimum height (e.g., 300px)
|
|
const finalHeight = Math.max(availableHeight, 300);
|
|
|
|
// Bootstrap Table natively supports setting just the height without rewriting all options
|
|
$table.bootstrapTable('resetView', {
|
|
height: finalHeight
|
|
});
|
|
}
|
|
|
|
// Debounce function to prevent performance issues during active resizing
|
|
function debounce(func, wait) {
|
|
let timeout;
|
|
return function(...args) {
|
|
clearTimeout(timeout);
|
|
timeout = setTimeout(() => func.apply(this, args), wait);
|
|
};
|
|
}
|
|
|
|
// Initialization when DOM is fully ready and Bootstrap Table is loaded
|
|
$(function () {
|
|
// Small timeout to let Bootstrap Table finalize its internal rendering first
|
|
setTimeout(updateTableHeight, 200);
|
|
});
|
|
|
|
// Throttled listener for window resize
|
|
window.addEventListener('resize', debounce(updateTableHeight, 150)); |