-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.html
102 lines (86 loc) · 4.29 KB
/
controller.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Music Controller</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container theme-showcase" role="main">
<div >
<h1>Music Controller</h1>
<p class="lead">Send musical notes to a MQTT</p>
<div class="row">
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Queue Connection</h3>
</div>
<div class="panel-body">
<p>ClientID: <span data-bind="text: clientID"></span></p>
<p>Status: <span data-bind="text: status.status"></span></p>
<p>Server: <span data-bind="text: server"></span>:<span data-bind="text: port"></span></p>
<button class="btn btn-success" type="button" data-bind="click: connect">Connect</button>
<button class="btn btn-warning" type="button" data-bind="click: disconnect">Disconnect</button>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Music Keyboard</h3>
</div>
<div class="panel-body">
<button class="btn btn-success" type="button" data-bind="click:play.bind($data,'1')">1</button>
<button class="btn btn-success" type="button" data-bind="click:play.bind($data,'2')">2</button>
<button class="btn btn-success" type="button" data-bind="click:play.bind($data,'3')">3</button>
<button class="btn btn-success" type="button" data-bind="click:play.bind($data,'4')">4</button>
<button class="btn btn-success" type="button" data-bind="click:play.bind($data,'5')">5</button>
<button class="btn btn-success" type="button" data-bind="click:play.bind($data,'6')">6</button>
<button class="btn btn-success" type="button" data-bind="click:play.bind($data,'7')">7</button>
<button class="btn btn-success" type="button" data-bind="click:play.bind($data,'8')">8</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Debug messages</h3>
</div>
<div class="panel-body">
<div data-bind="foreach: log">
<p data-bind="text: $data"> </p>
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- /.container -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<!-- Knockout for data binding -->
<script src="js/knockout-3.4.0rc.js"></script>
<!--MQTT Client - https://eclipse.org/paho/clients/js/ -->
<script src="js/mqttws31.js"></script>
<!-- My Model -->
<script src="js/controllermodel.js"></script>
</body>
</html>
<!-- End of file-->