버전 정보 표기 기능추가, 카테고리, 링크 등 수정
All checks were successful
Build And Test / build-and-push (push) Successful in 4m14s
All checks were successful
Build And Test / build-and-push (push) Successful in 4m14s
This commit is contained in:
parent
52586e9369
commit
0e59c11818
22
ansible_manager/templates/ansible_manager/notice.html
Normal file
22
ansible_manager/templates/ansible_manager/notice.html
Normal 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 %}
|
@ -10,4 +10,5 @@ urlpatterns = [
|
||||
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>/delete/', views.delete_job, name='delete_job'),
|
||||
path('notice/', views.notice), # 사용전 주의 사항 매뉴얼
|
||||
]
|
@ -116,3 +116,7 @@ def delete_job(request, job_id):
|
||||
job = get_object_or_404(AnsibleJob, id=job_id, owner=request.user)
|
||||
job.delete()
|
||||
return redirect('ansible_manager:job_list')
|
||||
|
||||
|
||||
def notice(request):
|
||||
return render(request, "ansible_manager/notice.html", {})
|
||||
|
@ -77,6 +77,7 @@ TEMPLATES = [
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
"butler_ddochi.version.context_processors.version_processor", # 추가
|
||||
],
|
||||
},
|
||||
},
|
||||
|
12
butler_ddochi/version/context_processors.py
Normal file
12
butler_ddochi/version/context_processors.py
Normal 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}
|
@ -4,15 +4,19 @@
|
||||
<!-- Footer Top Navigation Links -->
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<ul class="list-inline mb-0">
|
||||
<li class="list-inline-item mx-2">
|
||||
<a href="{% url 'butler:privacy' %}" class="text-dark">개인정보 처리방침</a>
|
||||
</li>
|
||||
<li class="list-inline-item mx-2">
|
||||
<a href="https://youtube.com/@icurfer" class="text-dark" target="_blank">유튜브</a>
|
||||
</li>
|
||||
<li class="list-inline-item mx-2">
|
||||
<a href="https://gitea.itstant.com/icurfer/butler_ddochi" class="text-dark" target="_blank">코드저장소</a>
|
||||
<ul class="list-inline mb-0 d-flex justify-content-between">
|
||||
<div class="d-flex">
|
||||
<li class="list-inline-item mx-2">
|
||||
<a href="{% url 'butler:privacy' %}" class="text-dark">개인정보 처리방침</a>
|
||||
</li>
|
||||
<li class="list-inline-item mx-2">
|
||||
<a href="https://gitea.icurfer.com/icurfer/butler_ddochi" class="text-dark" target="_blank">코드저장소</a>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
<li class="list-inline-item mx-2 ms-auto">
|
||||
version:
|
||||
{{ version }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -32,11 +36,11 @@
|
||||
</div>
|
||||
<div class="col-md-4 text-center ms-auto">
|
||||
<span class="copy">Copyright © icurfer 2024</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Back to Top Button -->
|
||||
<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' });">
|
||||
|
@ -7,11 +7,6 @@
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/notice">공지사항</a>
|
||||
</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>
|
||||
</li>
|
||||
<li class="my-2">
|
||||
|
@ -1,14 +1,18 @@
|
||||
<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>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/accounts/upload_ssh_key/">SSH Private Key Management</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/ansible_manager/jobs/">job list</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
</li>
|
Loading…
Reference in New Issue
Block a user