Skip to content

Commit

Permalink
Adds individual command indicators to frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasr committed Jun 3, 2014
1 parent 072a6b9 commit b6223a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/static/devices.mustache.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h4 class="panel-title">
<tbody>
{{#commands}}
<tr id="command{{cmd.CommandUUID}}">
<td>*</td>
<td><span class="glyphicon {{status}} glyphicon-certificate"></span></td>
<td>{{cmd.Command.RequestType}}</td>
<td><button type="button" class="btn btn-xs btn-primary" id="{{cmd.CommandUUID}}" data-toggle="modal" data-target="#modal">Response</button></td>
</tr>
Expand Down
9 changes: 9 additions & 0 deletions server/static/dist/css/site-template.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
body {
padding-top: 50px;
}
.success{
color: #468847;
}
.warning{
color: #F89406;
}
.danger{
color: #B94A48;
}
.site-template {
padding: 40px 15px;
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion server/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ <h4 class="modal-title" id="myModalLabel">Response:</h4>
// Get device UDID and command UUID
var udid = $(this).closest(".panel").attr("id");
var uuid = $(this).attr("id");
// TODO: SOMETHING WRONG WITH UUID - GETTING WRONG COMMAND?

// Access /response with to get the response string
$.post("/response", JSON.stringify({"UDID":udid, "UUID":uuid}), function(data){
Expand Down Expand Up @@ -236,7 +237,6 @@ <h4 class="modal-title" id="myModalLabel">Response:</h4>
}
else{
// Send AJAX request

// Variable to pass all necessary data to server
var parameters = {
"cmd":$("#commands").val(),
Expand Down

0 comments on commit b6223a4

Please sign in to comment.