userOnlineIP.blade.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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-fluid">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h3 class="panel-title">
  10. {!! trans('admin.logs.user_ip.title') !!}
  11. </h3>
  12. </div>
  13. <div class="panel-body">
  14. <form class="form-row">
  15. <div class="form-group col-lg-1 col-sm-4">
  16. <input class="form-control" name="id" type="number" value="{{ Request::query('id') }}" placeholder="{{ trans('model.user.id') }}" />
  17. </div>
  18. <div class="form-group col-lg-3 col-sm-8">
  19. <input class="form-control" name="username" type="text" value="{{ Request::query('username') }}"
  20. placeholder="{{ trans('common.account') }}" />
  21. </div>
  22. <div class="form-group col-lg-2 col-sm-6">
  23. <input class="form-control" name="wechat" type="text" value="{{ Request::query('wechat') }}"
  24. placeholder="{{ trans('model.user.wechat') }}" />
  25. </div>
  26. <div class="form-group col-lg-2 col-sm-6">
  27. <input class="form-control" name="qq" type="number" value="{{ Request::query('qq') }}" placeholder="{{ trans('model.user.qq') }}" />
  28. </div>
  29. <div class="form-group col-lg-1 col-sm-6">
  30. <input class="form-control" name="port" type="number" value="{{ Request::query('port') }}"
  31. placeholder="{{ trans('model.user.port') }}" />
  32. </div>
  33. <div class="form-group col-lg-2 col-sm-6 btn-group">
  34. <button class="btn btn-primary" type="submit">{{ trans('common.search') }}</button>
  35. <a class="btn btn-danger" href="{{ route('admin.log.ip') }}">{{ trans('common.reset') }}</a>
  36. </div>
  37. </form>
  38. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  39. <thead class="thead-default">
  40. <tr>
  41. <th> #</th>
  42. <th> {{ trans('common.account') }}</th>
  43. <th> {{ trans('model.user.port') }}</th>
  44. <th> {{ trans('model.user.account_status') }}</th>
  45. <th> {{ trans('model.user.proxy_status') }}</th>
  46. <th> {{ trans('admin.logs.user_ip.connect') }}</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. @foreach ($userList as $user)
  51. <tr>
  52. <td> {{ $user->id }} </td>
  53. <td> {{ $user->username }} </td>
  54. <td> {{ $user->port }} </td>
  55. <td>
  56. @if ($user->status > 0)
  57. <span class="badge badge-lg badge-success">{{ trans('common.status.normal') }}</span>
  58. @elseif ($user->status < 0)
  59. <span class="badge badge-lg badge-danger">{{ trans('common.status.banned') }}</span>
  60. @else
  61. <span class="badge badge-lg badge-default">{{ trans('common.status.inactive') }}</span>
  62. @endif
  63. </td>
  64. <td>
  65. @if ($user->enable)
  66. <span class="badge badge-lg badge-success">{{ trans('common.status.enabled') }}</span>
  67. @else
  68. <span class="badge badge-lg badge-danger">{{ trans('common.status.banned') }}</span>
  69. @endif
  70. </td>
  71. <td>
  72. @if ($user->onlineIPList->isNotEmpty())
  73. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  74. <thead>
  75. <tr>
  76. <th> {{ trans('model.node.attribute') }}</th>
  77. <th> {{ trans('model.ip.network_type') }}</th>
  78. <th> IP</th>
  79. <th> {{ trans('validation.attributes.time') }}</th>
  80. </tr>
  81. </thead>
  82. <tbody>
  83. @foreach ($user->onlineIPList as $log)
  84. <tr>
  85. <td>{{ $log->node->name ?? '【' . trans('common.deleted_item', ['attribute' => trans('model.node.attribute')]) . '】' }}
  86. </td>
  87. <td>{{ $log->type }}</td>
  88. <td>
  89. <a href="https://db-ip.com/{{ $log->ip }}" target="_blank">{{ $log->ip }}</a>
  90. </td>
  91. <td>{{ date('Y-m-d H:i:s', $log->created_at) }}</td>
  92. </tr>
  93. @endforeach
  94. </tbody>
  95. </table>
  96. @endif
  97. </td>
  98. </tr>
  99. @endforeach
  100. </tbody>
  101. </table>
  102. </div>
  103. <div class="panel-footer">
  104. <div class="row">
  105. <div class="col-sm-4">
  106. {!! trans('admin.logs.counts', ['num' => $userList->total()]) !!}
  107. </div>
  108. <div class="col-sm-8">
  109. <nav class="Page navigation float-right">
  110. {{ $userList->links() }}
  111. </nav>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. @endsection
  118. @section('javascript')
  119. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js"></script>
  120. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
  121. @endsection