certificateList.blade.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. <h2 class="panel-title">域名证书列表<small>(V2Ray节点的伪装域名)</small></h2>
  10. <div class="panel-actions">
  11. <a href="/node/certificate/add" class="btn btn-primary">
  12. <i class="icon wb-plus" aria-hidden="true"></i>添加域名证书
  13. </a>
  14. </div>
  15. </div>
  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. <th> 域名</th>
  22. <th> KEY</th>
  23. <th> PEM</th>
  24. <th> 签发机构</th>
  25. <th> 签发日期</th>
  26. <th> 到期时间</th>
  27. <th> 操作</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. @foreach ($list as $vo)
  32. <tr>
  33. <td> {{$vo->id}} </td>
  34. <td> {{$vo->domain}} </td>
  35. <td> {{$vo->key ? '✔️' : '❌'}} </td>
  36. <td> {{$vo->pem ? '✔️' : '❌'}} </td>
  37. <td> {{$vo->issuer}} </td>
  38. <td> {{$vo->from}} </td>
  39. <td> {{$vo->to}} </td>
  40. <td>
  41. <div class="btn-group">
  42. <a href="/node/certificate/edit?id={{$vo->id}}" class="btn btn-primary">
  43. <i class="icon wb-edit" aria-hidden="true"></i>
  44. </a>
  45. <button onclick="delCertificate('{{$vo->id}}')" class="btn btn-danger">
  46. <i class="icon wb-trash" aria-hidden="true"></i>
  47. </button>
  48. </div>
  49. </td>
  50. </tr>
  51. @endforeach
  52. </tbody>
  53. </table>
  54. </div>
  55. <div class="panel-footer">
  56. <div class="row">
  57. <div class="col-sm-4">
  58. 共 <code>{{$list->total()}}</code> 个域名证书
  59. </div>
  60. <div class="col-sm-8">
  61. <nav class="Page navigation float-right">
  62. {{$list->links()}}
  63. </nav>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. @endsection
  70. @section('script')
  71. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  72. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  73. <script type="text/javascript">
  74. // 删除授权
  75. function delCertificate(id) {
  76. swal.fire({
  77. title: '提示',
  78. text: '确定删除该证书吗?',
  79. type: 'info',
  80. showCancelButton: true,
  81. cancelButtonText: '{{trans('home.ticket_close')}}',
  82. confirmButtonText: '{{trans('home.ticket_confirm')}}',
  83. }).then((result) => {
  84. if (result.value) {
  85. $.post("/node/certificate/delete", {_token: '{{csrf_token()}}', id: id}, function (ret) {
  86. if (ret.status === 'success') {
  87. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  88. .then(() => window.location.reload())
  89. } else {
  90. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  91. }
  92. });
  93. }
  94. });
  95. }
  96. </script>
  97. @endsection