item.ejs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <td class="text-center">
  2. <div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
  3. <span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
  4. </div>
  5. </td>
  6. <td>
  7. <div class="wrap">
  8. <% domain_names.map(function(host) {
  9. if (host.indexOf('*') === -1) {
  10. %>
  11. <span class="tag host-link hover-green" rel="http<%- certificate_id ? 's' : '' %>://<%- host %>"><%- host %></span>
  12. <%
  13. } else {
  14. %>
  15. <span class="tag"><%- host %></span>
  16. <%
  17. }
  18. });
  19. %>
  20. </div>
  21. <div class="small text-muted">
  22. <%- i18n('str', 'created-on', {date: formatDbDate(created_on, 'Do MMMM YYYY')}) %>
  23. </div>
  24. </td>
  25. <td>
  26. <div class="text-monospace"><%- forward_scheme %>://<%- forward_host %>:<%- forward_port %></div>
  27. </td>
  28. <td>
  29. <div><%- certificate && certificate_id ? i18n('ssl', certificate.provider) : i18n('ssl', 'none') %></div>
  30. </td>
  31. <td>
  32. <div><%- access_list_id ? access_list.name : i18n('str', 'public') %></div>
  33. </td>
  34. <td>
  35. <%
  36. var o = isOnline();
  37. if (!enabled) { %>
  38. <span class="status-icon bg-warning"></span> <%- i18n('str', 'disabled') %>
  39. <% } else if (o === true) { %>
  40. <span class="status-icon bg-success"></span> <%- i18n('str', 'online') %>
  41. <% } else if (o === false) { %>
  42. <span title="<%- getOfflineError() %>"><span class="status-icon bg-danger"></span> <%- i18n('str', 'offline') %></span>
  43. <% } else { %>
  44. <span class="status-icon bg-warning"></span> <%- i18n('str', 'unknown') %>
  45. <% } %>
  46. </td>
  47. <% if (canManage) { %>
  48. <td class="text-right">
  49. <div class="item-action dropdown">
  50. <a href="#" data-toggle="dropdown" class="icon"><i class="fe fe-more-vertical"></i></a>
  51. <div class="dropdown-menu dropdown-menu-right">
  52. <span class="dropdown-header"><%- i18n('audit-log', 'proxy-host') %> #<%- id %></span>
  53. <a href="#" class="edit dropdown-item"><i class="dropdown-icon fe fe-edit"></i> <%- i18n('str', 'edit') %></a>
  54. <a href="#" class="able dropdown-item"><i class="dropdown-icon fe fe-power"></i> <%- i18n('str', enabled ? 'disable' : 'enable') %></a>
  55. <div class="dropdown-divider"></div>
  56. <a href="#" class="delete dropdown-item"><i class="dropdown-icon fe fe-trash-2"></i> <%- i18n('str', 'delete') %></a>
  57. </div>
  58. </div>
  59. </td>
  60. <% } %>