analysis.blade.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. @extends('admin.table_layouts')
  2. @section('content')
  3. <div class="page-content container">
  4. <div class="panel">
  5. <div class="panel-heading">
  6. <h2 class="panel-title">
  7. {{ trans('admin.menu.tools.analysis') }} <small>{{ trans('admin.tools.analysis.sub_title') }}</small>
  8. </h2>
  9. </div>
  10. @if (Session::has('analysisErrorMsg'))
  11. <x-alert type="danger" :message="Session::pull('analysisErrorMsg')" />
  12. @endif
  13. <div class="panel-body">
  14. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  15. <thead class="thead-default">
  16. <tr>
  17. <th>{{ trans('admin.tools.analysis.req_url') }}</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. @if (!empty($urlList))
  22. @foreach ($urlList as $url)
  23. <tr>
  24. <td> {{ $url }} </td>
  25. </tr>
  26. @endforeach
  27. @else
  28. <tr>
  29. <td colspan="1">{{ trans('admin.tools.analysis.not_enough') }}</td>
  30. </tr>
  31. @endif
  32. </tbody>
  33. </table>
  34. </div>
  35. </div>
  36. </div>
  37. @endsection
  38. @push('javascript')
  39. <script>
  40. const TableDatatablesScroller = function() {
  41. const e = function() {
  42. const e = $("#analysis");
  43. e.dataTable({
  44. language: {
  45. aria: {
  46. sortAscending: ": activate to sort column ascending",
  47. sortDescending: ": activate to sort column descending"
  48. },
  49. emptyTable: "暂无数据",
  50. info: "第 _START_ 到 _END_ 条,共计 _TOTAL_ 条",
  51. infoEmpty: "未找到",
  52. infoFiltered: "(filtered1 from _MAX_ total entries)",
  53. lengthMenu: "_MENU_ entries",
  54. search: "搜索:",
  55. zeroRecords: "未找到"
  56. },
  57. buttons: [{
  58. extend: "print",
  59. className: "btn btn-outline-dark"
  60. },
  61. {
  62. extend: "pdf",
  63. className: "btn btn-outline-success"
  64. },
  65. {
  66. extend: "csv",
  67. className: "btn btn-outline-primary"
  68. }
  69. ],
  70. scrollY: 300,
  71. deferRender: !0,
  72. scroller: !0,
  73. stateSave: !0,
  74. order: [
  75. [0, "asc"]
  76. ],
  77. lengthMenu: [
  78. [10, 15, 20, -1],
  79. [10, 15, 20, "All"]
  80. ],
  81. pageLength: 20,
  82. 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>>"
  83. });
  84. };
  85. return {
  86. init: function() {
  87. jQuery().dataTable && (e());
  88. }
  89. };
  90. }();
  91. jQuery(document).ready(function() {
  92. TableDatatablesScroller.init();
  93. });
  94. </script>
  95. @endpush