1
0

subd.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <div class="standardContainer">
  2. <div class="ui basic segment">
  3. <h2>Subdomain</h2>
  4. <p>Subdomains are a way to organize and identify different sections of a website or domain. They are essentially a prefix to the main domain name, separated by a dot. <br>For example, in the domain "blog.example.com," "blog" is the subdomain.</p>
  5. </div>
  6. <table class="ui celled sortable unstackable compact table">
  7. <thead>
  8. <tr>
  9. <th>Matching Domain</th>
  10. <th>Proxy To</th>
  11. <th class="no-sort">Remove</th>
  12. </tr>
  13. </thead>
  14. <tbody id="subdList">
  15. </tbody>
  16. </table>
  17. <button class="ui icon right floated basic button" onclick="listSubd();"><i class="green refresh icon"></i> Refresh</button>
  18. <br><br>
  19. </div>
  20. <script>
  21. listSubd();
  22. function listSubd(){
  23. $("#subdList").html(``);
  24. $.get("/api/proxy/list?type=subd", function(data){
  25. if (data.error !== undefined){
  26. $("#subdList").append(`<tr>
  27. <td data-label="" colspan="3"><i class="remove icon"></i> ${data.error}</td>
  28. </tr>`);
  29. }else if (data.length == 0){
  30. $("#subdList").append(`<tr>
  31. <td data-label="" colspan="3"><i class="checkmark icon"></i> No Subdomain Proxy Record</td>
  32. </tr>`);
  33. }else{
  34. data.forEach(subd => {
  35. let tlsIcon = "";
  36. if (subd.RequireTLS){
  37. tlsIcon = `<i class="lock icon"></i>`;
  38. }
  39. $("#subdList").append(`<tr>
  40. <td data-label="">${subd.MatchingDomain}</td>
  41. <td data-label="">${subd.Domain} ${tlsIcon}</td>
  42. <td class="center aligned" data-label=""><button class="ui circular mini red basic icon button" onclick='deleteEndpoint("subd","${subd.MatchingDomain}")'><i class="trash icon"></i></button></td>
  43. </tr>`);
  44. });
  45. }
  46. });
  47. }
  48. </script>