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.

93 lines
2.9 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>Integrations &gt; Add New Integrations</strong>,
  19. and add the "API" integration.
  20. </p>
  21. <p>
  22. Give it a descriptive name, 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. Save the integration, and
  51. you are done!</p>
  52. </div>
  53. </div>
  54. <h2>Integration Settings</h2>
  55. <form method="post" class="form-horizontal" action="{% url 'hc-add-opsgenie' %}">
  56. {% csrf_token %}
  57. <div class="form-group {{ form.value.css_classes }}">
  58. <label for="api-key" class="col-sm-2 control-label">API Key</label>
  59. <div class="col-sm-4">
  60. <input
  61. id="api-key"
  62. type="text"
  63. class="form-control"
  64. name="value"
  65. placeholder=""
  66. value="{{ form.value.value|default:"" }}">
  67. {% if form.value.errors %}
  68. <div class="help-block">
  69. {{ form.value.errors|join:"" }}
  70. </div>
  71. {% endif %}
  72. </div>
  73. </div>
  74. <div class="form-group">
  75. <div class="col-sm-offset-2 col-sm-10">
  76. <button type="submit" class="btn btn-primary">Save Integration</button>
  77. </div>
  78. </div>
  79. </form>
  80. </div>
  81. </div>
  82. {% endblock %}