From a3b20ba316dab84ceb09bd000cc35b5cab92d5e6 Mon Sep 17 00:00:00 2001 From: dosse91 Date: Sun, 14 Feb 2021 09:04:36 +0100 Subject: [PATCH] example-multipleServers-pretty now shows an error when no servers are available --- example-multipleServers-pretty.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/example-multipleServers-pretty.html b/example-multipleServers-pretty.html index 714e302..5f7d326 100644 --- a/example-multipleServers-pretty.html +++ b/example-multipleServers-pretty.html @@ -48,8 +48,12 @@ s.onend=function(aborted){ //callback for test ended/aborted } function selectServer(){ //called after loading server list s.selectServer(function(server){ //run server selection. When the server has been selected, display it in the UI - I("startStopBtn").style.display=""; //show start/stop button again - I("serverId").textContent=server.name; //show name of test server + if(server==null){ + I("serverId").textContent="No servers available"; + }else{ + I("startStopBtn").style.display=""; //show start/stop button again + I("serverId").textContent=server.name; //show name of test server + } }); } function loadServers(){ //called when the page is fully loaded