Add response time to output
This commit is contained in:
parent
278261db26
commit
a80142ee03
|
@ -17,11 +17,19 @@
|
|||
background-color: #ffdbdb;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.medium {
|
||||
background-color: #fce7ac;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.good {
|
||||
background-color: #cfeaa8;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
td.text {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
|
@ -51,6 +59,7 @@
|
|||
<th scope="col">Score</th>
|
||||
<th scope="col">IP-Adresse</th>
|
||||
<th scope="col">Erreichbar</th>
|
||||
<th scope="col">Antwortzeit</th>
|
||||
<th scope="col">Icon</th>
|
||||
<th scope="col"><abbr title="Site ist sowohl mit www. als auch ohne www. in URL erreichbar">www. optional</abbr></th>
|
||||
<th scope="col"><abbr title="URL-Varianten leiten auf eine einzige Startseiten-URL weiter">Kanonische URL</abbr></th>
|
||||
|
|
|
@ -51,6 +51,12 @@ $(function(){
|
|||
// SITE_REACHABLE
|
||||
row.append('<td class="'+ (item.result.SITE_REACHABLE.value ? 'good' : 'bad') +' text-center">' + (item.result.SITE_REACHABLE.value ? '✅' : '❌') + '</td>');
|
||||
|
||||
// HTTP_RESPONSE_DURATION
|
||||
var durationClass = 'bad';
|
||||
if (item.result.HTTP_RESPONSE_DURATION.score > 0) { durationClass = 'medium'; }
|
||||
if (item.result.HTTP_RESPONSE_DURATION.score > 0.5) { durationClass = 'good'; }
|
||||
row.append('<td class="text '+ durationClass +' text-center" data-order="' + item.result.HTTP_RESPONSE_DURATION.value + '">' + item.result.HTTP_RESPONSE_DURATION.value + ' ms</td>');
|
||||
|
||||
// FAVICON
|
||||
var icon = item.result.FAVICON.value;
|
||||
row.append('<td class="' + (icon ? 'good' : 'bad') + ' text-center">' + (icon ? ('<img src="' + item.details.icons[0] + '" class="icon">') : '❌') + '</td>');
|
||||
|
|
Loading…
Reference in New Issue