From a80142ee039ae571761b4b7a213f066e2893848b Mon Sep 17 00:00:00 2001 From: Marian Steinbach Date: Thu, 19 Apr 2018 11:36:56 +0200 Subject: [PATCH] Add response time to output --- webapp/dist/index.html | 9 +++++++++ webapp/src/index.js | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/webapp/dist/index.html b/webapp/dist/index.html index a9ea58d..d08e7ba 100644 --- a/webapp/dist/index.html +++ b/webapp/dist/index.html @@ -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 @@ Score IP-Adresse Erreichbar + Antwortzeit Icon www. optional Kanonische URL diff --git a/webapp/src/index.js b/webapp/src/index.js index 55c9a0f..a8f2377 100644 --- a/webapp/src/index.js +++ b/webapp/src/index.js @@ -51,6 +51,12 @@ $(function(){ // SITE_REACHABLE row.append('' + (item.result.SITE_REACHABLE.value ? '✅' : '❌') + ''); + // 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('' + item.result.HTTP_RESPONSE_DURATION.value + ' ms'); + // FAVICON var icon = item.result.FAVICON.value; row.append('' + (icon ? ('') : '❌') + '');