버전 정보 표기 기능추가, 카테고리, 링크 등 수정
All checks were successful
Build And Test / build-and-push (push) Successful in 4m14s

This commit is contained in:
icurfer 2024-12-15 23:58:47 +09:00
parent 52586e9369
commit 0e59c11818
9 changed files with 64 additions and 21 deletions

View File

@ -0,0 +1,22 @@
{% extends 'components/base.html' %}
{% load static %}
{% block main_area %}
<section>
<div class="container">
<div class="row justify-content-between">
<div class="mt-5">
<h1>
주의 사항</h1>
<p>
<ul>
<li>로그인을 반드시 해야 기능 메뉴가 나타납니다.</li>
<li>로그인을 하지 않으면 views.py의 함수가 동작하지 않습니다.</li>
<li>사설 IP대역을 사용해서 제어하려면 솔루션을 동일 네트워크에 직접 배포해야 합니다.</li>
</ul>
</p>
</div>
</div>
</div>
</section>
{% endblock %}

View File

@ -10,4 +10,5 @@ urlpatterns = [
path('jobs/<int:job_id>/', views.job_detail, name='job_detail'), path('jobs/<int:job_id>/', views.job_detail, name='job_detail'),
path('jobs/<int:job_id>/run/', views.run_job, name='run_job'), path('jobs/<int:job_id>/run/', views.run_job, name='run_job'),
path('jobs/<int:job_id>/delete/', views.delete_job, name='delete_job'), path('jobs/<int:job_id>/delete/', views.delete_job, name='delete_job'),
path('notice/', views.notice), # 사용전 주의 사항 매뉴얼
] ]

View File

@ -116,3 +116,7 @@ def delete_job(request, job_id):
job = get_object_or_404(AnsibleJob, id=job_id, owner=request.user) job = get_object_or_404(AnsibleJob, id=job_id, owner=request.user)
job.delete() job.delete()
return redirect('ansible_manager:job_list') return redirect('ansible_manager:job_list')
def notice(request):
return render(request, "ansible_manager/notice.html", {})

View File

@ -77,6 +77,7 @@ TEMPLATES = [
'django.template.context_processors.request', 'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages', 'django.contrib.messages.context_processors.messages',
"butler_ddochi.version.context_processors.version_processor", # 추가
], ],
}, },
}, },

View File

@ -0,0 +1,12 @@
import os
def version_processor(request):
version_file_path = os.path.join(os.path.dirname(__file__), "../../version")
try:
with open(version_file_path, "r", encoding="utf-8") as file:
version = file.read().strip()
except FileNotFoundError:
version = "Version not found"
return {"version": version}

View File

@ -4,15 +4,19 @@
<!-- Footer Top Navigation Links --> <!-- Footer Top Navigation Links -->
<div class="row mb-3"> <div class="row mb-3">
<div class="col"> <div class="col">
<ul class="list-inline mb-0"> <ul class="list-inline mb-0 d-flex justify-content-between">
<li class="list-inline-item mx-2"> <div class="d-flex">
<a href="{% url 'butler:privacy' %}" class="text-dark">개인정보 처리방침</a> <li class="list-inline-item mx-2">
</li> <a href="{% url 'butler:privacy' %}" class="text-dark">개인정보 처리방침</a>
<li class="list-inline-item mx-2"> </li>
<a href="https://youtube.com/@icurfer" class="text-dark" target="_blank">유튜브</a> <li class="list-inline-item mx-2">
</li> <a href="https://gitea.icurfer.com/icurfer/butler_ddochi" class="text-dark" target="_blank">코드저장소</a>
<li class="list-inline-item mx-2"> </li>
<a href="https://gitea.itstant.com/icurfer/butler_ddochi" class="text-dark" target="_blank">코드저장소</a> </div>
<li class="list-inline-item mx-2 ms-auto">
version:
{{ version }}
</li> </li>
</ul> </ul>
</div> </div>
@ -32,11 +36,11 @@
</div> </div>
<div class="col-md-4 text-center ms-auto"> <div class="col-md-4 text-center ms-auto">
<span class="copy">Copyright © icurfer 2024</span> <span class="copy">Copyright © icurfer 2024</span>
</div> </div>
</div> </div>
</div> </div>
<!-- Back to Top Button --> <!-- Back to Top Button -->
<div class="position-absolute end-0 bottom-0 me-3 mb-3"> <div class="position-absolute end-0 bottom-0 me-3 mb-3">
<button type="button" class="btn btn-outline-dark" onclick="window.scrollTo({ top: 0, behavior: 'smooth' });"> <button type="button" class="btn btn-outline-dark" onclick="window.scrollTo({ top: 0, behavior: 'smooth' });">

View File

@ -7,11 +7,6 @@
<li> <li>
<a class="d-inline-flex align-items-center rounded" href="/notice">공지사항</a> <a class="d-inline-flex align-items-center rounded" href="/notice">공지사항</a>
</li> </li>
<li>
<a class="d-inline-flex align-items-center rounded" href="https://www.icurfer.com/about/" target="_blank">
개인프로젝트 K8S + React + Django DRF
</a>
</li>
</ul> </ul>
</li> </li>
<li class="my-2"> <li class="my-2">

View File

@ -1,14 +1,18 @@
<li class="my-2"> <li class="my-2">
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#ansible-collapse" aria-controls="ansible-collapse">Op-premise Ansible(구현 중)</button> <button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#ansible-collapse" aria-controls="ansible-collapse">Op-premise Ansible</button>
{% if request.user.is_authenticated and request.user.is_staff %} <ul class="list-unstyled ps-3 collapse" id="ansible-collapse">
<ul class="list-unstyled ps-3 collapse" id="ansible-collapse"> <li>
<a class="d-inline-flex align-items-center rounded" href="/ansible_manager/notice">주의 사항</a>
</li>
{% if request.user.is_authenticated and request.user.is_staff %}
<li> <li>
<a class="d-inline-flex align-items-center rounded" href="/accounts/upload_ssh_key/">SSH Private Key Management</a> <a class="d-inline-flex align-items-center rounded" href="/accounts/upload_ssh_key/">SSH Private Key Management</a>
</li> </li>
<li> <li>
<a class="d-inline-flex align-items-center rounded" href="/ansible_manager/jobs/">job list</a> <a class="d-inline-flex align-items-center rounded" href="/ansible_manager/jobs/">job list</a>
</li> </li>
</ul> {% endif %}
{% endif %} </ul>
</li> </li>

View File

@ -1 +1 @@
dev_0.0.18r4-build-test3 dev_0.0.19