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.

124 lines
4.1 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Add OpsGenie - {% 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 can integrate it with your {% site_name %} account in 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">1</span>
  16. <p>
  17. Log into your OpsGenie account,
  18. go to <strong>Settings &gt; Integration list</strong>,
  19. and add a new "API" integration.
  20. </p>
  21. <p>
  22. Give it a descriptive name, select its team, then
  23. save the integration.
  24. </p>
  25. </div>
  26. <div class="col-sm-6">
  27. <img
  28. class="ai-guide-screenshot"
  29. alt="Screenshot"
  30. src="{% static 'img/integrations/setup_opsgenie_1.png' %}">
  31. </div>
  32. </div>
  33. <div class="row ai-step">
  34. <div class="col-sm-6">
  35. <span class="step-no">2</span>
  36. After adding the new integration, take note of its
  37. <strong>API Key</strong>, a long string
  38. of letters and digits.
  39. </div>
  40. <div class="col-sm-6">
  41. <img
  42. class="ai-guide-screenshot"
  43. alt="Screenshot"
  44. src="{% static 'img/integrations/setup_opsgenie_2.png' %}">
  45. </div>
  46. </div>
  47. <div class="row ai-step">
  48. <div class="col-sm-6">
  49. <span class="step-no">3</span>
  50. <p>Paste the API Key down below, and make sure the correct
  51. <strong>service region</strong> is selected.
  52. Save the integration, and you are done!
  53. </p>
  54. </div>
  55. </div>
  56. <h2>Integration Settings</h2>
  57. <form method="post" class="form-horizontal" action="{% url 'hc-add-opsgenie' %}">
  58. {% csrf_token %}
  59. <div class="form-group {{ form.value.css_classes }}">
  60. <label for="api-key" class="col-sm-2 control-label">API Key</label>
  61. <div class="col-sm-4">
  62. <input
  63. id="api-key"
  64. type="text"
  65. class="form-control"
  66. name="key"
  67. placeholder=""
  68. value="{{ form.key.value|default:"" }}">
  69. {% if form.key.errors %}
  70. <div class="help-block">
  71. {{ form.key.errors|join:"" }}
  72. </div>
  73. {% endif %}
  74. </div>
  75. </div>
  76. <div class="form-group {{ form.region.css_classes }}">
  77. <label for="api-key" class="col-sm-2 control-label">Region</label>
  78. <div class="col-sm-4">
  79. <label class="radio-container">
  80. <input
  81. type="radio"
  82. name="region"
  83. value="us"
  84. {% if form.region.value == "us" %} checked {% endif %}>
  85. <span class="radiomark"></span>
  86. US (default)
  87. </label>
  88. <label class="radio-container">
  89. <input
  90. type="radio"
  91. name="region"
  92. value="eu"
  93. {% if form.region.value == "eu" %} checked {% endif %}>
  94. <span class="radiomark"></span>
  95. EU
  96. </label>
  97. {% if form.region.errors %}
  98. <div class="help-block">
  99. {{ form.region.errors|join:"" }}
  100. </div>
  101. {% endif %}
  102. </div>
  103. </div>
  104. <div class="form-group">
  105. <div class="col-sm-offset-2 col-sm-10">
  106. <button type="submit" class="btn btn-primary">Save Integration</button>
  107. </div>
  108. </div>
  109. </form>
  110. </div>
  111. </div>
  112. {% endblock %}