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.

136 lines
4.7 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}OpsGenie Integration for {{ site_name }}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1>OpsGenie</h1>
  8. <p><a href="https://www.opsgenie.com/">OpsGenie</a> provides
  9. alerting, on-call scheduling, escalation policies, and incident tracking.
  10. You can integrate it with your {{ site_name }} account in a few
  11. simple steps.</p>
  12. <h2>Setup Guide</h2>
  13. <div class="row ai-step">
  14. <div class="col-sm-6">
  15. <span class="step-no"></span>
  16. <p>
  17. Log into your OpsGenie account,
  18. select a team, and go to the team's
  19. <strong>Integrations › Add integration</strong> page.
  20. </p>
  21. </div>
  22. <div class="col-sm-6">
  23. <img
  24. class="ai-guide-screenshot"
  25. alt="Screenshot"
  26. src="{% static 'img/integrations/setup_opsgenie_1.png' %}">
  27. </div>
  28. </div>
  29. <div class="row ai-step">
  30. <div class="col-sm-6">
  31. <span class="step-no"></span>
  32. Select <strong>API</strong> in the grid of offered integration types.
  33. </div>
  34. <div class="col-sm-6">
  35. <img
  36. class="ai-guide-screenshot"
  37. alt="Screenshot"
  38. src="{% static 'img/integrations/setup_opsgenie_2.png' %}">
  39. </div>
  40. </div>
  41. <div class="row ai-step">
  42. <div class="col-sm-6">
  43. <span class="step-no"></span>
  44. <p>The integration needs a <strong>Create and Update Access</strong>
  45. permission, make sure it is <strong>checked</strong>.
  46. </p>The integration does not need the <strong>Read Access</strong> and
  47. <strong>Delete Access</strong> checkboxes – make sure they are
  48. <strong>unchecked</strong>.
  49. </p>
  50. <p>Give the integration a descriptive name,
  51. take note of its <strong>API Key</strong>, then save the integration.
  52. </p>
  53. </div>
  54. <div class="col-sm-6">
  55. <img
  56. class="ai-guide-screenshot"
  57. alt="Screenshot"
  58. src="{% static 'img/integrations/setup_opsgenie_3.png' %}">
  59. </div>
  60. </div>
  61. <div class="row ai-step">
  62. <div class="col-sm-6">
  63. <span class="step-no"></span>
  64. <p>Paste the API Key down below, and make sure the correct
  65. <strong>service region</strong> is selected.
  66. Save the integration, and you are done!
  67. </p>
  68. </div>
  69. </div>
  70. <h2>Integration Settings</h2>
  71. <form method="post" class="form-horizontal">
  72. {% csrf_token %}
  73. <div class="form-group {{ form.key.css_classes }}">
  74. <label for="api-key" class="col-sm-2 control-label">API Key</label>
  75. <div class="col-sm-4">
  76. <input
  77. id="api-key"
  78. type="text"
  79. class="form-control"
  80. name="key"
  81. placeholder=""
  82. value="{{ form.key.value|default:"" }}">
  83. {% if form.key.errors %}
  84. <div class="help-block">
  85. {{ form.key.errors|join:"" }}
  86. </div>
  87. {% endif %}
  88. </div>
  89. </div>
  90. <div class="form-group {{ form.region.css_classes }}">
  91. <label for="api-key" class="col-sm-2 control-label">Region</label>
  92. <div class="col-sm-4">
  93. <label class="radio-container">
  94. <input
  95. type="radio"
  96. name="region"
  97. value="us"
  98. {% if form.region.value == "us" %} checked {% endif %}>
  99. <span class="radiomark"></span>
  100. US (default)
  101. </label>
  102. <label class="radio-container">
  103. <input
  104. type="radio"
  105. name="region"
  106. value="eu"
  107. {% if form.region.value == "eu" %} checked {% endif %}>
  108. <span class="radiomark"></span>
  109. EU
  110. </label>
  111. {% if form.region.errors %}
  112. <div class="help-block">
  113. {{ form.region.errors|join:"" }}
  114. </div>
  115. {% endif %}
  116. </div>
  117. </div>
  118. <div class="form-group">
  119. <div class="col-sm-offset-2 col-sm-10">
  120. <button type="submit" class="btn btn-primary">Save Integration</button>
  121. </div>
  122. </div>
  123. </form>
  124. </div>
  125. </div>
  126. {% endblock %}