mirror of
https://github.com/eduardogsilva/routerfleet.git
synced 2025-08-04 10:15:00 +02:00
186 lines
No EOL
8.6 KiB
HTML
186 lines
No EOL
8.6 KiB
HTML
{% extends 'base.html' %}
|
|
{% load crispy_forms_tags %}
|
|
|
|
{% block content %}
|
|
<div class='row'>
|
|
<div class='col-xl-5'>
|
|
<div class="card card-primary card-outline">
|
|
|
|
<div class="card-header">
|
|
<h3 class="card-title">{{ router.name }}
|
|
|
|
</h3>
|
|
<span class="float-right">
|
|
<a href="/router/manage/?uuid={{ router.uuid }}" >
|
|
<i class="fas fa-edit"></i>
|
|
</a>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="card-body row">
|
|
<div class="col-lg-12">
|
|
|
|
<ul class="list-group list-group-unbordered mb-3">
|
|
{% comment %}
|
|
<li class="list-group-item">
|
|
<b></b>
|
|
<span class="float-right">{{ router }}</span>
|
|
</li>
|
|
{% endcomment %}
|
|
<li class="list-group-item">
|
|
<b>Enabled</b>
|
|
<span class="float-right">
|
|
{% if router.enabled %}
|
|
<i class="far fa-check-circle text-success" ></i>
|
|
{% else %}
|
|
<i class="far fa-times-circle text-danger" ></i>
|
|
{% endif %}
|
|
</span>
|
|
</li>
|
|
|
|
<li class="list-group-item">
|
|
<b>Address</b>
|
|
<span class="float-right">{{ router.address }}</span>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<b>username</b>
|
|
<span class="float-right">{{ router.username }}</span>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<b>Authentication</b>
|
|
<span class="float-right">
|
|
{% if router.ssh_key %}
|
|
<i class="fas fa-key"></i> SSH Key: {{ router.ssh_key }}
|
|
{% elif router.password %}
|
|
<i class="fas fa-keyboard"></i> Password
|
|
{% else %}
|
|
<i class="fas fa-exclamation-triangle text-warning"></i> Missing authentication
|
|
{% endif %}
|
|
</span>
|
|
</li>
|
|
|
|
<li class="list-group-item">
|
|
<b>Monitoring</b>
|
|
<span class="float-right">
|
|
{% if router.monitoring %}
|
|
{% if router.routerstatus.status_online %}
|
|
<i class="far fa-check-circle text-success" title="Host is Online"></i>
|
|
{% else %}
|
|
<i class="far fa-times-circle text-danger" title="Host is unavailable"></i>
|
|
{% endif %}
|
|
{% else %}
|
|
Disabled
|
|
{% endif %}
|
|
</span>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<b>Router Type</b>
|
|
<span class="float-right">{{ router.get_router_type_display }}</span>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<b>Backup Profile</b>
|
|
<span class="float-right">
|
|
{% if router.backup_profile %}
|
|
{{ router.backup_profile }}
|
|
{% if router.routerstatus.last_backup_failed %}
|
|
<i class="fas fa-exclamation-triangle text-danger" title="Last backup failed to complete"></i>
|
|
{% endif %}
|
|
{% else %}
|
|
<i class="fas fa-exclamation-triangle text-warning" title="No backup profile selected"></i>
|
|
{% endif %}
|
|
</span>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<b>Groups</b>
|
|
<span class="float-right">
|
|
{% for router_group in router.routergroup_set.all %}
|
|
<span class="badge badge-primary">{{ router_group.name }}</span>
|
|
{% endfor %}
|
|
</span>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<b>Notes</b>
|
|
<span class="float-right">{{ router.internal_notes|default_if_none:""|linebreaksbr }}</span>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class='col-xl-7'>
|
|
<div class="card card-primary card-outline">
|
|
|
|
<div class="card-header">
|
|
<h3 class="card-title">Backup history</h3>
|
|
</div>
|
|
|
|
<div class="card-body row">
|
|
<div class="col-lg-12">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Schedule</th>
|
|
<th>Time</th>
|
|
<th>Status</th>
|
|
<th><i class="fas fa-code-branch" title="Configuration has changed"></i></th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
<tbody>
|
|
{% for backup in router_backup_list %}
|
|
<tr>
|
|
<td class="min-width">
|
|
<a href="/backup/backup_details/?uuid={{ backup.uuid }}">
|
|
<i class="far fa-eye"></i>
|
|
</a>
|
|
</td>
|
|
|
|
<td>{{ backup.get_schedule_type_display }}</td>
|
|
<td>{% if backup.finish_time %}{{ backup.finish_time }}{% else %}
|
|
<i class="far fa-clock text-warning"></i>{% endif %}</td>
|
|
<td>
|
|
{% if backup.success %}
|
|
<i class="far fa-check-circle text-success"></i>
|
|
{% elif backup.error %}
|
|
<i class="far fa-times-circle text-danger"
|
|
title="{{ backup.error_message }}"></i>
|
|
{% elif backup.backup_pending_retrieval %}
|
|
<i class="fas fa-cloud-download-alt text-info"
|
|
title="Backup pending Retrieval"></i>
|
|
{% else %}
|
|
<i class="far fa-clock text-warning"></i>
|
|
{% endif %}
|
|
</td>
|
|
<td class="min-width">
|
|
{% if backup.config_change_detected %}
|
|
<i class="fas fa-code-branch text-info"
|
|
title="Configuration has changed since last backup"></i>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block custom_page_scripts %}
|
|
|
|
|
|
{% endblock %} |