1 <% content_for :page_title do %>
2 Event bus debugging page
4 <h1>Event bus debugging page</h1>
7 <textarea style="width:100%; height: 10em" id="websocket-message-content"></textarea>
8 <button type="button" id="send-to-websocket">Send</button>
13 <p id="PutStuffHere"></p>
17 putStuffThere = function (content) {
18 $("#PutStuffHere").append(content + "<br>");
21 var dispatcher = new WebSocket('<%= arvados_api_client.discovery[:websocketUrl] %>?api_token=<%= Thread.current[:arvados_api_token] %>');
22 dispatcher.onmessage = function(event) {
23 //putStuffThere(JSON.parse(event.data));
24 putStuffThere(event.data);
27 sendStuff = function () {
28 dispatcher.send($("#websocket-message-content").val());
31 $("#send-to-websocket").click(sendStuff);