-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable.html
75 lines (69 loc) · 1.51 KB
/
table.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
<!DOCTYPE html>
<HTML>
<HEAD>
<META CHARSET="utf-8">
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1">
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<TITLE>{{appName}} has a Posse</TITLE>
<LINK REL="stylesheet" HREF="//cdn.datatables.net/1.10.5/css/jquery.dataTables.min.css">
<LINK REL="stylesheet" HREF="posse.css">
<SCRIPT SRC="//code.jquery.com/jquery-2.1.3.min.js"></SCRIPT>
<SCRIPT SRC="//cdn.datatables.net/1.10.5/js/jquery.dataTables.min.js"></SCRIPT>
<SCRIPT SRC="table2CSV.js"></SCRIPT>
</HEAD>
<BODY>
<TABLE CLASS="display">
<CAPTION>System Profiles</CAPTION>
<THEAD>
<TR>
<TH>Time</TH>
<TH>IP</TH>
<TH>App</TH>
<TH>Version</TH>
<TH>Model</TH>
<TH>OS</TH>
<TH>Lang</TH>
<TH>Arch</TH>
<TH>CPU</TH>
<TH>Speed</TH>
<TH>RAM</TH>
</TR>
</THEAD>
<TBODY>
{{#members}}
<TR>
<TD>{{time}}</TD>
<TD>{{ip}}</TD>
<TD>{{appName}}</TD>
<TD>{{displayVersion}}</TD>
<TD>{{modelInfo.desc}}</TD>
<TD>{{osVersion}}</TD>
<TD>{{lang}}</TD>
<TD>{{modelInfo.proc}}</TD>
<TD>{{ncpu}}</TD>
<TD>{{cpuFreqMHz}} MHz</TD>
<TD>{{ramGB}} GB</TD>
</TR>
{{/members}}
</TBODY>
<BUTTON ID="csv">Export CSV</BUTTON>
</TABLE>
<SCRIPT>
$(document).ready(function() {
$('TABLE').dataTable({
paging: false,
columnDefs: [{
targets: 0,
render: function ( data ) {
var d = new Date(parseInt(data, 10) * 1000);
return d.toDateString();
}
}]
});
$('#csv').click(function() {
$('TABLE').table2CSV();
});
});
</SCRIPT>
</BODY>
</HTML>