169 lines
4.5 KiB
HTML
169 lines
4.5 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">
|
|
<h2 class="text-center">Details</h2>
|
|
<div class="text-center">
|
|
<h2>Phone: {{ client.phone or "N/A" }} | Address: {{ client.address or "N/A" }}</h2>
|
|
</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>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for p in passwords %}
|
|
<tr>
|
|
<td>{{ p.item }}</td>
|
|
<td>{{ p.username }}</td>
|
|
<td>{{ p.password }}</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>
|
|
|
|
<!-- You can include a print CSS or a Print button that calls window.print() if desired -->
|
|
|
|
</div>
|
|
{% endblock %}
|