tyo-mq
Version:
Distributed Message Pub/Sub Service with socket.io
83 lines (74 loc) • 2.34 kB
HTML
<!-- index.html -->
<html>
<head>
<title>TYO MQ Library Demo</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style>
h1, p, div { text-align: center; }
html { background: #fffffe; }
</style>
</head>
<body>
<div class="container">
<div>
<h3>TYO MQ Server</h3>
<br>
<input type="text" id="server" name="server" value="lab2.tyolab.com"><br>
<br>
<button type="button" onclick="updateMQServer()">update</button>
<br>
</div>
<hr>
<div class="producer">
<h3>Producer / Publisher</h3>
<div>
<h4>Producer Status</h4>
<div id="producer-status">Not Connected</div>
</div>
<div>
<h4>Publish Message Type</h4>
<input type="text" id="message-type-producer" value="foobar"><br>
<br>
<!--
<button type="button" id="btn-update-producer-message-type" onclick="updatePublisherMessageType">update</button><br>
-->
</div>
<div>
<h4>Message To Send</h4>
<textarea id="message-to-send" rows="4" cols="50">Eternal vigilance is the price of liberty. -- Thomas Jefferson </textarea>
<br>
<button type="button" id="btn-send-message" onclick="publish()">send</button><br>
</div>
</div>
</div>
<hr>
<div class="consumer">
<h3>consumer / Subscriber</h3>
<br>
<div>
<h4>Consumer Status</h4>
<div id="consumer-status">Not Connected</div>
</div>
<div>
<h4>Subscribe Message Type</h4>
<input type="text" id="message-type-consumer" value="foobar"><br>
<br>
<button type="button" id="btn-update-consumer-message-type" onclick="updateSubscription()">update</button><br>
</div>
<div>
<h4>Message from Publisher</h4>
<br>
<textarea id="message-received" rows="4" cols="50"></textarea><br>
</div>
</div>
</div>
<script src="tyo-mq-client.js"></script>
<script src="main.js"></script>
<script lang="javascript">
window.onload = function() {
updateMQServer();
};
</script>
</body>
</html>