github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/docs/index.html (about) 1 <!doctype html> 2 <html lang="en"> 3 4 <head> 5 <meta http-equiv="Permissions-Policy" content="interest-cohort=()"> 6 <meta charset="utf-8"> 7 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> 8 <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> 9 <title>W3bStream CI/CD Status Dashboard</title> 10 </head> 11 12 <body> 13 <h1>W3bStream CI/CD Status Dashboard</h1> 14 <div class="table-responsive"> 15 <table id="myTable" class="table"> 16 <thead> 17 <tr> 18 <th>Endpoint</th> 19 <th><a href="https://devnet-prod.w3bstream.com">Prod</a></th> 20 <th><a href="https://devnet-staging.w3bstream.com">Staging</a></th> 21 <th><a href="https://dev.w3bstream.com">Dev</a></th> 22 </tr> 23 </thead> 24 <tbody> 25 </tbody> 26 </table> 27 </div> 28 <script> 29 $(document).ready(function () { 30 var urls = [ 31 'https://devnet-prod.w3bstream.com/liveness', 32 'https://devnet-staging.w3bstream.com/liveness', 33 'https://dev.w3bstream.com/liveness' 34 ]; 35 36 var results = []; 37 38 urls.forEach(function(url, index) { 39 $.ajax({ 40 url: url, 41 method: 'GET', 42 success: function(data) { 43 results[index] = data; 44 result = [] 45 results.forEach((obj, i) => { 46 temp = {} 47 for(let prop in obj) { 48 if (results[i][prop] == 'ok'){ 49 v = '✅' 50 } else{ 51 v = '❌' 52 } 53 if(prop.startsWith('Server/srv-applet-mgr')) { 54 temp['Version'] = prop.split('@')[1] 55 temp['Server/srv-applet-mgr']=v; 56 } else if(prop.startsWith('TaskWorker/DbLogStoring')) { 57 temp['TaskWorker/DbLogStoring']=v; 58 } else if(prop.startsWith('TaskWorker/HandleEvent')) { 59 temp['TaskWorker/HandleEvent']=v; 60 } else if(prop.startsWith('mqtt-broker-cli')) { 61 temp['MQTT-broker-cli']=v; 62 } else if(prop.startsWith('postgres-cli')) { 63 temp['Postgres-cli']=v; 64 } else if(prop.startsWith('redis-cli')) { 65 temp['Redis-cli']=v; 66 } else { 67 temp[prop]=v; 68 } 69 } 70 ordered = Object.keys(temp).sort().reverse().reduce( 71 (obj, key) => { 72 obj[key] = temp[key]; 73 return obj; 74 }, 75 {} 76 ); 77 78 result[i]=ordered 79 }); 80 81 if (result.length == urls.length) { 82 for (var key in result[0]) { 83 console.log(key) 84 var row = '<tr><td>' + key + '</td>'; 85 for (var i = 0; i < result.length; i++) { 86 row += '<td>' + result[i][key] + '</td>'; 87 } 88 row += '</tr>'; 89 $('#myTable').append(row); 90 } 91 } 92 } 93 }); 94 }); 95 }); 96 </script> 97 </body> 98 99 </html>