131 lines
6.1 KiB
HTML
131 lines
6.1 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n static %}
|
|
|
|
{% block title %}{% trans "NPHIES Messages" %} - {{ block.super }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container-fluid">
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h1 class="h3 mb-0">
|
|
<i class="fa fa-exchange-alt me-2"></i>{% trans "NPHIES Messages" %}
|
|
</h1>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Filters -->
|
|
<div class="card mb-3">
|
|
<div class="card-body">
|
|
<form method="get" class="row g-3">
|
|
<div class="col-md-3">
|
|
<label class="form-label">{% trans "Direction" %}</label>
|
|
<select name="direction" class="form-select">
|
|
<option value="">{% trans "All Directions" %}</option>
|
|
{% for value, label in directions %}
|
|
<option value="{{ value }}" {% if request.GET.direction == value %}selected{% endif %}>{{ label }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label class="form-label">{% trans "Resource Type" %}</label>
|
|
<select name="resource_type" class="form-select">
|
|
<option value="">{% trans "All Types" %}</option>
|
|
{% for value, label in resource_types %}
|
|
<option value="{{ value }}" {% if request.GET.resource_type == value %}selected{% endif %}>{{ label }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label class="form-label">{% trans "Status" %}</label>
|
|
<select name="status" class="form-select">
|
|
<option value="">{% trans "All Statuses" %}</option>
|
|
{% for value, label in statuses %}
|
|
<option value="{{ value }}" {% if request.GET.status == value %}selected{% endif %}>{{ label }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="col-md-3 d-flex align-items-end">
|
|
<button type="submit" class="btn btn-primary me-2">
|
|
<i class="fa fa-filter me-1"></i>{% trans "Filter" %}
|
|
</button>
|
|
<a href="{% url 'integrations:nphies-message-list' %}" class="btn btn-secondary">
|
|
<i class="fa fa-times me-1"></i>{% trans "Clear" %}
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
{% if messages %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Direction" %}</th>
|
|
<th>{% trans "Resource Type" %}</th>
|
|
<th>{% trans "Status" %}</th>
|
|
<th>{% trans "Correlation ID" %}</th>
|
|
<th>{% trans "Created At" %}</th>
|
|
<th>{% trans "Sent At" %}</th>
|
|
<th>{% trans "Actions" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for message in messages %}
|
|
<tr>
|
|
<td>
|
|
{% if message.direction == 'OUTBOUND' %}
|
|
<span class="badge bg-primary">
|
|
<i class="fa fa-arrow-up me-1"></i>{{ message.get_direction_display }}
|
|
</span>
|
|
{% else %}
|
|
<span class="badge bg-success">
|
|
<i class="fa fa-arrow-down me-1"></i>{{ message.get_direction_display }}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ message.get_resource_type_display }}</td>
|
|
<td>
|
|
{% if message.status == 'QUEUED' %}
|
|
<span class="badge bg-secondary">{{ message.get_status_display }}</span>
|
|
{% elif message.status == 'SENT' %}
|
|
<span class="badge bg-info">{{ message.get_status_display }}</span>
|
|
{% elif message.status == 'ACK' %}
|
|
<span class="badge bg-success">{{ message.get_status_display }}</span>
|
|
{% else %}
|
|
<span class="badge bg-danger">{{ message.get_status_display }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<small class="font-monospace">{{ message.correlation_id|default:"—" }}</small>
|
|
</td>
|
|
<td>{{ message.created_at|date:"Y-m-d H:i" }}</td>
|
|
<td>{{ message.sent_at|date:"Y-m-d H:i"|default:"—" }}</td>
|
|
<td>
|
|
<a href="{% url 'integrations:nphies-message-detail' message.pk %}" class="btn btn-sm btn-outline-primary">
|
|
<i class="fa fa-eye"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% if is_paginated %}
|
|
{% include "includes/pagination_unified.html" %}
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<div class="text-center py-5">
|
|
<i class="fa fa-exchange-alt fa-3x text-muted mb-3"></i>
|
|
<p class="text-muted">{% trans "No NPHIES messages found." %}</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
{% endblock %}
|