This repository has been archived by the owner on Dec 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.html
149 lines (145 loc) · 6.37 KB
/
index.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html>
<html>
<head>
<title>Spark Simple Web Interface</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js 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/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body data-ng-app>
<div class="container">
<div class="alert fade in" id="info-alert" hidden data-spy="affix"></div>
<div class="panel panel-default" id="settings-panel">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#settings">
Core ID and API Token
</a>
</h4>
</div>
<div id="settings" class="panel-collapse collapse in">
<div class="panel-body">
<p>
Visit <a href="https://www.spark.io/build" target="_blank">https://www.spark.io/build</a> to get the ID of the core to access and your unique API token.
</p>
<div class="input-group">
<span class="input-group-addon">Core ID</span>
<input type="text" class="form-control" id="core-id" placeholder="Core ID">
</div>
<div class="input-group">
<span class="input-group-addon">API Token</span>
<input type="text" class="form-control" id="api-token" placeholder="API Token">
</div>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#functions">
Functions
</a>
</h4>
</div>
<div id="functions" class="panel-collapse collapse in">
<div class="panel-body">
<p>
Input the function name to call along with the data to pass and hit the post button to attempt to send it to the core.
</p>
<div class="row" data-ng-repeat="idx in [1, 2, 3, 4]">
<div class="col-lg-5">
<div class="input-group">
<span class="input-group-addon">
Function Name
</span>
<input type="text" class="form-control" id="method-{{idx}}">
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div class="col-lg-5">
<div class="input-group">
<span class="input-group-addon">
Data
</span>
<input type="text" class="form-control" id="data-{{idx}}">
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div class="col-lg-2">
<div class="input-group">
<button class="btn btn-success" type="button" id="post-{{idx}}">Post</button>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<br/><br/>
</div><!-- /.row -->
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#variables">
Variables
</a>
</h4>
</div>
<div id="variables" class="panel-collapse collapse in">
<div class="panel-body">
<p>
Enter the variable name to query and press the Get button, the value will appear in the field if successful. If you wish to auto-query, check the box. Enter a custom time in ms or leave it blank for the default refresh time of 5 seconds.
</p>
<div class="row" data-ng-repeat="idx in [1, 2, 3, 4]">
<div class="col-lg-5">
<div class="input-group">
<span class="input-group-addon">
Variable Name
</span>
<input type="text" class="form-control" id="var-{{idx}}">
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div class="col-lg-3">
<div class="input-group">
<span class="input-group-addon">
Value
</span>
<input type="text" class="form-control" value="---" readonly id="var-val-{{idx}}">
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div class="col-lg-2">
<div class="input-group">
<span class="input-group-addon">
<input type="checkbox" id="refresh-{{idx}}">
</span>
<input type="text" class="form-control" placeholder="Refresh (ms)" id="refresh-time-{{idx}}">
</div><!-- /input-group -->
</div><!-- /.col-lg-1 -->
<div class="col-lg-1">
<div class="input-group">
<button class="btn btn-success" type="button" id="get-var-{{idx}}">Get</button>
</div><!-- /input-group -->
</div><!-- /.col-lg-1 -->
<br/><br/>
</div><!-- /.row -->
</div>
</div>
</div>
</div>
<script type="text/javascript" src="http://codeorigin.jquery.com/jquery-2.0.3.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46376650-1', 'jflasher.github.io');
ga('send', 'pageview');
</script>
</body>
</html>