Refactor Health UI and enable static file support
- Added `app.UseStaticFiles()` to serve static files from `wwwroot`. - Changed root path redirection to `/health-ui`. - Moved inline CSS/JS from `Program.cs` to `health-ui.css` and `health-ui.js`. - Updated navigation links in the health check HTML. - Enhanced Health UI with improved styles and animations. - Introduced countdown auto-refresh in `health-ui.js`. - Updated `launchSettings.json` to start at the root URL.
This commit is contained in:
15
ECMJobRunner.WebCron/wwwroot/js/health-ui.js
Normal file
15
ECMJobRunner.WebCron/wwwroot/js/health-ui.js
Normal file
@@ -0,0 +1,15 @@
|
||||
let countdown = 10;
|
||||
|
||||
function updateCountdown() {
|
||||
document.getElementById('countdown').innerText = countdown;
|
||||
countdown--;
|
||||
if (countdown < 0) {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
function autoRefresh() {
|
||||
setInterval(updateCountdown, 1000);
|
||||
}
|
||||
|
||||
window.onload = autoRefresh;
|
||||
Reference in New Issue
Block a user