Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Add maintenance page reload when deployed application is available ag…
Browse files Browse the repository at this point in the history
…ain (#183)
  • Loading branch information
deborahvandervegt authored and niels-nijens committed Jun 29, 2016
1 parent 02b2231 commit 2ce332d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Resources/maintenance/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<title>We're currently upgrading our systems...</title>
<meta name='viewport' content='width=device-width, initial-scale=1'/>
<meta name='theme-color' content='#4884be'>
<script type='text/javascript'>
var check = setInterval(checkForMaintenance, 10000);

function checkForMaintenance() {
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.responseText.indexOf('Accompli') == -1) {
window.location.reload(true);
}
};

xhttp.open('GET', '/?' + Math.random(), true);
xhttp.send();
}
</script>
<link rel='stylesheet' href='style.css'/>
</head>
<body>
Expand Down

0 comments on commit 2ce332d

Please sign in to comment.