{% extends "base.html" %}

{% block content %}
<h1>Endpoints</h1>
<ul>
  <li>POST <code>/reports</code> - Create a new report</li>
  <li>GET <code>/reports</code> - Get a list of all reports</li>
  <li>GET <code>/reports/:report_id</code> - Get report with id <code>report_id</code></li>
  <li>GET <code>/services</code> - Get an overview of the services
</ul>
<h1>Services</h1>
{% for name, service in services.items() %}
<h2>{{name}}</h2>
{{service.description}}
<ul>
  <li><strong>Group:</strong>{{service.group}}</li>
  <li><strong>Keywords:</strong>{{', '.join(service.keywords)}}</li>
  <li><strong>Protocol Type:</strong>{{service.protocol_type}}</li>
  <li><strong>Service Code:</strong>{{service.service_code}}</li>
  <li><strong>Service Name:</strong>{{service.service_name}}</li>
</ul>
Fields:
<ul>
  {% for field, attrs in service.fields.items() %}
  <li><strong>{{field}}:</strong>{{attrs['type']}}{% if attrs['required'] %} <i>required</i>{% endif %}</li>
  {% endfor %}
</ul>
{% endfor %}
</li>
{% endblock %}

{% extends "base.html" %}

{% block content %}
<h1>Endpoints</h1>
<ul>
  <li>POST <code>/reports</code> - Create a new report</li>
  <li>GET <code>/reports</code> - Get a list of all reports</li>
  <li>GET <code>/reports/:report_id</code> - Get report with id <code>report_id</code></li>
  <li>GET <code>/services</code> - Get an overview of the services
</ul>
<h1>Services</h1>
{% for name, service in services.items() %}
<h2>{{name}}</h2>
{{service.description}}
<ul>
  <li><strong>Group:</strong>{{service.group}}</li>
  <li><strong>Keywords:</strong>{{', '.join(service.keywords)}}</li>
  <li><strong>Protocol Type:</strong>{{service.protocol_type}}</li>
  <li><strong>Service Code:</strong>{{service.service_code}}</li>
  <li><strong>Service Name:</strong>{{service.service_name}}</li>
</ul>
Fields:
<ul>
  {% for field, attrs in service.fields.items() %}
  <li><strong>{{field}}:</strong>{{attrs['type']}}{% if attrs['required'] %} <i>required</i>{% endif %}</li>
  {% endfor %}
</ul>
<a href="/reports/add?service_code={{service.service_code}}" class="btn btn-primary">Submit a new report</a>
{% endfor %}
</li>
{% endblock %}

Add link for submitting new report
Add link for submitting new report
