Update 2026-01-20 20:47:44
This commit is contained in:
@@ -9,11 +9,21 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 600px;
|
||||
/* 초기 높이 */
|
||||
min-height: 300px;
|
||||
/* 최소 높이 */
|
||||
max-height: 1200px;
|
||||
/* 최대 높이 (선택 사항) */
|
||||
background: #1e1e1e;
|
||||
border: 1px solid #333;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
|
||||
overflow: hidden;
|
||||
/* resize를 위해 필수 */
|
||||
resize: vertical;
|
||||
/* 수직 리사이징 활성화 */
|
||||
position: relative;
|
||||
/* 자식 요소 relative 기준 */
|
||||
}
|
||||
|
||||
/* 툴바 (헤더) */
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
|
||||
<!-- Bootstrap Icons -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"
|
||||
integrity="sha384-tViUnnbYAV00FLIhhi3v/dWt3Jxw4gZQcNoSCxCIFNJVCx7/D55/wXsrNIRANwdD" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button type="submit" formaction="{{ url_for('utils.update_guid_list') }}"
|
||||
<button type="button" data-bs-toggle="modal" data-bs-target="#slotPriorityModal"
|
||||
class="btn btn-white bg-white border shadow-sm w-100 py-2 d-flex flex-column align-items-center justify-content-center gap-1 btn-quick-move h-100">
|
||||
<div class="rounded-circle bg-success bg-opacity-10 text-success p-1">
|
||||
<i class="bi bi-file-earmark-excel fs-5"></i>
|
||||
@@ -300,9 +300,12 @@
|
||||
<div class="col">
|
||||
<div class="card border shadow-sm">
|
||||
<div class="card-header bg-light border-0 py-2 d-flex justify-content-between align-items-center">
|
||||
<h6 class="mb-0">
|
||||
<h6 class="mb-0 d-flex align-items-center">
|
||||
<i class="bi bi-files me-2"></i>
|
||||
처리된 파일 목록
|
||||
{% if files_to_display %}
|
||||
<span class="badge bg-primary ms-3">{{ files_to_display|length }} 파일</span>
|
||||
{% endif %}
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body p-4">
|
||||
@@ -419,10 +422,10 @@
|
||||
</div>
|
||||
<div id="collapse-{{ loop.index }}" class="collapse">
|
||||
<div class="p-3">
|
||||
<div class="row g-3">
|
||||
<div class="row g-3 backup-files-container" data-folder="{{ date }}" style="min-height: 50px;">
|
||||
{% for file in info.files %}
|
||||
<div class="col-auto">
|
||||
<div class="file-card-compact border rounded p-2 text-center">
|
||||
<div class="col-auto backup-file-item" data-filename="{{ file }}">
|
||||
<div class="file-card-compact border rounded p-2 text-center bg-white">
|
||||
<a href="{{ url_for('main.download_backup_file', date=date, filename=file) }}"
|
||||
class="text-decoration-none text-dark fw-semibold d-block mb-2 text-nowrap px-2" download
|
||||
title="{{ file }}">
|
||||
@@ -444,6 +447,50 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- 백업 목록 페이지네이션 -->
|
||||
{% if total_backup_pages > 1 %}
|
||||
<nav aria-label="Backup pagination" class="mt-4">
|
||||
<ul class="pagination justify-content-center mb-0">
|
||||
|
||||
<!-- 이전 페이지 -->
|
||||
{% if backup_page > 1 %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ url_for('main.index', backup_page=backup_page-1, page=page) }}">
|
||||
<i class="bi bi-chevron-left"></i> 이전
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link"><i class="bi bi-chevron-left"></i> 이전</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<!-- 페이지 번호 -->
|
||||
{% set start_b_page = ((backup_page - 1) // 10) * 10 + 1 %}
|
||||
{% set end_b_page = [start_b_page + 9, total_backup_pages]|min %}
|
||||
|
||||
{% for p in range(start_b_page, end_b_page + 1) %}
|
||||
<li class="page-item {% if p == backup_page %}active{% endif %}">
|
||||
<a class="page-link" href="{{ url_for('main.index', backup_page=p, page=page) }}">{{ p }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
<!-- 다음 페이지 -->
|
||||
{% if backup_page < total_backup_pages %} <li class="page-item">
|
||||
<a class="page-link" href="{{ url_for('main.index', backup_page=backup_page+1, page=page) }}">
|
||||
다음 <i class="bi bi-chevron-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link">다음 <i class="bi bi-chevron-right"></i></span>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="text-center py-5">
|
||||
<i class="bi bi-inbox fs-1 text-muted mb-3"></i>
|
||||
@@ -484,43 +531,8 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/index.css') }}">
|
||||
<!-- Tom Select CSS (Bootstrap 5 theme) -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/tom-select@2.2.2/dist/css/tom-select.bootstrap5.min.css" rel="stylesheet">
|
||||
<style>
|
||||
/* Tom Select 미세 조정 */
|
||||
.ts-wrapper.form-select {
|
||||
padding: 0 !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.ts-control {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.375rem;
|
||||
padding: 0.375rem 0.75rem;
|
||||
}
|
||||
|
||||
.ts-wrapper.focus .ts-control {
|
||||
border-color: #86b7fe;
|
||||
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
||||
}
|
||||
|
||||
/* Quick Move 버튼 호버 효과 */
|
||||
.btn-quick-move {
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.btn-quick-move:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1) !important;
|
||||
background-color: #f8f9fa !important;
|
||||
border-color: #dee2e6 !important;
|
||||
}
|
||||
|
||||
.btn-quick-move:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
@@ -529,27 +541,164 @@
|
||||
<!-- Tom Select JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.2.2/dist/js/tom-select.complete.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Tom Select 초기화
|
||||
// 모바일 등 환경 고려, 검색 가능하게 설정
|
||||
if (document.getElementById('script')) {
|
||||
new TomSelect("#script", {
|
||||
create: false,
|
||||
sortField: {
|
||||
field: "text",
|
||||
direction: "asc"
|
||||
},
|
||||
placeholder: "스크립트를 검색하거나 선택하세요...",
|
||||
plugins: ['clear_button'],
|
||||
allowEmptyOption: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
window.APP_CONFIG = {
|
||||
moveBackupUrl: "{{ url_for('main.move_backup_files') }}",
|
||||
csrfToken: "{{ csrf_token() }}",
|
||||
downloadBaseUrl: "{{ url_for('main.download_backup_file', date='PLACEHOLDER_DATE', filename='PLACEHOLDER_FILE') }}"
|
||||
};
|
||||
</script>
|
||||
<script src="{{ url_for('static', filename='js/dashboard.js') }}?v={{ range(1, 100000) | random }}"></script>
|
||||
|
||||
<script src="{{ url_for('static', filename='js/index.js') }}?v={{ range(1, 100000) | random }}"></script>
|
||||
|
||||
<!-- 외부 script.js 파일 (IP 폼 처리 로직 포함) -->
|
||||
<script src="{{ url_for('static', filename='script.js') }}?v={{ range(1, 100000) | random }}"></script>
|
||||
<!-- SortableJS for Drag and Drop -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.0/Sortable.min.js"></script>
|
||||
|
||||
<!-- 슬롯 우선순위 설정 모달 (Premium Design) -->
|
||||
<div class="modal fade" id="slotPriorityModal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl">
|
||||
<div class="modal-content border-0 shadow-lg" style="border-radius: 1rem; overflow: hidden;">
|
||||
|
||||
<!-- 헤더: 깔끔한 모던 스타일 -->
|
||||
<div class="modal-header border-bottom p-4 bg-white">
|
||||
<div>
|
||||
<h5 class="modal-title fw-bold text-dark mb-1">
|
||||
<i class="bi bi-layers text-primary me-2"></i>GUID 슬롯 우선순위 설정
|
||||
</h5>
|
||||
<p class="mb-0 text-muted" style="font-size: 0.85rem;">
|
||||
엑셀 변환 시 적용될 슬롯의 순서를 설정합니다.
|
||||
</p>
|
||||
</div>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="닫기"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body p-0 bg-light">
|
||||
<form id="slotPriorityForm" action="{{ url_for('utils.update_guid_list') }}" method="post">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="server_list_content" id="modal_server_list_content">
|
||||
<input type="hidden" name="slot_priority" id="slot_priority_input">
|
||||
|
||||
<div class="row g-0">
|
||||
<!-- 왼쪽: 입력 및 프리셋 -->
|
||||
<div class="col-lg-5 border-end bg-white p-4 d-flex flex-column">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h6 class="fw-bold text-dark mb-0 small text-uppercase">
|
||||
<i class="bi bi-keyboard me-1"></i>슬롯 번호 입력
|
||||
</h6>
|
||||
</div>
|
||||
|
||||
<div class="position-relative flex-grow-1">
|
||||
<textarea id="slotNumbersInput"
|
||||
class="form-control bg-light border-0 font-monospace p-3 text-dark h-100"
|
||||
style="resize: none; font-size: 0.9rem; min-height: 200px;"
|
||||
placeholder="슬롯 번호를 입력하세요. 구분자: 쉼표(,) 공백( ) 줄바꿈 예시: 38, 39, 37"></textarea>
|
||||
|
||||
<div class="position-absolute bottom-0 end-0 p-2">
|
||||
<button type="button" id="btnClearSlots" class="btn btn-sm btn-link text-decoration-none text-muted"
|
||||
style="font-size: 0.75rem;">
|
||||
<i class="bi bi-x-circle me-1"></i>지우기
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 미니멀한 프리셋 설정 (숫자 입력) -->
|
||||
<div class="mt-3 pt-3 border-top border-light d-flex align-items-center justify-content-between">
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="small text-muted me-2" style="font-size: 0.75rem;">카드 개수 설정:</span>
|
||||
<div class="input-group input-group-sm" style="width: 120px;">
|
||||
<span class="input-group-text bg-white border-end-0 text-muted"
|
||||
style="font-size: 0.75rem;">개수</span>
|
||||
<input type="number" id="presetCountInput" class="form-control border-start-0 text-center"
|
||||
value="10" min="1" max="10" style="font-size: 0.8rem;">
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" id="btnApplyPreset" class="btn btn-sm btn-outline-primary rounded-pill px-3"
|
||||
style="font-size: 0.75rem;">
|
||||
적용
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 오른쪽: 시각화 및 확인 -->
|
||||
<div class="col-lg-7 p-4 bg-light d-flex flex-column">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h6 class="fw-bold text-secondary mb-0 small text-uppercase">
|
||||
<i class="bi bi-sort-numeric-down me-1"></i>적용 순서
|
||||
</h6>
|
||||
<span class="badge bg-white text-dark border rounded-pill px-3 py-1" id="slotCountDisplay">0개</span>
|
||||
</div>
|
||||
|
||||
<!-- 미리보기 영역 -->
|
||||
<div class="flex-grow-1 bg-white border rounded-3 p-4 shadow-sm mb-4 position-relative"
|
||||
style="min-height: 250px; max-height: 400px; overflow-y: auto;">
|
||||
<div id="slotPreview" class="d-flex flex-wrap gap-2 align-content-start h-100">
|
||||
<!-- Empty State -->
|
||||
<div
|
||||
class="d-flex flex-column align-items-center justify-content-center w-100 h-100 text-muted opacity-50">
|
||||
<i class="bi bi-layers fs-1 mb-2"></i>
|
||||
<span class="small">프리셋을 선택하거나 번호를 입력하세요.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-auto">
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<i class="bi bi-info-circle text-primary me-2"></i>
|
||||
<span class="small text-muted">입력된 순서대로 <strong>GUID 컬럼</strong>과 <strong>슬롯 데이터</strong>가
|
||||
정렬됩니다.</span>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary w-100 py-2 fw-semibold shadow-sm">
|
||||
설정 확인 및 변환
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 중복 파일 확인 모달 -->
|
||||
<div class="modal fade" id="duplicateCheckModal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content border-0 shadow-lg">
|
||||
<div class="modal-header border-bottom-0 pb-0">
|
||||
<h5 class="modal-title fw-bold text-warning">
|
||||
<i class="bi bi-exclamation-triangle-fill me-2"></i>중복 파일 발견
|
||||
</h5>
|
||||
</div>
|
||||
<div class="modal-body pt-3">
|
||||
<p class="text-secondary mb-3">
|
||||
대상 폴더에 이미 동일한 이름의 파일이 <strong id="dupCount" class="text-dark">0</strong>개 존재합니다.<br>
|
||||
덮어쓰시겠습니까?
|
||||
</p>
|
||||
<div class="bg-light rounded p-3 mb-3 border font-monospace text-muted small"
|
||||
style="max-height: 150px; overflow-y: auto;">
|
||||
<ul id="dupList" class="list-unstyled mb-0">
|
||||
<!-- JS로 주입됨 -->
|
||||
</ul>
|
||||
<div id="dupMore" class="text-center mt-2 fst-italic display-none" style="display:none;">...외 <span
|
||||
id="dupMoreCount">0</span>개</div>
|
||||
</div>
|
||||
<p class="small text-muted mb-0">
|
||||
<i class="bi bi-info-circle me-1"></i>덮어쓰기를 선택하면 기존 파일은 삭제됩니다.
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer border-top-0 pt-0">
|
||||
<button type="button" class="btn btn-light" data-bs-dismiss="modal">취소</button>
|
||||
<button type="button" class="btn btn-warning text-white fw-bold" id="btnConfirmOverwrite">
|
||||
<i class="bi bi-arrow-repeat me-1"></i>덮어쓰기 (Overwrite)
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Styles moved to index_custom.css -->
|
||||
|
||||
<!-- Scripts moved to index_custom.js -->
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user