-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from Matige/patch-2
Unify the maintenance page based on dokku error pages
- Loading branch information
Showing
1 changed file
with
58 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,61 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<title>Application Offline for Maintenance</title> | ||
<style type="text/css"> | ||
body { | ||
background-color: white; | ||
color: #333333; | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 36px; | ||
line-height: 18px; | ||
font-size: 14px; | ||
} | ||
.section { | ||
margin-bottom: 36px; | ||
color: #222222; | ||
} | ||
.section h1 { | ||
font-size: 26px; | ||
background-color: #dad8e4; | ||
padding: 18px 22px 15px 22px; | ||
margin: 0; | ||
overflow: hidden; | ||
} | ||
.article { | ||
border: 4px solid #dad8e4; | ||
padding: 24px 18px 18px 18px; | ||
font-size: 14px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="section"> | ||
<h1>Application Offline for Maintenance</h1> | ||
<div class="article"> | ||
<p>This application is undergoing maintenance right now. Please check back later.</p> | ||
</div> | ||
</div> | ||
</body> | ||
<head> | ||
<title>Application Offline for Maintenance</title> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<style> | ||
body { | ||
background-color: #6CABF7; | ||
color: #fff; | ||
text-align: center; | ||
font-family: arial, sans-serif; | ||
margin: 0; | ||
} | ||
div { | ||
position:absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translateX(-50%) translateY(-50%); | ||
} | ||
p { | ||
color: #eee; | ||
} | ||
</style> | ||
|
||
<script> | ||
/* Attempt to automatically reload, assuming that the maintenance mode is temporary */ | ||
var retry_current = 2; // First refresh at 2 seconds | ||
var retry_limit = 4096; // Maximum backoff time, ~68 minutes | ||
|
||
check_gateway = function () { | ||
|
||
var request = new XMLHttpRequest(); | ||
request.open('HEAD', window.location.href, true); | ||
|
||
request.onload = function () { | ||
|
||
if (request.status >= 200 && request.status < 400) { | ||
window.location.reload(true); | ||
} else { | ||
if (retry_current < retry_limit) { | ||
retry_current *= 2; | ||
} | ||
|
||
setTimeout(check_gateway, retry_current * 1000); | ||
} | ||
}; | ||
|
||
request.send(); | ||
}; | ||
|
||
setTimeout(check_gateway, retry_current * 1000); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<div> | ||
<h1>Application Offline for Maintenance.</h1> | ||
<p>This application is undergoing maintenance right now. Please check back later.</p> | ||
</div> | ||
</body> | ||
</html> |