index.blade.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. @extends('admin.public.layout')
  2. @section('title')日志管理@endsection
  3. @section('content')
  4. <section class="content-header">
  5. <h1>
  6. 日志管理
  7. <small>管理后台日志</small>
  8. </h1>
  9. </section>
  10. <section class="content">
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <div class="box">
  14. <div class="box-header">
  15. <div class="row">
  16. <div class="col-xs-2">
  17. <div class="btn-group">
  18. {{--<button class="btn btn-default btn-sm" data-toggle="tooltip" title="删除选中项" onclick="confirm_submit('item_form','{{ route('admin.article.destroy') }}','确认删除选中项?')"><i class="fa fa-trash-o"></i></button>--}}
  19. </div>
  20. </div>
  21. <div class="col-xs-10">
  22. <div class="row">
  23. <form name="searchForm" action="{{ route('admin.operationLog.index') }}" method="GET">
  24. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  25. <div class="col-xs-3">
  26. <input type="text" name="date_range" id="date_range" class="form-control" placeholder="时间范围" value="{{ $filter['date_range'] or '' }}" />
  27. </div>
  28. <div class="col-xs-2">
  29. <input type="text" class="form-control" name="user_id" placeholder="UID" value="{{ $filter['user_id'] or '' }}"/>
  30. </div>
  31. <div class="col-xs-2">
  32. <input type="text" class="form-control" name="word" placeholder="路由关键词" value="{{ $filter['word'] or '' }}"/>
  33. </div>
  34. <div class="col-xs-1">
  35. <button type="submit" class="btn btn-primary">搜索</button>
  36. </div>
  37. </form>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="box-body no-padding">
  43. <form name="itemForm" id="item_form" method="POST">
  44. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  45. <div class="table-responsive">
  46. <table class="table table-striped">
  47. <tr>
  48. {{--<th><input type="checkbox" class="checkbox-toggle" /></th>--}}
  49. <th>ID</th>
  50. <th>UID</th>
  51. <th>请求路由</th>
  52. <th>请求方式</th>
  53. <th>IP</th>
  54. <th>操作数据</th>
  55. <th>时间</th>
  56. </tr>
  57. @foreach($operations as $operation)
  58. <tr>
  59. {{--<td><input type="checkbox" name="id[]" value="{{ $article->id }}"/></td>--}}
  60. <td>{{ $operation->id }}</td>
  61. <td> @if($operation->user) {{ $operation->user->name }} @else 未知 @endif [uid:{{ $operation->id }}]</td>
  62. <td>{{ $operation->action }}</td>
  63. <td>{{ $operation->method }}</td>
  64. <td>{{ $operation->ip }}</td>
  65. <td width="40%" style="height:80px;">
  66. <div style= "OVERFLOW-Y:auto;height:80px;word-break: break-all">{!! $operation->data !!}</div>
  67. </td>
  68. <td>{{ $operation->created_at }}</td>
  69. </tr>
  70. @endforeach
  71. </table>
  72. </div>
  73. </form>
  74. </div>
  75. <div class="box-footer clearfix">
  76. <div class="row">
  77. <div class="col-sm-3">
  78. <div class="btn-group">
  79. {{--<button class="btn btn-default btn-sm" data-toggle="tooltip" title="删除选中项" onclick="confirm_submit('item_form','{{ route('admin.article.destroy') }}','确认删除选中项?')"><i class="fa fa-trash-o"></i></button>--}}
  80. </div>
  81. </div>
  82. <div class="col-sm-9">
  83. <div class="text-right">
  84. <span class="total-num">共 {{ $operations->total() }} 条数据</span>
  85. {!! str_replace('/?', '?', $operations->appends($filter)->links()) !!}
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </section>
  94. @endsection
  95. @section('script')
  96. <script type="text/javascript">
  97. set_active_menu('global',"{{ route('admin.operationLog.index') }}");
  98. </script>
  99. @endsection