-
Notifications
You must be signed in to change notification settings - Fork 0
/
CPSpringdale.html
115 lines (107 loc) · 4.52 KB
/
CPSpringdale.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
<!DOCTYPE html>
<html>
<head>
<title>Clement Pappas Springdale</title>
<link href="plugins/jquery-ui-1.8.2.custom.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Fjalla+One' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link href="cpspringdale.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="images/clpappas.jpg" type="image/jpg">
<!--[if lt IE 9]>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<!--<![endif]-->
<script src="Scripts/jquery.jmodal.js" type="text/javascript"></script>
<script src="Scripts/global.js" type="text/javascript"></script>
<script type="text/javascript">
secondInterval = 5; // feel free to adjust
seconds = secondInterval - 1; // do not modify
$(document).ready(function () {
getStatus();
getPercent();
setInterval(getStatus, 1000);
setInterval(getPercent, 300000);
});
function getPercent() {
$.ajax({
url: 'GetLinePercent.ashx?client=cpspringdale',
type: 'GET',
dataType: 'json',
data: { time: new Date().format('yyyy/MM/dd HH:mm:ss') },
success: function (data) {
$.each(data, function () {
$('li#' + this.line).find(".percent").text(this.percent);
});
},
error: function (xhr, textStatus, errorThrown) {
$('div.percent').text('--%');
}
});
}
function getStatus() {
seconds++; if (seconds % secondInterval == 0)
$.ajax({
url: 'http://api.thrivemes.com/api/LineStatus/cpspringdale',
type: 'GET',
dataType: 'json',
success: function (data) {
$.each(data, function () {
$('li#' + this.line).find(".time").text(this.time);
if (this.status == true) {
$('li#' + this.line).attr('class', 'green_border');
}
else {
$('li#' + this.line).attr('class', 'red_border');
};
});
},
error: function (xhr, textStatus, errorThrown) {
$('li.green_border').attr('class', 'red_border');
$('div.time').text(textStatus);
}
});
else $(".time").each(function() { var times = $(this).text().split(":"); times[2]++; if (times[2] >= 60) { times[2] = 0; times[1]++; if (times[1] >= 60) { times[1] = 0; times[0]++; if (times[0] < 10) times[0] = "0" + times[0]; } if (times[1] < 10) times[1] = "0" + times[1]; } if (times[2] < 10) times[2] = "0" + times[2]; if (!isNaN(times[0]) && !isNaN(times[1]) && !isNaN(times[2])) $(this).text(times.join(":")); });
}
</script>
</head>
<body>
<div id="header-body">
<div id="header-content">
<img src="images/clement-logo.png" id="clement-logo">
<a target="_blank" href="http://www.downtimecollectionsolutions.com/"><img src="images/thrive-logo.png" id="thrive-logo" alt="Thrive DCS" /></a>
</div>
</div>
<div id="header-bottom"></div>
<div id="body">
<div id="body-content">
<div id="clement-fruit"></div>
<div id="clement-oj"></div>
<div id="main">
<div class="row">
<div class="col-md-4">
<div class="columnDiv">
<ul class="line">
<li class="red_border" id="Line_1"><a href="DCSDemo.aspx?line=ICO-02">Line 1</a><br />
<div class="percent">--%</div> <div class="time">--:--:--</div>
<div class="buttons">
<a href="http://www.downtimecollectionsolutions.com/app/demo/DCSDemo.aspx?line=Line_1" target="_blank">OI</a>
<a href="http://dashboard.thrivemes.com/downtime/snapshot?line=Line_1" target="_blank">DB</a>
<a href="http://www.downtimecollectionsolutions.com/app/demo/DCSDemoReasonCodes.aspx?line=Line_1" target="_blank">RC</a>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>