{% extends "horizon/common/_modal_form.html" %}
{% load i18n %}
{% load url from future %}

{% block form_id %}create_alarm_form{% endblock %}
{% block form_action %}{{ action_url }}{% endblock %}

{% block modal-header %}{% trans "Create Alarm Definition" %}{% endblock %}

{% block modal-body %}
    <h3>{% trans "Description" %}:</h3>
    <p>{% blocktrans %}
      The Name field is used to identify the alarm definition.
    {% endblocktrans %}</p>
    <p>{% blocktrans %}
      The Expression field  which if true, triggers a notification to be sent.
    {% endblocktrans %}</p>
    <p>{% blocktrans %}
      The Notifications field contains the list of Notifications that should be sent when transitioning to another ALARM state.
    {% endblocktrans %}</p>
    <fieldset>
    {% include "horizon/common/_form_fields.html" %}
    </fieldset>

<script type="text/javascript">
metricsList = {{ metrics | safe }}
</script>
<link href='{{ STATIC_URL }}/monitoring/css/ng-tags-input.css' type="text/css" rel="stylesheet"/>
<link href='{{ STATIC_URL }}/monitoring/css/alarm-create.css' type="text/css" rel="stylesheet"/>
{% endblock %}

{% block modal-footer %}
  <input class="btn btn-primary pull-right"
         type="submit"
         value="{% trans 'Create Alarm Definition' %}" />
  <a href="{{ cancel_url }}"
     class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}
