accesscontrol.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Access Control</title>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
  7. <link rel="stylesheet" href="../../script/semantic/semantic.min.css">
  8. <script type="text/javascript" src="../../script/jquery.min.js"></script>
  9. <script type="text/javascript" src="../../script/semantic/semantic.min.js"></script>
  10. <style>
  11. a.pageFocus {
  12. background: #222222;
  13. color: white !important;
  14. border-radius: 50%;
  15. -moz-border-radius: 50%;
  16. -webkit-border-radius: 50%;
  17. display: inline-block;
  18. font-weight: bold;
  19. line-height: 30px;
  20. margin-right: 2px;
  21. text-align: center;
  22. width: 30px;
  23. }
  24. .noselect {
  25. -webkit-touch-callout: none; /* iOS Safari */
  26. -webkit-user-select: none; /* Safari */
  27. -khtml-user-select: none; /* Konqueror HTML */
  28. -moz-user-select: none; /* Old versions of Firefox */
  29. -ms-user-select: none; /* Internet Explorer/Edge */
  30. user-select: none; /* Non-prefixed version, currently
  31. supported by Chrome, Edge, Opera and Firefox */
  32. }
  33. </style>
  34. </head>
  35. <body>
  36. <br>
  37. <div class="ui container" style="height: 100% !important;">
  38. <div>
  39. <h3 class="ui header">
  40. Access Control
  41. <div class="sub header">Manage IPs from accessing this host</div>
  42. </h3>
  43. <div class="ui divider"></div>
  44. <h3><i class="ui green checkmark icon"></i> Whitelist</h3>
  45. <div class="ui divider"></div>
  46. <h3><i class="ui red remove icon"></i> Blacklist</h3>
  47. <div class="ui black segment">
  48. <h4>Usage</h4>
  49. <p>Block certain IP or IP range from logging into the system. Syntax Examples:</p>
  50. <div class="ui bulleted list">
  51. <div class="item">192.168.1.100</div>
  52. <div class="item">123.36.53.100</div>
  53. <div class="item">192.168.0.100 - 192.168.0.250</div>
  54. </div>
  55. </div>
  56. <div class="ui toggle checkbox">
  57. <input type="checkbox" name="enableBlacklist">
  58. <label>Enable Blacklist Filtering</label>
  59. </div>
  60. <table class="ui celled table">
  61. <thead>
  62. <tr><th>IP Range</th>
  63. <th>Edit</th>
  64. <th>Remove</th>
  65. </tr></thead>
  66. <tbody id="blacklisttable">
  67. <tr>
  68. <td data-label="Name">James</td>
  69. <td data-label="Age">24</td>
  70. <td data-label="Job">Engineer</td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. <div class="ui divider"></div>
  75. <h3>Regional Block</h3>
  76. </div>
  77. <script>
  78. //Init
  79. initBlacklist();
  80. //Blacklist load
  81. function initBlacklist(){
  82. $.get("../../system/auth/blacklist/list", function(data){
  83. data.forEach(entry => {
  84. })
  85. if (data.length == 0){
  86. $("#blacklisttable").html(`<tr>
  87. <td colspan="3"><i class="remove icon"></i> No Banned IPs</td>
  88. </tr>`);
  89. }
  90. })
  91. }
  92. </script>
  93. </body>
  94. </html>