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.

71 lines
3.3 KiB

10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="body" class="container">
  6. {{template "repo/setting_nav" .}}
  7. <div id="repo-setting-container" class="col-md-10">
  8. {{template "base/alert" .}}
  9. <form id="repo-hooks-edit-form" action="{{.RepoLink}}/settings/hooks/{{.Webhook.Id}}" method="post">
  10. {{.CsrfTokenHtml}}
  11. <div class="panel panel-default">
  12. <div class="panel-heading">
  13. Manage Webhook
  14. </div>
  15. <div class="panel-body">
  16. <div class="col-md-7">
  17. <p>We’ll send a POST request to the URL below with details of any subscribed events.</p>
  18. <hr/>
  19. <div class="form-group">
  20. <label for="payload-url">Payload URL</label>
  21. <input id="payload-url" name="url" class="form-control" type="url" required="required" value="{{.Webhook.Url}}" />
  22. </div>
  23. <div class="form-group">
  24. <label for="payload-version">Content type</label>
  25. <select id="content-type" name="content_type" class="form-control">
  26. <option value="1">application/json</option>
  27. </select>
  28. </div>
  29. <div class="form-group">
  30. <label for="payload-secret">Secret</label>
  31. <input id="payload-secret" name="secret" class="form-control" type="text" value="{{.Webhook.Secret}}" />
  32. </div>
  33. <hr/>
  34. <div class="form-group">
  35. <label>Which events would you like to trigger this webhook?</label>
  36. <div class="radio">
  37. <label>
  38. <input class="form-control" name="push_only" type="radio" {{if .Webhook.HookEvent.PushOnly}}checked {{end}}name="trigger"/> Just the <i>push</i> event.
  39. </label>
  40. </div>
  41. </div>
  42. <hr/>
  43. <div class="form-group">
  44. <label>
  45. <input type="checkbox" name="active" {{if .Webhook.IsActive}}checked{{end}}/>&nbsp;&nbsp;Active
  46. </label>
  47. <p class="help-block">We will deliver event details when this hook is triggered.</p>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="panel-footer">
  52. <button class="btn btn-primary">Update Webhook</button>&nbsp;&nbsp;
  53. <a type="button" href="{{.RepoLink}}/settings/hooks?remove={{.Webhook.Id}}" class="btn btn-danger">Delete Webhook</a>
  54. </div>
  55. </div>
  56. </form>
  57. <div class="panel panel-default">
  58. <div class="panel-heading">
  59. <h3 class="panel-title">Recent Deliveries</h3>
  60. </div>
  61. <div class="panel-body">
  62. Coming soon
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. {{template "base/footer" .}}