-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
333 lines (288 loc) · 13.3 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900' rel='stylesheet' type='text/css'>
<!-- Page title -->
<title>cyBuzz Support Dashboard</title>
<!-- Vendor styles -->
<link rel="stylesheet" href="vendor/fontawesome/css/font-awesome.css" />
<link rel="stylesheet" href="vendor/animate.css/animate.css" />
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="vendor/toastr/toastr.min.css" />
<!-- App styles -->
<link rel="stylesheet" href="styles/pe-icons/pe-icon-7-stroke.css" />
<link rel="stylesheet" href="styles/pe-icons/helper.css" />
<link rel="stylesheet" href="styles/stroke-icons/style.css" />
<link rel="stylesheet" href="styles/style.css?sdsd">
<script src="https://code.createjs.com/soundjs-0.6.2.min.js"></script>
<!-- Vendor scripts -->
<script src="vendor/pacejs/pace.min.js"></script>
<script src="vendor/jquery/dist/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="vendor/toastr/toastr.min.js"></script>
<script src="vendor/sparkline/index.js"></script>
<script src="vendor/flot/jquery.flot.min.js"></script>
<script src="vendor/flot/jquery.flot.resize.min.js"></script>
<script src="vendor/flot/jquery.flot.spline.js"></script>
<!-- App scripts -->
<script src="scripts/luna.js"></script>
</head>
<script type="text/javascript">
var soundID = "notify";
loadSound();
var memberArray;
var clientsArray;
var totaltickets;
var closedticket;
var opentickets;
var timeNow;
var startRefresh = function() {
var postdata = 'swqdew';
$.ajax({
type: "POST",
url: 'services/ajax.php',
data: postdata,
timeout: 15000,
success: function(msg) {
var isThereAnyChange = false;
var json = JSON.parse(msg);
if (JSON.stringify(memberArray) != JSON.stringify(json.members)) {
isThereAnyChange = true;
playSound();
setTimeout(function() {
$('.staffpanel').animateCss('tada');
}, 2000);
}
if (JSON.stringify(clientsArray) != JSON.stringify(json.clients)) {
isThereAnyChange = true;
playSound();
setTimeout(function() {
$('.clientpanel').animateCss('tada');
}, 2000);
}
if (totaltickets != json.totalTickets) {
isThereAnyChange = true;
playSound();
setTimeout(function() {
$('.staffpanel').animateCss('tada');
}, 2000);
}
if (opentickets != json.openTickets) {
isThereAnyChange = true;
playSound();
setTimeout(function() {
$('.totalopenticketspanel').animateCss('tada');
}, 2000);
}
if (closedtickets != json.closedTickets) {
isThereAnyChange = true;
playSound();
setTimeout(function() {
$('.totalclosedticketspanel').animateCss('tada');
}, 2000);
}
if (isThereAnyChange) {
memberArray = json.members;
clientsArray = json.clients;
totaltickets = json.totalTickets;
opentickets = json.openTickets;
closedtickets = json.closedTickets;
timeNow = json.timeNow;
refreshMembers();
refreshClients();
refreshTotalTickets();
refreshOpenTickets();
refreshClosedTicket();
refreshTimeNow();
}
}
});
};
setInterval(startRefresh, 5000);
function refreshMembers() {
$("#member").empty();
memberArray.forEach(function(item, index) {
if (index === 0) {
$("#member").append('<tr id="blinker"><td>' + item.firstname + ' ' + item.lastname + '</td><td><span class="usage1 c-accent">' + item.totaltickets + '</span></td></tr>');
} else {
$("#member").append('<tr><td>' + item.firstname + ' ' + item.lastname + '</td><td><span class="usage1 c-accent">' + item.totaltickets + '</span></td></tr>');
}
})
}
function refreshClients() {
$("#clientdata").empty();
clientsArray.forEach(function(item) {
$("#clientdata").append('<tr><td>' + item.name + '</td><td>' + item.totalticket + '</td><td>' + item.totalclosedticket + '</td><td>3</td><td>6</td></tr>');
})
}
function refreshTotalTickets() {
$("#totaltickets").html(totaltickets)
}
function refreshOpenTickets() {
$("#opentickets").html(opentickets)
}
function refreshClosedTicket() {
$("#closedtickets").html(closedtickets)
}
function refreshTimeNow() {
$(".timeNow").html(timeNow)
}
function loadSound() {
createjs.Sound.registerSound("assets/alert.mp3", soundID);
}
function playSound() {
createjs.Sound.play(soundID);
}
$.fn.extend({
animateCss: function(animationName) {
var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
this.addClass('animated ' + animationName).one(animationEnd, function() {
$(this).removeClass('animated ' + animationName);
});
}
});
</script>
</head>
<body onload="loadSound()">
<!-- Wrapper-->
<div class="wrapper">
<!-- Main content-->
<section class="content" style="margin-top:0px; margin-left:0px;">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="view-header">
<div class="pull-right text-right" style="line-height: 14px">
<small>cyBuzz Support<br>Dashboard<br> <span class="c-white">v.1.0</span></small>
</div>
<div class="header-icon">
<i class="pe page-header-icon pe-7s-shield"></i>
</div>
<div class="header-title">
<h3 class="m-b-xs">cyBuzz Support Dashboard</h3>
<small>
Special minimal admin theme with Dark UI style for monitoring or administration web applications.
</small>
</div>
</div>
<hr>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-xs-12">
<div class="row">
<div class="col-lg-3 col-xs-6 totalticketspanel">
<div class="panel panel-filled">
<div class="panel-body">
<h2 class="m-b-none">
<span id="totaltickets"></span> <span class="slight"><i class="fa fa-play fa-rotate-270 text-warning"> </i> +20%</span>
</h2>
<div class="small">Total Tickets</div>
<div class="slight m-t-sm"><i class="fa fa-clock-o"> </i> Updated : <span class="c-white timeNow"></span> </div>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6 totalopenticketspanel">
<div class="panel panel-filled">
<div class="panel-body">
<h2 class="m-b-none">
<span id="opentickets"></span> <span class="slight"><i class="fa fa-play fa-rotate-90 c-white"> </i> 5%</span>
</h2>
<div class="small">Total Open Tickets</div>
<div class="slight m-t-sm"><i class="fa fa-clock-o"> </i> Updated : <span class="c-white timeNow"></span> </div>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6 totalclosedticketspanel">
<div class="panel panel-filled">
<div class="panel-body">
<h2 class="m-b-none">
<span id="closedtickets"></span> <span class="slight"><i class="fa fa-play fa-rotate-270 text-warning"> </i> +56%</span>
</h2>
<div class="small">Total Closed</div>
<div class="slight m-t-sm"><i class="fa fa-clock-o"> </i> Updated : <span class="c-white timeNow"></span> </div>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="panel panel-filled">
<div class="panel-body">
<h2 class="m-b-none">
34<span class="slight"><i class="fa fa-play fa-rotate-270 text-warning"> </i> +18%</span>
</h2>
<div class="small">Bounce Rate</div>
<div class="slight m-t-sm"><i class="fa fa-clock-o"> </i> Updated : <span class="c-white timeNow"></span> </div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 clientpanel">
<div class="panel">
<div class="panel-body">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Active</th>
<th>Closed</th>
<th>Over Due</th>
<th>Manager</th>
</tr>
</thead>
<tbody id="clientdata">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-xs-12 staffpanel">
<div class="panel panel-filled">
<div class="panel-body">
<p>
It is a long established fact that a reader will be distracted by the readable content of
</p>
<table class="table">
<thead>
<tr>
<th>
Machine number
</th>
<th>
Usage
</th>
</tr>
</thead>
<tbody id="member">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- End main content-->
</div>
<!-- End wrapper-->
<script>
var blink = function() {
if ($('#blinker').hasClass("red")) {
$('#blinker').removeClass("red");
} else {
$('#blinker').addClass("red");
}
};
$(document).ready(function() {
setInterval(blink, 1000);
});
</script>
</body>
</html>