-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: UI refresh and update to bootstrap 5 (milestone 7)
More cleanups and polishing to get everything ready to merge: - djlint template warning/error cleanups - Moved prominent table templates to the tables partials
- Loading branch information
Showing
19 changed files
with
248 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
{% extends "base.html" %} | ||
{% load strip_db %} | ||
|
||
|
||
{% block title %}| Distributed database index{% endblock %} | ||
{% block title %}| Distributed database index{% endblock title %} | ||
{% block body %} | ||
|
||
<div class="alert alert-primary" role="alert"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16"> | ||
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/> | ||
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/> | ||
</svg> | ||
This is ara's <a class="alert-link" href="https://ara.readthedocs.io/en/latest/distributed-sqlite-backend.html" target="_blank">distributed sqlite backend</a> index. | ||
It does not have an API but provides links to databases where the reporting UI and API are available. | ||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16"> | ||
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/> | ||
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/> | ||
</svg> | ||
This is ara's <a class="alert-link" href="https://ara.readthedocs.io/en/latest/distributed-sqlite-backend.html" target="_blank">distributed sqlite backend</a> index. | ||
It does not have an API but provides links to databases where the reporting UI and API are available. | ||
</div> | ||
|
||
<div> | ||
<h4>Database root: {{ distributed_sqlite_root }}</h4> | ||
<div class="table-responsive"> | ||
<table class="table table-sm table-hover" id="distributed_table"> | ||
<thead> | ||
<tr style="height:50px;"> | ||
<th title="Path">Path</th> | ||
<th class="text-right" title="Path">Size</th> | ||
<th class="text-right" title="Path">Last updated</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for database in databases %} | ||
<tr> | ||
<td><a href="{{ database.path | strip_db }}">{{ database.path }}</a></td> | ||
<td class="text-right">{{ database.size }}</td> | ||
<td class="text-right">{{ database.updated }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
<h4>Database root: {{ distributed_sqlite_root }}</h4> | ||
<div class="table-responsive"> | ||
<table class="table table-sm table-hover" id="distributed_table"> | ||
<thead> | ||
<tr style="height:50px;"> | ||
<th title="Path">Path</th> | ||
<th class="text-right" title="Path">Size</th> | ||
<th class="text-right" title="Path">Last updated</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for database in databases %} | ||
<tr> | ||
<td><a href="{{ database.path | strip_db }}">{{ database.path }}</a></td> | ||
<td class="text-right">{{ database.size }}</td> | ||
<td class="text-right">{{ database.updated }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
{% endblock %} | ||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
{% extends "base.html" %} | ||
{% load truncatepath %} | ||
|
||
{% block title %}| Host #{{ host.id }}: {{ results.count }} results on {{ host.name | truncatechars:50 }} for {{ host.playbook.path | truncatepath:50 }}{% endblock %} | ||
{% block title %}| Host #{{ host.id }}: {{ results.count }} results on {{ host.name | truncatechars:50 }} for {{ host.playbook.path | truncatepath:50 }}{% endblock title %} | ||
{% block body %} | ||
<div> | ||
{% include "partials/playbook_card.html" with playbook=host.playbook %} | ||
</div> | ||
<br/> | ||
<div> | ||
{% include "partials/tables/host_facts.html" %} | ||
</div> | ||
<br/> | ||
<div> | ||
{% include "partials/tables/host_results.html" %} | ||
</div> | ||
<br/> | ||
|
||
<script> | ||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') | ||
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl)) | ||
</script> | ||
{% endblock %} | ||
<div> | ||
{% include "partials/playbook_card.html" with playbook=host.playbook %} | ||
</div> | ||
<br/> | ||
<div> | ||
{% include "partials/tables/host_facts.html" %} | ||
</div> | ||
<br/> | ||
<div> | ||
{% include "partials/tables/host_results.html" %} | ||
</div> | ||
|
||
<script> | ||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') | ||
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl)) | ||
</script> | ||
|
||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
{% if status == "ok" %} | ||
<a role="button" class="btn btn-success btn-sm ara-result-status-badge" title="Task completed successfully" {% if search_url %}href="{{ search_url | add:'?status=ok#results' }}"{% endif %}> | ||
<a role="button" class="btn btn-success btn-sm ara-result-status-badge" title="Task completed successfully" {% if search_url %}href="{{ search_url | add:'?status=ok#results' }}"{% endif %}>{{ status | upper }}</a> | ||
{% elif status == "failed" or status == "unreachable" %} | ||
<a role="button" class="btn btn-danger btn-sm ara-result-status-badge" title="Task failed" {% if search_url %}href="{{ search_url | add:'?status=failed#results' }}"{% endif %}> | ||
<a role="button" class="btn btn-danger btn-sm ara-result-status-badge" title="Task failed" {% if search_url %}href="{{ search_url | add:'?status=failed#results' }}"{% endif %}>{{ status | upper }}</a> | ||
{% elif status == "ignored" %} | ||
<a role="button" class="btn btn-info btn-sm ara-result-status-badge" title="Task failed but was ignored" {% if search_url %}href="{{ search_url | add:'?status=failed#results' }}"{% endif %}> | ||
<a role="button" class="btn btn-info btn-sm ara-result-status-badge" title="Task failed but was ignored" {% if search_url %}href="{{ search_url | add:'?status=failed#results' }}"{% endif %}>{{ status | upper }}</a> | ||
{% elif status == "skipped" %} | ||
<a role="button" class="btn btn-info btn-sm ara-result-status-badge" title="Task was skipped" {% if search_url %}href="{{ search_url | add:'?status=skipped#results' }}"{% endif %}> | ||
<a role="button" class="btn btn-info btn-sm ara-result-status-badge" title="Task was skipped" {% if search_url %}href="{{ search_url | add:'?status=skipped#results' }}"{% endif %}>{{ status | upper }}</a> | ||
{% elif status == "changed" %} | ||
<a role="button" class="btn btn-warning btn-sm ara-result-status-badge" title="Task resulted in a change" {% if search_url %}href="{{ search_url | add:'?changed=true#results' }}"{% endif %}> | ||
<a role="button" class="btn btn-warning btn-sm ara-result-status-badge" title="Task resulted in a change" {% if search_url %}href="{{ search_url | add:'?changed=true#results' }}"{% endif %}>{{ status | upper }}</a> | ||
{% else %} | ||
<a role="button" class="btn btn-warning btn-sm ara-result-status-badge" title="Task result is unknown" {% if search_url %}href="{{ search_url | add:'?status=unknown#results' }}"{% endif %}> | ||
{% endif %} | ||
{{ status | upper }} | ||
</a> | ||
<a role="button" class="btn btn-warning btn-sm ara-result-status-badge" title="Task result is unknown" {% if search_url %}href="{{ search_url | add:'?status=unknown#results' }}"{% endif %}>{{ status | upper }}</a> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.