{% extends "base.html" %} {% load static %} {% block title %}{{ object.name }} - Channel Details{% endblock %} {% block content %}

Channel Details

{{ object.name }}
{{ object.get_channel_type_display }} {% if object.is_active %}Active{% else %}Inactive{% endif %} {{ object.get_health_status_display|default:"Unknown" }}
{% if object.description %} {% endif %}
Channel Type: {{ object.get_channel_type_display }}
Status:
{% if object.is_active %}Active{% else %}Inactive{% endif %}
Health Status: {{ object.get_health_status_display|default:"Unknown" }}
Priority: {{ object.get_priority_display|default:"Normal" }}
Created: {{ object.created_at|date:"M d, Y g:i A" }}
Last Updated: {{ object.updated_at|date:"M d, Y g:i A" }}
Last Health Check: {% if object.last_health_check %} {{ object.last_health_check|date:"M d, Y g:i A" }}
{{ object.last_health_check|timesince }} ago {% else %} Never {% endif %}
Rate Limit: {% if object.rate_limit %} {{ object.rate_limit }} messages/hour {% else %} No limit {% endif %}
Configuration:
{% if object.channel_type == 'EMAIL' %}
SMTP Server: {{ object.configuration.smtp_host|default:"Not configured" }}
Port: {{ object.configuration.smtp_port|default:"Not configured" }}
Security: {{ object.configuration.smtp_security|default:"None" }}
From Email: {{ object.configuration.from_email|default:"Not configured" }}
From Name: {{ object.configuration.from_name|default:"Not configured" }}
Authentication: {% if object.configuration.smtp_username %}Enabled{% else %}Disabled{% endif %}
{% elif object.channel_type == 'SMS' %}
Provider: {{ object.configuration.sms_provider|default:"Not configured" }}
API Endpoint: {{ object.configuration.api_endpoint|default:"Not configured" }}
From Number: {{ object.configuration.from_number|default:"Not configured" }}
API Key: {% if object.configuration.api_key %}Configured{% else %}Not configured{% endif %}
{% elif object.channel_type == 'WEBHOOK' %}
URL: {{ object.configuration.webhook_url|default:"Not configured" }}
Method: {{ object.configuration.http_method|default:"POST" }}
Content Type: {{ object.configuration.content_type|default:"application/json" }}
Authentication: {% if object.configuration.auth_header %}Enabled{% else %}Disabled{% endif %}
{% elif object.channel_type == 'SLACK' %}
Webhook URL: {% if object.configuration.slack_webhook %}Configured{% else %}Not configured{% endif %}
Channel: {{ object.configuration.slack_channel|default:"#general" }}
Username: {{ object.configuration.slack_username|default:"Hospital Bot" }}
Icon: {{ object.configuration.slack_icon|default:":hospital:" }}
{% else %}
{{ object.configuration|pprint }}
{% endif %}
{% if object.retry_attempts or object.retry_delay %}
Retry Configuration:
Max Attempts: {{ object.retry_attempts|default:0 }}
Retry Delay: {{ object.retry_delay|default:0 }} seconds
Backoff Strategy: {{ object.backoff_strategy|default:"Linear" }}
Max Delay: {{ object.max_retry_delay|default:"No limit" }}
{% endif %}
Performance Metrics

{{ object.message_count|default:0 }}

Total Messages

{{ object.success_rate|default:0 }}%

Success Rate

{{ object.avg_delivery_time|default:0 }}ms

Avg Delivery Time

{{ object.failed_count|default:0 }}

Failed Messages


Recent Messages
View All Logs
{% if recent_messages %}
{% for message in recent_messages %} {% endfor %}
Message Recipient Status Sent Delivery Time
{{ message.subject|default:message.content|truncatechars:40 }} {{ message.recipient|truncatechars:30 }} {{ message.get_status_display }} {{ message.sent_at|date:"M d, g:i A" }} {% if message.delivery_time %} {{ message.delivery_time }}ms {% else %} - {% endif %}
{% else %}
No recent messages

Messages sent through this channel will appear here

{% endif %}
Quick Actions
Edit Channel
{% if object.is_active %} {% else %} {% endif %}
Delete Channel
Channel Statistics
Messages Today: {{ object.messages_today|default:0 }}
Messages This Week: {{ object.messages_week|default:0 }}
Messages This Month: {{ object.messages_month|default:0 }}
Error Rate: {{ object.error_rate|default:0 }}%
Avg Response Time: {{ object.avg_response_time|default:0 }}ms
Uptime: {{ object.uptime_percentage|default:0 }}%
Health Status
{{ object.get_health_status_display|default:"Unknown" }}
{% if object.last_health_check %} Last checked {{ object.last_health_check|timesince }} ago {% else %} Never checked {% endif %}
{% if object.health_details %}
{{ object.health_details }}
{% endif %}
Configuration Summary
Type: {{ object.get_channel_type_display }}
Priority: {{ object.get_priority_display|default:"Normal" }}
Rate Limit: {% if object.rate_limit %} {{ object.rate_limit }}/hour {% else %} No limit {% endif %}
Retry Attempts: {{ object.retry_attempts|default:0 }}
Timeout: {{ object.timeout|default:30 }}s
{% endblock %} {% block js %} {% endblock %}