analysis.blade.php 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
  4. @endsection
  5. @section('content')
  6. <div class="page-content container">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h2 class="panel-title"> SSR日志分析
  10. <small>仅适用于单机单节点</small>
  11. </h2>
  12. </div>
  13. @if (Session::has('analysisErrorMsg'))
  14. <x-alert type="danger" :message="Session::get('analysisErrorMsg')"/>
  15. @endif
  16. <div class="panel-body">
  17. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  18. <thead class="thead-default">
  19. <tr>
  20. <th>近期请求地址</th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. @if(empty($urlList))
  25. <tr>
  26. <td colspan="1">访问记录不足15000条,无法分析数据</td>
  27. </tr>
  28. @else
  29. @foreach($urlList as $url)
  30. <tr>
  31. <td> {{$url}} </td>
  32. </tr>
  33. @endforeach
  34. @endif
  35. </tbody>
  36. </table>
  37. </div>
  38. </div>
  39. </div>
  40. @endsection
  41. @section('javascript')
  42. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js"></script>
  43. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
  44. <script>
  45. const TableDatatablesScroller = function() {
  46. const e = function() {
  47. const e = $('#analysis');
  48. e.dataTable({
  49. language: {
  50. aria: {
  51. sortAscending: ': activate to sort column ascending',
  52. sortDescending: ': activate to sort column descending',
  53. },
  54. emptyTable: '暂无数据',
  55. info: '第 _START_ 到 _END_ 条,共计 _TOTAL_ 条',
  56. infoEmpty: '未找到',
  57. infoFiltered: '(filtered1 from _MAX_ total entries)',
  58. lengthMenu: '_MENU_ entries',
  59. search: '搜索:',
  60. zeroRecords: '未找到',
  61. },
  62. buttons: [
  63. {extend: 'print', className: 'btn btn-outline-dark'},
  64. {extend: 'pdf', className: 'btn btn-outline-success'},
  65. {extend: 'csv', className: 'btn btn-outline-primary'},
  66. ],
  67. scrollY: 300,
  68. deferRender: !0,
  69. scroller: !0,
  70. stateSave: !0,
  71. order: [[0, 'asc']],
  72. lengthMenu: [[10, 15, 20, -1], [10, 15, 20, 'All']],
  73. pageLength: 20,
  74. dom: '<\'row\' <\'col-md-12\'B>><\'row\'<\'col-md-6 col-sm-12\'l><\'col-md-6 col-sm-12\'f>r><\'table-scrollable\'t><\'row\'<\'col-md-5 col-sm-12\'i><\'col-md-7 col-sm-12\'p>>',
  75. });
  76. };
  77. return {
  78. init: function() {
  79. jQuery().dataTable && (e());
  80. },
  81. };
  82. }();
  83. jQuery(document).ready(function() {
  84. TableDatatablesScroller.init();
  85. });
  86. </script>
  87. @endsection