1
0
Fork 0
mirror of https://github.com/TwiN/gatus.git synced 2024-12-14 11:58:04 +00:00

Make hostname links instead of just text

This commit is contained in:
TwinProduction 2019-10-05 22:47:09 -04:00
parent 40eb35aab2
commit 894122fb29

View file

@ -38,6 +38,7 @@
let tableBody = "";
for (let serviceName in data) {
let serviceStatus = "";
let hostname =data[serviceName][data[serviceName].length-1].hostname
for (let key in data[serviceName]) {
let entry = data[serviceName][key];
console.log(data[serviceName][key]);
@ -47,7 +48,7 @@
+ "<tr>"
+ " <td>" + serviceName + "</td>"
+ " <td>" + serviceStatus + "</td>"
+ " <td>" + data[serviceName][data[serviceName].length-1].hostname + "</td>"
+ " <td><a href=\"//" + hostname + "\">" + hostname + "</a></td>"
+ " <td>" + parseInt(data[serviceName][data[serviceName].length-1].duration / 1000000) + "ms </td>"
+ "</tr>";
}
@ -61,4 +62,4 @@
}, 3000);
</script>
</body>
</html>
</html>