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.

138 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>
  47. <p>
  48. The integration does not need the <strong>Read Access</strong> and
  49. <strong>Delete Access</strong> checkboxes – make sure they are
  50. <strong>unchecked</strong>.
  51. </p>
  52. <p>Give the integration a descriptive name,
  53. take note of its <strong>API Key</strong>, then save the integration.
  54. </p>
  55. </div>
  56. <div class="col-sm-6">
  57. <img
  58. class="ai-guide-screenshot"
  59. alt="Screenshot"
  60. src="{% static 'img/integrations/setup_opsgenie_3.png' %}">
  61. </div>
  62. </div>
  63. <div class="row ai-step">
  64. <div class="col-sm-6">
  65. <span class="step-no"></span>
  66. <p>Paste the API Key down below, and make sure the correct
  67. <strong>service region</strong> is selected.
  68. Save the integration, and you are done!
  69. </p>
  70. </div>
  71. </div>
  72. <h2>Integration Settings</h2>
  73. <form method="post" class="form-horizontal">
  74. {% csrf_token %}
  75. <div class="form-group {{ form.key.css_classes }}">
  76. <label for="api-key" class="col-sm-2 control-label">API Key</label>
  77. <div class="col-sm-4">
  78. <input
  79. id="api-key"
  80. type="text"
  81. class="form-control"
  82. name="key"
  83. placeholder=""
  84. value="{{ form.key.value|default:"" }}">
  85. {% if form.key.errors %}
  86. <div class="help-block">
  87. {{ form.key.errors|join:"" }}
  88. </div>
  89. {% endif %}
  90. </div>
  91. </div>
  92. <div class="form-group {{ form.region.css_classes }}">
  93. <label for="api-key" class="col-sm-2 control-label">Region</label>
  94. <div class="col-sm-4">
  95. <label class="radio-container">
  96. <input
  97. type="radio"
  98. name="region"
  99. value="us"
  100. {% if form.region.value == "us" %} checked {% endif %}>
  101. <span class="radiomark"></span>
  102. US (default)
  103. </label>
  104. <label class="radio-container">
  105. <input
  106. type="radio"
  107. name="region"
  108. value="eu"
  109. {% if form.region.value == "eu" %} checked {% endif %}>
  110. <span class="radiomark"></span>
  111. EU
  112. </label>
  113. {% if form.region.errors %}
  114. <div class="help-block">
  115. {{ form.region.errors|join:"" }}
  116. </div>
  117. {% endif %}
  118. </div>
  119. </div>
  120. <div class="form-group">
  121. <div class="col-sm-offset-2 col-sm-10">
  122. <button type="submit" class="btn btn-primary">Save Integration</button>
  123. </div>
  124. </div>
  125. </form>
  126. </div>
  127. </div>
  128. {% endblock %}