Skip to content

Commit

Permalink
Working on web server performance
Browse files Browse the repository at this point in the history
  • Loading branch information
lbussy committed Mar 26, 2020
1 parent ccf007d commit 4e92521
Show file tree
Hide file tree
Showing 11 changed files with 314 additions and 124 deletions.
16 changes: 7 additions & 9 deletions data/about.htm
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
}

.footer {
background-color: #f5f5f5;
background-color: #f5f5f5f5;
}

.footer>.container {
padding-right: 15px;
padding-left: 15px;
}
</style>

</head>

<body class="d-flex flex-column h-100">
Expand Down Expand Up @@ -111,18 +112,15 @@ <h4 class="card-title">Brew Bubbles Information</h4>
</footer>

<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous">
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>

</body>

</html>
</html>
21 changes: 21 additions & 0 deletions data/clean.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<html lang="en" class="h-100">

<head>
<meta charset="utf-8">
<title>Brew Bubbles</title>
</head>

<body>
<h4 class="card-title">Lorem Ipsum</h4>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras placerat lectus quis neque fermentum lobortis. Maecenas
mi nunc, commodo eget nisi eget, convallis scelerisque massa. Proin malesuada lorem et congue sollicitudin. Nulla
condimentum egestas tempor. Vivamus lacinia quam nisl, a malesuada mi pretium vitae. Etiam aliquam ex leo, vitae
lacinia sem dapibus nec. Proin at sem aliquam, facilisis tortor sit amet, elementum orci. Curabitur at eros sed quam
cursus porttitor sed a libero. Vestibulum euismod eros nec lectus varius malesuada. Nulla semper leo at elit gravida
luctus.
</p>
</body>>

</html>
18 changes: 8 additions & 10 deletions data/help.htm
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
}

.footer {
background-color: #f5f5f5;
background-color: #f5f5f5f5;
}

.footer>.container {
padding-right: 15px;
padding-left: 15px;
}
</style>

</head>

<body class="d-flex flex-column h-100">
Expand Down Expand Up @@ -119,20 +120,17 @@ <h4 class="card-title">Brew Bubbles Support</h4>
<span class="text-muted">Copyright &copy; 2019-2020, Lee C. Bussy</span>
</div>
</footer>

<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous">
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>

</body>

</html>
</html>
27 changes: 16 additions & 11 deletions data/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
}

.footer {
background-color: #f5f5f5;
background-color: #f5f5f5f5;
}

.footer>.container {
padding-right: 15px;
padding-left: 15px;
}
</style>

</head>

<body class="d-flex flex-column h-100">
Expand Down Expand Up @@ -131,20 +132,19 @@ <h4 class="card-title">Current Readings</h4>
</footer>

<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous">
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>

<script>
$(document).ready(function () {
function doAfterPageLoad() {
console.log("DEBUG: Entering: " + arguments.callee.name);

loadPage(); // Load once on page load

reloadPeriod = 60;
Expand All @@ -156,10 +156,13 @@ <h4 class="card-title">Current Readings</h4>
document.getElementById('countdown').innerHTML = remaining
setTimeout(function () { countdown(remaining - 1) }, 1000)
})(reloadPeriod)
console.log("DEBUG: Exiting: " + arguments.callee.name);
}

});
window.addEventListener("load", doAfterPageLoad, false);

function loadPage() {
console.log("DEBUG: Entering: " + arguments.callee.name);
var url = "/bubble/";
var bubble = $.getJSON(url, function () {
})
Expand Down Expand Up @@ -204,7 +207,9 @@ <h4 class="card-title">Current Readings</h4>
})
.always(function () {
// Post load processing here
});
}
);
console.log("DEBUG: Exiting: " + arguments.callee.name);
}
</script>

Expand Down
29 changes: 17 additions & 12 deletions data/ota.htm
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
}

.footer {
background-color: #f5f5f5;
background-color: #f5f5f5f5;
}

.footer>.container {
padding-right: 15px;
padding-left: 15px;
}
</style>

</head>

<body class="d-flex flex-column h-100">
Expand Down Expand Up @@ -134,25 +135,29 @@ <h4 class="card-title">Confirmation</h4>
<span class="text-muted">Copyright &copy; 2019-2020, Lee C. Bussy</span>
</div>
</footer>

<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous">
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>

<script>
$(document).ready(function () { // Wait till page is loaded
<script type="text/javascript">
function pageLoad() { // Load the page's JS elements
loadThisVersion(); // Populate form with controller settings
loadThatVersion(); // Populate form with controller settings
});
}

// Attach the event after the page loads
if (window.addEventListener)
window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", downloadJSAtOnload);
else window.onload = downloadJSAtOnload;

function loadThisVersion() { // Get current parameters
var thisVersionJson = "/thisVersion/";
Expand Down
28 changes: 16 additions & 12 deletions data/ota2.htm
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
}

.footer {
background-color: #f5f5f5;
background-color: #f5f5f5f5;
}

.footer>.container {
padding-right: 15px;
padding-left: 15px;
}
</style>

</head>

<body class="d-flex flex-column h-100">
Expand Down Expand Up @@ -127,22 +128,19 @@ <h4 class="card-title">Please Wait ...</h4>
<span class="text-muted">Copyright &copy; 2019-2020, Lee C. Bussy</span>
</div>
</footer>

<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous">
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>

<script>
$(document).ready(function () {
<script type="text/javascript">
function doUpdate() { // Load the page's JS elements
$.get("/clearupdate/", function(data){}); // Clear any previous update flags
$.get("/otastart/", function(data){}); // Semaphore the controller that it's safe to proceed

Expand All @@ -162,8 +160,14 @@ <h4 class="card-title">Please Wait ...</h4>
}
});
}, 5000);
}

});
// Attach the event after the page loads
if (window.addEventListener)
window.addEventListener("load", doUpdate, false);
else if (window.attachEvent)
window.attachEvent("onload", doUpdate);
else window.onload = doUpdate;

function checkSemaphore(callback) { // Check to see if the update is complete
var jqxhr = $.getJSON("/config/")
Expand Down
Loading

0 comments on commit 4e92521

Please sign in to comment.