onlineIPMonitor.blade.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css" type="text/css" rel="stylesheet">
  4. @endsection
  5. @section('content')
  6. <div class="page-content container-fluid">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h3 class="panel-title">在线IP监控
  10. <small>实时</small>
  11. </h3>
  12. </div>
  13. <div class="panel-body">
  14. <div class="form-row">
  15. <div class="form-group col-lg-2 col-sm-2">
  16. <input type="number" class="form-control" name="id" id="id" value="{{Request::get('id')}}" placeholder="ID"/>
  17. </div>
  18. <div class="form-group col-lg-2 col-sm-5">
  19. <input type="text" class="form-control" name="email" id="email" value="{{Request::get('email')}}" placeholder="用户名"/>
  20. </div>
  21. <div class="form-group col-lg-2 col-sm-5">
  22. <input type="text" class="form-control" name="ip" id="ip" value="{{Request::get('ip')}}" placeholder="IP"/>
  23. </div>
  24. <div class="form-group col-lg-2 col-sm-3">
  25. <input type="number" class="form-control" name="port" id="port" value="{{Request::get('port')}}" placeholder="端口"/>
  26. </div>
  27. <div class="form-group col-lg-2 col-sm-5">
  28. <select name="nodeId" id="nodeId" class="form-control" onChange="Search()">
  29. <option value="" @if(Request::get('nodeId') == '') selected @endif hidden>选择节点</option>
  30. @foreach($nodeList as $node)
  31. <option value="{{$node->id}}" @if(Request::get('nodeId') == $node->id) selected @endif>{{$node->name}}</option>
  32. @endforeach
  33. </select>
  34. </div>
  35. <div class="form-group col-lg-2 col-sm-4 btn-group">
  36. <button class="btn btn-primary" onclick="Search()">搜 索</button>
  37. <a href="/admin/onlineIPMonitor" class="btn btn-danger">重 置</a>
  38. </div>
  39. </div>
  40. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  41. <thead class="thead-default">
  42. <tr>
  43. <th> #</th>
  44. <th> 时间</th>
  45. <th> 类型</th>
  46. <th> 节点</th>
  47. <th> 用户</th>
  48. <th> 地址</th>
  49. <th> IP</th>
  50. <th> 归属地</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. @foreach($list as $vo)
  55. <tr>
  56. <td>{{$vo->id}}</td>
  57. <td>{{$vo->created_at}}</td>
  58. <td>{{$vo->type}}</td>
  59. <td>{{$vo->node ? $vo->node->name : '【节点已删除】'}}</td>
  60. <td>{{$vo->user ? $vo->user->email : '【用户已删除】'}}</td>
  61. <td>{{$vo->user ? $vo->user->address : '【用户已删除】'}}</td>
  62. <td>
  63. @if (strpos($vo->ip, ',') == TRUE)
  64. @foreach (explode(',', $vo->ip) as $ip)
  65. <a href="https://www.ipip.net/ip/{{$ip}}.html" target="_blank">{{$ip}}</a>
  66. @endforeach
  67. @else
  68. <a href="https://www.ipip.net/ip/{{$vo->ip}}.html" target="_blank">{{$vo->ip}}</a>
  69. @endif
  70. </td>
  71. <td>{{strpos($vo->ip, ',') == TRUE? '':$vo->ipInfo}}</td>
  72. </tr>
  73. @endforeach
  74. </tbody>
  75. </table>
  76. </div>
  77. <div class="panel-footer">
  78. <div class="row">
  79. <div class="col-sm-4">
  80. 共 <code>{{$list->total()}}</code> 个账号
  81. </div>
  82. <div class="col-sm-8">
  83. <nav class="Page navigation float-right">
  84. {{$list->links()}}
  85. </nav>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. @endsection
  92. @section('script')
  93. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  94. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  95. <script src="/assets/custom/Plugin/clipboardjs/clipboard.min.js" type="text/javascript"></script>
  96. <script type="text/javascript">
  97. //回车检测
  98. $(document).on("keypress", "input", function (e) {
  99. if (e.which === 13) {
  100. Search();
  101. return false;
  102. }
  103. });
  104. // 搜索
  105. function Search() {
  106. window.location.href = '/admin/onlineIPMonitor?id=' + $("#id").val() + '&ip=' + $("#ip").val() + '&email=' + $("#email").val() + '&port=' + $("#port").val() + '&nodeId=' + $("#nodeId option:selected").val();
  107. }
  108. </script>
  109. @endsection