Skip to content

Commit

Permalink
[WFLY-19391] thread-racing Quickstarts should have a root webpage sim…
Browse files Browse the repository at this point in the history
…ilar to helloworld
  • Loading branch information
sudeshnas93 committed Jun 6, 2024
1 parent 01313ed commit 526ea0d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 38 deletions.
52 changes: 14 additions & 38 deletions thread-racing/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -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>
54 changes: 54 additions & 0 deletions thread-racing/src/main/webapp/welcome.html
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 526ea0d

Please sign in to comment.