Add VIO FC Status monitoring page and enhance server inventory filtering
- 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.
This commit is contained in:
33
js/tableResize2.js
Normal file
33
js/tableResize2.js
Normal file
@@ -0,0 +1,33 @@
|
||||
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));
|
||||
Reference in New Issue
Block a user