Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions PiWebAPIFinal/Content/app.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@

* {
margin: 0;
padding: 0;
margin: 0;
padding: 0;
}

html, body, #dataView, #login {
width: 100%;
height: 100%;

}

#dataView{
text-align:center;
#dataView {
text-align: center;
background-color: aliceblue;
}

#circuitSelect{

}
}

#circuitSelector {
padding:100px;
}

.dataDiv{
float:left;
Expand All @@ -28,11 +34,13 @@ html, body, #dataView, #login {
height: 30%;
bottom: 0px;
}



h4{
color:maroon;
}

#info *, #login * {
position: relative;
position: relative;
}

#login {
Expand Down
1 change: 1 addition & 0 deletions PiWebAPIFinal/Content/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions PiWebAPIFinal/Scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var baseServiceUrl = "https://osi.burnsmcdbts.com/PIWebApi/";
var statusWebID;

var authSuccessCallBack = function (data, statusMessage, statusObj) {
if (statusObj.status == 200) {
if (statusObj.status === 200) {
$("#login").hide();
$("#dataView").show();

Expand All @@ -13,7 +13,7 @@ var authSuccessCallBack = function (data, statusMessage, statusObj) {
};

var authErrorCallBack = function (data) {
if (data.status == 401) {
if (data.status === 401) {
alert("Invalid username and password.");
}
else {
Expand All @@ -33,7 +33,7 @@ function loadCircuitCallBak(data) {

function circuitChange() {
var newCircuit = $('#circuitSelect').val();
if (newCircuit != "") {
if (newCircuit !== "") {
$(".valuesContainer").show();
piwebapi.GetAllEvents(newCircuit);

Expand Down
26 changes: 14 additions & 12 deletions PiWebAPIFinal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3>Outage and Emergency Tracker: Login</h3>
</div>
<div id="dataView" style="display : none; padding-left:150px;">
<div style="min-width:1000px">
<div class="dataDiv" >
<div class="dataDiv" id="circuitSelector" >
<h3>Circuit</h3>
<select id="circuitSelect" style="width:150px;" onchange="circuitChange()">
<option value="">-select-</option>
Expand All @@ -46,17 +46,19 @@ <h3>
<h4 id="emerName"></h4>
</div>
<div style="clear: both;"></div>
<div class="dataDiv valuesContainer" style="display : none;">
<h4>Overall Circuit Status:</h4><h4 id="lblCurrentStatus"></h4>
</div>
<div class="dataDiv valuesContainer" style="display : none;">
<h4>Update Circuit Status</h4>
<select id="statusSelect" style="width:150px;">
<option value="">-select-</option>
<option value="true">Good Status</option>
<option value="false">Alarm Status</option>
</select>
<input id="btnUpdateStatus" type="button" onclick="updateStatus()" value="Submit" />
<div style="margin-left:450px;">
<div class="dataDiv valuesContainer" style="display : none;">
<h3>Overall Circuit Status:</h3><h4 id="lblCurrentStatus"></h4>
</div>
<div class="dataDiv valuesContainer" style="display : none;">
<h3>Update Circuit Status</h3>
<select id="statusSelect" style="width:150px;">
<option value="">-select-</option>
<option value="true">Good Status</option>
<option value="false">Alarm Status</option>
</select>
<input id="btnUpdateStatus" type="button" onclick="updateStatus()" value="Submit" />
</div>
</div>

</div>
Expand Down