-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathindex.php
145 lines (136 loc) · 6.29 KB
/
index.php
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
<?php
require_once('init.php');
$users = Database::find('review')->query('SELECT DISTINCT reviewed_by FROM '.Database::escapeField($reviewhost['review_table']).' WHERE reviewed_by IS NOT NULL');
$Reviewers = " 'None' ";
while(($user = $users->fetch_col()) !== false)
if (strlen($user))
$Reviewers .= ",'$user' ";
$Reviewers .= " ";
unset($users);
require_once('templates/header.php');
?>
<table id="Queries">
<thead>
<tr>
<th id="queriesChecksum" class="checksum" > Checksum </th>
<th id="queriesColCount" class="count" > Count </th>
<th id="queriesColTime" class="time" > Total ms </th>
<th id="queriesColAvgTime" class="avgTime" > Avg ms </th>
<th id="queriesColtmpDisk" class="tmpDisk" > Tmp Disk </th>
<th id="queriesColtmpTbl" class="tmpTbl" > Tmp Tbl </th>
<th id="queriesColFirstSeen" class="firstSeen" > First Seen </th>
<th id="queriesColLastSeen" class="lastSeen" > Last Seen </th>
<th id="queriesColfingerprint" class="fingerprint" > Query Fingerprint</th>
<th id="queriesColReviewedOn" class="reviewed_on" > Reviewed On </th>
<th id="queriesColReviewedBy" class="reviewed_by" > Reviewed By </th>
<th id="queriesColComments" class="comments" > Comments </th>
<th id="queriesColDetails" class="details" > </th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th class=""></th>
<th class="number"></th>
<th class="number"></th>
<th class="number"></th>
<th class="number"></th>
<th class="number"></th>
<th class="date"></th>
<th class="date"></th>
<th class=""></th>
<th class="date"></th>
<th class=""></th>
<th class=""></th>
<th class=""></th>
</tr>
</tfoot>
</table>
<script type="text/javascript">
$(function() {
oTable = $('#Queries').dataTable({
"sPaginationType": "full_numbers",
"bDeferRender": true,
"bServerSide": true,
"sAjaxSource": "list-ajax.php",
"sDom": '"R<"H"Cpr>t<"F"il>"',
"bJQueryUI": true,
"bStateSave": true,
// Store the cookie for one year
"iCookieDuration": 31556926,
"bProcessing": true,
"aaSort": [],
"bAutoWidth": true,
"aoColumnDefs": [
{ "sClass": "checksum", "bSearchable": true, "aTargets": [ 0 ] },
{ "sClass": "count number", "bSearchable": false, "aTargets": [ 1 ] },
{ "sClass": "time number", "bSearchable": false, "aTargets": [ 2 ] },
{ "sClass": "avgTime number", "bSearchable": false, "aTargets": [ 3 ] },
{ "sClass": "tmpDisk number", "bSearchable": false, "aTargets": [ 4 ] },
{ "sClass": "tmpTbl number", "bSearchable": false, "aTargets": [ 5 ] },
{ "sClass": "firstSeen date", "bSearchable": false, "aTargets": [ 6 ] },
{ "sClass": "lastSeen date", "bSearchable": false, "aTargets": [ 7 ] },
{ "sClass": "fingerprint", "bSearchable": true, "aTargets": [ 8 ] },
{ "sClass": "reviewed_on date", "bSearchable": false, "aTargets": [ 9 ] },
{ "sClass": "reviewed_by", "bSearchable": true, "aTargets": [ 10 ] },
{ "sClass": "comments", "bSearchable": true, "aTargets": [ 11 ] },
{ "sClass": "details", "bSearchable": false, "aTargets": [ 12 ], "bSortable": false }
],
"oColVis": {
"aiExclude": [ 12 ]
},
"fnDrawCallback" : function() {
$("a.details").fancybox({
type: 'iframe',
width: '98%',
height: '98%',
centerOnScroll: true,
padding: 0,
margin: 10
});
return true;
},
"fnInitComplete": function(oSettings, json) {
if (typeof oSettings.saved_aaSorting != 'object') {
oTable.fnSetColumnVis( 0, <?php echo ($settings['defaultColumnVis']['Checksum'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 1, <?php echo ($settings['defaultColumnVis']['Count'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 2, <?php echo ($settings['defaultColumnVis']['TotalMS'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 3, <?php echo ($settings['defaultColumnVis']['AvgMS'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 4, <?php echo ($settings['defaultColumnVis']['tmpDisk'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 5, <?php echo ($settings['defaultColumnVis']['tmpTbl'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 6, <?php echo ($settings['defaultColumnVis']['FirstSeen'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 7, <?php echo ($settings['defaultColumnVis']['LastSeen'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 8, <?php echo ($settings['defaultColumnVis']['Fingerprint'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 9, <?php echo ($settings['defaultColumnVis']['ReviewedOn'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 10, <?php echo ($settings['defaultColumnVis']['ReviewedBy'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 11, <?php echo ($settings['defaultColumnVis']['Comments'] ? 'true' : 'false'); ?>, false);
oTable.fnSetColumnVis( 12, true, true);
}
},
}).columnFilter({
bUseColVis: true,
sPlaceHolder: 'tfoot',
aoColumns: [
{ type: "text" },
{ type: "number-range" },
{ type: "number-range" },
{ type: "number-range" },
{ type: "number-range" },
{ type: "number-range" },
{ type: "date-range" },
{ type: "date-range" },
{ type: "text" },
{ type: "date-range" },
{ type: "select", values: [<?php echo $Reviewers; ?>] },
{ type: "text" },
null
]
});
$(window).bind('resize', function () {
oTable.fnAdjustColumnSizing();
} );
});
</script>
<?php
require_once('templates/footer.php');