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 django.conf import settings
|
||||||
|
|
||||||
|
from . import __author__
|
||||||
from .utils.helpers import get_mount_fs_info
|
from .utils.helpers import get_mount_fs_info
|
||||||
|
|
||||||
|
|
||||||
@ -7,6 +8,7 @@ def metadata(request):
|
|||||||
return {
|
return {
|
||||||
"version": settings.VERSION,
|
"version": settings.VERSION,
|
||||||
"environment": settings.ENVIRONMENT,
|
"environment": settings.ENVIRONMENT,
|
||||||
|
"author": __author__,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{% endblock collector_head %}
|
{% endblock collector_head %}
|
||||||
|
|
||||||
{% block collector_content %}
|
{% block collector_content %}
|
||||||
<header>
|
<header class="sticky-top">
|
||||||
<section>
|
<section>
|
||||||
{% include 'includes/navigation.html' %}
|
{% include 'includes/navigation.html' %}
|
||||||
</section>
|
</section>
|
||||||
@ -16,9 +16,9 @@
|
|||||||
{% block main %}{% endblock main %}
|
{% block main %}{% endblock main %}
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer class="footer mt-auto">
|
||||||
<section>
|
<section>
|
||||||
{% block footer %}{% endblock footer %}
|
{% include 'includes/footer.html' %}
|
||||||
</section>
|
</section>
|
||||||
</footer>
|
</footer>
|
||||||
{% endblock collector_content %}
|
{% endblock collector_content %}
|
||||||
|
@ -200,7 +200,7 @@ if DEBUG:
|
|||||||
SPECTACULAR_SETTINGS = {
|
SPECTACULAR_SETTINGS = {
|
||||||
'TITLE': 'Logs collector API',
|
'TITLE': 'Logs collector API',
|
||||||
'DESCRIPTION': 'Collector of archives with log files for further analysis',
|
'DESCRIPTION': 'Collector of archives with log files for further analysis',
|
||||||
'VERSION': '0.1.0',
|
'VERSION': VERSION,
|
||||||
'SERVE_INCLUDE_SCHEMA': True,
|
'SERVE_INCLUDE_SCHEMA': True,
|
||||||
'SERVE_PUBLIC': False,
|
'SERVE_PUBLIC': False,
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
from drf_spectacular.views import (
|
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
||||||
SpectacularAPIView,
|
|
||||||
SpectacularRedocView,
|
|
||||||
SpectacularSwaggerView
|
|
||||||
)
|
|
||||||
|
|
||||||
from two_factor.urls import urlpatterns as tf_urls
|
from two_factor.urls import urlpatterns as tf_urls
|
||||||
from account.utils import AdminSiteOTPRequiredMixinRedirectSetup
|
from account.utils import AdminSiteOTPRequiredMixinRedirectSetup
|
||||||
|
|
||||||
@ -48,9 +43,4 @@ urlpatterns += [
|
|||||||
SpectacularSwaggerView.as_view(url_name='schema'),
|
SpectacularSwaggerView.as_view(url_name='schema'),
|
||||||
name='swagger-ui'
|
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 collector_head %}{% endblock collector_head %}
|
||||||
{% block account_head %}{% endblock account_head %}
|
{% block account_head %}{% endblock account_head %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="d-flex flex-column min-vh-100">
|
||||||
{% block collector_content %}{% endblock collector_content %}
|
{% block collector_content %}{% endblock collector_content %}
|
||||||
{% block account_content %}{% endblock account_content %}
|
{% block account_content %}{% endblock account_content %}
|
||||||
<!-- BS dependences JS-->
|
<!-- BS dependences JS-->
|
||||||
@ -46,6 +46,7 @@
|
|||||||
<script src="{% static '/js/bs.theme.mode.js' %}"></script>
|
<script src="{% static '/js/bs.theme.mode.js' %}"></script>
|
||||||
<!-- BS tooltip JS-->
|
<!-- BS tooltip JS-->
|
||||||
<script src="{% static '/js/bs.tooltip.js' %}"></script>
|
<script src="{% static '/js/bs.tooltip.js' %}"></script>
|
||||||
|
<!-- Apps JS-->
|
||||||
{% block collector_scripts %}{% endblock collector_scripts %}
|
{% block collector_scripts %}{% endblock collector_scripts %}
|
||||||
{% block account_scripts %}{% endblock account_scripts %}
|
{% block account_scripts %}{% endblock account_scripts %}
|
||||||
</body>
|
</body>
|
||||||
|
@ -19,14 +19,6 @@
|
|||||||
><i class="bi bi-shield-shaded"></i> Admin</a>
|
><i class="bi bi-shield-shaded"></i> Admin</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% 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>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="{% url 'two_factor:profile' %}"
|
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"
|
class="progress"
|
||||||
role="progressbar"
|
role="progressbar"
|
||||||
aria-label="storage used"
|
aria-label="storage used"
|
||||||
aria-valuenow="25"
|
aria-valuenow="{{ storage.used_percent }}"
|
||||||
aria-valuemin="0"
|
aria-valuemin="0"
|
||||||
aria-valuemax="100"
|
aria-valuemax="100"
|
||||||
style="width: 125px"
|
style="width: 125px"
|
||||||
|
Loading…
Reference in New Issue
Block a user