You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.0 KiB

  1. <?php $this->layout('layout-loggedin', ['title' => $title, 'accounts' => $accounts, 'user' => $user]); ?>
  2. <div class="ui main text container" style="margin-top: 80px;">
  3. <h2>Webmention Request</h2>
  4. <table class="ui table single line"><tbody>
  5. <tr>
  6. <td><b>Status</b></td>
  7. <td>
  8. <i class="circular inverted <?= $icon ?> icon"></i>
  9. <?= ucfirst($status) ?>
  10. </td>
  11. </tr>
  12. <tr>
  13. <td><b>Date</b></td>
  14. <td><?= date('M j, g:ia', strtotime($webmention->created_at)) ?></td>
  15. </tr>
  16. <tr>
  17. <td><b>Source</b></td>
  18. <td><a href="<?= $this->e($webmention->source) ?>"><?= $this->e($webmention->source) ?></a></td>
  19. </tr>
  20. <tr>
  21. <td><b>Target</b></td>
  22. <td><a href="<?= $this->e($webmention->target) ?>"><?= $this->e($webmention->target) ?></a></td>
  23. </tr>
  24. <? if($webmention->vouch): ?>
  25. <tr>
  26. <td><b>Vouch</b></td>
  27. <td><a href="<?= $this->e($webmention->vouch) ?>"><?= $this->e($webmention->vouch) ?></a></td>
  28. </tr>
  29. <? endif; ?>
  30. <? if($webmention->callback): ?>
  31. <tr>
  32. <td><b>Callback URL</b></td>
  33. <td><?= $this->e($webmention->callback) ?></td>
  34. </tr>
  35. <? endif; ?>
  36. </tbody></table>
  37. <h2>Details</h2>
  38. <? if(count($statuses) == 0): ?>
  39. <p>The request is queued for processing. Check for updates again later.</p>
  40. <? else: ?>
  41. <table class="ui table single line"><tbody>
  42. <? if($webmention->webmention_endpoint): ?>
  43. <tr>
  44. <td><b>Webmention Endpoint</b></td>
  45. <td><?= $this->e($webmention->webmention_endpoint) ?></td>
  46. </tr>
  47. <? endif; ?>
  48. <? if($webmention->pingback_endpoint): ?>
  49. <tr>
  50. <td><b>Pingback Endpoint</b></td>
  51. <td><?= $this->e($webmention->pingback_endpoint) ?></td>
  52. </tr>
  53. <? endif; ?>
  54. <? if($webmention->webmention_endpoint == false && $webmention->pingback_endpoint == false): ?>
  55. <tr>
  56. <td><b>Webmention Endpoint</b></td>
  57. <td>No webmention endpoint was discovered for this target</td>
  58. </tr>
  59. <? endif; ?>
  60. <? if($webmention->webmention_endpoint): ?>
  61. <tr>
  62. <td><b>Status URL</b></td>
  63. <td><?= $webmention->webmention_status_url ? $this->e($webmention->webmention_status_url) : 'The webmention endpoint did not return a status URL' ?></td>
  64. </tr>
  65. <? endif; ?>
  66. </tbody></table>
  67. <h2>Logs</h2>
  68. <table class="ui very compact table single line">
  69. <thead>
  70. <tr>
  71. <th>Date</th>
  72. <th>Status</th>
  73. <th>HTTP Code</th>
  74. </tr>
  75. </thead>
  76. <tbody>
  77. <? foreach($statuses as $status): ?>
  78. <tr>
  79. <td><?= date('M j, g:ia', strtotime($status->created_at)) ?></td>
  80. <td><?= $status->status ?></td>
  81. <td><?= $status->http_code ?></td>
  82. </tr>
  83. <tr>
  84. <td colspan="3">
  85. <pre style="font-size: 10px;"><?= $this->e($status->raw_response) ?></pre>
  86. </td>
  87. </tr>
  88. <? endforeach; ?>
  89. </tbody>
  90. </table>
  91. <? endif; ?>
  92. </div>