-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated as of November 04, 2024 - 12:13 AM CST -0600
- Loading branch information
1 parent
e6b9edf
commit 0c4b46e
Showing
1 changed file
with
250 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,250 @@ | ||
<html lang="en"> | ||
<head> | ||
<meta content="no-cache, no-store, must-revalidate" http-equiv="Cache-Control"/> | ||
<meta content="no-cache" http-equiv="Pragma"/> | ||
<meta content="0" http-equiv="Expires"/> | ||
<meta charset="utf-8"> | ||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> | ||
<title>Jarvis::Health Check</title> | ||
<meta property="og:type" content="HealthCheck"> | ||
<meta content="This is a health check page for Jarvis" name="description"> | ||
<meta name="keywords" content="AWS, HTML, CSS, JavaScript"> | ||
<meta name="author" content="Vignesh Rao"> | ||
<link rel="icon" href="https://thevickypedia.github.io/open-source/images/logo/jarvis.ico"> | ||
<link rel="apple-touch-icon" href="https://thevickypedia.github.io/open-source/images/logo/jarvis.png"> | ||
<meta content="width=device-width, initial-scale=1" name="viewport"> | ||
</head> | ||
<style> | ||
/* | ||
table, th, td { | ||
border: 1px solid black; | ||
border-collapse: collapse; | ||
} | ||
tr:hover { | ||
background-color: gray; | ||
} | ||
*/ | ||
|
||
td { | ||
height: 30px; | ||
vertical-align: bottom; | ||
} | ||
|
||
th, td { | ||
border-top: 1px solid #ddd; | ||
border-bottom: 1px solid #ddd; | ||
border-left: 1px solid #ddd; | ||
border-right: 1px solid #ddd; | ||
} | ||
|
||
figure { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
ul { | ||
padding-left: 10%; | ||
text-align: left; | ||
} | ||
|
||
.text_input { | ||
font-family: "Courier", Courier, monospace; | ||
text-align: center; | ||
} | ||
|
||
.list_input { | ||
font-family: "Courier", Courier, monospace; | ||
padding-left: 40%; | ||
} | ||
|
||
.center { | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.corner { | ||
position: absolute; | ||
top: 3%; | ||
right: 2%; | ||
font-size: 12px; | ||
} | ||
|
||
.legend_txt { | ||
font-family: "Courier", Courier, monospace; | ||
font-size: 14px; | ||
} | ||
|
||
.legend_img { | ||
width: 35px; | ||
} | ||
|
||
.footer { | ||
font-family: 'Helvetica Neue'; | ||
font-size: 12px; | ||
line-height: 20px; | ||
margin-bottom: 10px; | ||
color: #444444; | ||
line-height: 20px; | ||
padding: 16px 16px 16px 16px; | ||
text-align: center; | ||
} | ||
|
||
.header { | ||
font-family: "Courier", Courier, monospace; | ||
display: flex; | ||
align-items: center; | ||
height: 60px; | ||
justify-content: center; | ||
border-bottom: 1px solid #E8E8E8; | ||
} | ||
|
||
</style> | ||
<body onload="displayTimer()"> | ||
<div class="corner"> | ||
<i> | ||
<span id="span"></span><br> | ||
Last status update: <span id="latestCommit"></span><br> | ||
Mapping file generated by <a href="https://github.com/thevickypedia/Jarvis">Jarvis</a> is used as source feed | ||
</i> | ||
</div> | ||
</body> | ||
<br><br><br><br> | ||
<div class="header"><h1>Jarvis Status</h1></div> | ||
<br><br> | ||
<div class="container"> | ||
<img style="text-align:center" src="warning.png" alt="status" width="100"/> | ||
<h2 class="text_input">Some components are degraded</h2> | ||
</div> | ||
<table class="center" style='font-family:"Courier", Courier, monospace; font-size:100%; min-width: 20%'> | ||
<thead> | ||
<tr> | ||
<th>Process Name</th> | ||
<th>Status</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
||
<tr> | ||
<td><p style="text-align:center"> Jarvis </p></td> | ||
<td><p style="text-align:center"> 🟢 </p></td> | ||
<td style='border:none;'><p style="cursor: pointer;" title=" Main Process "> ⓘ</p></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><p style="text-align:center"> Jarvis API </p></td> | ||
<td><p style="text-align:center"> 🟢 </p></td> | ||
<td style='border:none;'><p style="cursor: pointer;" title=" Telegram, Jarvis UI, Surveillance, Stock monitor, Offline communicator, Robinhood portfolio report "> ⓘ</p></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><p style="text-align:center"> Background Tasks </p></td> | ||
<td><p style="text-align:center"> 🟢 </p></td> | ||
<td style='border:none;'><p style="cursor: pointer;" title=" Alarms, Reminders, Cron jobs, Home automation, Wi-Fi connector, Background tasks, Meetings and Events sync "> ⓘ</p></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><p style="text-align:center"> Speech Synthesis API </p></td> | ||
<td><p style="text-align:center"> 🔴 </p></td> | ||
<td style='border:none;'><p style="cursor: pointer;" title=" Speech Synthesis "> ⓘ</p></td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
<br><br> | ||
<div class="text_input"></div> | ||
<div class="list_input"><b>Impacted by speech synthesis api:</b><br><br> Speech Synthesis<ul><li></li></ul></div> | ||
<br><br> | ||
<figure> | ||
<img class="legend_img" src="ok.png"/> | ||
<figcaption><p class="legend_txt"> No Issues </p></figcaption> | ||
<img class="legend_img" src="maintenance.png"/> | ||
<figcaption><p class="legend_txt"> Maintenance </p></figcaption> | ||
<img class="legend_img" src="notice.png"/> | ||
<figcaption><p class="legend_txt"> Attention Required </p></figcaption> | ||
<img class="legend_img" src="warning.png"/> | ||
<figcaption><p class="legend_txt"> Partially Degraded </p></figcaption> | ||
<img class="legend_img" src="issue.png"/> | ||
<figcaption><p class="legend_txt"> Service Disrupted</p></figcaption> | ||
</figure> | ||
|
||
<div class="footer"> | ||
<br><b>Components Monitored:</b> <a | ||
href="https://thevickypedia.github.io/Jarvis/#jarvis.executors.processor.start_processes" target="_bottom">jarvis.executors.processor.start_processes</a> | ||
<br><b>Source code:</b> <a href="https://github.com/thevickypedia/JarvisMonitor" target="_bottom">https://github.com/thevickypedia/JarvisMonitor</a> | ||
<br><b>Jarvis base:</b> <a href="https://github.com/thevickypedia/Jarvis" target="_bottom">https://github.com/thevickypedia/Jarvis</a> | ||
<br><b>Reach out:</b> <a href="https://vigneshrao.com/contact" target="_bottom">https://vigneshrao.com/contact</a> | ||
</div> | ||
<script> | ||
function millisecondsToStr(milliseconds) { | ||
let seconds = milliseconds / 1000 | ||
let levels = [ | ||
[Math.floor(seconds / 31536000), 'years'], | ||
[Math.floor((seconds % 31536000) / 86400), 'days'], | ||
[Math.floor(((seconds % 31536000) % 86400) / 3600), 'hours'], | ||
[Math.floor((((seconds % 31536000) % 86400) % 3600) / 60), 'minutes'], | ||
[Math.floor((((seconds % 31536000) % 86400) % 3600) % 60), 'seconds'], | ||
]; | ||
let returntext = ''; | ||
|
||
for (let i = 0, max = levels.length; i < max; i++) { | ||
if (levels[i][0] === 0) continue; | ||
returntext += ', ' + levels[i][0] + ' ' + (levels[i][0] === 1 ? levels[i][1].substr(0, levels[i][1].length - 1) : levels[i][1]); | ||
} | ||
return returntext.trim(); | ||
} | ||
|
||
function displayTimer() { | ||
let diff = new Date() - new Date(2020,09,06,17,45); | ||
let display = millisecondsToStr(diff); | ||
document.getElementById('span').innerHTML = "Age: " + display.substring(1); | ||
setTimeout(displayTimer, 1000); | ||
} | ||
|
||
setInterval(function () { | ||
window.location.reload(); | ||
}, 60000); | ||
</script> | ||
<script> | ||
document.addEventListener('DOMContentLoaded', function () { | ||
// GitHub repository information | ||
let owner = 'thevickypedia'; | ||
let repo = 'JarvisMonitor'; | ||
let branch = 'docs'; | ||
|
||
// GitHub API endpoint for fetching the latest commit on a branch | ||
let apiUrl = `https://api.github.com/repos/${owner}/${repo}/commits/${branch}`; | ||
|
||
// Server's TimeZone | ||
let timeZone = "CST -0600"; | ||
|
||
// Fetch data from GitHub API | ||
fetch(apiUrl) | ||
.then(response => response.json()) | ||
.then(data => { | ||
// Extract the commit information | ||
let commitDate = new Date(data.commit.author.date); | ||
let dateTime = commitDate.toLocaleString('en-US', { | ||
day: 'numeric', | ||
month: 'long', // short prints March as Mar without - between date and time | ||
year: 'numeric', | ||
hour: 'numeric', | ||
minute: 'numeric', | ||
hour12: true // to be extra safe | ||
}); | ||
document.getElementById("latestCommit").textContent = dateTime + " " + timeZone; | ||
}) | ||
.catch(error => { | ||
console.error('Error fetching data from GitHub API:', error); | ||
let dateTime = `<a href=https://github.com/${owner}/${repo}/commits/${branch}>Unknown</a>` | ||
document.getElementById('latestCommit').innerHTML = dateTime; | ||
}); | ||
}); | ||
</script> | ||
</html> |