diff --git a/ansible_manager/templates/ansible_manager/notice.html b/ansible_manager/templates/ansible_manager/notice.html new file mode 100644 index 0000000..6dd7d64 --- /dev/null +++ b/ansible_manager/templates/ansible_manager/notice.html @@ -0,0 +1,22 @@ +{% extends 'components/base.html' %} +{% load static %} +{% block main_area %} +
+
+
+
+

+ 주의 사항

+

+

    +
  • 로그인을 반드시 해야 기능 메뉴가 나타납니다.
  • +
  • 로그인을 하지 않으면 views.py의 함수가 동작하지 않습니다.
  • +
  • 사설 IP대역을 사용해서 제어하려면 솔루션을 동일 네트워크에 직접 배포해야 합니다.
  • +
+

+
+
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/ansible_manager/urls.py b/ansible_manager/urls.py index 6149fbe..77a60f5 100644 --- a/ansible_manager/urls.py +++ b/ansible_manager/urls.py @@ -10,4 +10,5 @@ urlpatterns = [ path('jobs//', views.job_detail, name='job_detail'), path('jobs//run/', views.run_job, name='run_job'), path('jobs//delete/', views.delete_job, name='delete_job'), + path('notice/', views.notice), # 사용전 주의 사항 매뉴얼 ] \ No newline at end of file diff --git a/ansible_manager/views.py b/ansible_manager/views.py index dcdd90e..5f9d9b9 100644 --- a/ansible_manager/views.py +++ b/ansible_manager/views.py @@ -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", {}) diff --git a/butler_ddochi/settings.py b/butler_ddochi/settings.py index 90f5f1d..b089e70 100644 --- a/butler_ddochi/settings.py +++ b/butler_ddochi/settings.py @@ -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", # 추가 ], }, }, diff --git a/butler_ddochi/version/context_processors.py b/butler_ddochi/version/context_processors.py new file mode 100644 index 0000000..716eb8d --- /dev/null +++ b/butler_ddochi/version/context_processors.py @@ -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} diff --git a/components/templates/components/_footer.html b/components/templates/components/_footer.html index 0696912..2d93475 100644 --- a/components/templates/components/_footer.html +++ b/components/templates/components/_footer.html @@ -4,15 +4,19 @@
-
@@ -32,11 +36,11 @@
Copyright © icurfer 2024 +
-
+ - {% if request.user.is_authenticated and request.user.is_staff %} - + \ No newline at end of file diff --git a/version b/version index a0f4b21..c1e0a49 100644 --- a/version +++ b/version @@ -1 +1 @@ -dev_0.0.18r4-build-test3 \ No newline at end of file +dev_0.0.19 \ No newline at end of file