mirror of
https://github.com/MOIS3Y/logs-collector.git
synced 2025-02-01 01:10:52 +01:00
Add: footer, meta info, move api to footer
This commit is contained in:
parent
016994d594
commit
3672d8b321
@ -0,0 +1,10 @@
|
||||
# █▀▄▀█ █▀▀ ▀█▀ ▄▀█ ▀
|
||||
# █░▀░█ ██▄ ░█░ █▀█ ▄
|
||||
# -------------------
|
||||
__author__ = "MOIS3Y"
|
||||
__credits__ = ["Stepan Zhukovsky"]
|
||||
__license__ = "GPL v3.0"
|
||||
__version__ = "0.1.0"
|
||||
__maintainer__ = "Stepan Zhukovsky"
|
||||
__email__ = "stepan@zhukovsky.me"
|
||||
__status__ = "Development"
|
@ -1,5 +1,6 @@
|
||||
from django.conf import settings
|
||||
|
||||
from . import __author__
|
||||
from .utils.helpers import get_mount_fs_info
|
||||
|
||||
|
||||
@ -7,6 +8,7 @@ def metadata(request):
|
||||
return {
|
||||
"version": settings.VERSION,
|
||||
"environment": settings.ENVIRONMENT,
|
||||
"author": __author__,
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
{% endblock collector_head %}
|
||||
|
||||
{% block collector_content %}
|
||||
<header>
|
||||
<header class="sticky-top">
|
||||
<section>
|
||||
{% include 'includes/navigation.html' %}
|
||||
</section>
|
||||
@ -16,9 +16,9 @@
|
||||
{% block main %}{% endblock main %}
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<footer class="footer mt-auto">
|
||||
<section>
|
||||
{% block footer %}{% endblock footer %}
|
||||
{% include 'includes/footer.html' %}
|
||||
</section>
|
||||
</footer>
|
||||
{% endblock collector_content %}
|
||||
|
@ -200,7 +200,7 @@ if DEBUG:
|
||||
SPECTACULAR_SETTINGS = {
|
||||
'TITLE': 'Logs collector API',
|
||||
'DESCRIPTION': 'Collector of archives with log files for further analysis',
|
||||
'VERSION': '0.1.0',
|
||||
'VERSION': VERSION,
|
||||
'SERVE_INCLUDE_SCHEMA': True,
|
||||
'SERVE_PUBLIC': False,
|
||||
}
|
||||
|
@ -1,12 +1,7 @@
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
from drf_spectacular.views import (
|
||||
SpectacularAPIView,
|
||||
SpectacularRedocView,
|
||||
SpectacularSwaggerView
|
||||
)
|
||||
|
||||
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
||||
from two_factor.urls import urlpatterns as tf_urls
|
||||
from account.utils import AdminSiteOTPRequiredMixinRedirectSetup
|
||||
|
||||
@ -48,9 +43,4 @@ urlpatterns += [
|
||||
SpectacularSwaggerView.as_view(url_name='schema'),
|
||||
name='swagger-ui'
|
||||
),
|
||||
path(
|
||||
'api/v1/schema/redoc/',
|
||||
SpectacularRedocView.as_view(url_name='schema'),
|
||||
name='redoc'
|
||||
),
|
||||
]
|
||||
|
@ -37,7 +37,7 @@
|
||||
{% block collector_head %}{% endblock collector_head %}
|
||||
{% block account_head %}{% endblock account_head %}
|
||||
</head>
|
||||
<body>
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
{% block collector_content %}{% endblock collector_content %}
|
||||
{% block account_content %}{% endblock account_content %}
|
||||
<!-- BS dependences JS-->
|
||||
@ -46,6 +46,7 @@
|
||||
<script src="{% static '/js/bs.theme.mode.js' %}"></script>
|
||||
<!-- BS tooltip JS-->
|
||||
<script src="{% static '/js/bs.tooltip.js' %}"></script>
|
||||
<!-- Apps JS-->
|
||||
{% block collector_scripts %}{% endblock collector_scripts %}
|
||||
{% block account_scripts %}{% endblock account_scripts %}
|
||||
</body>
|
||||
|
@ -19,14 +19,6 @@
|
||||
><i class="bi bi-shield-shaded"></i> Admin</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a class="dropdown-item" type="button" href="{% url 'swagger-ui' %}" target="_blank"
|
||||
><i class="bi bi-braces-asterisk"></i> Swagger</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" type="button" href="{% url 'redoc' %}" target="_blank"
|
||||
><i class="bi bi-file-earmark-medical"></i> Redoc</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="{% url 'two_factor:profile' %}"
|
||||
|
26
logs_collector/templates/includes/footer.html
Normal file
26
logs_collector/templates/includes/footer.html
Normal file
@ -0,0 +1,26 @@
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<div class="container d-flex justify-content-between">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<span class="text-muted">© Created by {{ author }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<li>
|
||||
<a
|
||||
class="nav-link"
|
||||
type="button"
|
||||
href="{% url 'swagger-ui' %}"
|
||||
target="_blank"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-html="true"
|
||||
data-bs-placement="bottom"
|
||||
data-bs-title="Swagger"
|
||||
>
|
||||
<i class="bi bi-braces-asterisk"></i> API
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
@ -14,7 +14,7 @@
|
||||
class="progress"
|
||||
role="progressbar"
|
||||
aria-label="storage used"
|
||||
aria-valuenow="25"
|
||||
aria-valuenow="{{ storage.used_percent }}"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
style="width: 125px"
|
||||
|
Loading…
Reference in New Issue
Block a user