-
Notifications
You must be signed in to change notification settings - Fork 12
/
audit.html
264 lines (228 loc) · 8.61 KB
/
audit.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
<!--
// Copyright (c) Cingulara LLC 2020 and Tutela LLC 2020. All rights reserved.
// Licensed under the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 license. See LICENSE file in the project root for full license information.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OpenRMF Audit Report</title>
<meta name="description" content="OpenRMF Audit Report">
<meta name="author" content="Dale Bingham - https://www.cingulara.com">
<meta name="referrer" content="origin">
<!-- Favicon -->
<link rel="shortcut icon" href="/assets/images/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="/assets/favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/assets/favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicons/favicon-16x16.png">
<link rel="manifest" href="/assets/favicons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Bootstrap CSS -->
<link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<!-- Font Awesome CSS -->
<link href="/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!-- Custom CSS -->
<link href="/assets/css/style.css" rel="stylesheet" type="text/css" />
<link href="/assets/plugins/sweetalert/sweetalert.css" rel="stylesheet" type="text/css" />
<!-- BEGIN CSS for this page -->
<link rel="stylesheet" type="text/css" href="/assets/css/dataTables.bootstrap4.min.css" />
<style>
td.details-control {
background: url('/assets/plugins/datatables/img/details_open.png') no-repeat center center;
cursor: pointer;
}
tr.shown td.details-control {
background: url('/assets/plugins/datatables/img/details_close.png') no-repeat center center;
}
</style>
<!-- END CSS for this page -->
</head>
<body class="adminbody">
<script src="/assets/js/keycloak.min.js"></script>
<script src="/js/auth.js"></script>
<div id="main" style="display: none;">
<!-- top bar navigation -->
<div id="includeNavBarLink"></div>
<!-- End Navigation -->
<!-- Left Sidebar -->
<div id="includeSidebarLink"></div>
<!-- End Sidebar -->
<div class="content-page">
<!-- Start content -->
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-xl-12">
<div class="breadcrumb-holder">
<h1 class="main-title float-left">Audit Listing</h1>
<ol class="breadcrumb float-right">
<li class="breadcrumb-item">Home</li>
<li class="breadcrumb-item active">Audit</li>
</ol>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
<div class="card mb-3">
<div class="card-header">
<h3><i class="fa fa-fw fa-shield"></i> Audit Listing</h3>
</div>
<div class="card-body">
<div>
<table id="tblAuditRecords" style="width: 100%;"
class="table table-bordered table-hover display">
<thead>
<tr>
<th></th>
<th>Created</th>
<th>Program</th>
<th>Action</th>
<th>Username</th>
<th>User Id</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div><!-- end card body -->
</div><!-- end card-->
</div>
</div><!-- end row-->
</div>
<!-- END container-fluid -->
</div>
<!-- END content -->
</div>
<!-- END content-page -->
<footer class="footer">
<div id="includeFooterLink"></div>
</footer>
<div id="includeAutoLogin"></div>
</div>
<!-- END main -->
<script src="/assets/js/modernizr.min.js"></script>
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/moment.min.js"></script>
<script src="/assets/js/popper.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/detect.js"></script>
<script src="/assets/js/fastclick.js"></script>
<script src="/assets/js/jquery.blockUI.js"></script>
<script src="/assets/js/jquery.nicescroll.js"></script>
<!-- App js -->
<script src="/assets/js/pikeadmin.js"></script>
<script src="/js/openrmf.js"></script>
<script src="/js/apis.js"></script>
<script src="/assets/js/jquery.dataTables.min.js"></script>
<!-- <script src="/assets/js/dataTables.select.min.js"></script> -->
<script src="/assets/js/dataTables.bootstrap4.min.js"></script>
<script src="/assets/plugins/sweetalert/sweetalert.js"></script>
<!-- BEGIN Java Script for this page -->
<script>
$(document).ready(function () {
// authentication first
keycloak.init({ onLoad: 'login-required' }).success(function (authenticated) {
if (authenticated) {
// setup the User Interface
setupOpenRMFUI();
getChecklistSystemsForReportFilter();
// format the extra row data
function format(d) {
// `d` is the original data object for the row
var fullname = "(not set)";
if (d.fullname) fullname = d.fullname;
return "<div><h6>Full Name</h6>" + fullname + "</div><br />" +
"<div><h6>Email</h6>" + d.email + "</div><br />" +
"<div><h6>Message</h6>" + d.message + "</div><br />" +
"<div><h6>URL</h6>" + d.url + "</div><br />" +
"<div><h6>Audit Id</h6>" + d.auditId + "</div>";
}
// setup the table
var tableAudits = $('#tblAuditRecords').DataTable({
"responsive": false,
"searching": true,
"pageLength": 25,
"autoWidth": false,
"deferRender": true,
"ajax": {
"dataSrc": ""
},
"columns": [
{
"className": 'details-control',
"orderable": false,
"data": null,
"defaultContent": '',
"targets": 0
},
{
"data": null,
"targets": 1,
"render": function (data, type, full, meta) {
return moment(data.created).format('MM/DD/YYYY h:mm a');
}
},
{ "data": "program" },
{ "data": "action" },
{ "data": "username" },
{ "data": "userid" }
],
"columnDefs": [
{ "width": "5%", "targets": 0 },
{ "width": "10%", "targets": 1 },
{ "width": "10%", "targets": 2 },
{ "width": "15%", "targets": 3 },
{ "width": "15%", "targets": 4 },
{ "width": "25%", "targets": 5 }
],
order: [[1, 'desc']]
});
// Add event listener for opening and closing details
$('#tblAuditRecords tbody').on('click', 'td.details-control', function () {
var tr = $(this).closest('tr');
var row = tableAudits.row(tr);
if (row.child.isShown()) {
// This row is already open - close it
row.child.hide();
tr.removeClass('shown');
}
else {
// Open this row
row.child(format(row.data())).show();
tr.addClass('shown');
}
});
$.fn.dataTable.ext.errMode = function(obj,param,err){
var tableId = obj.sTableId;
//console.log('Handling DataTable issue of Table '+tableId);
};
$('#tblAuditRecords').DataTable().clear().draw();
// load the data
getAuditRecords();
}
else {
alert('You are not logged in. Please check your setup with Keycloak.');
}
}).error(function () {
alert('Keycloak did not respond correctly. Please verify your Keycloak realm as well as Redirect URI and Web Origins information. (i.e. are you missing an \'*\' somewhere?');
});
});
</script>
<!-- END Java Script for this page -->
</body>
</html>