...
|
...
|
@@ -56,12 +56,47 @@ |
|
|
<td >load</td>
|
|
|
<td >firstscreen</td>
|
|
|
<td >DOMContentLoaded</td>
|
|
|
<td >详细情况</td>
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
|
|
<div class="modal-dialog modal-lg" role="document" style="display:table;">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
<h4 class="modal-title" id="myModalLabel">详细信息</h4>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
<table id="table-detail" class="table table-striped table-bordered">
|
|
|
<thead class="">
|
|
|
<tr>
|
|
|
<td >time</td>
|
|
|
<td >app</td>
|
|
|
<td >route</td>
|
|
|
<td >type</td>
|
|
|
<td >duration</td>
|
|
|
<td >reqID</td>
|
|
|
<td >udid</td>
|
|
|
<td >uid</td>
|
|
|
<td >useragent</td>
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- panel -->
|
|
|
</div>
|
|
|
|
...
|
...
|
@@ -69,7 +104,7 @@ |
|
|
<script>
|
|
|
var selectedServer, selectedStarTime, selectedEndTime, selectedApp, lastTime;
|
|
|
var data_end_point = '/profile/mean.json';
|
|
|
var dataTable = null;
|
|
|
var dataTable = null, detailTable = null;
|
|
|
|
|
|
function ajaxUrl() {
|
|
|
let url = `${data_end_point}?app=${selectedApp}&server=${selectedServer}`;
|
...
|
...
|
@@ -111,6 +146,7 @@ |
|
|
{data: 'load'},
|
|
|
{data: 'firstscreen'},
|
|
|
{data: 'DOMContentLoaded'},
|
|
|
{data: 'detail'}
|
|
|
],
|
|
|
data: [{
|
|
|
route: '',
|
...
|
...
|
@@ -118,9 +154,68 @@ |
|
|
mean: 0,
|
|
|
load: 0,
|
|
|
firstscreen: 0,
|
|
|
DOMContentLoaded: 0
|
|
|
DOMContentLoaded: 0,
|
|
|
detail: ''
|
|
|
}],
|
|
|
order: [[ 2, "desc" ]],
|
|
|
columnDefs: [ {
|
|
|
targets: -1,
|
|
|
data: null,
|
|
|
render: function ( data, type, row ) {
|
|
|
return '<button data-toggle="modal" data-target="#myModal">查看</button>';
|
|
|
},
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
$('#table-servers tbody').on( 'click', 'button', function (e) {
|
|
|
var data = dataTable.row($(this).parents('tr')).data();
|
|
|
|
|
|
var modal = $('#myModal'), modalBody = $('#myModal .modal-body');
|
|
|
|
|
|
modal.on('show.bs.modal', function () {
|
|
|
detailTable.clear().rows.add(data.detail).draw();
|
|
|
});
|
|
|
|
|
|
e.preventDefault();
|
|
|
});
|
|
|
|
|
|
detailTable = $("#table-detail").DataTable({
|
|
|
pageLength: 20,
|
|
|
retrieve: true,
|
|
|
searching: true,
|
|
|
dataSrc: 'data',
|
|
|
pageLength: 25,
|
|
|
columns: [
|
|
|
{data: 'time'},
|
|
|
{data: 'app'},
|
|
|
{data: 'route'},
|
|
|
{data: 'type'},
|
|
|
{data: 'duration'},
|
|
|
{data: 'reqID'},
|
|
|
{data: 'udid'},
|
|
|
{data: 'uid'},
|
|
|
{data: 'useragent'}
|
|
|
],
|
|
|
data: [{
|
|
|
time: '',
|
|
|
app: '',
|
|
|
duration: '',
|
|
|
reqID: '',
|
|
|
route: '',
|
|
|
type: '',
|
|
|
udid: '',
|
|
|
uid: '',
|
|
|
useragent: ''
|
|
|
}],
|
|
|
order: [[ 2, "desc" ]]
|
|
|
order: [[ 0, "desc" ]],
|
|
|
columnDefs: [
|
|
|
{
|
|
|
render: function(data, type, row) {
|
|
|
return moment(data).format('YYYY/MM/DD HH:MM:ss');
|
|
|
},
|
|
|
targets: 0
|
|
|
}
|
|
|
],
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|