From 526ea0d3809e91842b74093eee6359e4ad9eee8e Mon Sep 17 00:00:00 2001 From: sudeshnas93 <ssur@redhat.com> Date: Thu, 6 Jun 2024 19:40:16 +0530 Subject: [PATCH] [WFLY-19391] thread-racing Quickstarts should have a root webpage similar to helloworld --- thread-racing/src/main/webapp/index.html | 52 ++++++--------------- thread-racing/src/main/webapp/welcome.html | 54 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 38 deletions(-) create mode 100644 thread-racing/src/main/webapp/welcome.html diff --git a/thread-racing/src/main/webapp/index.html b/thread-racing/src/main/webapp/index.html index a6a6f9d31f..adc8ec4098 100644 --- a/thread-racing/src/main/webapp/index.html +++ b/thread-racing/src/main/webapp/index.html @@ -1,54 +1,30 @@ <!-- JBoss, Home of Professional Open Source - Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual + Copyright 2024, Red Hat, Inc. and/or its affiliates, and individual contributors by the @authors tag. See the copyright.txt in the distribution for a full listing of individual contributors. - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + @@ -15,95 +13,21 @@ See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE html> -<html> +<!-- Plain HTML page that kicks us into the app --> + +<html lang="en"> <head> -<title>Jakarta EE Thread Racing</title> - <script type="text/javascript"> - function letsRace() { - var output = document.getElementById("output"); - document.getElementById("raceButton").disabled = true; - output.innerHTML = ''; - var host = window.location.host; - var wsProtocol = window.location.protocol == "https:" ? "wss" : "ws"; - var url = wsProtocol + '://' + host + window.location.pathname + 'race'; - var ws = new WebSocket(url); - ws.onmessage = function (message) { - output.innerHTML += message.data; - } - ws.onclose = function (message) { - document.getElementById("raceButton").disabled = false; - } - } - </script> - <style type="text/css"> - body{ margin-left: 20px} - </style> + <meta charset="UTF-8"> + <title>thread-racing</title> </head> <body> -<div> - <h1>Jakarta EE Thread Racing</h1> - <p>The GREATEST open source racing application ever developed, all for FREE, including TV live broadcast.</p> - <p>A race where 4 threads run() for glory, completing different stages, each sponsored by a new or updated Jakarta EE technology!</p> - <form action=""> - <input id="raceButton" onclick="letsRace();" value="INSERT COIN" type="button"> - </form> - <br /> - <div id="output"></div> +<div style="text-align:center"> + + <h1>Hello There! Welcome to WildFly!</h1> + <h2>The thread-racing application has been deployed and running successfully.</h2> + <a href="welcome.html" title="Go to the application">Access the Jakarta EE thread-racing web application here</a> + </div> </body> -</html> +</html> \ No newline at end of file diff --git a/thread-racing/src/main/webapp/welcome.html b/thread-racing/src/main/webapp/welcome.html new file mode 100644 index 0000000000..e870a93689 --- /dev/null +++ b/thread-racing/src/main/webapp/welcome.html @@ -0,0 +1,54 @@ +<!-- + JBoss, Home of Professional Open Source + Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual + contributors by the @authors tag. See the copyright.txt in the + distribution for a full listing of individual contributors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!DOCTYPE html> +<html> +<head> +<title>Jakarta EE Thread Racing</title> + <script type="text/javascript"> + function letsRace() { + var output = document.getElementById("output"); + document.getElementById("raceButton").disabled = true; + output.innerHTML = ''; + var host = window.location.host; + var wsProtocol = window.location.protocol == "https:" ? "wss" : "ws"; + var url = wsProtocol + '://' + host + window.location.pathname + '/../race'; + var ws = new WebSocket(url); + ws.onmessage = function (message) { + output.innerHTML += message.data; + } + ws.onclose = function (message) { + document.getElementById("raceButton").disabled = false; + } + } + </script> + <style type="text/css"> + body{ margin-left: 20px} + </style> +</head> +<body> +<div> + <h1>Jakarta EE Thread Racing</h1> + <p>The GREATEST open source racing application ever developed, all for FREE, including TV live broadcast.</p> + <p>A race where 4 threads run() for glory, completing different stages, each sponsored by a new or updated Jakarta EE technology!</p> + <form action=""> + <input id="raceButton" onclick="letsRace();" value="INSERT COIN" type="button"> + </form> + <br /> + <div id="output"></div> +</div> +</body> +</html>