Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFLY-19391] thread-racing Quickstarts should have a root webpage similar to helloworld #928

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>