DomainExpiration/app/templates/client_detail_print.html

186 lines
5.2 KiB
HTML

{% extends "base.html" %}
{% block title %}Print - {{ client.name }}{% endblock %}
{% block content %}
<div class="container">
<div class="text-center">
<h1 class="display-4">{{ client.name }}</h1>
</div>
<!-- Details Section -->
<div class="mt-4">
<div class="text-center">
<ul class="list-unstyled">
{% if client.phone %}
<li><strong>Phone:</strong> {{ client.phone }}</li>
{% endif %}
{% if client.address %}
<li><strong>Address:</strong> {{ client.address }}</li>
{% endif %}
{% if client.ip_address %}
<li><strong>IP Address:</strong> {{ client.ip_address }}</li>
{% endif %}
{% if client.subnet_mask %}
<li><strong>Subnet Mask:</strong> {{ client.subnet_mask }}</li>
{% endif %}
{% if client.gateway %}
<li><strong>Gateway:</strong> {{ client.gateway }}</li>
{% endif %}
</ul>
{% if client.phone is none and client.address is none and client.ip_address is none and client.subnet_mask is none and client.gateway is none %}
<p>No details available.</p>
{% endif %}
</div>
</div>
<hr>
<!-- Remote Section -->
<div class="mt-4">
<h2>Remote</h2>
{% for category, remotes in remotes_by_category.items() %}
{% if remotes|length > 0 %}
<h3 class="mt-3">{{ category }}</h3>
<table class="table table-bordered table-hover">
<thead class="thead-light">
{% if category == 'RDP' %}
<tr>
<th>Name</th>
<th>IP Address</th>
<th>Port</th>
</tr>
{% elif category == 'SSL-VPN' %}
<tr>
<th>IP Address</th>
<th>Port</th>
</tr>
{% elif category == 'VPN' %}
<tr>
<th>IP Address</th>
<th>PSK</th>
</tr>
{% elif category == 'MGMT' %}
<tr>
<th>Name</th>
<th>Address</th>
</tr>
{% else %}
<tr>
<th>Details</th>
</tr>
{% endif %}
</thead>
<tbody>
{% for remote in remotes %}
<tr>
{% if category == 'RDP' %}
<td>{{ remote.name }}</td>
<td>{{ remote.ip_address }}</td>
<td>{{ remote.port }}</td>
{% elif category == 'SSL-VPN' %}
<td>{{ remote.ip_address }}</td>
<td>{{ remote.port }}</td>
{% elif category == 'VPN' %}
<td>{{ remote.ip_address }}</td>
<td>{{ remote.psk }}</td>
{% elif category == 'MGMT' %}
<td>{{ remote.name }}</td>
<td><a href="{{ remote.address }}" target="_blank">{{ remote.address }}</a></td>
{% else %}
<td>{{ remote.details }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endfor %}
</div>
<hr>
<!-- Passwords Section -->
<div class="mt-4">
<h2>Passwords</h2>
{% for category, passwords in passwords_by_category.items() %}
{% if passwords|length > 0 %}
<h3 class="mt-3">{{ category }}</h3>
<table class="table table-bordered table-hover">
<thead class="thead-light">
<tr>
<th>Item</th>
<th>Username</th>
<th>Password</th>
<th>IP Address</th>
</tr>
</thead>
<tbody>
{% for p in passwords %}
<tr>
<td>{{ p.item }}</td>
<td>{{ p.username }}</td>
<td>{{ p.password }}</td>
<td>{{ p.ip_address }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endfor %}
</div>
<hr>
<!-- Domains Section -->
<div class="mt-4">
<h2>Domains</h2>
{% if client.domains|length > 0 %}
<table class="table table-bordered table-hover">
<thead class="thead-light">
<tr>
<th>Domain</th>
<th>WHOIS Expiration</th>
</tr>
</thead>
<tbody>
{% for d in client.domains %}
<tr>
<td>{{ d.domain }}</td>
<td>{{ d.expiration_date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No domain associations.</p>
{% endif %}
</div>
<hr>
<!-- SSL Section -->
<div class="mt-4">
<h2>SSL</h2>
{% if client.ssl_domains|length > 0 %}
<table class="table table-bordered table-hover">
<thead class="thead-light">
<tr>
<th>Domain</th>
<th>SSL Expiration</th>
</tr>
</thead>
<tbody>
{% for d in client.ssl_domains %}
<tr>
<td>{{ d.domain }}</td>
<td>{{ d.ssl_expiration_date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No SSL associations.</p>
{% endif %}
</div>
</div>
{% endblock %}