summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/changeMID.html4
-rw-r--r--templates/admin/index.html2
-rw-r--r--templates/admin/testexp.html2
-rw-r--r--templates/admin/user_logs.html15
-rw-r--r--templates/webcam/show_video.html15
5 files changed, 15 insertions, 23 deletions
diff --git a/templates/admin/changeMID.html b/templates/admin/changeMID.html
index a2ca257..1ccfea0 100644
--- a/templates/admin/changeMID.html
+++ b/templates/admin/changeMID.html
@@ -31,7 +31,7 @@
function updateMID() {
$("#update-btn").prop('disabled',true);
- var BASE_URL = window.location.origin + "/sbhs";
+var BASE_URL = window.location.origin + "/sbhs-rpi";
var username = $("#username").val();
var board_id = $("#mid").children(":selected").attr("id");
@@ -65,7 +65,7 @@
// for live search of usernames
if (sessionStorage.getItem("fetchedUsers") == null) {
- var BASE_URL = window.location.origin + "/sbhs";
+var BASE_URL = window.location.origin + "/sbhs-rpi";
var request = $.ajax({
url: BASE_URL + '/admin/getusers',
method: 'POST'
diff --git a/templates/admin/index.html b/templates/admin/index.html
index dba8419..a28935f 100644
--- a/templates/admin/index.html
+++ b/templates/admin/index.html
@@ -40,7 +40,7 @@
$(".label-warning").click(toggleState);
function toggleState() {
- var BASE_URL = window.location.origin + "/sbhs";
+var BASE_URL = window.location.origin + "/sbhs-rpi";
if (window.confirm("Are you sure you want to toggle the state?")) {
var element = $(this);
var board_class = element.attr("class");
diff --git a/templates/admin/testexp.html b/templates/admin/testexp.html
index 4379952..807e0f2 100644
--- a/templates/admin/testexp.html
+++ b/templates/admin/testexp.html
@@ -92,7 +92,7 @@
</div>
</div>
<script>
- var BASE_URL = window.location.origin + "/sbhs";
+var BASE_URL = window.location.origin + "/sbhs-rpi";
$("#tableId").on("click", "tr", function(e) {
$("#tableId").find("tr.highlight").removeClass("highlight");
$(this).addClass("highlight");
diff --git a/templates/admin/user_logs.html b/templates/admin/user_logs.html
index 4586b56..453eb33 100644
--- a/templates/admin/user_logs.html
+++ b/templates/admin/user_logs.html
@@ -89,7 +89,7 @@
</div>
</div>
<h4 id="file-count"></h4>
- <table id="logs-table" class="table table-condensed">
+ <table id="logs-table" class="table table-condensed" style="display: none;">
<thead>
<tr>
<th>Sl No</th>
@@ -120,6 +120,7 @@ var endDate = "{{ nowdate }}";
}).on('changeDate', function(ev) {
var newDate = new Date(ev.date);
startDate = newDate.getFullYear() + "-" + (newDate.getMonth() + 1) + "-" + newDate.getDate();
+ $(this).datepicker('hide');
}).data('datepicker');
var DP2 = $('#dp2').datepicker({
@@ -129,15 +130,16 @@ var endDate = "{{ nowdate }}";
}).on('changeDate', function(ev) {
var newDate = new Date(ev.date);
endDate = newDate.getFullYear() + "-" + (newDate.getMonth() + 1) + "-" + newDate.getDate();
+ $(this).datepicker('hide');
}).data('datepicker');
})();
function fetchFileNames() {
var startTime = $("#start-time").val();
var endTime = $("#end-time").val();
- var BASE_URl = window.location.origin + "/sbhs";
+ var BASE_URL = window.location.origin + "/sbhs-rpi";
var request = $.ajax({
- url : BASE_URl + "/admin/rangelogs",
+ url : BASE_URL + "/admin/rangelogs",
method : "POST",
data : {
"start_date" : startDate,
@@ -152,11 +154,14 @@ function fetchFileNames() {
htmlContent = "";
ctr=1;
for (item of data.message) {
- htmlContent += "<tr>" + "<td>" + ctr + "</td>" + "<td>" + item.log.split("/")[0] +"</td>" + "<td><a href='" + BASE_URl + "/admin/explogs/" + item.id + "'>" + item.log.split("/")[1] +"</a></td>" + "</tr>";
+ htmlContent += "<tr>" + "<td>" + ctr + "</td>" + "<td>" + item.log.split("/")[0] +"</td>" + "<td><a href='" + BASE_URL + "/admin/explogs/" + item.id + "'>" + item.log.split("/")[1] +"</a></td>" + "</tr>";
ctr+=1;
}
$("#file-count").html(data.message.length + " results found");
- $("#logs-table tbody").html(htmlContent);
+ if (data.message.length > 0) {
+ $("#logs-table tbody").html(htmlContent);
+ $("#logs-table").show();
+ }
}
else {
alert(data.message);
diff --git a/templates/webcam/show_video.html b/templates/webcam/show_video.html
index e3b49ca..ab2032f 100644
--- a/templates/webcam/show_video.html
+++ b/templates/webcam/show_video.html
@@ -11,20 +11,7 @@
<h3>SBHS live feed: Machine ID {{ mid }}</h3>
<div class="span4 offset4" style="text-align: center">
</div>
-
-
-
- {% if mid > 10 %}
-
- <img id="videoImage" src="http://10.102.152.16:8080/webcams/{{ mid }}/get_image_data" alt="SBHS live feed" class="span4 offset4" style="padding-bottom: 20px;">
-
-
-
- {% else %}
-
-
- <img id="videoImage" src="{% static image_link %}" alt="SBHS live feed" class="span4 offset4">
-{% endif %}
+ <img id="videoImage" src="{% static image_link %}" alt="SBHS live feed" class="span4 offset4">
<div class="span4 offset4" style="text-align: center">
<a href="#" onclick="image_reloader()" id="image_reloader" class="btn btn-primary btn-large">Refresh image</a>