Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (55 sloc) 1.99 KB
{% extends "index.html" %}
{% block stylesheets %}
<link rel="stylesheet" href="/static/css/interface.css" type="text/css" />
{% end %}
{% block extend_titlebar %}
<a class="btn btn-danger pull-right" href="/disconnect/user">Disconnect</a>
<p class="navbar-text pull-right">{{ device }} @ {{ baud }}&nbsp;&nbsp;</p>
</div>
{% end %}
{% block content %}
<div class="row-fluid">
<div class="span8">
<div class="well">
<h4>Movement</h4>
{% for dim in ['x', 'y', 'z'] %}
<div class="pagination">
<ul>
<li class="disabled"><a href="#">-{{dim}}</a></li>
{% for delta in [-100, -10, -1, -0.1] %}
<li><a class="movement" data-delta="{{ delta }}" data-dim="{{ dim }}" href="#">{{ abs(delta) }}</a></li>
{% end %}
<li class="disabled"><a href="#">|</a></li>
{% for delta in [0.1, 1, 10, 100] %}
<li><a class="movement" data-delta="{{ delta }}" data-dim="{{ dim }}" href="#">{{ abs(delta) }}</a></li>
{% end %}
<li class="disabled"><a href="#">{{dim}}</a></li>
</ul>
</div>
{% end %}
</div>
</div>
<div id="console-wrapper">
<div id="console-output">
</div>
<div id="console-input" class="input-prepend">
<span class="add-on">$</span>
<input type="text"/></td>
</div>
</div>
</div>
{% end %}
{% block js %}
<script>
var ws = new WebSocket("ws://localhost:8888/direct/{{ identify }}");
ws.onmessage = function (evt) {
appendToConsole("out", evt.data);
};
serverDisconnect = function() {
window.location.href = "http://localhost:8888/disconnect/lostConnection";
}
ws.onerror = serverDisconnect;
ws.onclose = serverDisconnect;
</script>
<script src="/static/js/interface.js"></script>
{% end %}