This commit is contained in:
0
components/__init__.py
Normal file
0
components/__init__.py
Normal file
3
components/admin.py
Normal file
3
components/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
components/apps.py
Normal file
6
components/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ComponentsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'components'
|
0
components/migrations/__init__.py
Normal file
0
components/migrations/__init__.py
Normal file
3
components/models.py
Normal file
3
components/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
BIN
components/static/components/favicon/favicon.ico
Normal file
BIN
components/static/components/favicon/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
3
components/templates/components/_favicon.html
Normal file
3
components/templates/components/_favicon.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% load static %}
|
||||
<link rel="icon" href="{% static 'components/favicon/favicon.ico' %}" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="{% static 'components/favicon/favicon.ico' %}" type="image/x-icon">
|
47
components/templates/components/_footer.html
Normal file
47
components/templates/components/_footer.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!-- Footer -->
|
||||
<footer class="text-dark py-4 mt-auto position-relative">
|
||||
<div class="container-fluid">
|
||||
<!-- 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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Divider -->
|
||||
<hr class="mb-4"/>
|
||||
|
||||
<!-- Contact Information and Logo -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-4 text-center mb-3 mb-md-0">
|
||||
<div class="footer-tel">
|
||||
<span class="text-dark">문의: icurfer@gmail.com</span>
|
||||
<br>
|
||||
<small>상담시간 평일: 09시~18시 / 주말, 공휴일 휴무</small>
|
||||
</div>
|
||||
</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' });">
|
||||
<i class="fa-solid fa-up-long"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
93
components/templates/components/_nav copy.html
Normal file
93
components/templates/components/_nav copy.html
Normal file
@ -0,0 +1,93 @@
|
||||
<nav class="navbar fixed-top navbar-expand-lg navbar-light bg-light">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/">DDoCHI</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarContent">
|
||||
<!-- 로그인/로그아웃 및 회원가입 버튼 -->
|
||||
<ul class="navbar-nav ms-auto">
|
||||
{% if request.user.is_authenticated %}
|
||||
<!-- 로그아웃 버튼 -->
|
||||
<li class="nav-item">
|
||||
<form method="post" action="{% url 'custom_auth:logout' %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-outline-danger w-100">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
{% else %}
|
||||
<!-- 로그인 버튼 -->
|
||||
<li class="nav-item me-3">
|
||||
<button type="button" class="btn btn-outline-primary w-100 mb-2" data-bs-toggle="modal" data-bs-target="#loginModal">Login</button>
|
||||
</li>
|
||||
<!-- 회원가입 버튼 -->
|
||||
<li class="nav-item me-3">
|
||||
<button type="button" class="btn btn-outline-success w-100" data-bs-toggle="modal" data-bs-target="#signupModal">Sign Up</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<!-- 로그인 모달 -->
|
||||
<div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="loginModalLabel">Login</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 로그인 폼 -->
|
||||
<form method="post" action="{% url 'custom_auth:login' %}">
|
||||
{% csrf_token %}
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required="required">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" required="required">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 회원가입 모달 -->
|
||||
<div class="modal fade" id="signupModal" tabindex="-1" aria-labelledby="signupModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="signupModalLabel">Sign Up</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 회원가입 폼 -->
|
||||
<form method="post" action="{% url 'custom_auth:signup' %}">
|
||||
{% csrf_token %}
|
||||
<div class="mb-3">
|
||||
<label for="usernameSignup" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" id="usernameSignup" name="username" required="required">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="passwordSignup" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" id="passwordSignup" name="password1" required="required">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="passwordConfirmSignup" class="form-label">Confirm Password</label>
|
||||
<input type="password" class="form-control" id="passwordConfirmSignup" name="password2" required="required">
|
||||
</div>
|
||||
<a href="{% url 'butler:privacy' %}" class="text-dark" target="_blank">개인정보 처리방침</a>
|
||||
<p class="text-danger">회원 가입후 권한 신청 메일을 보내주세요.</p>
|
||||
<p class="text-danger">회원 가입시 본 개인정보 처리방침에 동의하는 것으로 간주됩니다.</p>
|
||||
<button type="submit" class="btn btn-success w-100">Sign Up</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
149
components/templates/components/_nav.html
Normal file
149
components/templates/components/_nav.html
Normal file
@ -0,0 +1,149 @@
|
||||
<div class="container-fluid d-flex justify-content-between align-items-center">
|
||||
<h1 class="d-flex align-items-center fs-4 text-white mb-0">
|
||||
<a class="navbar-brand" href="/">
|
||||
<i class="fa-solid fa-dog"></i> DDoCHI</a>
|
||||
</h1>
|
||||
<!-- 로그인/로그아웃 및 회원가입 버튼 -->
|
||||
<ul class="navbar-nav flex-row">
|
||||
{% if user.is_authenticated and user.is_superuser %}
|
||||
<!-- 관리자 콘솔 버튼 -->
|
||||
<li class="nav-item me-3">
|
||||
<a href="/admin" target="_blank" class="btn btn-outline-warning mb-2">ADMIN</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<!-- 회원정보 변경 버튼 -->
|
||||
<li class="nav-item me-3">
|
||||
<button type="button" class="btn btn-outline-info mb-2" data-bs-toggle="modal"
|
||||
data-bs-target="#editProfileModal">Edit Profile</button>
|
||||
</li>
|
||||
<!-- 로그아웃 버튼 -->
|
||||
<li class="nav-item">
|
||||
<form method="post" action="{% url 'custom_auth:logout' %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-outline-danger w-100">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
{% else %}
|
||||
<!-- 로그인 버튼 -->
|
||||
<li class="nav-item me-3">
|
||||
<button type="button" class="btn btn-outline-primary mb-2" data-bs-toggle="modal"
|
||||
data-bs-target="#loginModal">Login</button>
|
||||
</li>
|
||||
<!-- 회원가입 버튼 -->
|
||||
<li class="nav-item me-3">
|
||||
<button type="button" class="btn btn-outline-success" data-bs-toggle="modal" data-bs-target="#signupModal">Sign
|
||||
Up</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 로그인 모달 -->
|
||||
<div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="loginModalLabel">Login</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 로그인 실패 메시지 표시 -->
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<!-- 로그인 폼 -->
|
||||
<form method="post" action="{% url 'custom_auth:login' %}">
|
||||
{% csrf_token %}
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required="required">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" required="required">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 회원가입 모달 -->
|
||||
<div class="modal fade" id="signupModal" tabindex="-1" aria-labelledby="signupModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="signupModalLabel">Sign Up</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 회원가입 폼 -->
|
||||
<form method="post" action="{% url 'custom_auth:signup' %}">
|
||||
{% csrf_token %}
|
||||
<div class="mb-3">
|
||||
<label for="usernameSignup" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" id="usernameSignup" name="username" required="required">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="passwordSignup" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" id="passwordSignup" name="password1" required="required">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="passwordConfirmSignup" class="form-label">Confirm Password</label>
|
||||
<input type="password" class="form-control" id="passwordConfirmSignup" name="password2" required="required">
|
||||
</div>
|
||||
<a href="{% url 'butler:privacy' %}" class="text-dark" target="_blank">개인정보 처리방침</a>
|
||||
<p class="text-danger">회원 가입후 권한 신청 메일을 보내주세요.</p>
|
||||
<p class="text-danger">회원 가입시 본 개인정보 처리방침에 동의하는 것으로 간주됩니다.</p>
|
||||
<button type="submit" class="btn btn-success w-100">Sign Up</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 회원정보 변경 모달 -->
|
||||
<div class="modal fade" id="editProfileModal" tabindex="-1" aria-labelledby="editProfileModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="editProfileModalLabel">Edit Profile</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 회원정보 변경 폼 -->
|
||||
<form method="post" action="{% url 'custom_auth:edit_profile' %}">
|
||||
{% csrf_token %}
|
||||
<div class="mb-3">
|
||||
<label for="emailEdit" class="form-label">Email</label>
|
||||
<input type="email" class="form-control" id="emailEdit" name="email" value="{{ request.user.email }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="nhncIdEdit" class="form-label">NHNC ID</label>
|
||||
<input type="text" class="form-control" id="nhncIdEdit" name="nhnc_id" value="{{ request.user.nhnc_id }}">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="nhncApiTenantIdEdit" class="form-label">NHNC API Tenant ID</label>
|
||||
<input type="text" class="form-control" id="nhncApiTenantIdEdit" name="nhnc_api_tenant_id" value="{{ request.user.nhnc_api_tenant_id }}">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="passwordEdit" class="form-label">새 비밀번호</label>
|
||||
<input type="password" class="form-control" id="passwordEdit" name="password">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="passwordConfirmEdit" class="form-label">비밀번호 확인</label>
|
||||
<input type="password" class="form-control" id="passwordConfirmEdit" name="password_confirm">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100">Save Changes</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
139
components/templates/components/_sidebar.html
Normal file
139
components/templates/components/_sidebar.html
Normal file
@ -0,0 +1,139 @@
|
||||
<!-- Side Navigation -->
|
||||
<nav class="sticky-xl-top small" id="toc">
|
||||
<ul class="list-unstyled">
|
||||
<li class="my-2">
|
||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#about-collapse" aria-controls="about-collapse">About</button>
|
||||
<ul class="list-unstyled ps-3 collapse" id="about-collapse">
|
||||
<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">
|
||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#contents-collapse" aria-controls="contents-collapse">Contents</button>
|
||||
<ul class="list-unstyled ps-3 collapse" id="contents-collapse">
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/blog">Post</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/ip_mgmt">IP관리대장</a>
|
||||
</li>
|
||||
{% if request.user.is_authenticated and request.user.is_staff %}
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/mm_msg">mm 발송기능</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
<hr>
|
||||
<li class="my-2">
|
||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#nhnc-collapse" aria-controls="nhnc-collapse">NHN Cloud API</button>
|
||||
<ul class="list-unstyled ps-3 collapse" id="nhnc-collapse">
|
||||
<span>가이드</span>
|
||||
{% if request.user.is_authenticated and request.user.is_staff %}
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/test">출력결과 검토</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/preparations">주의 사항</a>
|
||||
</li>
|
||||
<hr>
|
||||
<span>관리대장</span>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhnc_mgmt/igw">인터넷 게이트웨이</a>
|
||||
</li>
|
||||
<hr>
|
||||
<span>Network</span>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/infoVpcListRequest">VPC 조회 및 삭제</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/createVpcRequest">VPC 생성</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/infoClusterListRequest">NKS Cluseter 조회 및 삭제</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/createClusterOnlyRequest">NKS Cluseter 생성</a>
|
||||
</li>
|
||||
<hr>
|
||||
<span>k8s Components deploy</span>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/nksApply">Ingress Deploy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/nksApply">FluentBit Deploy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="text-secondary d-inline-flex align-items-center rounded disabled" href="#">Logging Deploy(미구현)</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="text-secondary d-inline-flex align-items-center rounded disabled" href="#">Monitoring Deploy(미구현)</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<hr>
|
||||
<li class="my-2">
|
||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#components-collapse" aria-controls="components-collapse">DevOpsTools</button>
|
||||
<ul class="list-unstyled ps-3 collapse" id="components-collapse">
|
||||
<span>Dev</span>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://gitea.icurfer.com/icurfer" target="_blank">Repository - Gitea</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://harbor.icurfer.com/" target="_blank">Registry - Harbor</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://argocd.icurfer.com/" target="_blank">Deploy - ArgoCD</a>
|
||||
</li>
|
||||
<hr>
|
||||
<span>Ops</span>
|
||||
{% if request.user.is_authenticated and request.user.is_staff %}
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://code.icurfer.com/" target="_blank">Web VScode - CodeServer</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://rancher.icurfer.com/" target="_blank">Cluster Management - Rancher</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://grafana.icurfer.com/" target="_blank">Monitoring - Grafana</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://prometheus.icurfer.com/" target="_blank">Metrics - Prometheus</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://os.icurfer.com/" target="_blank">Container Log - OpenSearch</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://kiali.icurfer.com/" target="_blank">Main Cluster Traffic - Kiali</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="my-2">
|
||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#other-collapse" aria-controls="other-collapse">Other Tools</button>
|
||||
<ul class="list-unstyled ps-3 collapse" id="other-collapse">
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="https://mm.icurfer.com/" target="_blank">Messenger - Mattermost</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<hr>
|
||||
<li class="my-2">
|
||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#forms-collapse" aria-controls="forms-collapse">Documents</button>
|
||||
<ul class="list-unstyled ps-3 collapse" id="forms-collapse">
|
||||
<li>
|
||||
<a class="d-inline-flex align-items-center rounded" href="#">사용가이드</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<hr>
|
||||
{% include "components/_sidebar_ansible.html" %}
|
||||
</ul>
|
||||
</nav>
|
14
components/templates/components/_sidebar_ansible.html
Normal file
14
components/templates/components/_sidebar_ansible.html
Normal file
@ -0,0 +1,14 @@
|
||||
<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>
|
||||
|
||||
{% if request.user.is_authenticated and request.user.is_staff %}
|
||||
<ul class="list-unstyled ps-3 collapse" id="ansible-collapse">
|
||||
<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 %}
|
||||
</li>
|
1851
components/templates/components/base copy.html
Normal file
1851
components/templates/components/base copy.html
Normal file
File diff suppressed because it is too large
Load Diff
83
components/templates/components/base.html
Normal file
83
components/templates/components/base.html
Normal file
@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>
|
||||
{% block title %}Butler_DDOCHI{% endblock %}
|
||||
</title>
|
||||
{% include "components/_favicon.html" %}
|
||||
<!-- Bootstrap CSS 추가 -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
<!-- fontawesome 추가 -->
|
||||
<script src="https://kit.fontawesome.com/77d81e5d17.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
|
||||
<body class="bg-light">
|
||||
<!-- 네비게이션 바 -->
|
||||
<header class="bg-dark py-3 d-flex align-items-stretch border-bottom border-dark">
|
||||
{% include "components/_nav.html" %}
|
||||
<!-- Toggle Button for Sidebar -->
|
||||
|
||||
</header>
|
||||
<!-- Circle Toggle Button -->
|
||||
|
||||
<!-- Main Content with Sidebar -->
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<!-- Sidebar -->
|
||||
<aside id="sidebar" class="col-12 col-md-3 col-lg-2 bg-light p-3">
|
||||
{% include "components/_sidebar.html" %}
|
||||
</aside>
|
||||
<!-- Main Section -->
|
||||
<div id="main_section" class="min-vh-100 col-12 col-md-9 col-lg-10 bg-body p-3">
|
||||
<button id="toggleSidebar" class="btn btn-light rounded-circle position-absolute">
|
||||
☰
|
||||
</button>
|
||||
<section id="content" class="pt-4">
|
||||
{% block main_area %}{% endblock %}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="container-fluid">
|
||||
{% include "components/_footer.html" %}
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap JavaScript 추가 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
||||
<!-- Sidebar JavaScript 추가 -->
|
||||
<script>
|
||||
document
|
||||
.getElementById('toggleSidebar')
|
||||
.addEventListener('click', function () {
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
const mainSection = document.getElementById('main_section');
|
||||
|
||||
if (sidebar.style.display === 'none') {
|
||||
sidebar.style.display = 'block';
|
||||
mainSection
|
||||
.classList
|
||||
.remove('col-lg-12');
|
||||
mainSection
|
||||
.classList
|
||||
.add('col-lg-10');
|
||||
} else {
|
||||
sidebar.style.display = 'none';
|
||||
mainSection
|
||||
.classList
|
||||
.remove('col-lg-10');
|
||||
mainSection
|
||||
.classList
|
||||
.add('col-lg-12');
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
86
components/templates/components/base_nhncloud.html
Normal file
86
components/templates/components/base_nhncloud.html
Normal file
@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>
|
||||
{% block title %}Butler_DDOCHI{% endblock %}
|
||||
</title>
|
||||
{% include "components/_favicon.html" %}
|
||||
<!-- Bootstrap CSS 추가 -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
<!-- fontawesome 추가 -->
|
||||
<script src="https://kit.fontawesome.com/77d81e5d17.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
|
||||
<body class="bg-light">
|
||||
<!-- 네비게이션 바 -->
|
||||
<header class="bg-dark py-3 d-flex align-items-stretch border-bottom border-dark">
|
||||
{% include "components/_nav.html" %}
|
||||
<!-- Toggle Button for Sidebar -->
|
||||
|
||||
</header>
|
||||
<!-- Circle Toggle Button -->
|
||||
|
||||
<!-- Main Content with Sidebar -->
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<!-- Sidebar -->
|
||||
<aside id="sidebar" class="col-12 col-md-3 col-lg-2 bg-light p-3">
|
||||
{% include "components/_sidebar.html" %}
|
||||
</aside>
|
||||
<!-- Main Section -->
|
||||
<div id="main_section" class="min-vh-100 col-12 col-md-9 col-lg-10 bg-body p-3">
|
||||
<button id="toggleSidebar" class="btn btn-light rounded-circle position-absolute">
|
||||
☰
|
||||
</button>
|
||||
<section id="content" class="pt-4">
|
||||
{% if not request.user.is_authenticated %}
|
||||
<h5 class='text-danger pt-4'>로그인이 필요합니다. NHN Cloud 계정, 테넌트 정보가 있어야 정상 동작합니다.</h3>
|
||||
{% endif %}
|
||||
{% block main_area %}{% endblock %}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="container-fluid">
|
||||
{% include "components/_footer.html" %}
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap JavaScript 추가 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
||||
<!-- Sidebar JavaScript 추가 -->
|
||||
<script>
|
||||
document
|
||||
.getElementById('toggleSidebar')
|
||||
.addEventListener('click', function () {
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
const mainSection = document.getElementById('main_section');
|
||||
|
||||
if (sidebar.style.display === 'none') {
|
||||
sidebar.style.display = 'block';
|
||||
mainSection
|
||||
.classList
|
||||
.remove('col-lg-12');
|
||||
mainSection
|
||||
.classList
|
||||
.add('col-lg-10');
|
||||
} else {
|
||||
sidebar.style.display = 'none';
|
||||
mainSection
|
||||
.classList
|
||||
.remove('col-lg-10');
|
||||
mainSection
|
||||
.classList
|
||||
.add('col-lg-12');
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
31
components/templates/components/navigation_sample.html
Normal file
31
components/templates/components/navigation_sample.html
Normal file
@ -0,0 +1,31 @@
|
||||
<nav class="navbar fixed-top navbar-expand-lg navbar-light bg-light">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand pl-3 " href="/">Butler</a>
|
||||
</div>
|
||||
<div class="container-fluid flex-column">
|
||||
<div class="collapse navbar-collapse" id="sidebarMenu">
|
||||
<!-- 로그인/로그아웃 및 회원가입 버튼 -->
|
||||
<ul class="navbar-nav">
|
||||
{% if request.user.is_authenticated %}
|
||||
<!-- 로그아웃 버튼 -->
|
||||
<li class="nav-item">
|
||||
<form method="post" action="{% url 'custom_auth:logout' %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-outline-danger w-100">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
{% else %}
|
||||
<!-- 로그인 버튼 -->
|
||||
<li class="nav-item">
|
||||
<button type="button" class="btn btn-outline-primary w-100 mb-2" data-bs-toggle="modal" data-bs-target="#loginModal">Login</button>
|
||||
</li>
|
||||
<!-- 회원가입 버튼 -->
|
||||
<li class="nav-item">
|
||||
<button type="button" class="btn btn-outline-success w-100" data-bs-toggle="modal" data-bs-target="#signupModal">Sign Up</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
69
components/templates/components/temp.html
Normal file
69
components/templates/components/temp.html
Normal file
@ -0,0 +1,69 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<!-- Side Navigation -->
|
||||
<nav class="col-12 col-md-3 col-lg-2 d-md-block bg-body-tertiary sidebar">
|
||||
<div class="position-sticky">
|
||||
<a class="navbar-brand" href="#">Butler</a>
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="ip_mgmt">ip_mgmt</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="col-12 col-md-9 col-lg-10 ms-sm-auto px-md-4">
|
||||
{% extends "components/base.html" %}
|
||||
|
||||
{% block title %}IP Management{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-center mb-4">IP List</h1>
|
||||
|
||||
<!-- IP 레코드 목록 -->
|
||||
<form id="recordForm" method="post" action="">
|
||||
{% csrf_token %}
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<!-- 테이블 내용 -->
|
||||
</table>
|
||||
|
||||
{% if request.user.is_authenticated and request.user.is_staff %}
|
||||
<!-- 버튼 컨테이너 -->
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<!-- 데이터 등록 버튼 -->
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addDataModal">
|
||||
<i class="bi bi-plus-lg"></i> Add New IP Record
|
||||
</button>
|
||||
|
||||
<!-- 전체 삭제 버튼 -->
|
||||
<button type="submit" formaction="{% url 'ip_mgmt_delete' %}" class="btn btn-danger">
|
||||
<i class="bi bi-trash"></i> Delete Selected
|
||||
</button>
|
||||
|
||||
<!-- 수정 버튼 -->
|
||||
<button type="button" id="editSelectedButton" class="btn btn-warning" disabled>
|
||||
<i class="bi bi-pencil-square"></i> Edit Selected
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
3
components/tests.py
Normal file
3
components/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
3
components/views.py
Normal file
3
components/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
Reference in New Issue
Block a user