mirror of
https://github.com/eduardogsilva/routerfleet.git
synced 2025-08-05 02:34:32 +02:00
import tool visualizations
This commit is contained in:
parent
b2ef6138d9
commit
5732cd8a6c
7 changed files with 149 additions and 5 deletions
48
templates/import_tool/import_details.html
Normal file
48
templates/import_tool/import_details.html
Normal file
|
@ -0,0 +1,48 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class='row'>
|
||||
<div class='col-lg-12'>
|
||||
<div class="card card-primary card-outline">
|
||||
{% if page_title %}
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{{ page_title }}</h3>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if import_view == 'tasks' %}active{% endif %}" href="?uuid={{ csv_data.uuid }}&view=taks" role="tab">
|
||||
Tasks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if import_view == 'processed' %}active{% endif %}" href="?uuid={{ csv_data.uuid }}&view=processed" role="tab">
|
||||
Processed data
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if import_view == 'raw' %}active{% endif %}" href="?uuid={{ csv_data.uuid }}&view=raw" role="tab">
|
||||
Raw data
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
{% if import_view == 'tasks' %}
|
||||
{% include 'import_tool/import_details_tasks.html' %}
|
||||
{% elif import_view == 'processed' %}
|
||||
{% include 'import_tool/import_details_processed.html' %}
|
||||
{% elif import_view == 'raw' %}
|
||||
{% include 'import_tool/import_details_raw.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
34
templates/import_tool/import_details_processed.html
Normal file
34
templates/import_tool/import_details_processed.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<table class="table table-hover datatables-no-export">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="min-width">Import ID</th>
|
||||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>Port</th>
|
||||
<th>Username</th>
|
||||
<th>Password</th>
|
||||
<th>SSH Key</th>
|
||||
<th>Router Type</th>
|
||||
<th>Backup Profile</th>
|
||||
<th>Router Group</th>
|
||||
<th>Monitoring</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for import_task in csv_data.import_data %}
|
||||
<tr>
|
||||
<td>{{ import_task.import_id }}</td>
|
||||
<td>{{ import_task.name }}</td>
|
||||
<td>{{ import_task.address }}</td>
|
||||
<td>{{ import_task.port }}</td>
|
||||
<td>{{ import_task.username }}</td>
|
||||
<td>{{ import_task.password }}</td>
|
||||
<td>{{ import_task.ssh_key }}</td>
|
||||
<td>{{ import_task.router_type }}</td>
|
||||
<td>{{ import_task.backup_profile }}</td>
|
||||
<td>{{ import_task.router_group }}</td>
|
||||
<td>{{ import_task.monitoring }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
1
templates/import_tool/import_details_raw.html
Normal file
1
templates/import_tool/import_details_raw.html
Normal file
|
@ -0,0 +1 @@
|
|||
<pre>{{ csv_data.raw_csv_data }}</pre>
|
0
templates/import_tool/import_details_tasks.html
Normal file
0
templates/import_tool/import_details_tasks.html
Normal file
|
@ -16,11 +16,32 @@
|
|||
<table class="table table-hover datatables-no-export">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>ID</th>
|
||||
<th>Created</th>
|
||||
<th>Total Tasks</th>
|
||||
<th>Success</th>
|
||||
<th>Error</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for import in import_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/router/import_tool/details/?uuid={{ import.csv_data.uuid }}">
|
||||
{{ import.csv_data.id }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ import.csv_data.created }}
|
||||
</td>
|
||||
<td>{{ import.task_count }}</td>
|
||||
<td>{{ import.success_count }}</td>
|
||||
<td>{{ import.error_count }}</td>
|
||||
<td>{{ import.status }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue