Browse Source

web-ui: Add utils file

Utils file has a function to get the number of rows to load depending on screen height
prometheus-integration
jonsadev 6 years ago
parent
commit
79cfe8952d
  1. 6
      web-ui/src/app/utils.ts

6
web-ui/src/app/utils.ts

@ -0,0 +1,6 @@
export function getNumberOfRowsForScreen(height: number): number {
if (height < 550) {
return 10;
}
return Math.min(10 + Math.ceil((height - 550) / 20), 100);
}
Loading…
Cancel
Save