Files
puppetboard/puppetboard/static/js/radiator.js
Corey Hammerton 3833bbf0a1 puppetboard/app.py: Adding Radiator view (#232)
* puppetboard/app.py: Adding Radiator view

Part 2 of https://github.com/voxpupuli/puppetboard/issues/70

This is a refactoring of the changes in https://github.com/voxpupuli/puppetboard/pull/100.
Adds a simple Heads-Up Display of the last run statuses of managed nodes,
either environment filtered or not.

* puppetboard/app.py: Fixing environment filters and metric strings.

* The names of the population metrics have changes in PuppetDB 4.0, the initial
  commit used the metric names from PuppetDB 2.x.
* The main nodes query did not include a query string to filter on environments.
2016-05-16 19:59:40 -04:00

22 lines
617 B
JavaScript

function resizeMe() {
var preferredHeight = 944;
var displayHeight = $(window).height();
var percentageHeight = displayHeight / preferredHeight;
var preferredWidth = 1100;
var displayWidth = $(window).width();
var percentageWidth = displayWidth / preferredWidth;
var newFontSize;
if (percentageHeight < percentageWidth) {
newFontSize = Math.floor("960" * percentageHeight) - 30;
} else {
newFontSize = Math.floor("960" * percentageWidth) - 30;
}
$("body").css("font-size", newFontSize + "%")
}
$(document).ready(function() {
$(window).on('resize', resizeMe).trigger('resize');
})