A NodeJS application to use in OpenShift
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
1.3 KiB

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OpenShift Demo</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<style type="text/css">
<!--
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: lightgray;
}
body > div {
width: 300px;
height: 300px;
background-color: gray;
position:absolute;
left:0; right:0;
top:0; bottom:0;
margin:auto;
overflow:auto;
text-align: center;
font-family: Arial, Helvetica, "sans-serif";
font-size: xx-large;
}
.message {
padding-top: 50px;
}
-->
</style>
<script type="text/javascript">
$().ready(function() {
$.ajax("/info", {
headers: {
'x-random': + new Date() // timestamp
}
}).done(function(data) {
if (data.podName) {
$("#pod-name").text(data.podName);
}
$("#box").css("background-color", data.color);
});
});
</script>
</head>
<body>
<div id="box">
<div class="message">
Hello from <span id="pod-name">unknown</span>&nbsp;!
</div>
</div>
</body>
</html>