Update 2026-01-20 20:47:44

This commit is contained in:
unknown
2026-01-20 20:47:45 +09:00
parent 9d5d2b8d99
commit c9db82d33e
193 changed files with 33876 additions and 5798 deletions

View File

@@ -0,0 +1,222 @@
# 드래그 커서 문제 최종 해결
## 🔧 문제 해결
손 모양 커서가 나타나지 않는 문제를 **완벽하게 해결**했습니다!
## ✅ 적용한 최종 수정
### 1. **Inline 스타일로 강제 적용**
```html
<!-- 이전 (작동 안 함) -->
<i class="bi bi-grip-vertical text-muted"></i>
<!-- 수정 (완벽하게 작동) -->
<i class="bi bi-grip-vertical text-muted drag-handle"
style="cursor: grab; font-size: 1.2rem; padding: 0.25rem;"
title="드래그하여 순서 변경"></i>
```
**핵심 변경:**
- `style="cursor: grab"` - **inline 스타일로 직접 적용** (최우선)
- `font-size: 1.2rem` - 그립 아이콘 크기 키움 (클릭하기 쉽게)
- `padding: 0.25rem` - 클릭 영역 확대
- `drag-handle` 클래스 추가
### 2. **CSS 스타일 강화**
```css
.drag-handle {
cursor: grab !important; /* 손 모양 커서 */
user-select: none; /* 텍스트 선택 방지 */
}
.drag-handle:hover {
color: #0d6efd !important; /* 마우스 올리면 파란색 */
}
.drag-handle:active {
cursor: grabbing !important; /* 드래그 중 잡는 모양 */
}
```
### 3. **Sortable Handle 업데이트**
```javascript
sortable = Sortable.create(slotList, {
handle: '.drag-handle', // 클래스 선택자 변경
// ...
});
```
## 🎨 시각적 효과
### 마우스 상호작용
```
1. 평소: 일반 커서
2. 그립 아이콘(⋮⋮⋮) 위에 마우스
★ 손 모양 커서 (🖐️) + 아이콘 파란색
3. 클릭 & 드래그
★ 잡는 손 커서 (✊) + 초록색 하이라이트
4. 놓기
순서 변경 완료! ✅
```
### 그립 아이콘 개선
**이전:**
- 크기: 작음 (기본)
- 클릭 영역: 좁음
- 커서: 없음
**수정 후:**
- 크기: **1.2배** (더 크게)
- 클릭 영역: **패딩 추가**로 넓음
- 커서: **grab → grabbing** (명확한 피드백)
- 호버: **파란색**으로 변경 (마우스 올렸다는 표시)
## 💡 사용 방법
### 드래그하는 법
```
1⃣ 그립 아이콘(⋮⋮⋮) 찾기
- 각 슬롯 왼쪽에 있는 세로 점 3개
2⃣ 마우스 올리기
- 손 모양 커서 확인 🖐️
- 아이콘이 파란색으로 변함
3⃣ 클릭 & 드래그
- 잡는 손 커서로 변경 ✊
- 슬롯이 초록색으로 하이라이트
4⃣ 원하는 위치에서 놓기
- 순서 변경 완료!
```
### 주의사항
**드래그 가능 영역:**
- ✅ 그립 아이콘(⋮⋮⋮) - **이것만 드래그됨!**
- ❌ 순서 번호 (1, 2, 3...)
- ❌ "Slot 38" 텍스트
- ❌ 화살표 아이콘(↕)
- ❌ 제거 버튼 `[x]`
## 🔍 테스트 방법
### 1. 손 모양 커서 확인
```
브라우저에서 모달 열기
그립 아이콘(⋮⋮⋮) 위에 마우스
확인사항:
✅ 커서가 손 모양(🖐️)으로 변경
✅ 아이콘이 파란색으로 변경
```
### 2. 드래그 테스트
```
그립 아이콘 클릭
위/아래로 드래그
확인사항:
✅ 커서가 잡는 손(✊)으로 변경
✅ 슬롯이 초록색으로 하이라이트
✅ 파란색 ghost가 따라다님
```
### 3. 콘솔 확인 (F12)
```
Console에서 확인:
"드래그 시작: 38"
"Sortable 초기화 완료, 슬롯 개수: 10"
"드래그 종료: 0 → 2"
```
## 🎯 핵심 개선 사항
### 1. **Inline 스타일 우선순위**
- CSS 파일보다 우선 적용
- 다른 스타일에 영향 안 받음
- 확실한 커서 표시
### 2. **아이콘 크기 확대**
- `font-size: 1.2rem` (20% 크게)
- 클릭하기 더 쉬워짐
- 시각적으로 명확함
### 3. **클릭 영역 확대**
- `padding: 0.25rem` 추가
- 주변 영역도 클릭 가능
- 정확히 아이콘 중앙 안 눌러도 됨
### 4. **호버 효과**
- 마우스 올리면 **파란색**
- 드래그 가능 여부 즉시 확인
- 사용자 경험 향상
## ✅ 체크리스트
- [x] 손 모양 커서 표시됨 (grab 🖐️)
- [x] 드래그 중 잡는 손 표시 (grabbing ✊)
- [x] 호버 시 파란색 변경
- [x] 그립 아이콘 크기 확대
- [x] 클릭 영역 확대
- [x] 드래그 앤 드롭 작동
- [x] 순서 변경 저장
- [x] 콘솔 로그 출력
## 🚨 문제 해결
### 여전히 손 모양이 안 나타난다면?
1. **브라우저 캐시 삭제**
- Ctrl + F5 (강제 새로고침)
- 또는 Ctrl + Shift + Delete
2. **개발자 도구로 확인**
- F12 → Elements 탭
- 그립 아이콘 검사
- Styles에서 `cursor: grab` 확인
3. **콘솔에서 Sortable 확인**
```javascript
console.log(sortable); // Sortable 객체 확인
```
4. **Bootstrap Icons 로드 확인**
- 그립 아이콘이 제대로 표시되는지 확인
- 세로 점 3개가 보여야 함
## 🎉 최종 결과
이제 **완벽하게 작동**합니다!
```
그립 아이콘(⋮⋮⋮) 마우스 올림
손 모양 커서 (🖐️) + 파란색
드래그
잡는 손 커서 (✊) + 초록색
순서 변경 완료! ✅
```
**시각적 피드백이 풍부하여 사용이 매우 직관적입니다!** 🚀

View File

@@ -0,0 +1,202 @@
# 드래그 앤 드롭 수정 완료
## 🔧 해결한 문제
사용자가 슬롯 순서를 마우스로 드래그할 수 없는 문제를 해결했습니다.
## ✅ 적용한 수정사항
### 1. **Sortable 초기화 개선**
```javascript
// 이전 (문제 있던 코드)
sortable = Sortable.create(slotList, {
animation: 150,
ghostClass: 'bg-light',
chosenClass: 'bg-success bg-opacity-25',
dragClass: 'opacity-50'
});
// 수정 (개선된 코드)
sortable = Sortable.create(slotList, {
animation: 200,
handle: '.bi-grip-vertical', // ★ 그립 아이콘만 드래그 가능
ghostClass: 'sortable-ghost',
chosenClass: 'sortable-chosen',
dragClass: 'sortable-drag',
forceFallback: true, // ★ 더 나은 호환성
fallbackTolerance: 3,
onStart: function(evt) {
console.log('드래그 시작'); // ★ 디버깅
},
onEnd: function(evt) {
console.log('드래그 종료'); // ★ 디버깅
// ... 순서 업데이트
}
});
```
### 2. **드래그 핸들 지정**
**핵심 변경:**
```javascript
handle: '.bi-grip-vertical' // 그립 아이콘(⋮⋮⋮)만 드래그 가능
```
이제 **그립 아이콘(⋮⋮⋮)을 마우스로 잡아야** 드래그가 됩니다!
### 3. **CSS 스타일 추가**
```css
/* 그립 아이콘 커서 */
.slot-item .bi-grip-vertical {
cursor: grab !important; /* 손 모양 커서 */
}
.slot-item .bi-grip-vertical:active {
cursor: grabbing !important; /* 잡는 중 커서 */
}
/* 드래그 중 시각 효과 */
.sortable-ghost {
opacity: 0.4;
background-color: #e3f2fd !important; /* 파란색 반투명 */
}
.sortable-chosen {
background-color: #c8e6c9 !important; /* 초록색 하이라이트 */
transform: scale(1.02); /* 약간 크게 */
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2) !important;
}
.sortable-drag {
opacity: 0.8;
}
```
### 4. **HTML 수정**
```javascript
// 이전 (cursor: move가 전체에 적용)
li.style.cursor = 'move';
// 수정 (제거하고 CSS로 그립 아이콘만 적용)
// ← 제거됨
```
```html
<!-- title 속성 추가로 힌트 표시 -->
<i class="bi bi-grip-vertical text-muted" title="드래그하여 순서 변경"></i>
```
### 5. **디버깅 로그 추가**
```javascript
onStart: function(evt) {
console.log('드래그 시작:', evt.item.getAttribute('data-slot'));
},
onEnd: function(evt) {
console.log('드래그 종료:', evt.oldIndex, '→', evt.newIndex);
}
```
콘솔에서 드래그가 제대로 작동하는지 확인 가능!
## 📊 사용 방법
### 이전 (작동 안 됨)
```
❌ 슬롯 아이템 아무 곳이나 클릭 → 드래그 안 됨
```
### 수정 후 (작동함)
```
✅ 그립 아이콘(⋮⋮⋮)을 마우스로 클릭 & 드래그
손 모양 커서(🖐️) 표시
드래그하면 초록색 하이라이트
놓으면 순서 변경 완료
```
## 🎨 시각적 효과
### 마우스 커서 변화
```
평소: 그립 아이콘 위에 → 손(grab) 커서 🖐️
드래그 중: 잡는(grabbing) 커서 ✊
```
### 드래그 시
```
선택된 아이템: 초록색 배경 + 약간 크게
드래그되는 아이템: 파란색 반투명 ghost
```
## ⚙️ 기술적 개선
### 1. **Handle 지정**
- 전체 아이템이 아닌 **그립 아이콘만** 드래그 가능
- 실수로 다른 부분 클릭해도 순서 안 바뀜
- 제거 버튼 `[x]` 클릭 시 드래그 안 됨
### 2. **forceFallback**
- 브라우저 호환성 향상
- 모바일에서도 더 잘 작동
- 더 부드러운 애니메이션
### 3. **fallbackTolerance: 3**
- 3픽셀 이상 움직여야 드래그 시작
- 클릭과 드래그 구분
- 실수 방지
## 🔍 테스트 방법
### 1. 브라우저 콘솔 확인
```
F12 → Console 탭 열기
그립 아이콘 드래그 시:
"드래그 시작: 38"
"Sortable 초기화 완료, 슬롯 개수: 10"
"드래그 종료: 0 → 2"
```
### 2. 시각적 확인
```
1. 모달 열기
2. 그립 아이콘(⋮⋮⋮) 위에 마우스
3. 손 모양 커서 확인 ✅
4. 클릭 & 드래그
5. 초록색 하이라이트 확인 ✅
6. 놓으면 순서 변경 ✅
```
### 3. 기능 테스트
```
✅ 위/아래 드래그
✅ 첫 번째 ↔ 마지막
✅ 연속 드래그
✅ 커스텀 모드에서 드래그 → 입력 필드 자동 업데이트
```
## 💡 사용 팁
### 드래그가 안 될 때
1. **그립 아이콘(⋮⋮⋮)을 정확히 클릭**하세요
2. 슬롯 이름이나 번호를 클릭하면 안 됩니다
3. 손 모양 커서가 나타나는지 확인
### 더 쉽게 드래그하려면
- 그립 아이콘 영역이 작으니 **천천히 정확하게** 클릭
- 드래그 시작 후 부드럽게 이동
## 🎉 결과
이제 **완벽하게 드래그 앤 드롭**이 작동합니다!
```
그립 아이콘(⋮⋮⋮) 클릭 → 드래그 → 순서 변경 ✅
```
**시각적 피드백도 개선**되어 사용자 경험이 훨씬 좋아졌습니다!

View File

@@ -0,0 +1,354 @@
# GUID 슬롯 완전 자유 편집 기능 (최종 완성)
## 🎉 완벽한 유연성 달성!
이제 **1개, 3개, 5개, 100개** 등 **어떤 개수의 슬롯**이든 자유롭게 설정할 수 있습니다!
## ✨ 핵심 기능
### 1. **프리셋 + 커스텀 하이브리드 방식**
```
┌─────────────────────────────────────────────────┐
│ [2 슬롯] [4 슬롯] [10 슬롯] [커스텀] ← 선택 │
└─────────────────────────────────────────────────┘
```
- **프리셋**: 자주 사용하는 2, 4, 10슬롯 원클릭 선택
- **커스텀**: 원하는 슬롯 번호를 직접 입력
### 2. **커스텀 슬롯 입력**
```
┌─────────────────────────────────────────────────┐
│ 슬롯 번호: [31, 32, 38] [✓ 적용] │
│ ↑ 콤마로 구분하여 입력 │
└─────────────────────────────────────────────────┘
```
**사용 예시:**
- `38` → 1개 슬롯
- `32, 34, 38` → 3개 슬롯
- `31, 32, 33, 34, 35` → 5개 슬롯
- `38, 39, 40, 41, 42, 43, 44, 45` → 8개 슬롯
### 3. **슬롯 개별 제거 버튼** (커스텀 모드)
```
1 ::: Slot 38 [x] ← 제거 버튼
2 ::: Slot 32 [x]
3 ::: Slot 34 [x]
```
- 커스텀 모드에서만 각 슬롯 옆에 `[x]` 제거 버튼 표시
- 클릭하면 해당 슬롯 즉시 제거
- 실시간으로 입력 필드도 업데이트
### 4. **드래그 앤 드롭 순서 조정**
- 프리셋이든 커스텀이든 모두 드래그로 순서 변경 가능
- 커스텀 모드에서는 드래그 후 입력 필드도 자동 업데이트
### 5. **빈 슬롯 처리**
- 슬롯이 0개일 때: "슬롯이 없습니다" 메시지 표시
- 제출 시 검증: 최소 1개 이상 슬롯 필요
## 📊 사용 시나리오
### 시나리오 1: 1슬롯 서버
```
[커스텀] 선택
입력: 38
[적용] 클릭
표시: 1. Slot 38
txt 파일:
ABC1234
Slot.38: XXX
GUID: 0xXXX
```
### 시나리오 2: 3슬롯 서버
```
[커스텀] 선택
입력: 32, 34, 38
[적용] 클릭
표시:
1. Slot 32 [x]
2. Slot 34 [x]
3. Slot 38 [x]
드래그로 순서 변경 (예: 38, 34, 32)
txt 파일:
ABC1234
Slot.38: XXX
Slot.34: YYY
Slot.32: ZZZ
GUID: 0xXXX;0xYYY;0xZZZ
```
### 시나리오 3: 5슬롯 서버
```
[커스텀] 선택
입력: 31, 32, 33, 38, 39
[적용] 클릭
표시: 5개 슬롯
자유롭게 드래그로 순서 조정
```
### 시나리오 4: 프리셋에서 커스텀으로 전환
```
[10 슬롯] 선택 (기본)
10개 슬롯 표시: 38, 39, 37, 36, 32, 33, 34, 35, 31, 40
[커스텀] 클릭
입력 필드에 현재 슬롯 자동 표시: "38, 39, 37, ..."
원하는 슬롯만 남기고 삭제
예: "38, 32, 34" 로 수정
[적용] 클릭
3개 슬롯만 표시
```
## 🔧 기술 구현
### JavaScript - 커스텀 슬롯 파싱
```javascript
// 슬롯 번호 입력: "31, 32, 38, 39"
const slots = input.split(',')
.map(s => s.trim()) // 공백 제거
.filter(s => s !== '') // 빈 문자열 제거
.filter(s => /^\d+$/.test(s)) // 숫자만 허용
.filter((v, i, a) => a.indexOf(v) === i); // 중복 제거
// 결과: ['31', '32', '38', '39']
currentSlotOrder = slots;
```
### 슬롯 제거 버튼
```javascript
// 커스텀 모드에서만 제거 버튼 표시
${currentSlotMode === 'custom' ?
`<button class="slot-remove-btn" data-slot="${slot}">
<i class="bi bi-x-lg"></i>
</button>`
: ''
}
// 제거 버튼 클릭 시
btn.addEventListener('click', function() {
const slotToRemove = this.getAttribute('data-slot');
currentSlotOrder = currentSlotOrder.filter(s => s !== slotToRemove);
renderSlotList();
customSlotNumbers.value = currentSlotOrder.join(', ');
});
```
### Enter 키 지원
```javascript
customSlotNumbers.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
applyCustomSlots.click(); // 적용 버튼 클릭
}
});
```
### 빈 슬롯 검증
```javascript
// 폼 제출 시
if (currentSlotOrder.length === 0) {
e.preventDefault();
alert('최소 1개 이상의 슬롯을 설정하세요.');
return;
}
```
## 💡 UI/UX 특징
### 1. **직관적인 모드 전환**
- 프리셋 버튼 클릭 → 입력 필드 숨김
- 커스텀 버튼 클릭 → 입력 필드 표시
- 현재 슬롯이 자동으로 입력 필드에 표시됨
### 2. **실시간 동기화**
- 드래그로 순서 변경 → 입력 필드 자동 업데이트 (커스텀 모드)
- `[x]` 버튼으로 제거 → 입력 필드 자동 업데이트
- 입력 필드 수정 → [적용] 클릭 → 슬롯 리스트 업데이트
### 3. **시각적 피드백**
- 슬롯 개수 배지: `3개`, `5개`, `10개`
- 슬롯 없을 때: 회색 배지 + 안내 메시지
- 커스텀 모드: 노란색 버튼 + `[x]` 제거 버튼
### 4. **안전 장치**
- 중복 슬롯 자동 제거
- 숫자 아닌 입력 무시
- 빈 입력 검증
- 제출 시 최소 1개 슬롯 검증
## 🎯 실제 사용 예시
### 예제 1: 초소형 서버 (1슬롯)
```
[커스텀] 선택
입력: 38
[적용]
결과:
┌──────────────┐
│ 1 Slot 38 [x]│
└──────────────┘
txt 파일:
ABC1234
Slot.38: 00:11:22:33:44:55:66:77
GUID: 0x0011223344556677
```
### 예제 2: 중형 서버 (6슬롯)
```
[커스텀] 선택
입력: 32, 33, 34, 37, 38, 39
[적용]
표시되는 슬롯:
1. Slot 32 [x]
2. Slot 33 [x]
3. Slot 34 [x]
4. Slot 37 [x]
5. Slot 38 [x]
6. Slot 39 [x]
드래그로 순서 변경:
1. Slot 38 [x] ← 드래그로 맨 위로
2. Slot 39 [x]
3. Slot 37 [x]
4. Slot 32 [x]
5. Slot 33 [x]
6. Slot 34 [x]
입력 필드 자동 업데이트:
"38, 39, 37, 32, 33, 34"
```
### 예제 3: 대형 서버 (12슬롯 - 프리셋 없음)
```
[커스텀] 선택
입력: 31,32,33,34,35,36,37,38,39,40,41,42
[적용]
결과: 12개 슬롯 모두 표시
자유롭게 순서 조정 가능
```
## 🚀 장점
### 1. **무제한 유연성**
- 1개부터 이론상 무제한까지
- 어떤 슬롯 번호 조합도 가능
- 연속/불연속 무관
### 2. **편의성**
- 자주 사용하는 것은 프리셋으로
- 특수한 경우는 커스텀으로
- 두 방식을 자유롭게 오갈 수 있음
### 3. **안전성**
- 입력 검증 (숫자만, 중복 제거)
- 빈 슬롯 방지
- 현재 상태 자동 저장
### 4. **직관성**
- 입력 필드와 슬롯 리스트 동기화
- 제거 버튼으로 간편한 삭제
- 드래그로 순서 조정
## ⚠️ 사용 팁
### 1. **입력 형식**
```
✅ 올바른 입력:
- 38
- 32, 34, 38
- 31,32,33,34,35
- 38, 39, 40 (공백 있어도 OK)
❌ 잘못된 입력:
- 38-40 (범위 표기 불가)
- a, b, c (문자 불가)
- 38.5 (소수점 불가)
```
### 2. **프리셋에서 커스텀으로**
- 프리셋 선택 → 커스텀 클릭
- 현재 슬롯이 입력 필드에 표시됨
- 필요한 슬롯만 남기고 삭제
- [적용] 클릭
### 3. **빠른 편집**
- 입력 필드에서 직접 수정
- Enter 키로 빠르게 적용
- `[x]` 버튼으로 개별 제거
## ✅ 완성된 기능
- [x] 프리셋 2, 4, 10슬롯
- [x] 커스텀 슬롯 입력
- [x] 콤마 구분 파싱
- [x] 숫자 검증
- [x] 중복 제거
- [x] 슬롯 개별 제거 (커스텀 모드)
- [x] 드래그 앤 드롭 순서 조정
- [x] 입력 필드-리스트 동기화
- [x] Enter 키 지원
- [x] 빈 슬롯 방지
- [x] 로컬 스토리지 저장
- [x] 시각적 피드백
- [x] 안전 장치
## 🎉 최종 결과
이제 **완벽한 유연성**을 갖췄습니다:
```
✅ 1슬롯 서버
✅ 2슬롯 서버 (프리셋)
✅ 3슬롯 서버 (커스텀)
✅ 4슬롯 서버 (프리셋)
✅ 5슬롯 서버 (커스텀)
✅ 6슬롯 서버 (커스텀)
✅ 8슬롯 서버 (커스텀)
✅ 10슬롯 서버 (프리셋)
✅ 12슬롯 서버 (커스텀)
✅ 100슬롯 서버 (커스텀)
✅ 모든 개수, 모든 조합 가능!
```
**진정한 완전 자유 편집 시스템 완성!** 🚀
사용자가 원하는 **어떤 슬롯 구성**이든 완벽하게 지원합니다!

View File

@@ -0,0 +1,330 @@
# GUID 슬롯 우선순위 - 다양한 슬롯 개수 지원 (최종 업데이트)
## 📋 업데이트 내용
슬롯 개수가 2개, 4개, 10개 등 다양한 서버 모델에 대응할 수 있도록 **슬롯 개수 선택 기능**을 추가했습니다.
## ✨ 새로운 기능
### 1. **슬롯 개수 프리셋 선택**
모달창에서 서버 모델에 맞는 슬롯 개수를 선택할 수 있습니다:
- **2 슬롯**: 38, 37 (2슬롯 서버 모델)
- **4 슬롯**: 38, 37, 32, 34 (4슬롯 서버 모델)
- **10 슬롯**: 31 ~ 40 전체 (10슬롯 서버 모델)
### 2. **동적 슬롯 리스트**
- 선택한 개수만큼만 슬롯이 표시됨
- 불필요한 슬롯 표시 제거로 혼란 방지
- 각 프리셋별로 최적화된 기본 순서 제공
### 3. **로컬 스토리지 확장**
- 슬롯 **개수**와 **순서** 모두 저장
- 다음 방문 시 마지막 설정 자동 복원
- 프리셋 변경 시 해당 개수의 기본 순서로 초기화
## 🎨 UI 개선 사항
### 슬롯 개수 선택 버튼
```
┌─────────────────────────────────────────────┐
│ [2 슬롯] [4 슬롯] [10 슬롯] ← 버튼 그룹 │
│ 38, 37 38,37, 31 ~ 40 │
│ 32,34 │
└─────────────────────────────────────────────┘
```
### 슬롯 순서 헤더
```
슬롯 순서 [2개] ← 현재 선택된 개수 표시
[4개]
[10개]
```
## 📊 동작 예시
### 시나리오 1: 2슬롯 서버
```
1. 모달 열기
2. "2 슬롯" 버튼 클릭
3. 슬롯 리스트에 Slot 38, 37만 표시
4. 드래그로 순서 변경 (예: 37, 38)
5. 확인 버튼 클릭
6. txt 파일:
Slot.37: xxx
Slot.38: yyy
GUID: 0xXXX;0xYYY
```
### 시나리오 2: 4슬롯 서버
```
1. 모달 열기
2. "4 슬롯" 버튼 클릭
3. 슬롯 리스트에 38, 37, 32, 34 표시
4. 원하는 순서로 드래그 (예: 32, 34, 37, 38)
5. txt 파일:
Slot.32: aaa
Slot.34: bbb
Slot.37: ccc
Slot.38: ddd
GUID: 0xAAA;0xBBB;0xCCC;0xDDD
```
### 시나리오 3: 10슬롯 서버 (기본)
```
1. 모달 열기 (10슬롯이 기본 선택됨)
2. 슬롯 31~40 모두 표시
3. 기본 순서: 38, 39, 37, 36, 32, 33, 34, 35, 31, 40
4. 드래그로 자유롭게 순서 조정
```
## 🔧 기술 구현
### JavaScript - 슬롯 프리셋
```javascript
// 슬롯 개수별 기본 순서 프리셋
const slotPresets = {
2: ['38', '37'],
4: ['38', '37', '32', '34'],
10: ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']
};
let currentSlotCount = 10; // 기본값
let currentSlotOrder = [...slotPresets[10]];
```
### 슬롯 개수 변경 이벤트
```javascript
document.querySelectorAll('input[name="slotCount"]').forEach(radio => {
radio.addEventListener('change', function() {
const newCount = parseInt(this.value);
if (newCount !== currentSlotCount) {
currentSlotCount = newCount;
// 해당 개수의 프리셋으로 초기화
currentSlotOrder = [...slotPresets[currentSlotCount]];
// UI 업데이트
updateSlotCountBadge();
renderSlotList();
initSortable();
saveSlotConfigToStorage();
}
});
});
```
### 로컬 스토리지 저장/불러오기
```javascript
// 저장
function saveSlotConfigToStorage() {
localStorage.setItem('guidSlotCount', currentSlotCount.toString());
localStorage.setItem('guidSlotPriority', JSON.stringify(currentSlotOrder));
}
// 불러오기
function loadSlotConfigFromStorage() {
const savedCount = localStorage.getItem('guidSlotCount');
const savedOrder = localStorage.getItem('guidSlotPriority');
if (savedCount) {
currentSlotCount = parseInt(savedCount);
document.getElementById(`slotCount${currentSlotCount}`).checked = true;
}
if (savedOrder) {
currentSlotOrder = JSON.parse(savedOrder);
} else {
// 저장된 순서 없으면 프리셋 사용
currentSlotOrder = [...slotPresets[currentSlotCount]];
}
}
```
## 🎯 백엔드 호환성
백엔드 스크립트들은 이미 유연하게 구현되어 있습니다:
### PortGUID_v1.py
```python
# 환경변수에서 슬롯 우선순위 읽기
slot_priority_str = os.getenv("GUID_SLOT_PRIORITY", "")
if slot_priority_str:
# 사용자 지정 순서 (2개든 4개든 10개든 모두 처리)
desired_order = [s.strip() for s in slot_priority_str.split(",")]
else:
# 기본값 (슬롯 개수에 따라 자동 결정)
total_slots = len(slots_in_match_order)
if total_slots == 4:
desired_order = ['38', '37', '32', '34']
elif total_slots == 10:
desired_order = ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']
else:
desired_order = slots_in_match_order
# 존재하는 슬롯만 처리
for s in desired_order:
guid = slot_to_guid.get(s, "Not Found")
if guid != "Not Found": # 존재하는 슬롯만
f.write(f"Slot.{s}: {guid}\n")
hex_guid_list.append(f"0x{guid.replace(':', '').upper()}")
```
### GUIDtxtT0Execl.py
```python
# 슬롯 우선순위에 따라 데이터 재정렬
for slot_num in SLOT_PRIORITY:
slot_key = f"Slot.{slot_num}"
if slot_key in parsed_data: # txt 파일에 존재하는 슬롯만
reordered_data[slot_key] = parsed_data[slot_key]
```
## 💡 핵심 특징
### 1. **유연성**
- 2슬롯, 4슬롯, 10슬롯 모두 지원
- 커스텀 슬롯 개수도 확장 가능
- 존재하지 않는 슬롯은 자동으로 스킵
### 2. **사용자 편의성**
- 한 번에 한 가지 프리셋만 선택
- 프리셋 변경 시 즉시 UI 업데이트
- 기본값 복원 시 현재 프리셋의 기본 순서로 복원
### 3. **일관성**
- 모든 GUID 관련 작업에서 동일한 슬롯 개수/순서 적용
- 로컬 스토리지로 설정 유지
- 환경변수로 백엔드까지 일관되게 전달
### 4. **확장성**
- 새로운 프리셋 추가 용이
```javascript
const slotPresets = {
2: ['38', '37'],
4: ['38', '37', '32', '34'],
6: ['38', '39', '37', '36', '32', '34'], // 새로운 프리셋 추가
10: ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']
};
```
## ⚠️ 주의사항
### 1. **프리셋 변경 시**
- 기존에 드래그로 조정한 순서는 **초기화**됩니다
- 프리셋의 기본 순서로 리셋됨
- 필요시 다시 드래그로 조정 가능
### 2. **슬롯 번호 제한**
- 현재는 31~40 범위 내의 슬롯만 지원
- 다른 범위 슬롯 필요 시 프리셋 추가 필요
### 3. **하위 호환성**
- 환경변수가 없으면 스크립트가 자동으로 슬롯 개수 감지
- 기존 txt 파일도 정상 처리됨
## 🚀 향후 개선 방안
### 1. **커스텀 슬롯 입력**
- 프리셋 외에 직접 슬롯 번호 입력 가능
- 예: "32, 33, 38, 39" 입력
### 2. **자동 감지**
- 업로드된 txt 파일에서 실제 존재하는 슬롯 자동 감지
- 감지된 슬롯만 모달에 표시
### 3. **프리셋 관리**
- 사용자 정의 프리셋 저장
- 프로젝트별/서버별 프리셋 관리
### 4. **일괄 적용**
- 여러 서버에 동일한 설정 적용
- 프리셋 템플릿 공유 기능
## 📝 사용 예시
### 예제 1: 2슬롯 서버 (간단한 구성)
```
모달에서 "2 슬롯" 선택
순서: 38 → 37 (기본값 유지)
결과 txt 파일:
ABC1234
Slot.38: 00:11:22:33:44:55:66:77
Slot.37: 11:22:33:44:55:66:77:88
GUID: 0x0011223344556677;0x1122334455667788
```
### 예제 2: 4슬롯 서버 + 순서 커스터마이징
```
모달에서 "4 슬롯" 선택
순서 변경: 32, 34, 37, 38 (드래그로 조정)
결과 txt 파일:
ABC1234
Slot.32: AA:BB:CC:DD:EE:FF:00:11
Slot.34: BB:CC:DD:EE:FF:00:11:22
Slot.37: CC:DD:EE:FF:00:11:22:33
Slot.38: DD:EE:FF:00:11:22:33:44
GUID: 0xAABBCCDDEEFF0011;0xBBCCDDEEFF001122;0xCCDDEEFF00112233;0xDDEEFF0011223344
```
### 예제 3: 10슬롯 서버 (역순 정렬)
```
모달에서 "10 슬롯" 선택 (기본값)
순서 변경: 40, 31, 35, 34, 33, 32, 36, 37, 39, 38
결과: 지정한 순서대로 txt 파일 생성
```
## ✅ 테스트 체크리스트
- [x] 2슬롯 프리셋 선택 및 표시
- [x] 4슬롯 프리셋 선택 및 표시
- [x] 10슬롯 프리셋 선택 및 표시 (기본)
- [x] 프리셋 변경 시 슬롯 리스트 업데이트
- [x] 슬롯 개수 배지 동적 업데이트
- [x] 드래그 앤 드롭 정상 동작
- [x] 로컬 스토리지에 개수+순서 저장
- [x] 페이지 새로고침 후 설정 복원
- [x] 기본값 복원 버튼 (현재 프리셋 기준)
- [x] 백엔드 환경변수 전달
- [x] txt 파일 순서 적용
- [x] 엑셀 컬럼 순서 적용
- [x] GUID 합치기 순서 적용
## 🎉 결과
이제 **모든 슬롯 개수의 서버**에 대응할 수 있습니다!
```
2슬롯 서버 → "2 슬롯" 선택 → 38, 37만 표시 ✅
4슬롯 서버 → "4 슬롯" 선택 → 38, 37, 32, 34 표시 ✅
10슬롯 서버 → "10 슬롯" 선택 → 31~40 모두 표시 ✅
```
각 프리셋별로 최적화된 기본 순서가 제공되며,
사용자는 드래그로 자유롭게 순서를 조정할 수 있습니다!
**완벽한 유연성과 확장성을 갖춘 GUID 슬롯 관리 시스템 완성!** 🚀

View File

@@ -0,0 +1,341 @@
# GUID 슬롯 우선순위 및 GUID 합치기 기능 구현 (최종 버전)
## 📋 개요
GUID to Excel 버튼 클릭 시 슬롯 우선순위(Slot 31~40)를 사용자가 직접 지정할 수 있는 모달창을 추가하고, **GUID 값을 합치는 순서도 동일하게 적용**되도록 전체 시스템을 통합 구현했습니다.
## ✨ 구현된 핵심 기능
### 1. **슬롯 우선순위 설정 모달**
- GUID to Excel 버튼 클릭 → 모달창 표시
- Slot 31~40의 우선순위를 **드래그 앤 드롭**으로 변경
- **로컬 스토리지**에 자동 저장 → 다음 방문 시에도 유지
- 기본값 복원 버튼으로 초기 순서로 즉시 리셋
### 2. **GUID 합치기 순서 적용**
- 사용자가 지정한 슬롯 순서대로 GUID 값을 세미콜론(;)으로 연결
- **txt 파일 생성 시**: `PortGUID.py`, `PortGUID_v1.py` 스크립트에서 순서 적용
- **엑셀 변환 시**: `GUIDtxtT0Execl.py` 스크립트에서 컬럼 순서 적용
- **예시**: `GUID: 0x12345678;0x23456789;0x34567890` (지정된 슬롯 순서대로)
### 3. **환경변수 기반 통합**
- 모든 GUID 관련 스크립트가 **GUID_SLOT_PRIORITY** 환경변수를 읽음
- 모달에서 설정한 순서가 모든 처리 과정에 일관되게 적용
- 환경변수가 없으면 기본 순서 사용 (하위 호환성 보장)
### 4. **로컬 스토리지 활용**
- 사용자가 설정한 슬롯 순서를 브라우저에 저장
- 페이지 새로고침 후에도 설정 유지
- 다른 작업 시에도 동일한 순서 자동 적용
## 🔧 구현 세부사항
### Frontend 변경사항
#### **index.html - 모달 UI**
```html
<div class="modal fade" id="slotPriorityModal">
<div class="modal-body">
<!-- 드래그 가능한 슬롯 리스트 -->
<ul id="slotList" class="list-group">
<!-- JavaScript로 동적 생성 -->
</ul>
<form action="/update_guid_list" method="post">
<!-- 슬롯 순서를 hidden input으로 전달 -->
<input type="hidden" name="slot_priority" id="slot_priority_input">
</form>
</div>
</div>
```
#### **JavaScript - 로컬 스토리지 연동**
```javascript
// 로컬 스토리지에 저장
function saveSlotOrderToStorage() {
localStorage.setItem('guidSlotPriority', JSON.stringify(currentSlotOrder));
}
// 로컬 스토리지에서 불러오기
function loadSlotOrderFromStorage() {
const saved = localStorage.getItem('guidSlotPriority');
if (saved) {
currentSlotOrder = JSON.parse(saved);
}
}
// 페이지 로드 시 자동 불러오기
loadSlotOrderFromStorage();
// 드래그 종료 시 자동 저장
sortable.onEnd = function() {
saveSlotOrderToStorage();
};
```
### Backend 변경사항
#### **utilities.py - 환경변수 전달**
```python
@utils_bp.route("/update_guid_list", methods=["POST"])
def update_guid_list():
slot_priority = request.form.get("slot_priority", "")
env = os.environ.copy()
if slot_priority:
env["GUID_SLOT_PRIORITY"] = slot_priority
logging.info(f"GUID 슬롯 우선순위: {slot_priority}")
subprocess.run(
[sys.executable, "GUIDtxtT0Execl.py"],
env=env # 환경변수로 슬롯 순서 전달
)
```
#### **GUIDtxtT0Execl.py - 엑셀 컬럼 정렬**
```python
# 환경변수에서 슬롯 우선순위 읽기
slot_priority_str = os.getenv("GUID_SLOT_PRIORITY", "")
if slot_priority_str:
SLOT_PRIORITY = [s.strip() for s in slot_priority_str.split(",")]
else:
SLOT_PRIORITY = ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']
# 슬롯 우선순위에 따라 데이터 재정렬
reordered_data = OrderedDict()
reordered_data["S/T"] = parsed_data.get("S/T", "")
for slot_num in SLOT_PRIORITY:
slot_key = f"Slot.{slot_num}"
if slot_key in parsed_data:
reordered_data[slot_key] = parsed_data[slot_key]
# GUID 필드도 순서 유지
if "GUID" in parsed_data:
reordered_data["GUID"] = parsed_data["GUID"]
```
#### **PortGUID_v1.py - GUID 수집 및 합치기**
```python
# 환경변수에서 슬롯 우선순위 읽기
slot_priority_str = os.getenv("GUID_SLOT_PRIORITY", "")
if slot_priority_str:
desired_order = [s.strip() for s in slot_priority_str.split(",")]
logging.info(f"사용자 지정 슬롯 우선순위 사용: {desired_order}")
else:
# 기본 우선순위 (슬롯 개수에 따라)
total_slots = len(slots_in_match_order)
if total_slots == 4:
desired_order = ['38', '37', '32', '34']
elif total_slots == 10:
desired_order = ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']
# 지정된 순서대로 GUID 합치기
hex_guid_list = []
for s in desired_order:
guid = slot_to_guid.get(s, "Not Found")
f.write(f"Slot.{s}: {guid}\n")
if guid != "Not Found":
hex_guid_list.append(f"0x{guid.replace(':', '').upper()}")
if hex_guid_list:
# GUID: 0xAAA;0xBBB;0xCCC 형식으로 저장
f.write(f"GUID: {';'.join(hex_guid_list)}\n")
```
#### **PortGUID.py - 동일 로직 적용**
```python
# 슬롯별 GUID를 딕셔너리로 수집
slot_to_guid = {}
for number, slot in matches:
port_guid = fetch_port_guid(...)
slot_to_guid[slot] = port_guid
# 환경변수에서 슬롯 우선순위 읽기
slot_priority_str = os.getenv("GUID_SLOT_PRIORITY", "")
if slot_priority_str:
desired_order = [s.strip() for s in slot_priority_str.split(",")]
else:
desired_order = slots_found # 발견된 순서
# 지정된 순서대로 GUID 합치기
hex_guid_list = []
for slot in desired_order:
port_guid = slot_to_guid.get(slot, "Not Found")
f.write(f"Slot.{slot}: {port_guid}\n")
if port_guid != "Not Found":
hex_guid_list.append(f"0x{port_guid.replace(':', '').upper()}")
f.write(f"GUID: {';'.join(hex_guid_list)}\n")
```
## 📊 전체 동작 흐름
### 시나리오 1: 엑셀 생성 (모달 사용)
```
1. 서버 리스트 입력
2. "GUID to Excel" 버튼 클릭
3. 모달창 표시 (저장된 순서 or 기본 순서)
4. 드래그 앤 드롭으로 순서 변경
5. "확인 및 엑셀 생성" 클릭
6. 슬롯 순서 → 로컬 스토리지 저장
7. 슬롯 순서 → 환경변수로 백엔드 전달
8. GUIDtxtT0Execl.py 실행
9. 지정된 순서대로 엑셀 컬럼 정렬 ✅
10. GUID 필드도 동일한 순서로 합쳐짐 ✅
```
### 시나리오 2: IP 처리 (GUID 수집)
```
1. IP 주소 입력 + GUID 스크립트 선택
2. "처리 시작" 버튼 클릭
3. 로컬 스토리지에서 슬롯 순서 읽기
4. 환경변수로 슬롯 순서 전달 (선택사항)
5. PortGUID.py / PortGUID_v1.py 실행
6. 슬롯 GUID 수집
7. 지정된 순서대로 txt 파일에 저장 ✅
8. GUID 합치기도 동일한 순서 적용 ✅
```
## 🎯 txt 파일 출력 예시
**사용자 지정 순서: 40, 39, 38, 37, 36, 35, 34, 33, 32, 31**
```txt
ABC1234
Slot.40: 00:11:22:33:44:55:66:77
Slot.39: 11:22:33:44:55:66:77:88
Slot.38: 22:33:44:55:66:77:88:99
Slot.37: 33:44:55:66:77:88:99:AA
Slot.36: 44:55:66:77:88:99:AA:BB
Slot.35: 55:66:77:88:99:AA:BB:CC
Slot.34: 66:77:88:99:AA:BB:CC:DD
Slot.33: 77:88:99:AA:BB:CC:DD:EE
Slot.32: 88:99:AA:BB:CC:DD:EE:FF
Slot.31: 99:AA:BB:CC:DD:EE:FF:00
GUID: 0x0011223344556677;0x1122334455667788;0x2233445566778899;...
```
## 💡 핵심 기능
### 1. **일관성 보장**
- 모든 GUID 관련 작업에서 동일한 슬롯 순서 적용
- txt 파일 생성 → 엑셀 변환까지 순서 유지
### 2. **사용자 편의성**
- 한 번 설정하면 계속 유지 (로컬 스토리지)
- 드래그 앤 드롭으로 직관적인 순서 변경
- 기본값 복원 버튼으로 쉬운 리셋
### 3. **유연성**
- 환경변수 없으면 기본 순서 사용 (하위 호환)
- 슬롯 개수(4개/10개)에 따라 자동 대응
- 모든 GUID 스크립트에서 일관되게 동작
### 4. **확장성**
- 새로운 GUID 스크립트 추가 시 환경변수만 읽으면 됨
- 프리셋 기능 추가 가능 (향후)
- API 엔드포인트로 확장 가능
## 🔍 기술적 특징
### Frontend
- **SortableJS**: 드래그 앤 드롭 UI
- **LocalStorage**: 브라우저 저장소 활용
- **Bootstrap Modal**: 모달 UI
- **JavaScript**: 순서 관리 및 전송
### Backend
- **환경변수**: 프로세스 간 데이터 전달
- **subprocess**: 스크립트 실행 시 env 전달
- **Flask**: 라우팅 및 폼 처리
### 데이터
- **OrderedDict**: Python에서 순서 유지
- **Pandas**: 엑셀 생성 시 컬럼 순서 적용
## ⚠️ 주의사항
1. **환경변수 우선순위**:
- 환경변수 있음 → 사용자 지정 순서 적용
- 환경변수 없음 → 기본 순서 또는 발견된 순서
2. **로컬 스토리지 제한**:
- 브라우저별로 독립적 (Chrome/Edge 간 공유 안 됨)
- 브라우저 캐시 삭제 시 초기화
3. **스크립트 호환성**:
- `PortGUID.py`, `PortGUID_v1.py` 모두 지원
- 다른 GUID 스크립트 추가 시 환경변수 읽기 로직 필요
## 🚀 향후 개선 방안
1. **서버 저장**: 로컬 스토리지 대신 DB에 저장하여 여러 브라우저에서 공유
2. **프리셋 기능**: 자주 사용하는 순서를 프리셋으로 저장
3. **자동 감지**: txt 파일에서 실제 존재하는 슬롯만 표시
4. **일괄 적용**: IP 처리 시에도 모달에서 순서 설정 가능
5. **검증 강화**: 슬롯 번호 유효성 검사 및 중복 체크
## 📝 관련 파일
### Frontend
- `backend/templates/index.html` - 모달 UI 및 JavaScript
### Backend
- `backend/routes/utilities.py` - 환경변수 전달
- `backend/routes/main.py` - IP 처리 라우트
### Scripts
- `data/scripts/PortGUID.py` - GUID 수집 (기본)
- `data/scripts/PortGUID_v1.py` - GUID 수집 (v1)
- `data/server_list/GUIDtxtT0Execl.py` - 엑셀 변환
## ✅ 테스트 완료
- [x] 모달창 정상 표시
- [x] 드래그 앤 드롭 동작
- [x] 로컬 스토리지 저장/불러오기
- [x] 기본값 복원 버튼
- [x] 슬롯 순서 백엔드 전달
- [x] 환경변수 읽기 (모든 스크립트)
- [x] txt 파일 슬롯 순서 적용
- [x] GUID 합치기 순서 적용
- [x] 엑셀 컬럼 순서 적용
- [x] 기본 순서 동작 (환경변수 없을 때)
## 🎉 결과
이제 GUID 관련 모든 작업에서 **슬롯 우선순위와 GUID 합치는 순서가 완벽하게 통합**되어 동작합니다!
사용자가 모달에서 한 번 설정하면:
1. ✅ 로컬 스토리지에 저장되어 다음에도 유지
2. ✅ txt 파일 생성 시 해당 순서로 저장
3. ✅ GUID 합치기도 동일한 순서 적용
4. ✅ 엑셀 변환 시 컬럼 순서도 일치
**완벽한 일관성과 사용자 편의성을 모두 확보했습니다!** 🚀

View File

@@ -0,0 +1,146 @@
# GUID 엑셀 변환 시 슬롯 우선순위 설정 기능 구현
## 📋 개요
GUID to Excel 버튼 클릭 시 슬롯 우선순위(slot 31~40)를 사용자가 직접 지정할 수 있는 모달창을 추가하여, 지정된 순서대로 엑셀 파일에 저장되도록 기능을 구현했습니다.
## ✨ 주요 기능
### 1. **모달창 기반 UI**
- GUID to Excel 버튼 클릭 시 모달창 표시
- Slot 31~40의 우선순위를 드래그 앤 드롭으로 변경 가능
- 기본값 복원 버튼으로 초기 순서로 리셋 가능
### 2. **드래그 앤 드롭 인터페이스**
- **SortableJS** 라이브러리 사용
- 직관적인 슬롯 순서 조정
- 실시간으로 순위 번호 업데이트
### 3. **백엔드 처리**
- 사용자가 지정한 슬롯 순서를 환경변수로 전달
- `GUIDtxtT0Execl.py` 스크립트에서 슬롯 우선순위를 읽어서 처리
- 지정된 순서대로 엑셀 컬럼 정렬
## 🔧 구현 세부사항
### Frontend 변경사항
#### **index.html**
**모달창 추가:**
```html
<div class="modal fade" id="slotPriorityModal">
<!-- 슬롯 우선순위 설정 UI -->
<ul id="slotList" class="list-group">
<!-- JavaScript로 동적 생성 -->
</ul>
<form id="slotPriorityForm" action="/update_guid_list" method="post">
<input type="hidden" name="slot_priority" id="slot_priority_input">
<!-- 서버 리스트 내용도 함께 전달 -->
</form>
</div>
```
**JavaScript 로직:**
- `SortableJS` 라이브러리를 사용하여 드래그 앤 드롭 구현
- 기본 슬롯 순서: `['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']`
- 폼 제출 시 슬롯 순서를 콤마로 구분된 문자열로 전달
### Backend 변경사항
#### **utilities.py**
```python
@utils_bp.route("/update_guid_list", methods=["POST"])
def update_guid_list():
slot_priority = request.form.get("slot_priority", "")
# 환경변수로 슬롯 우선순위 전달
env = os.environ.copy()
if slot_priority:
env["GUID_SLOT_PRIORITY"] = slot_priority
result = subprocess.run(
[sys.executable, "GUIDtxtT0Execl.py"],
env=env, # 환경변수 전달
...
)
```
#### **GUIDtxtT0Execl.py**
```python
# 환경변수에서 슬롯 우선순위 읽기
slot_priority_str = os.getenv("GUID_SLOT_PRIORITY", "")
if slot_priority_str:
SLOT_PRIORITY = [s.strip() for s in slot_priority_str.split(",")]
else:
# 기본 우선순위
SLOT_PRIORITY = ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40']
# 데이터 재정렬
for slot_num in SLOT_PRIORITY:
slot_key = f"Slot.{slot_num}"
if slot_key in parsed_data:
reordered_data[slot_key] = parsed_data[slot_key]
```
## 📊 사용 흐름
1. **서버 리스트 입력**: 텍스트 영역에 서버 목록 입력
2. **GUID to Excel 버튼 클릭**: 모달창 표시
3. **슬롯 우선순위 설정**: 드래그 앤 드롭으로 순서 변경
4. **확인 버튼 클릭**: 설정된 순서로 엑셀 생성
5. **결과 확인**: 지정된 슬롯 순서대로 엑셀에 저장됨
## 🎨 UI 특징
- **직관적인 디자인**: 순위 번호가 원형 배지로 표시
- **시각적 피드백**: 드래그 시 반투명 효과 및 하이라이트
- **기본값 복원**: 한 번의 클릭으로 초기 순서로 리셋
- **반응형**: 모달창 크기 조정 가능
## 🔍 기술 스택
- **Frontend**:
- Bootstrap 5 (모달, 스타일링)
- SortableJS 1.15.0 (드래그 앤 드롭)
- Vanilla JavaScript (로직 처리)
- **Backend**:
- Flask (라우팅)
- Python subprocess (스크립트 실행)
- 환경변수 (슬롯 순서 전달)
- **데이터 처리**:
- Pandas (엑셀 생성)
- OrderedDict (순서 유지)
## ⚠️ 주의사항
1. **서버 리스트 필수**: 모달 열기 전에 서버 리스트를 입력해야 함
2. **슬롯 개수**: 현재는 10개 슬롯(31~40) 기준으로 구현
3. **호환성**: 기존 *.txt 파일 형식과 호환됨
## 🚀 향후 개선 방안
1. **동적 슬롯 개수**: txt 파일에서 실제 존재하는 슬롯만 표시
2. **프리셋 저장**: 자주 사용하는 슬롯 순서를 프리셋으로 저장
3. **일괄 적용**: 여러 서버에 동일한 슬롯 순서 적용
4. **검증 강화**: 슬롯 번호 유효성 검사 추가
## ✅ 테스트 시나리오
1. ✓ 모달창 정상 표시
2. ✓ 드래그 앤 드롭 동작 확인
3. ✓ 기본값 복원 버튼 동작
4. ✓ 슬롯 순서가 백엔드로 정상 전달
5. ✓ 엑셀 파일에 순서대로 저장
6. ✓ 환경변수 전달 확인
7. ✓ 기본 순서 동작 (슬롯 우선순위 미지정 시)
## 📝 관련 파일
- `backend/templates/index.html` - 모달 UI 및 JavaScript
- `backend/routes/utilities.py` - 백엔드 라우트 처리
- `data/server_list/GUIDtxtT0Execl.py` - 엑셀 생성 로직

View File

@@ -0,0 +1,241 @@
# 슬롯 설정 완전 단순화 (최종)
## 🎉 드래그 앤 드롭 제거!
복잡한 드래그 앤 드롭 대신 **텍스트 입력만**으로 슬롯을 설정할 수 있게 완전히 단순화했습니다!
## ✨ 새로운 간단한 방식
### 1문. **텍스트 입력 필드**
```
┌─────────────────────────────────────┐
│ 슬롯 번호: [3개] │
│ ┌─────────────────────────────────┐ │
│ │ 38, 39, 37 │ │
│ └─────────────────────────────────┘ │
│ 💡 팁: 위에서부터 순서대로 우선순위 │
└─────────────────────────────────────┘
```
### 2. **빠른 프리셋 버튼**
```
[2슬롯] [4슬롯] [10슬롯]
```
클릭하면 자동으로 입력 필드 채워짐!
### 3. **실시간 미리보기**
```
┌─────────────────────────────────────┐
│ 미리보기: │
│ [1] Slot 38 [2] Slot 39 [3] Slot 37│
│ 💡 순서: 38 → 39 → 37 │
└─────────────────────────────────────┘
```
## 🚀 사용 방법
### 방법 1: 빠른 프리셋 사용
```
1. [2슬롯] 또는 [4슬롯] 또는 [10슬롯] 클릭
2. 입력 필드에 자동으로 슬롯 번호 채워짐
3. 필요하면 직접 수정
4. [확인] 클릭
```
### 방법 2: 직접 입력
```
1. 입력 필드에 슬롯 번호 입력
예: 38, 39, 37
2. 실시간 미리보기 확인
3. 순서 변경하고 싶으면 입력 필드에서 직접 수정
예: 37, 38, 39 (순서 변경)
4. [확인] 클릭
```
## 💡 입력 예시
### 1슬롯
```
38
```
### 2슬롯
```
38, 37
또는
38
37
```
### 4슬롯
```
32, 34, 38, 39
```
### 10슬롯
```
38, 39, 37, 36, 32, 33, 34, 35, 31, 40
또는 여러 줄로:
38
39
37
36
...
```
### 순서 변경
```
처음: 38, 37, 32
변경: 32, 38, 37 ← 입력 필드에서 직접 수정!
```
## ⚡ 핵심 장점
### 1. **초간단**
- 드래그 필요 없음
- 그냥 타이핑하면 끝!
- 복사 & 붙여넣기 가능
### 2. **명확한 순서**
- 위에서 아래로 = 우선순위
- 눈으로 바로 확인
- 수정도 바로 가능
### 3. **실시간 미리보기**
- 입력하면 즉시 미리보기
- 개수 자동 표시
- 순서 화살표로 표시
### 4. **자동 저장**
- 로컬 스토리지에 자동 저장
- 다음에 모달 열면 이전 설정 그대로
- 별도 저장 버튼 필요 없음
### 5. **유연한 입력**
- 콤마로 구분: `38, 39, 37`
- 줄바꿈으로 구분: `38\n39\n37`
- 공백도 OK: `38 39 37`
- 중복 자동 제거
- 숫자 아닌 것 자동 무시
## 🔧 기술적 개선
### 파싱 로직
```javascript
function parseSlots(input) {
return input.split(/[,\s\n]+/) // 콤마, 공백, 줄바꿈 모두 허용
.map(s => s.trim())
.filter(s => s !== '')
.filter(s => /^\d+$/.test(s)) // 숫자만
.filter((v, i, a) => a.indexOf(v) === i); // 중복 제거
}
```
### 실시간 업데이트
```javascript
slotNumbersInput.addEventListener('input', updatePreview);
```
타이핑하자마자 미리보기 업데이트!
### 자동 저장
```javascript
function saveToStorage() {
localStorage.setItem('guidSlotNumbers', slotNumbersInput.value);
}
```
## 📊 비교
### 이전 (복잡)
```
❌ 드래그 앤 드롭 필요
❌ 그립 아이콘 찾아야 함
❌ 손 모양 커서 안 나타남
❌ 순서 변경 어려움
❌ 모바일에서 불편
```
### 현재 (간단)
```
✅ 텍스트만 입력
✅ 복사 & 붙여넣기
✅ 순서는 그냥 타이핑 순서
✅ 실시간 미리보기
✅ 모바일에서도 편함
✅ Excel에서 복사 가능
```
## 🎯 실제 사용 시나리오
### 시나리오 1: 4슬롯 서버 설정
```
1. 모달 열기
2. 입력: 32, 34, 38, 39
3. 미리보기 확인: [1]Slot 32 [2]Sl34 [3]Slot 38 [4]Slot 39
4. [확인] 클릭
완료!
```
### 시나리오 2: 순서 변경
```
1. 현재: 38, 39, 37
2. 입력 필드에서 직접 수정: 37, 38, 39
3. 미리보기: [1]Slot 37 [2]Slot 38 [3]Slot 39
4. [확인] 클릭
완료!
```
### 시나리오 3: Excel에서 복사
```
1. Excel에 슬롯 목록 있음:
38
39
37
36
2. 복사 (Ctrl+C)
3. 모달 입력 필드에 붙여넣기 (Ctrl+V)
4. 자동 파싱: 38, 39, 37, 36
완료!
```
## ✅ 완료 체크리스트
- [x] 드래그 앤 드롭 제거
- [x] 텍스트 입력 필드 추가
- [x] 빠른 프리셋 버튼 (2, 4, 10슬롯)
- [x] 실시간 미리보기
- [x] 개수 자동 표시
- [x] 순서 화살표 표시
- [x] 로컬 스토리지 자동 저장
- [x] 입력 검증 (숫자만, 중복 제거)
- [x] 여러 구분자 지원 (콤마, 공백, 줄바꿈)
- [x] 빈 슬롯 검증
## 🎉 최종 결과
이제 **완전히 직관적**입니다!
```
입력 필드에 슬롯 번호 입력
실시간 미리보기 확인
[확인] 클릭
완료! ✅
```
**드래그 걱정 없이, 텍스트만 입력하면 끝!** 🚀
훨씬 간단하고 확실하고 빠릅니다!

View File

@@ -520,6 +520,15 @@ idrac_info/
2. GUID 데이터 입력
3. 서버 리스트 매핑
4. Excel 파일 생성 및 다운로드
523:
524: #### GUID 수집 및 슬롯 우선순위 설정
525: 1. "GUID to Excel" 섹션 선택
526: 2. "슬롯 설정" 모달 창 열기
527: 3. 원하는 슬롯 순서 입력 또는 프리셋 버튼(2슬롯, 4슬롯, 10슬롯) 사용
528: - 예: `38, 37` (2슬롯), `38, 37, 32, 34` (4슬롯)
529: - 입력된 순서대로 엑셀 컬럼이 정렬됩니다.
530: 4. GUID 데이터 입력 및 확인 버튼 클릭
531: 5. Excel 파일 생성 및 다운로드
### 7. 작업 모니터링

Binary file not shown.

6
app.py
View File

@@ -92,7 +92,7 @@ watchdog_handler.socketio = socketio
# ─────────────────────────────────────────────────────────────
# DB / 마이그레이션
# ─────────────────────────────────────────────────────────────
app.logger.info("DB URI = %s", app.config.get("SQLALCHEMY_DATABASE_URI"))
app.logger.debug("DB URI = %s", app.config.get("SQLALCHEMY_DATABASE_URI"))
db.init_app(app)
Migrate(app, db)
@@ -140,14 +140,14 @@ def start_telegram_bot_polling() -> None:
if _bot_socket_lock:
return
app.logger.info("🔒 봇 중복 실행 방지 락(TCP:50000) 획득 시도...")
app.logger.debug("🔒 봇 중복 실행 방지 락(TCP:50000) 획득 시도...")
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("127.0.0.1", 50000))
s.listen(1)
_bot_socket_lock = s
app.logger.info("🔒 락 획득 성공! 봇 폴링 스레드를 시작합니다.")
app.logger.debug("🔒 락 획득 성공! 봇 폴링 스레드를 시작합니다.")
except OSError:
app.logger.warning("⛔ 락 획득 실패: 이미 다른 프로세스(또는 좀비 프로세스)가 포트 50000을 점유 중입니다. 봇 폴링을 건너뜁니다.")
return

View File

@@ -245,3 +245,39 @@ def download_zip():
def download_backup_file(date: str, filename: str):
backup_path = Path(Config.BACKUP_FOLDER) / date
return send_from_directory(str(backup_path), filename, as_attachment=True)
@main_bp.route("/move_backup_files", methods=["POST"])
@login_required
def move_backup_files():
data = request.get_json()
filename = data.get("filename")
source_folder = data.get("source_folder")
target_folder = data.get("target_folder")
if not all([filename, source_folder, target_folder]):
return jsonify({"success": False, "message": "필수 파라미터가 누락되었습니다."}), 400
base_backup = Path(Config.BACKUP_FOLDER)
src_path = base_backup / source_folder / filename
dst_path = base_backup / target_folder / filename
# 경로 보안 검사 및 파일 존재 확인
try:
if not src_path.exists():
return jsonify({"success": False, "message": "원본 파일이 존재하지 않습니다."}), 404
# 상위 경로 탈출 방지 확인 (간단 검증)
if ".." in source_folder or ".." in target_folder:
return jsonify({"success": False, "message": "잘못된 경로입니다."}), 400
if not (base_backup / target_folder).exists():
return jsonify({"success": False, "message": "대상 폴더가 존재하지 않습니다."}), 404
shutil.move(str(src_path), str(dst_path))
logging.info(f"파일 이동 성공: {filename} from {source_folder} to {target_folder}")
return jsonify({"success": True, "message": "파일이 이동되었습니다."})
except Exception as e:
logging.error(f"파일 이동 실패: {e}")
return jsonify({"success": False, "message": f"이동 중 오류 발생: {str(e)}"}), 500

View File

@@ -24,51 +24,122 @@ def move_mac_files():
dst.mkdir(parents=True, exist_ok=True)
moved = 0
skipped = 0
missing = 0
errors = []
try:
for file in src.iterdir():
if not file.is_file():
continue
# JSON 요청 파싱 (overwrite 플래그 확인)
data = request.get_json(silent=True) or {}
overwrite = data.get("overwrite", False)
# 1. 대상 파일 스냅샷 (이동 시도할, 또는 해야할 파일들)
try:
# 파일이 존재하는지 확인
if not file.exists():
errors.append(f"{file.name}: 파일이 존재하지 않음")
continue
current_files = [f for f in src.iterdir() if f.is_file()]
except Exception as e:
logging.error(f"파일 목록 조회 실패: {e}")
return jsonify({"success": False, "error": str(e)})
# 대상 파일이 이미 존재하는 경우 건너뛰기
# [중복 체크 로직] 덮어쓰기 모드가 아닐 때, 미리 중복 검사
if not overwrite:
duplicates = []
for file in current_files:
target = dst / file.name
if target.exists():
logging.warning(f"⚠️ 파일이 이미 존재하여 건너뜀: {file.name}")
duplicates.append(file.name)
if duplicates:
return jsonify({
"success": False,
"requires_confirmation": True,
"duplicates": duplicates,
"duplicate_count": len(duplicates)
})
else:
logging.warning(f"⚠️ [MAC] 덮어쓰기 모드 활성화됨 - 중복 파일을 덮어씁니다.")
total_target_count = len(current_files)
# 카운터
moved_count = 0 # 내가 직접 옮김 (또는 덮어씀)
verified_count = 0 # 최종적으로 목적지에 있음을 확인 (성공)
lost_count = 0 # 소스에도 없고 목적지에도 없음 (진짜 유실?)
errors = []
for file in current_files:
target = dst / file.name
# [Step 1] 이미 목적지에 있는지 확인
if target.exists():
if overwrite:
# 덮어쓰기 모드: 기존 파일 삭제 후 이동 진행 (또는 바로 move로 덮어쓰기)
# shutil.move는 대상이 존재하면 에러가 날 수 있으므로(버전/OS따라 다름), 안전하게 삭제 시도
try:
# Windows에서는 사용 중인 파일 삭제 시 에러 발생 가능
# shutil.move(src, dst)는 dst가 존재하면 덮어쓰기 시도함 (Python 3.x)
pass
except Exception:
pass
else:
# (중복 체크를 통과했거나 Race Condition으로 생성된 경우) -> 이미 완료된 것으로 간주
verified_count += 1
logging.info(f"⏭️ 파일 이미 존재 (Skipped): {file.name}")
continue
shutil.move(str(file), str(target))
moved += 1
# [Step 2] 소스에 있는지 확인 (Race Condition)
if not file.exists():
if target.exists():
verified_count += 1
continue
else:
lost_count += 1
logging.warning(f"❓ 이동 중 사라짐: {file.name}")
continue
# [Step 3] 이동 시도 (덮어쓰기 포함)
try:
shutil.move(str(file), str(target))
moved_count += 1
verified_count += 1
except shutil.Error as e:
# shutil.move might raise Error if destination exists depending on implementation,
# but standard behavior overwrites if not same file.
# If exact same file, verified.
if target.exists():
verified_count += 1
else:
errors.append(f"{file.name}: {str(e)}")
except FileNotFoundError:
# 옮기려는 찰나에 사라짐 -> 목적지 재확인
if target.exists():
verified_count += 1
logging.info(f"⏭️ 동시 처리됨 (완료): {file.name}")
else:
lost_count += 1
except Exception as e:
# 권한 에러 등 진짜 실패
error_msg = f"{file.name}: {str(e)}"
errors.append(error_msg)
logging.error(f" 파일 이동 실패: {error_msg}")
logging.error(f"❌ 이동 에러: {error_msg}")
# 결과 로깅
if moved > 0:
logging.info(f"✅ MAC 파일 이동 완료 ({moved}개)")
# 결과 요약
msg = f"{total_target_count}건 중 {verified_count}건 처리 완료"
if moved_count < verified_count:
msg += f" (이동: {moved_count}, 이미 완료: {verified_count - moved_count})"
if errors:
logging.warning(f"⚠️ 일부 파일 이동 실패: {errors}")
if lost_count > 0:
msg += f", 확인 불가: {lost_count}"
logging.info(f"✅ MAC 처리 결과: {msg}")
flash(msg, "success" if lost_count == 0 else "warning")
# 하나라도 성공하면 success: true 반환
return jsonify({
"success": True,
"moved": moved,
"total": total_target_count,
"verified": verified_count,
"message": msg,
"errors": errors if errors else None
})
except Exception as e:
logging.error(f"❌ MAC 이동 중 치명적 오류: {e}")
return jsonify({"success": False, "error": str(e)})
@utils_bp.route("/move_guid_files", methods=["POST"])
@login_required
@@ -78,47 +149,86 @@ def move_guid_files():
dst.mkdir(parents=True, exist_ok=True)
moved = 0
skipped = 0
missing = 0
errors = []
try:
for file in src.iterdir():
if not file.is_file():
continue
# JSON 요청 파싱 (overwrite 플래그 확인)
data = request.get_json(silent=True) or {}
overwrite = data.get("overwrite", False)
try:
# 파일이 존재하는지 확인
if not file.exists():
errors.append(f"{file.name}: 파일이 존재하지 않음")
continue
files = [f for f in src.iterdir() if f.is_file()]
except Exception:
files = []
# 대상 파일이 이미 존재하는 경우 건너뛰기
# [중복 체크]
if not overwrite:
duplicates = []
for file in files:
target = dst / file.name
if target.exists():
logging.warning(f"⚠️ 파일이 이미 존재하여 건너뜀: {file.name}")
duplicates.append(file.name)
if duplicates:
return jsonify({
"success": False,
"requires_confirmation": True,
"duplicates": duplicates,
"duplicate_count": len(duplicates)
})
else:
logging.warning(f"⚠️ [GUID] 덮어쓰기 모드 활성화됨 - 중복 파일을 덮어씁니다.")
total_target_count = len(files)
verified_count = 0
moved_count = 0
errors = []
lost_count = 0
try:
for file in files:
target = dst / file.name
# 1. 이미 완료되었는지 확인
if target.exists():
if not overwrite:
verified_count += 1
continue
# overwrite=True면 계속 진행하여 덮어쓰기 시도
# 2. 소스 확인
if not file.exists():
if target.exists(): verified_count += 1
else: lost_count += 1
continue
# 3. 이동
try:
shutil.move(str(file), str(target))
moved += 1
moved_count += 1
verified_count += 1
except FileNotFoundError:
if target.exists(): verified_count += 1
else: lost_count += 1
except Exception as e:
errors.append(f"{file.name}: {e}")
# 상세 메시지
msg = f"{total_target_count}건 중 {verified_count}건 처리 완료"
logging.info(f"✅ GUID 처리: {msg}")
flash(msg, "success" if lost_count == 0 else "warning")
return jsonify({
"success": True,
"total": total_target_count,
"verified": verified_count,
"message": msg,
"errors": errors if errors else None
})
except Exception as e:
error_msg = f"{file.name}: {str(e)}"
errors.append(error_msg)
logging.error(f"❌ 파일 이동 실패: {error_msg}")
# 결과 메시지
if moved > 0:
flash(f"GUID 파일이 성공적으로 이동되었습니다. ({moved}개)", "success")
logging.info(f"✅ GUID 파일 이동 완료 ({moved}개)")
if errors:
logging.warning(f"⚠️ 일부 파일 이동 실패: {errors}")
flash(f"일부 파일 이동 실패: {len(errors)}", "warning")
except Exception as e:
logging.error(f"❌ GUID 이동 오류: {e}")
flash(f"오류 발생: {e}", "danger")
return redirect(url_for("main.index"))
logging.error(f"❌ GUID 이동 중 오류: {e}")
return jsonify({"success": False, "error": str(e)})
@utils_bp.route("/move_gpu_files", methods=["POST"])
@login_required
@@ -131,52 +241,85 @@ def move_gpu_files():
dst.mkdir(parents=True, exist_ok=True)
moved = 0
skipped = 0
missing = 0
errors = []
try:
for file in src.iterdir():
if not file.is_file():
continue
# GPU 관련 텍스트 파일만 이동 (GUID 등 제외)
if not file.name.lower().endswith(".txt"):
continue
# JSON 요청 파싱
data = request.get_json(silent=True) or {}
overwrite = data.get("overwrite", False)
try:
# 파일 존재 확인
if not file.exists():
errors.append(f"{file.name}: 파일이 존재하지 않음")
continue
files = [f for f in src.iterdir() if f.is_file()]
except Exception:
files = []
# 대상 파일이 이미 존재하면 스킵
# [중복 체크]
if not overwrite:
duplicates = []
for file in files:
target = dst / file.name
if target.exists():
logging.warning(f"⚠️ 이미 존재하여 건너뜀: {file.name}")
duplicates.append(file.name)
if duplicates:
return jsonify({
"success": False,
"requires_confirmation": True,
"duplicates": duplicates,
"duplicate_count": len(duplicates)
})
else:
logging.warning(f"⚠️ [GPU] 덮어쓰기 모드 활성화됨 - 중복 파일을 덮어씁니다.")
total_target_count = len(files)
verified_count = 0
moved_count = 0
errors = []
lost_count = 0
try:
for file in files:
target = dst / file.name
# 1. 존재 확인 (덮어쓰기 아닐 경우)
if target.exists():
if not overwrite:
verified_count += 1
continue
# 파일 이동
# 2. 소스 확인
if not file.exists():
if target.exists(): verified_count += 1
else: lost_count += 1
continue
# 3. 이동
try:
shutil.move(str(file), str(target))
moved += 1
moved_count += 1
verified_count += 1
except FileNotFoundError:
if target.exists(): verified_count += 1
else: lost_count += 1
except Exception as e:
error_msg = f"{file.name}: {str(e)}"
errors.append(error_msg)
logging.error(f"❌ GPU 파일 이동 실패: {error_msg}")
errors.append(f"{file.name}: {e}")
# 결과 메시지
if moved > 0:
flash(f"GPU 시리얼 파일이 성공적으로 이동되었습니다. ({moved}개)", "success")
logging.info(f"✅ GPU 파일 이동 완료 ({moved}개)")
# 상세 메시지
msg = f"{total_target_count}건 중 {verified_count}건 처리 완료"
logging.info(f"GPU 처리: {msg}")
flash(msg, "success")
if errors:
logging.warning(f"⚠️ 일부 파일 이동 실패: {errors}")
flash(f"일부 GPU 파일 이동 실패: {len(errors)}", "warning")
return jsonify({
"success": True,
"total": total_target_count,
"verified": verified_count,
"message": msg,
"errors": errors if errors else None
})
except Exception as e:
logging.error(f"❌ GPU 이동 오류: {e}")
flash(f"오류 발생: {e}", "danger")
return redirect(url_for("main.index"))
return jsonify({"success": False, "error": str(e)})
@utils_bp.route("/update_server_list", methods=["POST"])
@login_required
@@ -213,6 +356,8 @@ def update_server_list():
@login_required
def update_guid_list():
content = request.form.get("server_list_content")
slot_priority = request.form.get("slot_priority", "") # 슬롯 우선순위 받기
if not content:
flash("내용을 입력하세요.", "warning")
return redirect(url_for("main.index"))
@@ -220,6 +365,13 @@ def update_guid_list():
path = Path(Config.SERVER_LIST_FOLDER) / "guid_list.txt"
try:
path.write_text(content, encoding="utf-8")
# 슬롯 우선순위를 환경변수로 전달
env = os.environ.copy()
if slot_priority:
env["GUID_SLOT_PRIORITY"] = slot_priority
logging.info(f"GUID 슬롯 우선순위: {slot_priority}")
result = subprocess.run(
[sys.executable, str(Path(Config.SERVER_LIST_FOLDER) / "GUIDtxtT0Execl.py")],
capture_output=True,
@@ -227,6 +379,7 @@ def update_guid_list():
check=True,
cwd=str(Path(Config.SERVER_LIST_FOLDER)),
timeout=300,
env=env, # 환경변수 전달
)
logging.info(f"GUID 리스트 스크립트 실행 결과: {result.stdout}")
flash("GUID 리스트가 업데이트되었습니다.", "success")

View File

@@ -26,6 +26,35 @@ def setup_logging(app: Optional[object] = None) -> logging.Logger:
log_dir = _ensure_log_dir()
log_path = log_dir / "app.log"
# ─────────────────────────────────────────────────────────────
# [Fix] 앱 시작 시점에 app.log가 있고 날짜가 지났다면 강제 로테이션 (백업)
# TimedRotatingFileHandler는 프로세스가 재시작되면 파일의 생성일을 기준으로
# 롤오버를 즉시 수행하지 않고 append 모드로 여는 경우가 많음.
# 이를 보완하기 위해, 직접 날짜를 확인하고 파일을 옮겨준다.
# ─────────────────────────────────────────────────────────────
if log_path.exists():
try:
from datetime import date
# 파일 마지막 수정 시간 확인
mtime = os.path.getmtime(log_path)
file_date = date.fromtimestamp(mtime)
today = date.today()
# "파일 날짜" < "오늘" 이면 백업
if file_date < today:
backup_name = file_date.strftime("%Y-%m-%d.log")
backup_path = log_dir / backup_name
# 이미 백업 파일이 있으면 굳이 덮어쓰거나 하지 않음(안전성)
if not backup_path.exists():
os.rename(log_path, backup_path)
print(f"[Logger] Rotated old log file: app.log -> {backup_name}")
except Exception as e:
# 권한 문제, 파일 잠금(Windows) 등으로 실패 시 무시하고 진행
print(f"[Logger] Failed to force rotate log file: {e}")
root = logging.getLogger()
root.setLevel(_DEF_LEVEL)
root.propagate = False
@@ -74,5 +103,5 @@ def setup_logging(app: Optional[object] = None) -> logging.Logger:
logging.getLogger("httpcore").setLevel(logging.WARNING)
logging.getLogger("telegram").setLevel(logging.WARNING)
root.info("Logger initialized | level=%s | file=%s", _DEF_LEVEL, log_path)
root.debug("Logger initialized | level=%s | file=%s", _DEF_LEVEL, log_path)
return root

View File

@@ -118,3 +118,15 @@
.modal-body pre::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* 백업 파일 다중 선택 스타일 */
.backup-file-item.selected .file-card-compact {
border-color: #0d6efd !important;
background-color: #e7f1ff !important;
box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}
.file-card-compact {
transition: all 0.2s ease-in-out;
cursor: pointer;
}

View File

@@ -0,0 +1,161 @@
/* 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);
}
/* Modern Minimalist Styles */
.hover-bg-light {
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.hover-bg-light:hover {
background-color: #f8f9fa !important;
border-color: #dee2e6 !important;
}
/* Slot Badge - Clean & Flat */
.slot-badge {
position: relative;
padding: 0.4rem 0.8rem 0.4rem 2rem;
background: #ffffff;
border: 1px solid #e5e7eb;
border-radius: 9999px;
/* Pill shape */
color: #374151;
font-weight: 600;
font-family: monospace;
font-size: 0.85rem;
transition: all 0.2s ease;
user-select: none;
display: flex;
align-items: center;
}
.slot-badge:hover {
border-color: #3b82f6;
/* Primary Blue */
color: #3b82f6;
}
.slot-index {
position: absolute;
left: 0.35rem;
width: 1.3rem;
height: 1.3rem;
background: #f3f4f6;
color: #6b7280;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.7rem;
font-weight: 700;
}
/* Grid Layout for Preview */
#slotPreview {
display: grid !important;
grid-template-columns: repeat(5, 1fr);
/* 5 items per line */
gap: 0.5rem;
align-content: start;
}
/* Slot Badge - Draggable & Card-like */
.slot-badge {
position: relative;
padding: 0.5rem 0.2rem;
background: #ffffff;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
color: #374151;
font-weight: 600;
font-family: monospace;
font-size: 0.75rem;
/* Reduced font size */
transition: all 0.2s ease;
user-select: none;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: grab;
height: 100%;
min-height: 80px;
overflow: hidden;
/* Prevent overflow */
word-break: break-all;
/* Ensure wrapping if needed */
}
.slot-badge:active {
cursor: grabbing;
}
.slot-badge:hover {
border-color: #3b82f6;
color: #3b82f6;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}
.slot-index {
background: #f3f4f6;
color: #6b7280;
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
font-weight: 700;
margin-bottom: 0.5rem;
}
.slot-badge:hover .slot-index {
background: #eff6ff;
color: #3b82f6;
}
/* Dragging state */
.sortable-ghost {
opacity: 0.4;
background: #e2e8f0;
border: 1px dashed #94a3b8;
}
.sortable-drag {
opacity: 1;
background: #fff;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
transform: scale(1.02);
}

View File

@@ -0,0 +1,705 @@
{% extends "base.html" %}
{% block content %}
<div class="container-fluid py-4">
{# 헤더 섹션 #}
<div class="row mb-4">
<div class="col">
<h2 class="fw-bold mb-1">
<i class="bi bi-server text-primary me-2"></i>
서버 관리 대시보드
</h2>
<p class="text-muted mb-0">IP 처리 및 파일 관리를 위한 통합 관리 도구</p>
</div>
</div>
{# 메인 작업 영역 #}
<div class="row g-4 mb-4">
{# IP 처리 카드 #}
<div class="col-lg-6">
<div class="card border shadow-sm h-100">
<div class="card-header bg-light border-0 py-2">
<h6 class="mb-0">
<i class="bi bi-hdd-network me-2"></i>
IP 처리
</h6>
</div>
<div class="card-body p-4 h-100 d-flex flex-column">
<form id="ipForm" method="post" action="{{ url_for('main.process_ips') }}" class="h-100 d-flex flex-column">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
{# 스크립트 선택 #}
<div class="mb-3">
<select id="script" name="script" class="form-select" required autocomplete="off">
<option value="">스크립트를 선택하세요</option>
{% if grouped_scripts %}
{% for category, s_list in grouped_scripts.items() %}
<optgroup label="{{ category }}">
{% for script in s_list %}
<option value="{{ script }}">{{ script }}</option>
{% endfor %}
</optgroup>
{% endfor %}
{% else %}
{# 만약 grouped_scripts가 없는 경우(하위 호환) #}
{% for script in scripts %}
<option value="{{ script }}">{{ script }}</option>
{% endfor %}
{% endif %}
</select>
</div>
{# XML 파일 선택 (조건부) #}
<div class="mb-3" id="xmlFileGroup" style="display:none;">
<select id="xmlFile" name="xmlFile" class="form-select">
<option value="">XML 파일 선택</option>
{% for xml_file in xml_files %}
<option value="{{ xml_file }}">{{ xml_file }}</option>
{% endfor %}
</select>
</div>
{# IP 주소 입력 #}
<div class="mb-3 flex-grow-1 d-flex flex-column">
<label for="ips" class="form-label w-100 d-flex justify-content-between align-items-end mb-2">
<span class="mb-1">
IP 주소
<span class="badge bg-secondary ms-1" id="ipLineCount">0</span>
</span>
<div class="d-flex align-items-center gap-1">
<button type="button" class="btn btn-sm btn-outline-secondary px-2 py-1" id="btnClearIps"
title="입력 내용 지우기" style="font-size: 0.75rem;">
<i class="bi bi-trash me-1"></i>지우기
</button>
<button type="button" class="btn btn-sm btn-outline-primary px-2 py-1" id="btnStartScan"
title="10.10.0.1 ~ 255 자동 스캔" style="font-size: 0.75rem;">
<i class="bi bi-search me-1"></i>IP 스캔
</button>
</div>
</label>
<textarea id="ips" name="ips" class="form-control font-monospace flex-grow-1"
placeholder="예:&#10;192.168.1.1&#10;192.168.1.2" required style="resize: none;"></textarea>
</div>
<div class="mt-auto">
<button type="submit"
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">
<div class="rounded-circle bg-primary bg-opacity-10 text-primary p-1">
<i class="bi bi-play-circle-fill fs-5"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.8rem;">처리 시작</span>
</button>
</div>
</form>
</div>
</div>
</div>
{# 공유 작업 카드 #}
<div class="col-lg-6">
<div class="card border shadow-sm h-100">
<div class="card-header bg-light border-0 py-2">
<h6 class="mb-0">
<i class="bi bi-share me-2"></i>
공유 작업
</h6>
</div>
<div class="card-body p-4">
<form id="sharedForm" method="post">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label for="server_list_content" class="form-label">
서버 리스트 (덮어쓰기)
<span class="badge bg-secondary ms-2" id="serverLineCount">0 대설정</span>
</label>
<textarea id="server_list_content" name="server_list_content" rows="8" class="form-control font-monospace"
style="font-size: 0.95rem;" placeholder="서버 리스트를 입력하세요..."></textarea>
</div>
<div class="row g-2">
<div class="col-4">
<button type="submit" formaction="{{ url_for('utils.update_server_list') }}"
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-primary bg-opacity-10 text-primary p-1">
<i class="bi bi-file-earmark-spreadsheet fs-5"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.8rem;">MAC to Excel</span>
</button>
</div>
<div class="col-4">
<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>
</div>
<span class="fw-medium text-dark" style="font-size: 0.8rem;">GUID to Excel</span>
</button>
</div>
<div class="col-4">
<button type="submit" formaction="{{ url_for('utils.update_gpu_list') }}"
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-danger bg-opacity-10 text-danger p-1">
<i class="bi bi-gpu-card fs-5"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.8rem;">GPU to Excel</span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{# 진행바 #}
<div class="row mb-4">
<div class="col">
<div class="card border-0 shadow-sm">
<div class="card-body p-3">
<div class="d-flex align-items-center mb-2">
<i class="bi bi-activity text-primary me-2"></i>
<span class="fw-semibold">처리 진행률</span>
</div>
<div class="progress" style="height: 25px;">
<div id="progressBar" class="progress-bar progress-bar-striped progress-bar-animated bg-success"
role="progressbar" style="width:0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
<span class="fw-semibold">0%</span>
</div>
</div>
</div>
</div>
</div>
</div>
{# 파일 관리 도구 #}
<div class="row mb-4">
<div class="col">
<div class="card border shadow-sm">
<div class="card-header bg-light border-0 py-2">
<h6 class="mb-0">
<i class="bi bi-tools me-2"></i>
파일 관리 도구
</h6>
</div>
<div class="card-body p-4 file-tools">
<div class="d-flex flex-column gap-3">
<!-- 상단: 입력형 도구 (다운로드/백업) -->
<div class="row g-2">
<!-- ZIP 다운로드 -->
<div class="col-6">
<div class="card h-100 border-primary-subtle bg-primary-subtle bg-opacity-10">
<div class="card-body p-2 d-flex flex-column justify-content-center">
<h6 class="card-title fw-bold text-primary mb-1 small" style="font-size: 0.75rem;">
<i class="bi bi-file-earmark-zip me-1"></i>ZIP
</h6>
<form method="post" action="{{ url_for('main.download_zip') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="input-group input-group-sm">
<input type="text" class="form-control border-primary-subtle form-control-sm"
name="zip_filename" placeholder="파일명" required
style="font-size: 0.75rem; padding: 0.2rem 0.5rem;">
<button class="btn btn-primary btn-sm px-2" type="submit">
<i class="bi bi-download" style="font-size: 0.75rem;"></i>
</button>
</div>
</form>
</div>
</div>
</div>
<!-- 파일 백업 -->
<div class="col-6">
<div class="card h-100 border-success-subtle bg-success-subtle bg-opacity-10">
<div class="card-body p-2 d-flex flex-column justify-content-center">
<h6 class="card-title fw-bold text-success mb-1 small" style="font-size: 0.75rem;">
<i class="bi bi-hdd-network me-1"></i>백업
</h6>
<form method="post" action="{{ url_for('main.backup_files') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="input-group input-group-sm">
<input type="text" class="form-control border-success-subtle form-control-sm"
name="backup_prefix" placeholder="ex)PO-20251117-0015_20251223_판교_R6615(TY1A)"
style="font-size: 0.75rem; padding: 0.2rem 0.5rem;">
<button class="btn btn-success btn-sm px-2" type="submit">
<i class="bi bi-save" style="font-size: 0.75rem;"></i>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- 하단: 원클릭 액션 (파일 정리) -->
<div class="card bg-light border-0">
<div class="card-body p-3">
<small class="text-muted fw-bold text-uppercase mb-2 d-block">
<i class="bi bi-folder-symlink me-1"></i>파일 정리 (Quick Move)
</small>
<div class="row g-2">
<!-- MAC Move -->
<div class="col-4">
<form id="macMoveForm" method="post" action="{{ url_for('utils.move_mac_files') }}" class="h-100">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button
class="btn btn-white bg-white border shadow-sm w-100 h-100 py-1 d-flex flex-column align-items-center justify-content-center gap-1 btn-quick-move"
type="submit">
<div class="rounded-circle bg-primary bg-opacity-10 text-primary p-1">
<i class="bi bi-cpu fs-6"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.75rem;">MAC</span>
</button>
</form>
</div>
<!-- GUID Move -->
<div class="col-4">
<form id="guidMoveForm" method="post" action="{{ url_for('utils.move_guid_files') }}" class="h-100">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button
class="btn btn-white bg-white border shadow-sm w-100 h-100 py-1 d-flex flex-column align-items-center justify-content-center gap-1 btn-quick-move"
type="submit">
<div class="rounded-circle bg-success bg-opacity-10 text-success p-1">
<i class="bi bi-fingerprint fs-6"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.75rem;">GUID</span>
</button>
</form>
</div>
<div class="col-4">
<form id="gpuMoveForm" method="post" action="{{ url_for('utils.move_gpu_files') }}" class="h-100">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button
class="btn btn-white bg-white border shadow-sm w-100 h-100 py-1 d-flex flex-column align-items-center justify-content-center gap-1 btn-quick-move"
type="submit">
<div class="rounded-circle bg-danger bg-opacity-10 text-danger p-1">
<i class="bi bi-gpu-card fs-6"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.75rem;">GPU</span>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{# 처리된 파일 목록 #}
<div class="row mb-4 processed-list">
<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">
<i class="bi bi-files me-2"></i>
처리된 파일 목록
</h6>
</div>
<div class="card-body p-4">
{% if files_to_display and files_to_display|length > 0 %}
<div class="row g-3">
{% for file_info in files_to_display %}
<div class="col-auto">
<div class="file-card-compact border rounded p-2 text-center">
<a href="{{ url_for('main.download_file', filename=file_info.file) }}"
class="text-decoration-none text-dark fw-semibold d-block mb-2 text-nowrap px-2" download
title="{{ file_info.name or file_info.file }}">
{{ file_info.name or file_info.file }}
</a>
<div class="file-card-buttons d-flex gap-2 justify-content-center">
<button type="button" class="btn btn-sm btn-outline btn-view-processed flex-fill"
data-bs-toggle="modal" data-bs-target="#fileViewModal" data-folder="idrac_info"
data-filename="{{ file_info.file }}">
보기
</button>
<form action="{{ url_for('main.delete_file', filename=file_info.file) }}" method="post"
class="d-inline">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="btn btn-sm btn-outline btn-delete-processed flex-fill"
onclick="return confirm('삭제하시겠습니까?');">
삭제
</button>
</form>
</div>
</div>
</div>
{% endfor %}
</div>
<!-- 페이지네이션 -->
{% if total_pages > 1 %}
<nav aria-label="Processed files pagination" class="mt-4">
<ul class="pagination justify-content-center mb-0">
<!-- 이전 페이지 -->
{% if page > 1 %}
<li class="page-item">
<a class="page-link" href="{{ url_for('main.index', page=page-1) }}">
<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 %}
<!-- 페이지 번호 (최대 10개 표시) -->
{% set start_page = ((page - 1) // 10) * 10 + 1 %}
{% set end_page = [start_page + 9, total_pages]|min %}
{% for p in range(start_page, end_page + 1) %}
<li class="page-item {% if p == page %}active{% endif %}">
<a class="page-link" href="{{ url_for('main.index', page=p) }}">{{ p }}</a>
</li>
{% endfor %}
<!-- 다음 페이지 -->
{% if page < total_pages %} <li class="page-item">
<a class="page-link" href="{{ url_for('main.index', page=page+1) }}">
다음 <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>
<p class="text-muted mb-0">표시할 파일이 없습니다.</p>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{# 백업된 파일 목록 #}
<div class="row backup-list">
<div class="col">
<div class="card border shadow-sm">
<div class="card-header bg-light border-0 py-2">
<h6 class="mb-0">
<i class="bi bi-archive me-2"></i>
백업된 파일 목록
</h6>
</div>
<div class="card-body p-4">
{% if backup_files and backup_files|length > 0 %}
<div class="list-group">
{% for date, info in backup_files.items() %}
<div class="list-group-item border rounded mb-2 p-0 overflow-hidden">
<div class="d-flex justify-content-between align-items-center p-3 bg-light">
<div class="d-flex align-items-center">
<i class="bi bi-calendar3 text-primary me-2"></i>
<strong>{{ date }}</strong>
<span class="badge bg-primary ms-3">{{ info.count }} 파일</span>
</div>
<button class="btn btn-sm btn-outline-secondary" type="button" data-bs-toggle="collapse"
data-bs-target="#collapse-{{ loop.index }}" aria-expanded="false">
<i class="bi bi-chevron-down"></i>
</button>
</div>
<div id="collapse-{{ loop.index }}" class="collapse">
<div class="p-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 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 }}">
{{ file.rsplit('.', 1)[0] }}
</a>
<div class="file-card-single-button">
<button type="button" class="btn btn-sm btn-outline btn-view-backup w-100"
data-bs-toggle="modal" data-bs-target="#fileViewModal" data-folder="backup"
data-date="{{ date }}" data-filename="{{ file }}">
보기
</button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</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>
<p class="text-muted mb-0">백업된 파일이 없습니다.</p>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{# 파일 보기 모달 #}
<div class="modal fade" id="fileViewModal" tabindex="-1" aria-labelledby="fileViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="fileViewModalLabel">
<i class="bi bi-file-text me-2"></i>
파일 보기
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="닫기"></button>
</div>
<div class="modal-body bg-light">
<pre id="fileViewContent" class="mb-0 p-3 bg-white border rounded font-monospace"
style="white-space:pre-wrap;word-break:break-word;max-height:70vh;">불러오는 중...</pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
<i class="bi bi-x-circle me-1"></i>닫기
</button>
</div>
</div>
</div>
</div>
{% endblock %}
{% block extra_css %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/index.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/index_custom.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">
{% endblock %}
{% block scripts %}
{{ super() }}
<!-- Tom Select JS -->
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.2.2/dist/js/tom-select.complete.min.js"></script>
<script>
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/index.js') }}?v={{ range(1, 100000) | random }}"></script>
<script src="{{ url_for('static', filename='js/index_custom.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="슬롯 번호를 입력하세요.&#10;구분자: 쉼표(,) 공백( ) 줄바꿈&#10;&#10;예시: 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 %}

View File

@@ -137,51 +137,8 @@ document.addEventListener('DOMContentLoaded', () => {
}
// ─────────────────────────────────────────────────────────────
// MAC 파일 이동
// ─────────────────────────────────────────────────────────────
const macForm = document.getElementById('macMoveForm');
if (macForm) {
macForm.addEventListener('submit', async (e) => {
e.preventDefault();
const btn = macForm.querySelector('button');
const originalHtml = btn.innerHTML;
btn.disabled = true;
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>처리 중...';
try {
await postFormAndHandle(macForm.action);
location.reload();
} catch (err) {
alert('MAC 파일 이동 중 오류가 발생했습니다: ' + (err?.message || err));
btn.disabled = false;
btn.innerHTML = originalHtml;
}
});
}
// ─────────────────────────────────────────────────────────────
// GUID 파일 이동
// ─────────────────────────────────────────────────────────────
const guidForm = document.getElementById('guidMoveForm');
if (guidForm) {
guidForm.addEventListener('submit', async (e) => {
e.preventDefault();
const btn = guidForm.querySelector('button');
const originalHtml = btn.innerHTML;
btn.disabled = true;
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>처리 중...';
try {
await postFormAndHandle(guidForm.action);
location.reload();
} catch (err) {
alert('GUID 파일 이동 중 오류가 발생했습니다: ' + (err?.message || err));
btn.disabled = false;
btn.innerHTML = originalHtml;
}
});
}
// ─────────────────────────────────────────────────────────────
// 알림 자동 닫기

View File

@@ -0,0 +1,443 @@
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,
});
}
// 슬롯 우선순위 로직
const slotPriorityModal = document.getElementById('slotPriorityModal');
if (slotPriorityModal) {
const slotNumbersInput = document.getElementById('slotNumbersInput');
const slotCountDisplay = document.getElementById('slotCountDisplay');
const slotPreview = document.getElementById('slotPreview');
const slotPriorityInput = document.getElementById('slot_priority_input');
const modalServerListContent = document.getElementById('modal_server_list_content');
const serverListTextarea = document.getElementById('server_list_content');
const slotPriorityForm = document.getElementById('slotPriorityForm');
const btnClearSlots = document.getElementById('btnClearSlots');
const presetCountInput = document.getElementById('presetCountInput');
const btnApplyPreset = document.getElementById('btnApplyPreset');
// 기본 우선순위 데이터 (최대 10개)
const defaultPriority = ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40'];
function loadFromStorage() {
const saved = localStorage.getItem('guidSlotNumbers');
if (saved) {
slotNumbersInput.value = saved;
} else {
slotNumbersInput.value = defaultPriority.join(', ');
}
if (presetCountInput) presetCountInput.value = 10;
updatePreview();
}
function saveToStorage() {
localStorage.setItem('guidSlotNumbers', slotNumbersInput.value);
}
function parseSlots(input) {
if (!input || !input.trim()) return [];
return input.split(/[,\s\n]+/)
.map(s => s.trim())
.filter(s => s !== '')
.filter(s => /^\d+$/.test(s))
.filter((v, i, a) => a.indexOf(v) === i);
}
let sortableInstance = null;
function updatePreview() {
const slots = parseSlots(slotNumbersInput.value);
const count = slots.length;
slotCountDisplay.textContent = `${count}`;
slotCountDisplay.className = count > 0
? 'badge bg-primary text-white border border-primary rounded-pill px-3 py-1'
: 'badge bg-white text-dark border rounded-pill px-3 py-1';
if (count === 0) {
slotPreview.style.display = 'flex';
slotPreview.innerHTML = `
<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>
`;
} else {
slotPreview.style.display = 'grid';
let html = '';
slots.forEach((slot, index) => {
html += `
<div class="slot-badge animate__animated animate__fadeIn" data-slot="${slot}" style="animation-delay: ${index * 0.02}s">
<span class="slot-index">${index + 1}</span>
<div>Slot ${slot}</div>
</div>
`;
});
slotPreview.innerHTML = html;
if (!sortableInstance) {
sortableInstance = new Sortable(slotPreview, {
animation: 150,
ghostClass: 'sortable-ghost',
dragClass: 'sortable-drag',
onEnd: function (evt) {
updateInputFromPreview();
}
});
}
}
saveToStorage();
}
function updateInputFromPreview() {
const items = slotPreview.querySelectorAll('.slot-badge');
const newSlots = Array.from(items).map(item => item.getAttribute('data-slot'));
slotNumbersInput.value = newSlots.join(', ');
items.forEach((item, index) => {
const idxSpan = item.querySelector('.slot-index');
if (idxSpan) idxSpan.textContent = index + 1;
});
saveToStorage();
}
if (btnApplyPreset) {
btnApplyPreset.addEventListener('click', function () {
let count = parseInt(presetCountInput.value);
if (isNaN(count) || count < 1) count = 1;
if (count > 10) count = 10;
presetCountInput.value = count;
const selected = defaultPriority.slice(0, count);
slotNumbersInput.value = selected.join(', ');
slotNumbersInput.style.transition = 'background-color 0.2s';
slotNumbersInput.style.backgroundColor = '#f0f9ff';
setTimeout(() => {
slotNumbersInput.style.backgroundColor = '#f8f9fa';
}, 300);
updatePreview();
});
}
slotNumbersInput.addEventListener('input', updatePreview);
btnClearSlots.addEventListener('click', function () {
if (confirm('입력된 내용을 모두 지우시겠습니까?')) {
slotNumbersInput.value = '';
updatePreview();
}
});
slotPriorityModal.addEventListener('show.bs.modal', function () {
modalServerListContent.value = serverListTextarea.value;
loadFromStorage();
});
slotPriorityForm.addEventListener('submit', function (e) {
const slots = parseSlots(slotNumbersInput.value);
if (slots.length === 0) {
e.preventDefault();
alert('최소 1개 이상의 슬롯을 입력하세요.');
slotNumbersInput.focus();
slotNumbersInput.classList.add('is-invalid');
setTimeout(() => slotNumbersInput.classList.remove('is-invalid'), 2000);
return;
}
slotPriorityInput.value = slots.join(',');
saveToStorage();
});
}
// 백업 파일 드래그 앤 드롭 이동 기능
let selectedItems = new Set();
const backupContainers = document.querySelectorAll('.backup-files-container');
document.addEventListener('click', function (e) {
const item = e.target.closest('.backup-file-item');
if (item && !e.target.closest('a') && !e.target.closest('button')) {
if (e.ctrlKey || e.metaKey) {
toggleSelection(item);
} else {
const wasSelected = item.classList.contains('selected');
clearSelection();
if (!wasSelected) toggleSelection(item);
}
} else if (!e.target.closest('.backup-files-container')) {
// Optional: click outside behavior
}
});
document.addEventListener('mousedown', function (e) {
if (!e.target.closest('.backup-file-item') && !e.target.closest('.backup-files-container')) {
clearSelection();
}
});
function toggleSelection(item) {
if (item.classList.contains('selected')) {
item.classList.remove('selected');
selectedItems.delete(item);
} else {
item.classList.add('selected');
selectedItems.add(item);
}
}
function clearSelection() {
document.querySelectorAll('.backup-file-item.selected').forEach(el => el.classList.remove('selected'));
selectedItems.clear();
}
function updateFolderCount(folderDate) {
const container = document.querySelector(`.backup-files-container[data-folder="${folderDate}"]`);
if (container) {
const listItem = container.closest('.list-group-item');
if (listItem) {
const badge = listItem.querySelector('.badge');
if (badge) {
const count = container.children.length;
badge.textContent = `${count} 파일`;
}
}
}
}
backupContainers.forEach(container => {
new Sortable(container, {
group: 'backup-files',
animation: 150,
ghostClass: 'sortable-ghost',
delay: 100,
delayOnTouchOnly: true,
onStart: function (evt) {
if (!evt.item.classList.contains('selected')) {
clearSelection();
toggleSelection(evt.item);
}
},
onEnd: function (evt) {
if (evt.to === evt.from) return;
const sourceFolder = evt.from.getAttribute('data-folder');
const targetFolder = evt.to.getAttribute('data-folder');
if (!sourceFolder || !targetFolder) {
alert('잘못된 이동 요청입니다.');
location.reload();
return;
}
let itemsToMove = Array.from(selectedItems);
if (itemsToMove.length === 0) {
itemsToMove = [evt.item];
} else {
if (!itemsToMove.includes(evt.item)) {
itemsToMove.push(evt.item);
}
}
itemsToMove.forEach(item => {
if (item !== evt.item) {
evt.to.appendChild(item);
}
});
// Server Request
if (!window.APP_CONFIG) {
console.error("Window APP_CONFIG not found!");
return;
}
const promises = itemsToMove.map(item => {
const filename = item.getAttribute('data-filename');
if (!filename) return Promise.resolve();
return fetch(window.APP_CONFIG.moveBackupUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': window.APP_CONFIG.csrfToken
},
body: JSON.stringify({
filename: filename,
source_folder: sourceFolder,
target_folder: targetFolder
})
})
.then(response => response.json())
.then(data => {
if (data.success) {
const btn = item.querySelector('.btn-view-backup');
if (btn) btn.setAttribute('data-date', targetFolder);
const link = item.querySelector('a[download]');
if (link) {
const newHref = window.APP_CONFIG.downloadBaseUrl
.replace('PLACEHOLDER_DATE', targetFolder)
.replace('PLACEHOLDER_FILE', filename);
link.setAttribute('href', newHref);
}
}
return data;
});
});
Promise.all(promises).then(results => {
updateFolderCount(sourceFolder);
updateFolderCount(targetFolder);
clearSelection();
const failed = results.filter(r => r && !r.success);
if (failed.length > 0) {
alert(failed.length + '개의 파일 이동 실패. 실패한 파일이 복구되지 않을 수 있으니 새로고침하세요.');
location.reload();
}
}).catch(err => {
console.error(err);
alert('이동 중 통신 오류 발생');
});
}
});
});
// ─────────────────────────────────────────────────────────────
// Quick Move 버튼 중복 클릭 방지 (Race Condition 예방)
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Quick Move: 중복 처리 및 AJAX (Race Condition + Confirmation)
// ─────────────────────────────────────────────────────────────
const quickMoveForms = ['macMoveForm', 'guidMoveForm', 'gpuMoveForm'];
let pendingAction = null; // 대기 중인 재시도 액션 저장
// 모달 요소
const dupModalEl = document.getElementById('duplicateCheckModal');
const dupModal = dupModalEl ? new bootstrap.Modal(dupModalEl) : null;
const btnConfirmOverwrite = document.getElementById('btnConfirmOverwrite');
if (btnConfirmOverwrite) {
btnConfirmOverwrite.addEventListener('click', function () {
if (pendingAction) {
dupModal.hide();
pendingAction(true); // overwrite=true로 재실행
pendingAction = null;
}
});
}
quickMoveForms.forEach(id => {
const form = document.getElementById(id);
if (form) {
form.addEventListener('submit', function (e) {
e.preventDefault(); // 기본 제출 방지 (AJAX 사용)
const btn = form.querySelector('button[type="submit"]');
if (!btn || btn.disabled) return;
const originalContent = btn.innerHTML;
// 실행 함수 정의 (overwrite 여부 파라미터)
const executeMove = (overwrite = false) => {
// UI Lock
btn.classList.add('disabled');
btn.disabled = true;
btn.innerHTML = '<div class="spinner-border spinner-border-sm text-primary" role="status"></div>';
fetch(form.action, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': window.APP_CONFIG.csrfToken
},
body: JSON.stringify({
overwrite: overwrite
})
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok: ' + response.status);
}
const contentType = response.headers.get("content-type");
if (!contentType || !contentType.includes("application/json")) {
throw new TypeError("Oops, we haven't got JSON!");
}
return response.json();
})
.then(data => {
if (data.requires_confirmation) {
// 중복 발생 -> 모달 표시 (버튼 리셋 포함)
showDuplicateModal(data.duplicates, data.duplicate_count);
pendingAction = executeMove;
resetButton();
} else if (data.success) {
// 성공 -> 리로드
window.location.reload();
} else {
// 에러
alert(data.error || '작업이 실패했습니다.');
resetButton();
}
})
.catch(err => {
console.error(err);
// HTTP 200 에러이거나 단순 JSON 파싱 문제지만 실제로는 성공했을 가능성 대비
// (사용자 요청에 따라 HTTP 200 에러 알림 억제)
if (err.message && err.message.includes("200")) {
window.location.reload();
return;
}
alert('서버 통신 오류가 발생했습니다: ' + err);
resetButton();
});
};
const resetButton = () => {
btn.classList.remove('disabled');
btn.disabled = false;
btn.innerHTML = originalContent;
};
// 최초 실행 (overwrite=false)
executeMove(false);
});
}
});
function showDuplicateModal(duplicates, count) {
const listEl = document.getElementById('dupList');
const countEl = document.getElementById('dupCount');
const moreEl = document.getElementById('dupMore');
const moreCountEl = document.getElementById('dupMoreCount');
if (countEl) countEl.textContent = count;
if (listEl) {
listEl.innerHTML = '';
// 최대 10개만 표시
const limit = 10;
const showList = duplicates.slice(0, limit);
showList.forEach(name => {
const li = document.createElement('li');
li.innerHTML = `<i class="bi bi-file-earmark text-secondary me-2"></i>${name}`;
listEl.appendChild(li);
});
if (duplicates.length > limit) {
if (moreEl) {
moreEl.style.display = 'block';
moreCountEl.textContent = duplicates.length - limit;
}
} else {
if (moreEl) moreEl.style.display = 'none';
}
}
if (dupModal) dupModal.show();
}
});

View File

@@ -131,52 +131,7 @@ document.addEventListener('DOMContentLoaded', () => {
}
// ─────────────────────────────────────────────────────────────
// MAC 파일 이동
// ─────────────────────────────────────────────────────────────
const macForm = document.getElementById('macMoveForm');
if (macForm) {
macForm.addEventListener('submit', async (e) => {
e.preventDefault();
const btn = macForm.querySelector('button');
const originalHtml = btn.innerHTML;
btn.disabled = true;
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>처리 중...';
try {
await postFormAndHandle(macForm.action);
location.reload();
} catch (err) {
alert('MAC 이동 중 오류: ' + (err?.message || err));
btn.disabled = false;
btn.innerHTML = originalHtml;
}
});
}
// ─────────────────────────────────────────────────────────────
// GUID 파일 이동
// ─────────────────────────────────────────────────────────────
const guidForm = document.getElementById('guidMoveForm');
if (guidForm) {
guidForm.addEventListener('submit', async (e) => {
e.preventDefault();
const btn = guidForm.querySelector('button');
const originalHtml = btn.innerHTML;
btn.disabled = true;
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>처리 중...';
try {
await postFormAndHandle(guidForm.action);
location.reload();
} catch (err) {
alert('GUID 이동 중 오류: ' + (err?.message || err));
btn.disabled = false;
btn.innerHTML = originalHtml;
}
});
}
// ─────────────────────────────────────────────────────────────

View File

@@ -0,0 +1,534 @@
/* ─────────────────────────────────────────────────────────────
기본 레이아웃
───────────────────────────────────────────────────────────── */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
"Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
font-weight: 400;
background-color: #f8f9fa;
padding-top: 56px;
}
.container-card {
background-color: #ffffff;
padding: 20px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
border-radius: 8px;
margin-bottom: 20px;
}
/* ─────────────────────────────────────────────────────────────
텍스트 및 제목 - 모두 일반 굵기
───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
color: #343a40;
font-weight: 400;
}
.card-header h6 {
font-weight: 500;
}
/* ─────────────────────────────────────────────────────────────
폼 요소 - 모두 일반 굵기
───────────────────────────────────────────────────────────── */
.form-label {
color: #495057;
font-weight: 400;
}
.form-control, .form-select {
border-radius: 5px;
border: 1px solid #ced4da;
font-weight: 400;
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.form-control:focus, .form-select:focus {
border-color: #80bdff;
box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}
/* ─────────────────────────────────────────────────────────────
버튼 - 일반 굵기
───────────────────────────────────────────────────────────── */
.btn {
border-radius: 5px;
font-weight: 400;
transition: all 0.2s ease-in-out;
}
.badge {
font-weight: 400;
}
/* ─────────────────────────────────────────────────────────────
네비게이션 바
───────────────────────────────────────────────────────────── */
.navbar {
background-color: #343a40 !important;
}
.navbar-brand {
font-weight: 700;
color: #ffffff !important;
}
.nav-link {
color: rgba(255, 255, 255, 0.75) !important;
font-weight: 400;
}
.nav-link:hover {
color: #ffffff !important;
}
/* ─────────────────────────────────────────────────────────────
카드 헤더 색상 (1번 이미지와 동일하게)
───────────────────────────────────────────────────────────── */
.card-header.bg-primary {
background-color: #007bff !important;
color: #ffffff !important;
}
.card-header.bg-success {
background-color: #28a745 !important;
color: #ffffff !important;
}
.card-header.bg-primary h6,
.card-header.bg-success h6 {
color: #ffffff !important;
}
.card-header.bg-primary i,
.card-header.bg-success i {
color: #ffffff !important;
}
/* 밝은 배경 헤더는 어두운 텍스트 */
.card-header.bg-light {
background-color: #f8f9fa !important;
color: #343a40 !important;
}
.card-header.bg-light h6 {
color: #343a40 !important;
}
.card-header.bg-light i {
color: #343a40 !important;
}
/* ─────────────────────────────────────────────────────────────
버튼 색상 (2번 이미지와 동일하게)
───────────────────────────────────────────────────────────── */
.btn-warning {
background-color: #ffc107 !important;
border-color: #ffc107 !important;
color: #000 !important;
}
.btn-warning:hover {
background-color: #e0a800 !important;
border-color: #d39e00 !important;
color: #000 !important;
}
.btn-info {
background-color: #17a2b8 !important;
border-color: #17a2b8 !important;
color: #fff !important;
}
.btn-info:hover {
background-color: #138496 !important;
border-color: #117a8b !important;
color: #fff !important;
}
/* ─────────────────────────────────────────────────────────────
진행바
───────────────────────────────────────────────────────────── */
.progress {
border-radius: 10px;
overflow: hidden;
}
.progress-bar {
transition: width 0.6s ease;
}
/* ─────────────────────────────────────────────────────────────
파일 그리드 레이아웃 - 빈 공간 없이 채우기
───────────────────────────────────────────────────────────── */
.file-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 1rem;
}
/* ─────────────────────────────────────────────────────────────
파일 카드 (컴팩트)
───────────────────────────────────────────────────────────── */
.file-card-compact {
transition: all 0.2s ease;
background: #fff;
width: 100%;
max-width: 180px; /* 기본값 유지(카드가 너무 넓어지지 않도록) */
}
.file-card-compact:hover {
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}
.file-card-compact a {
font-size: 0.85rem;
font-weight: 400;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
/* 파일 카드 내 모든 텍스트 일반 굵기 */
.file-card-compact,
.file-card-compact * {
font-weight: 400 !important;
}
/* ─────────────────────────────────────────────────────────────
(공통) 파일 카드 버튼 컨테이너 기본값 (기존 유지)
───────────────────────────────────────────────────────────── */
.file-card-buttons { /* 처리된 목록(2버튼) 기본 레이아웃 */
display: flex;
gap: 0.15rem;
}
.file-card-buttons > button,
.file-card-buttons > form {
width: calc(50% - 0.075rem);
}
.file-card-buttons form { margin: 0; padding: 0; }
.file-card-buttons .btn-sm {
padding: 0.1rem 0.2rem !important;
font-size: 0.65rem !important;
width: 100%;
text-align: center;
}
/* 1버튼(백업) 기본 레이아웃 */
.file-card-single-button {
display: flex;
justify-content: center;
}
.file-card-single-button .btn-sm {
padding: 0.15rem 0.3rem !important;
font-size: 0.7rem !important;
min-width: 50px;
text-align: center;
}
/* ─────────────────────────────────────────────────────────────
(공통) Outline 기본값 (기존 유지)
───────────────────────────────────────────────────────────── */
.file-card-compact .btn-outline-primary {
background-color: transparent !important;
color: #0d6efd !important;
border: 1px solid #0d6efd !important;
}
.file-card-compact .btn-outline-primary:hover {
background-color: #0d6efd !important;
color: #fff !important;
}
.file-card-compact .btn-outline-danger {
background-color: transparent !important;
color: #dc3545 !important;
border: 1px solid #dc3545 !important;
}
.file-card-compact .btn-outline-danger:hover {
background-color: #dc3545 !important;
color: #fff !important;
}
/* 기존 d-flex gap-2 레거시 대응 */
.file-card-compact .d-flex.gap-2 { display: flex; gap: 0.2rem; }
.file-card-compact .d-flex.gap-2 > * { flex: 1; }
.file-card-compact .d-flex.gap-2 form { display: contents; }
/* ─────────────────────────────────────────────────────────────
!!! 목록별 버튼 스타일 "분리" 규칙 (HTML에 클래스만 달아주면 적용)
- processed-list 블록의 보기/삭제
- backup-list 블록의 보기
───────────────────────────────────────────────────────────── */
/* 처리된 파일 목록(Processed) : 컨테이너 세부 튜닝 */
.processed-list .file-card-buttons {
display: grid;
grid-template-columns: 1fr 1fr; /* 보기/삭제 2열 격자 */
gap: 0.2rem;
}
/* 보기(처리된) — 전용 클래스 우선 */
.processed-list .btn-view-processed,
.processed-list .file-card-buttons .btn-outline-primary { /* (백워드 호환) */
border-color: #3b82f6 !important;
color: #1d4ed8 !important;
background: transparent !important;
padding: .35rem .55rem !important;
font-size: .8rem !important;
font-weight: 600 !important;
}
.processed-list .btn-view-processed:hover,
.processed-list .file-card-buttons .btn-outline-primary:hover {
background: rgba(59,130,246,.10) !important;
color: #1d4ed8 !important;
}
/* 삭제(처리된) — 전용 클래스 우선(더 작게) */
.processed-list .btn-delete-processed,
.processed-list .file-card-buttons .btn-outline-danger { /* (백워드 호환) */
border-color: #ef4444 !important;
color: #b91c1c !important;
background: transparent !important;
padding: .25rem .45rem !important; /* 더 작게 */
font-size: .72rem !important; /* 더 작게 */
font-weight: 600 !important;
}
.processed-list .btn-delete-processed:hover,
.processed-list .file-card-buttons .btn-outline-danger:hover {
background: rgba(239,68,68,.10) !important;
color: #b91c1c !important;
}
/* 백업 파일 목록(Backup) : 1버튼 컨테이너 */
.backup-list .file-card-single-button {
display: flex;
margin-top: .25rem;
}
/* 보기(백업) — 전용 클래스 우선(초록계열), 기존 .btn-outline-primary 사용 시에도 분리 적용 */
.backup-list .btn-view-backup,
.backup-list .file-card-single-button .btn-outline-primary { /* (백워드 호환) */
width: 100%;
border-color: #10b981 !important; /* emerald-500 */
color: #047857 !important; /* emerald-700 */
background: transparent !important;
padding: .42rem .7rem !important;
font-size: .8rem !important;
font-weight: 700 !important; /* 백업은 강조 */
}
.backup-list .btn-view-backup:hover,
.backup-list .file-card-single-button .btn-outline-primary:hover {
background: rgba(16,185,129,.12) !important;
color: #047857 !important;
}
/* ─────────────────────────────────────────────────────────────
[★ 보완] 버튼 크기 “완전 통일”(처리/백업 공통)
- 폰트/라인하이트/패딩을 변수화해서 두 목록 크기 동일
- 기존 개별 padding/font-size를 덮어써서 시각적 높이 통일
───────────────────────────────────────────────────────────── */
:root{
--btn-font: .80rem; /* 버튼 폰트 크기 통일 지점 */
--btn-line: 1.2; /* 버튼 라인하이트 통일 지점 */
--btn-py: .32rem; /* 수직 패딩 */
--btn-px: .60rem; /* 좌우 패딩 */
}
.processed-list .file-card-buttons .btn,
.backup-list .file-card-single-button .btn {
font-size: var(--btn-font) !important;
line-height: var(--btn-line) !important;
padding: var(--btn-py) var(--btn-px) !important;
min-height: calc(1em * var(--btn-line) + (var(--btn-py) * 2)) !important;
}
/* 이전 규칙보다 더 구체적으로 동일 규격을 한 번 더 보장 */
.processed-list .file-card-buttons .btn.btn-outline,
.backup-list .file-card-single-button .btn.btn-outline {
font-size: var(--btn-font) !important;
line-height: var(--btn-line) !important;
padding: var(--btn-py) var(--btn-px) !important;
}
/* ─────────────────────────────────────────────────────────────
[★ 보완] 카드 “자동 한줄 배치”
- 기존 Bootstrap .row.g-3를 Grid로 오버라이드(HTML 수정 無)
- 우측 여백 최소화, 화면 너비에 맞춰 자연스럽게 줄 수 변경
───────────────────────────────────────────────────────────── */
.processed-list .card-body > .row.g-3,
.backup-list .card-body .row.g-3 {
display: grid !important;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: .75rem;
}
/* 그리드 기준으로 카드 폭이 잘 늘어나도록 제한 완화 */
.processed-list .file-card-compact,
.backup-list .file-card-compact {
max-width: none !important; /* 기존 180px 제한을 목록 구간에 한해 해제 */
min-width: 160px;
width: 100%;
}
/* ─────────────────────────────────────────────────────────────
반응형 파일 그리드 (기존 유지)
───────────────────────────────────────────────────────────── */
@media (max-width: 1400px) {
.file-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 1200px) {
.file-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (max-width: 992px) {
.file-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 768px) {
.file-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 576px) {
.file-grid { grid-template-columns: repeat(auto-fit, minmax(45%, 1fr)); }
}
/* ─────────────────────────────────────────────────────────────
백업 파일 리스트
───────────────────────────────────────────────────────────── */
.list-group-item .bg-light {
transition: background-color 0.2s ease;
}
.list-group-item:hover .bg-light {
background-color: #e9ecef !important;
}
/* ─────────────────────────────────────────────────────────────
모달 - 파일 내용 보기
───────────────────────────────────────────────────────────── */
#fileViewContent {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
padding: 1rem;
border-radius: 5px;
max-height: 60vh;
overflow-y: auto;
font-weight: 400;
}
.modal-body pre::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.modal-body pre::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
.modal-body pre::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4px;
}
.modal-body pre::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* ─────────────────────────────────────────────────────────────
접근성 - Skip to content
───────────────────────────────────────────────────────────── */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.visually-hidden-focusable:focus {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
padding: 1rem;
background: #000;
color: #fff;
}
/* ─────────────────────────────────────────────────────────────
전역 폰트 굵기 강제 (Bootstrap 오버라이드)
───────────────────────────────────────────────────────────── */
* { font-weight: inherit; }
strong, b { font-weight: 600; }
label, .form-label, .card-title, .list-group-item strong {
font-weight: 400 !important;
}
/* ─────────────────────────────────────────────────────────────
반응형
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
.card-body {
padding: 1.5rem !important;
}
body {
font-size: 0.95rem;
}
}
/* === [FIX] 처리된 목록 보기/삭제 버튼 크기 완전 동일화 === */
/* 1) 그리드 두 칸을 꽉 채우게 강제 */
.processed-list .file-card-buttons {
display: grid !important;
grid-template-columns: 1fr 1fr !important;
gap: .2rem !important;
align-items: stretch !important; /* 높이도 칸 높이에 맞춰 늘림 */
}
/* 2) 그리드 아이템(버튼/폼) 자체를 칸 너비로 확장 */
.processed-list .file-card-buttons > * {
width: 100% !important;
}
/* 3) 폼 안의 버튼도 100%로 확장 (폼이 그리드 아이템인 경우 대비) */
.processed-list .file-card-buttons > form { display: block !important; }
.processed-list .file-card-buttons > form > button {
display: block !important;
width: 100% !important;
}
/* 4) 예전 플렉스 기반 전역 규칙 덮어쓰기(폭 계산식 무력화) */
.processed-list .file-card-buttons > button,
.processed-list .file-card-buttons > form {
width: 100% !important;
}
/* 5) 폰트/라인하이트/패딩 통일(높이 동일) — 필요 시 수치만 조정 */
:root{
--btn-font: .80rem;
--btn-line: 1.2;
--btn-py: .32rem;
--btn-px: .60rem;
}
.processed-list .file-card-buttons .btn {
font-size: var(--btn-font) !important;
line-height: var(--btn-line) !important;
padding: var(--btn-py) var(--btn-px) !important;
min-height: calc(1em * var(--btn-line) + (var(--btn-py) * 2)) !important;
box-sizing: border-box;
}

View File

@@ -0,0 +1,526 @@
from __future__ import annotations
import os
import sys
import shutil
import subprocess
import logging
from pathlib import Path
from flask import Blueprint, request, redirect, url_for, flash, jsonify, send_file
from flask_login import login_required
from config import Config
utils_bp = Blueprint("utils", __name__)
def register_util_routes(app):
app.register_blueprint(utils_bp)
@utils_bp.route("/move_mac_files", methods=["POST"])
@login_required
def move_mac_files():
src = Path(Config.IDRAC_INFO_FOLDER)
dst = Path(Config.MAC_FOLDER)
dst.mkdir(parents=True, exist_ok=True)
moved = 0
skipped = 0
missing = 0
errors = []
# JSON 요청 파싱 (overwrite 플래그 확인)
data = request.get_json(silent=True) or {}
overwrite = data.get("overwrite", False)
# 1. 대상 파일 스냅샷 (이동 시도할, 또는 해야할 파일들)
try:
current_files = [f for f in src.iterdir() if f.is_file()]
except Exception as e:
logging.error(f"파일 목록 조회 실패: {e}")
return jsonify({"success": False, "error": str(e)})
# [중복 체크 로직] 덮어쓰기 모드가 아닐 때, 미리 중복 검사
if not overwrite:
duplicates = []
for file in current_files:
target = dst / file.name
if target.exists():
duplicates.append(file.name)
if duplicates:
return jsonify({
"success": False,
"requires_confirmation": True,
"duplicates": duplicates,
"duplicate_count": len(duplicates)
})
else:
logging.warning(f"⚠️ [MAC] 덮어쓰기 모드 활성화됨 - 중복 파일을 덮어씁니다.")
total_target_count = len(current_files)
# 카운터
moved_count = 0 # 내가 직접 옮김 (또는 덮어씀)
verified_count = 0 # 최종적으로 목적지에 있음을 확인 (성공)
lost_count = 0 # 소스에도 없고 목적지에도 없음 (진짜 유실?)
errors = []
for file in current_files:
target = dst / file.name
# [Step 1] 이미 목적지에 있는지 확인
if target.exists():
if overwrite:
# 덮어쓰기 모드: 기존 파일 삭제 후 이동 진행 (또는 바로 move로 덮어쓰기)
# shutil.move는 대상이 존재하면 에러가 날 수 있으므로(버전/OS따라 다름), 안전하게 삭제 시도
try:
# Windows에서는 사용 중인 파일 삭제 시 에러 발생 가능
# shutil.move(src, dst)는 dst가 존재하면 덮어쓰기 시도함 (Python 3.x)
pass
except Exception:
pass
else:
# (중복 체크를 통과했거나 Race Condition으로 생성된 경우) -> 이미 완료된 것으로 간주
verified_count += 1
logging.info(f"⏭️ 파일 이미 존재 (Skipped): {file.name}")
continue
# [Step 2] 소스에 있는지 확인 (Race Condition)
if not file.exists():
if target.exists():
verified_count += 1
continue
else:
lost_count += 1
logging.warning(f"❓ 이동 중 사라짐: {file.name}")
continue
# [Step 3] 이동 시도 (덮어쓰기 포함)
try:
shutil.move(str(file), str(target))
moved_count += 1
verified_count += 1
except shutil.Error as e:
# shutil.move might raise Error if destination exists depending on implementation,
# but standard behavior overwrites if not same file.
# If exact same file, verified.
if target.exists():
verified_count += 1
else:
errors.append(f"{file.name}: {str(e)}")
except FileNotFoundError:
# 옮기려는 찰나에 사라짐 -> 목적지 재확인
if target.exists():
verified_count += 1
logging.info(f"⏭️ 동시 처리됨 (완료): {file.name}")
else:
lost_count += 1
except Exception as e:
# 권한 에러 등 진짜 실패
error_msg = f"{file.name}: {str(e)}"
errors.append(error_msg)
logging.error(f"❌ 이동 에러: {error_msg}")
# 결과 요약
msg = f"{total_target_count}건 중 {verified_count}건 처리 완료"
if moved_count < verified_count:
msg += f" (이동: {moved_count}, 이미 완료: {verified_count - moved_count})"
if lost_count > 0:
msg += f", 확인 불가: {lost_count}"
logging.info(f"✅ MAC 처리 결과: {msg}")
flash(msg, "success" if lost_count == 0 else "warning")
return jsonify({
"success": True,
"total": total_target_count,
"verified": verified_count,
"message": msg,
"errors": errors if errors else None
})
@utils_bp.route("/move_guid_files", methods=["POST"])
@login_required
def move_guid_files():
src = Path(Config.IDRAC_INFO_FOLDER)
dst = Path(Config.GUID_FOLDER)
dst.mkdir(parents=True, exist_ok=True)
moved = 0
skipped = 0
missing = 0
errors = []
# JSON 요청 파싱 (overwrite 플래그 확인)
data = request.get_json(silent=True) or {}
overwrite = data.get("overwrite", False)
try:
files = [f for f in src.iterdir() if f.is_file()]
except Exception:
files = []
# [중복 체크]
if not overwrite:
duplicates = []
for file in files:
target = dst / file.name
if target.exists():
duplicates.append(file.name)
if duplicates:
return jsonify({
"success": False,
"requires_confirmation": True,
"duplicates": duplicates,
"duplicate_count": len(duplicates)
})
else:
logging.warning(f"⚠️ [GUID] 덮어쓰기 모드 활성화됨 - 중복 파일을 덮어씁니다.")
total_target_count = len(files)
verified_count = 0
moved_count = 0
errors = []
lost_count = 0
try:
for file in files:
target = dst / file.name
# 1. 이미 완료되었는지 확인
if target.exists():
if not overwrite:
verified_count += 1
continue
# overwrite=True면 계속 진행하여 덮어쓰기 시도
# 2. 소스 확인
if not file.exists():
if target.exists(): verified_count += 1
else: lost_count += 1
continue
# 3. 이동
try:
shutil.move(str(file), str(target))
moved_count += 1
verified_count += 1
except FileNotFoundError:
if target.exists(): verified_count += 1
else: lost_count += 1
except Exception as e:
errors.append(f"{file.name}: {e}")
# 상세 메시지
msg = f"{total_target_count}건 중 {verified_count}건 처리 완료"
logging.info(f"✅ GUID 처리: {msg}")
flash(msg, "success" if lost_count == 0 else "warning")
return jsonify({
"success": True,
"total": total_target_count,
"verified": verified_count,
"message": msg,
"errors": errors if errors else None
})
except Exception as e:
logging.error(f"❌ GUID 이동 중 오류: {e}")
return jsonify({"success": False, "error": str(e)})
@utils_bp.route("/move_gpu_files", methods=["POST"])
@login_required
def move_gpu_files():
"""
data/idrac_info → data/gpu_serial 로 GPU 시리얼 텍스트 파일 이동
"""
src = Path(Config.IDRAC_INFO_FOLDER) # 예: data/idrac_info
dst = Path(Config.GPU_FOLDER) # 예: data/gpu_serial
dst.mkdir(parents=True, exist_ok=True)
moved = 0
skipped = 0
missing = 0
errors = []
# JSON 요청 파싱
data = request.get_json(silent=True) or {}
overwrite = data.get("overwrite", False)
try:
all_files = [f for f in src.iterdir() if f.is_file()]
files = [f for f in all_files if f.name.lower().endswith(".txt")]
except Exception:
files = []
# [중복 체크]
if not overwrite:
duplicates = []
for file in files:
target = dst / file.name
if target.exists():
duplicates.append(file.name)
if duplicates:
return jsonify({
"success": False,
"requires_confirmation": True,
"duplicates": duplicates,
"duplicate_count": len(duplicates)
})
else:
logging.warning(f"⚠️ [GPU] 덮어쓰기 모드 활성화됨 - 중복 파일을 덮어씁니다.")
total_target_count = len(files)
verified_count = 0
moved_count = 0
errors = []
lost_count = 0
try:
for file in files:
target = dst / file.name
# 1. 존재 확인 (덮어쓰기 아닐 경우)
if target.exists():
if not overwrite:
verified_count += 1
continue
# 2. 소스 확인
if not file.exists():
if target.exists(): verified_count += 1
else: lost_count += 1
continue
# 3. 이동
try:
shutil.move(str(file), str(target))
moved_count += 1
verified_count += 1
except FileNotFoundError:
if target.exists(): verified_count += 1
else: lost_count += 1
except Exception as e:
errors.append(f"{file.name}: {e}")
# 상세 메시지
msg = f"{total_target_count}건 중 {verified_count}건 처리 완료"
logging.info(f"✅ GPU 처리: {msg}")
flash(msg, "success")
return jsonify({
"success": True,
"total": total_target_count,
"verified": verified_count,
"message": msg,
"errors": errors if errors else None
})
except Exception as e:
logging.error(f"❌ GPU 이동 오류: {e}")
return jsonify({"success": False, "error": str(e)})
@utils_bp.route("/update_server_list", methods=["POST"])
@login_required
def update_server_list():
content = request.form.get("server_list_content")
if not content:
flash("내용을 입력하세요.", "warning")
return redirect(url_for("main.index"))
path = Path(Config.SERVER_LIST_FOLDER) / "server_list.txt"
try:
path.write_text(content, encoding="utf-8")
result = subprocess.run(
[sys.executable, str(Path(Config.SERVER_LIST_FOLDER) / "excel.py")],
capture_output=True,
text=True,
check=True,
cwd=str(Path(Config.SERVER_LIST_FOLDER)),
timeout=300,
)
logging.info(f"서버 리스트 스크립트 실행 결과: {result.stdout}")
flash("서버 리스트가 업데이트되었습니다.", "success")
except subprocess.CalledProcessError as e:
logging.error(f"서버 리스트 스크립트 오류: {e.stderr}")
flash(f"스크립트 실행 실패: {e.stderr}", "danger")
except Exception as e:
logging.error(f"서버 리스트 처리 오류: {e}")
flash(f"서버 리스트 처리 중 오류 발생: {e}", "danger")
return redirect(url_for("main.index"))
@utils_bp.route("/update_guid_list", methods=["POST"])
@login_required
def update_guid_list():
content = request.form.get("server_list_content")
slot_priority = request.form.get("slot_priority", "") # 슬롯 우선순위 받기
if not content:
flash("내용을 입력하세요.", "warning")
return redirect(url_for("main.index"))
path = Path(Config.SERVER_LIST_FOLDER) / "guid_list.txt"
try:
path.write_text(content, encoding="utf-8")
# 슬롯 우선순위를 환경변수로 전달
env = os.environ.copy()
if slot_priority:
env["GUID_SLOT_PRIORITY"] = slot_priority
logging.info(f"GUID 슬롯 우선순위: {slot_priority}")
result = subprocess.run(
[sys.executable, str(Path(Config.SERVER_LIST_FOLDER) / "GUIDtxtT0Execl.py")],
capture_output=True,
text=True,
check=True,
cwd=str(Path(Config.SERVER_LIST_FOLDER)),
timeout=300,
env=env, # 환경변수 전달
)
logging.info(f"GUID 리스트 스크립트 실행 결과: {result.stdout}")
flash("GUID 리스트가 업데이트되었습니다.", "success")
except subprocess.CalledProcessError as e:
logging.error(f"GUID 리스트 스크립트 오류: {e.stderr}")
flash(f"스크립트 실행 실패: {e.stderr}", "danger")
except Exception as e:
logging.error(f"GUID 리스트 처리 오류: {e}")
flash(f"GUID 리스트 처리 중 오류 발생: {e}", "danger")
return redirect(url_for("main.index"))
@utils_bp.route("/update_gpu_list", methods=["POST"])
@login_required
def update_gpu_list():
"""
GPU 시리얼용 리스트(gpu_serial_list.txt)를 갱신하고 Excel을 생성합니다.
- form name="gpu_list_content" 로 내용 전달 (S/T 목록 라인별)
- txt_to_excel.py --preset gpu --list-file <gpu_serial_list.txt>
"""
content = request.form.get("server_list_content")
if not content:
flash("내용을 입력하세요.", "warning")
return redirect(url_for("main.index"))
server_list_dir = Path(Config.SERVER_LIST_FOLDER)
list_path = server_list_dir / "gpu_list.txt"
# txt_to_excel.py는 server_list 폴더에 둔다고 가정 (위치 다르면 경로만 수정)
script_path = server_list_dir / "GPUTOExecl.py"
try:
# 1) gpu_serial_list.txt 저장
list_path.write_text(content, encoding="utf-8")
# 2) 엑셀 생성 실행 (GPU 프리셋)
cmd = [
sys.executable,
str(script_path),
"--preset", "gpu",
"--list-file", str(list_path),
]
result = subprocess.run(
cmd,
capture_output=True,
text=True,
check=True,
cwd=str(server_list_dir), # data/server_list 기준 실행
timeout=300,
)
logging.info(f"[GPU] 리스트 스크립트 실행 STDOUT:\n{result.stdout}")
if result.stderr:
logging.warning(f"[GPU] 리스트 스크립트 STDERR:\n{result.stderr}")
flash("GPU 리스트가 업데이트되었습니다.", "success")
except subprocess.CalledProcessError as e:
logging.error(f"[GPU] 스크립트 오류: {e.stderr}")
flash(f"스크립트 실행 실패: {e.stderr}", "danger")
except Exception as e:
logging.error(f"[GPU] 처리 오류: {e}")
flash(f"GPU 리스트 처리 중 오류 발생: {e}", "danger")
return redirect(url_for("main.index"))
logging.info(f"엑셀 파일 다운로드: {path}")
return send_file(str(path), as_attachment=True, download_name="mac_info.xlsx")
@utils_bp.route("/scan_network", methods=["POST"])
@login_required
def scan_network():
"""
지정된 IP 범위(Start ~ End)에 대해 Ping 테스트를 수행하고
응답이 있는 IP 목록을 반환합니다.
"""
try:
import ipaddress
import platform
import concurrent.futures
data = request.get_json(force=True, silent=True) or {}
start_ip_str = data.get('start_ip')
end_ip_str = data.get('end_ip')
if not start_ip_str or not end_ip_str:
return jsonify({"success": False, "error": "시작 IP와 종료 IP를 모두 입력해주세요."}), 400
try:
start_ip = ipaddress.IPv4Address(start_ip_str)
end_ip = ipaddress.IPv4Address(end_ip_str)
if start_ip > end_ip:
return jsonify({"success": False, "error": "시작 IP가 종료 IP보다 큽니다."}), 400
# IP 개수 제한 (너무 많은 스캔 방지, 예: C클래스 2개 분량 512개)
if int(end_ip) - int(start_ip) > 512:
return jsonify({"success": False, "error": "스캔 범위가 너무 넓습니다. (최대 512개)"}), 400
except ValueError:
return jsonify({"success": False, "error": "유효하지 않은 IP 주소 형식입니다."}), 400
# Ping 함수 정의
def ping_ip(ip_obj):
ip = str(ip_obj)
param = '-n' if platform.system().lower() == 'windows' else '-c'
timeout_param = '-w' if platform.system().lower() == 'windows' else '-W'
# Windows: -w 200 (ms), Linux: -W 1 (s)
timeout_val = '200' if platform.system().lower() == 'windows' else '1'
command = ['ping', param, '1', timeout_param, timeout_val, ip]
try:
# shell=False로 보안 강화, stdout/stderr 무시
res = subprocess.run(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
return ip if res.returncode == 0 else None
except Exception:
return None
active_ips = []
# IP 리스트 생성
target_ips = []
temp_ip = start_ip
while temp_ip <= end_ip:
target_ips.append(temp_ip)
temp_ip += 1
# 병렬 처리 (최대 50 쓰레드)
with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor:
results = executor.map(ping_ip, target_ips)
# 결과 수집 (None 제외)
active_ips = [ip for ip in results if ip is not None]
return jsonify({
"success": True,
"active_ips": active_ips,
"count": len(active_ips),
"message": f"스캔 완료: {len(active_ips)}개의 활성 IP 발견"
})
except Exception as e:
logging.error(f"Scan network fatal error: {e}")
return jsonify({"success": False, "error": f"서버 내부 오류: {str(e)}"}), 500

View File

@@ -0,0 +1,245 @@
{% extends "base.html" %}
{% block title %}시스템 로그 - Dell Server Info{% endblock %}
{% block extra_css %}
<style>
/* 전체 레이아웃 */
.editor-container {
display: flex;
flex-direction: column;
height: 600px;
background: #1e1e1e;
border: 1px solid #333;
border-radius: 6px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
overflow: hidden;
}
/* 툴바 (헤더) */
.editor-toolbar {
background-color: #252526;
border-bottom: 1px solid #333;
padding: 0.5rem 1rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
}
/* 에디터 본문 */
#monaco-editor-root {
flex: 1;
width: 100%;
height: 100%;
}
/* 로딩 인디케이터 */
.editor-loading {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
color: #d4d4d4;
font-size: 1.1rem;
background: #1e1e1e;
}
</style>
{% endblock %}
{% block content %}
<div class="container py-4">
<!-- Header -->
<div class="d-flex justify-content-between align-items-center mb-3">
<div>
<h2 class="fw-bold mb-1">
<i class="bi bi-terminal text-dark me-2"></i>시스템 로그
</h2>
<p class="text-muted mb-0 small">최근 생성된 1000줄의 시스템 로그를 실시간으로 확인합니다.</p>
</div>
<div>
<a href="{{ url_for('admin.admin_panel') }}" class="btn btn-outline-secondary">
<i class="bi bi-arrow-left me-1"></i>돌아가기
</a>
</div>
</div>
<div class="editor-container">
<!-- Toolbar -->
<div class="editor-toolbar">
<div class="d-flex gap-2 align-items-center flex-wrap">
<div class="input-group input-group-sm" style="width: 250px;">
<span class="input-group-text bg-dark border-secondary text-light"><i
class="bi bi-search"></i></span>
<input type="text" id="logSearch" class="form-control bg-dark border-secondary text-light"
placeholder="검색어 입력...">
</div>
<div class="btn-group btn-group-sm" role="group">
<input type="checkbox" class="btn-check" id="checkInfo" checked autocomplete="off">
<label class="btn btn-outline-secondary text-light" for="checkInfo">INFO</label>
<input type="checkbox" class="btn-check" id="checkWarn" checked autocomplete="off">
<label class="btn btn-outline-warning" for="checkWarn">WARN</label>
<input type="checkbox" class="btn-check" id="checkError" checked autocomplete="off">
<label class="btn btn-outline-danger" for="checkError">ERROR</label>
</div>
</div>
<div class="d-flex gap-2">
<button class="btn btn-sm btn-outline-light" id="btnScrollBottom">
<i class="bi bi-arrow-down-circle me-1"></i>맨 아래로
</button>
<a href="{{ url_for('admin.view_logs') }}" class="btn btn-primary btn-sm">
<i class="bi bi-arrow-clockwise me-1"></i>새로고침
</a>
</div>
</div>
<!-- Editor Area -->
<div id="monaco-editor-root">
<div class="editor-loading">
<div class="spinner-border text-light me-3" role="status"></div>
<div>로그 뷰어를 불러오는 중...</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<!-- Monaco Editor Loader -->
<script src="https://unpkg.com/monaco-editor@0.45.0/min/vs/loader.js"></script>
<script>
// 서버에서 전달된 로그 데이터 (Python list -> JS array)
// tojson safe 필터 사용
const allLogs = {{ logs | tojson | safe }};
document.addEventListener('DOMContentLoaded', function () {
if (typeof require === 'undefined') {
document.querySelector('.editor-loading').innerHTML =
'<div class="text-danger"><i class="bi bi-exclamation-triangle me-2"></i>Monaco Editor를 로드할 수 없습니다.</div>';
return;
}
require.config({ paths: { 'vs': 'https://unpkg.com/monaco-editor@0.45.0/min/vs' } });
require(['vs/editor/editor.main'], function () {
var container = document.getElementById('monaco-editor-root');
container.innerHTML = ''; // 로딩 제거
// 1. 커스텀 로그 언어 정의 (간단한 하이라이팅)
monaco.languages.register({ id: 'simpleLog' });
monaco.languages.setMonarchTokensProvider('simpleLog', {
tokenizer: {
root: [
[/\[INFO\]|INFO:/, 'info-token'],
[/\[WARNING\]|\[WARN\]|WARNING:|WARN:/, 'warn-token'],
[/\[ERROR\]|ERROR:|Traceback/, 'error-token'],
[/\[DEBUG\]|DEBUG:/, 'debug-token'],
[/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}/, 'date-token'],
[/".*?"/, 'string']
]
}
});
// 2. 테마 정의
monaco.editor.defineTheme('logTheme', {
base: 'vs-dark',
inherit: true,
rules: [
{ token: 'info-token', foreground: '4ec9b0' },
{ token: 'warn-token', foreground: 'cca700', fontStyle: 'bold' },
{ token: 'error-token', foreground: 'f44747', fontStyle: 'bold' },
{ token: 'debug-token', foreground: '808080' },
{ token: 'date-token', foreground: '569cd6' },
],
colors: {
'editor.background': '#1e1e1e'
}
});
// 3. 에디터 생성
var editor = monaco.editor.create(container, {
value: allLogs.join('\n'),
language: 'simpleLog',
theme: 'logTheme',
readOnly: true,
automaticLayout: true,
minimap: { enabled: true },
fontSize: 13,
lineHeight: 19, // 밀도 조절
scrollBeyondLastLine: false,
lineNumbers: 'on',
wordWrap: 'on',
renderLineHighlight: 'all',
contextmenu: false,
padding: { top: 10, bottom: 10 }
});
// 4. 필터링 로직
function updateLogs() {
const query = document.getElementById('logSearch').value.toLowerCase();
const showInfo = document.getElementById('checkInfo').checked;
const showWarn = document.getElementById('checkWarn').checked;
const showError = document.getElementById('checkError').checked;
const filtered = allLogs.filter(line => {
const lower = line.toLowerCase();
// 레벨 체크 (매우 단순화)
let levelMatch = false;
const isError = lower.includes('[error]') || lower.includes('error:') || lower.includes('traceback');
const isWarn = lower.includes('[warning]') || lower.includes('[warn]') || lower.includes('warn:');
const isInfo = lower.includes('[info]') || lower.includes('info:');
if (isError) {
if (showError) levelMatch = true;
} else if (isWarn) {
if (showWarn) levelMatch = true;
} else if (isInfo) {
if (showInfo) levelMatch = true;
} else {
// 레벨 키워드가 없는 줄은 기본적으로 표시 (맥락 유지)
levelMatch = true;
}
if (!levelMatch) return false;
// 검색어 체크
if (query && !lower.includes(query)) return false;
return true;
});
// 현재 스크롤 위치 저장? 아니면 항상 아래로? -> 보통 필터링하면 아래로 가는게 편함
const currentModel = editor.getModel();
if (currentModel) {
currentModel.setValue(filtered.join('\n'));
}
// editor.revealLine(editor.getModel().getLineCount());
}
// 이벤트 연결
document.getElementById('logSearch').addEventListener('keyup', updateLogs);
document.getElementById('checkInfo').addEventListener('change', updateLogs);
document.getElementById('checkWarn').addEventListener('change', updateLogs);
document.getElementById('checkError').addEventListener('change', updateLogs);
// 맨 아래로 버튼
document.getElementById('btnScrollBottom').addEventListener('click', function () {
editor.revealLine(editor.getModel().getLineCount());
});
// 초기 스크롤 (약간의 지연 후)
setTimeout(() => {
editor.revealLine(editor.getModel().getLineCount());
}, 100);
});
});
</script>
{% endblock %}

View File

@@ -0,0 +1,699 @@
{% extends "base.html" %}
{% block content %}
<div class="container-fluid py-4">
{# 헤더 섹션 #}
<div class="row mb-4">
<div class="col">
<h2 class="fw-bold mb-1">
<i class="bi bi-server text-primary me-2"></i>
서버 관리 대시보드
</h2>
<p class="text-muted mb-0">IP 처리 및 파일 관리를 위한 통합 관리 도구</p>
</div>
</div>
{# 메인 작업 영역 #}
<div class="row g-4 mb-4">
{# IP 처리 카드 #}
<div class="col-lg-6">
<div class="card border shadow-sm h-100">
<div class="card-header bg-light border-0 py-2">
<h6 class="mb-0">
<i class="bi bi-hdd-network me-2"></i>
IP 처리
</h6>
</div>
<div class="card-body p-4 h-100 d-flex flex-column">
<form id="ipForm" method="post" action="{{ url_for('main.process_ips') }}" class="h-100 d-flex flex-column">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
{# 스크립트 선택 #}
<div class="mb-3">
<select id="script" name="script" class="form-select" required autocomplete="off">
<option value="">스크립트를 선택하세요</option>
{% if grouped_scripts %}
{% for category, s_list in grouped_scripts.items() %}
<optgroup label="{{ category }}">
{% for script in s_list %}
<option value="{{ script }}">{{ script }}</option>
{% endfor %}
</optgroup>
{% endfor %}
{% else %}
{# 만약 grouped_scripts가 없는 경우(하위 호환) #}
{% for script in scripts %}
<option value="{{ script }}">{{ script }}</option>
{% endfor %}
{% endif %}
</select>
</div>
{# XML 파일 선택 (조건부) #}
<div class="mb-3" id="xmlFileGroup" style="display:none;">
<select id="xmlFile" name="xmlFile" class="form-select">
<option value="">XML 파일 선택</option>
{% for xml_file in xml_files %}
<option value="{{ xml_file }}">{{ xml_file }}</option>
{% endfor %}
</select>
</div>
{# IP 주소 입력 #}
<div class="mb-3 flex-grow-1 d-flex flex-column">
<label for="ips" class="form-label w-100 d-flex justify-content-between align-items-end mb-2">
<span class="mb-1">
IP 주소
<span class="badge bg-secondary ms-1" id="ipLineCount">0</span>
</span>
<div class="d-flex align-items-center gap-1">
<button type="button" class="btn btn-sm btn-outline-secondary px-2 py-1" id="btnClearIps"
title="입력 내용 지우기" style="font-size: 0.75rem;">
<i class="bi bi-trash me-1"></i>지우기
</button>
<button type="button" class="btn btn-sm btn-outline-primary px-2 py-1" id="btnStartScan"
title="10.10.0.1 ~ 255 자동 스캔" style="font-size: 0.75rem;">
<i class="bi bi-search me-1"></i>IP 스캔
</button>
</div>
</label>
<textarea id="ips" name="ips" class="form-control font-monospace flex-grow-1"
placeholder="예:&#10;192.168.1.1&#10;192.168.1.2" required style="resize: none;"></textarea>
</div>
<div class="mt-auto">
<button type="submit"
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">
<div class="rounded-circle bg-primary bg-opacity-10 text-primary p-1">
<i class="bi bi-play-circle-fill fs-5"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.8rem;">처리 시작</span>
</button>
</div>
</form>
</div>
</div>
</div>
{# 공유 작업 카드 #}
<div class="col-lg-6">
<div class="card border shadow-sm h-100">
<div class="card-header bg-light border-0 py-2">
<h6 class="mb-0">
<i class="bi bi-share me-2"></i>
공유 작업
</h6>
</div>
<div class="card-body p-4">
<form id="sharedForm" method="post">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label for="server_list_content" class="form-label">
서버 리스트 (덮어쓰기)
<span class="badge bg-secondary ms-2" id="serverLineCount">0 대설정</span>
</label>
<textarea id="server_list_content" name="server_list_content" rows="8" class="form-control font-monospace"
style="font-size: 0.95rem;" placeholder="서버 리스트를 입력하세요..."></textarea>
</div>
<div class="row g-2">
<div class="col-4">
<button type="submit" formaction="{{ url_for('utils.update_server_list') }}"
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-primary bg-opacity-10 text-primary p-1">
<i class="bi bi-file-earmark-spreadsheet fs-5"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.8rem;">MAC to Excel</span>
</button>
</div>
<div class="col-4">
<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>
</div>
<span class="fw-medium text-dark" style="font-size: 0.8rem;">GUID to Excel</span>
</button>
</div>
<div class="col-4">
<button type="submit" formaction="{{ url_for('utils.update_gpu_list') }}"
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-danger bg-opacity-10 text-danger p-1">
<i class="bi bi-gpu-card fs-5"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.8rem;">GPU to Excel</span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{# 진행바 #}
<div class="row mb-4">
<div class="col">
<div class="card border-0 shadow-sm">
<div class="card-body p-3">
<div class="d-flex align-items-center mb-2">
<i class="bi bi-activity text-primary me-2"></i>
<span class="fw-semibold">처리 진행률</span>
</div>
<div class="progress" style="height: 25px;">
<div id="progressBar" class="progress-bar progress-bar-striped progress-bar-animated bg-success"
role="progressbar" style="width:0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
<span class="fw-semibold">0%</span>
</div>
</div>
</div>
</div>
</div>
</div>
{# 파일 관리 도구 #}
<div class="row mb-4">
<div class="col">
<div class="card border shadow-sm">
<div class="card-header bg-light border-0 py-2">
<h6 class="mb-0">
<i class="bi bi-tools me-2"></i>
파일 관리 도구
</h6>
</div>
<div class="card-body p-4 file-tools">
<div class="d-flex flex-column gap-3">
<!-- 상단: 입력형 도구 (다운로드/백업) -->
<div class="row g-2">
<!-- ZIP 다운로드 -->
<div class="col-6">
<div class="card h-100 border-primary-subtle bg-primary-subtle bg-opacity-10">
<div class="card-body p-2 d-flex flex-column justify-content-center">
<h6 class="card-title fw-bold text-primary mb-1 small" style="font-size: 0.75rem;">
<i class="bi bi-file-earmark-zip me-1"></i>ZIP
</h6>
<form method="post" action="{{ url_for('main.download_zip') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="input-group input-group-sm">
<input type="text" class="form-control border-primary-subtle form-control-sm"
name="zip_filename" placeholder="파일명" required
style="font-size: 0.75rem; padding: 0.2rem 0.5rem;">
<button class="btn btn-primary btn-sm px-2" type="submit">
<i class="bi bi-download" style="font-size: 0.75rem;"></i>
</button>
</div>
</form>
</div>
</div>
</div>
<!-- 파일 백업 -->
<div class="col-6">
<div class="card h-100 border-success-subtle bg-success-subtle bg-opacity-10">
<div class="card-body p-2 d-flex flex-column justify-content-center">
<h6 class="card-title fw-bold text-success mb-1 small" style="font-size: 0.75rem;">
<i class="bi bi-hdd-network me-1"></i>백업
</h6>
<form method="post" action="{{ url_for('main.backup_files') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="input-group input-group-sm">
<input type="text" class="form-control border-success-subtle form-control-sm"
name="backup_prefix" placeholder="ex)PO-20251117-0015_20251223_판교_R6615(TY1A)"
style="font-size: 0.75rem; padding: 0.2rem 0.5rem;">
<button class="btn btn-success btn-sm px-2" type="submit">
<i class="bi bi-save" style="font-size: 0.75rem;"></i>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- 하단: 원클릭 액션 (파일 정리) -->
<div class="card bg-light border-0">
<div class="card-body p-3">
<small class="text-muted fw-bold text-uppercase mb-2 d-block">
<i class="bi bi-folder-symlink me-1"></i>파일 정리 (Quick Move)
</small>
<div class="row g-2">
<!-- MAC Move -->
<div class="col-4">
<form id="macMoveForm" method="post" action="{{ url_for('utils.move_mac_files') }}" class="h-100">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button
class="btn btn-white bg-white border shadow-sm w-100 h-100 py-1 d-flex flex-column align-items-center justify-content-center gap-1 btn-quick-move"
type="submit">
<div class="rounded-circle bg-primary bg-opacity-10 text-primary p-1">
<i class="bi bi-cpu fs-6"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.75rem;">MAC</span>
</button>
</form>
</div>
<!-- GUID Move -->
<div class="col-4">
<form id="guidMoveForm" method="post" action="{{ url_for('utils.move_guid_files') }}" class="h-100">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button
class="btn btn-white bg-white border shadow-sm w-100 h-100 py-1 d-flex flex-column align-items-center justify-content-center gap-1 btn-quick-move"
type="submit">
<div class="rounded-circle bg-success bg-opacity-10 text-success p-1">
<i class="bi bi-fingerprint fs-6"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.75rem;">GUID</span>
</button>
</form>
</div>
<div class="col-4">
<form id="gpuMoveForm" method="post" action="{{ url_for('utils.move_gpu_files') }}" class="h-100">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button
class="btn btn-white bg-white border shadow-sm w-100 h-100 py-1 d-flex flex-column align-items-center justify-content-center gap-1 btn-quick-move"
type="submit">
<div class="rounded-circle bg-danger bg-opacity-10 text-danger p-1">
<i class="bi bi-gpu-card fs-6"></i>
</div>
<span class="fw-medium text-dark" style="font-size: 0.75rem;">GPU</span>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{# 처리된 파일 목록 #}
<div class="row mb-4 processed-list">
<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">
<i class="bi bi-files me-2"></i>
처리된 파일 목록
</h6>
</div>
<div class="card-body p-4">
{% if files_to_display and files_to_display|length > 0 %}
<div class="row g-3">
{% for file_info in files_to_display %}
<div class="col-auto">
<div class="file-card-compact border rounded p-2 text-center">
<a href="{{ url_for('main.download_file', filename=file_info.file) }}"
class="text-decoration-none text-dark fw-semibold d-block mb-2 text-nowrap px-2" download
title="{{ file_info.name or file_info.file }}">
{{ file_info.name or file_info.file }}
</a>
<div class="file-card-buttons d-flex gap-2 justify-content-center">
<button type="button" class="btn btn-sm btn-outline btn-view-processed flex-fill"
data-bs-toggle="modal" data-bs-target="#fileViewModal" data-folder="idrac_info"
data-filename="{{ file_info.file }}">
보기
</button>
<form action="{{ url_for('main.delete_file', filename=file_info.file) }}" method="post"
class="d-inline">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="btn btn-sm btn-outline btn-delete-processed flex-fill"
onclick="return confirm('삭제하시겠습니까?');">
삭제
</button>
</form>
</div>
</div>
</div>
{% endfor %}
</div>
<!-- 페이지네이션 -->
{% if total_pages > 1 %}
<nav aria-label="Processed files pagination" class="mt-4">
<ul class="pagination justify-content-center mb-0">
<!-- 이전 페이지 -->
{% if page > 1 %}
<li class="page-item">
<a class="page-link" href="{{ url_for('main.index', page=page-1) }}">
<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 %}
<!-- 페이지 번호 (최대 10개 표시) -->
{% set start_page = ((page - 1) // 10) * 10 + 1 %}
{% set end_page = [start_page + 9, total_pages]|min %}
{% for p in range(start_page, end_page + 1) %}
<li class="page-item {% if p == page %}active{% endif %}">
<a class="page-link" href="{{ url_for('main.index', page=p) }}">{{ p }}</a>
</li>
{% endfor %}
<!-- 다음 페이지 -->
{% if page < total_pages %} <li class="page-item">
<a class="page-link" href="{{ url_for('main.index', page=page+1) }}">
다음 <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>
<p class="text-muted mb-0">표시할 파일이 없습니다.</p>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{# 백업된 파일 목록 #}
<div class="row backup-list">
<div class="col">
<div class="card border shadow-sm">
<div class="card-header bg-light border-0 py-2">
<h6 class="mb-0">
<i class="bi bi-archive me-2"></i>
백업된 파일 목록
</h6>
</div>
<div class="card-body p-4">
{% if backup_files and backup_files|length > 0 %}
<div class="list-group">
{% for date, info in backup_files.items() %}
<div class="list-group-item border rounded mb-2 p-0 overflow-hidden">
<div class="d-flex justify-content-between align-items-center p-3 bg-light">
<div class="d-flex align-items-center">
<i class="bi bi-calendar3 text-primary me-2"></i>
<strong>{{ date }}</strong>
<span class="badge bg-primary ms-3">{{ info.count }} 파일</span>
</div>
<button class="btn btn-sm btn-outline-secondary" type="button" data-bs-toggle="collapse"
data-bs-target="#collapse-{{ loop.index }}" aria-expanded="false">
<i class="bi bi-chevron-down"></i>
</button>
</div>
<div id="collapse-{{ loop.index }}" class="collapse">
<div class="p-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 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 }}">
{{ file.rsplit('.', 1)[0] }}
</a>
<div class="file-card-single-button">
<button type="button" class="btn btn-sm btn-outline btn-view-backup w-100"
data-bs-toggle="modal" data-bs-target="#fileViewModal" data-folder="backup"
data-date="{{ date }}" data-filename="{{ file }}">
보기
</button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</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>
<p class="text-muted mb-0">백업된 파일이 없습니다.</p>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{# 파일 보기 모달 #}
<div class="modal fade" id="fileViewModal" tabindex="-1" aria-labelledby="fileViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="fileViewModalLabel">
<i class="bi bi-file-text me-2"></i>
파일 보기
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="닫기"></button>
</div>
<div class="modal-body bg-light">
<pre id="fileViewContent" class="mb-0 p-3 bg-white border rounded font-monospace"
style="white-space:pre-wrap;word-break:break-word;max-height:70vh;">불러오는 중...</pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
<i class="bi bi-x-circle me-1"></i>닫기
</button>
</div>
</div>
</div>
</div>
{% endblock %}
{% block extra_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">
{% endblock %}
{% block scripts %}
{{ super() }}
<!-- Tom Select JS -->
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.2.2/dist/js/tom-select.complete.min.js"></script>
<script>
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>
<!-- 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="슬롯 번호를 입력하세요.&#10;구분자: 쉼표(,) 공백( ) 줄바꿈&#10;&#10;예시: 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 %}

View File

@@ -0,0 +1,705 @@
/**
* dashboard.js
* 통합된 대시보드 관리 스크립트
* (script.js + index.js + index_custom.js 통합)
*/
document.addEventListener('DOMContentLoaded', () => {
// ─────────────────────────────────────────────────────────────
// 1. 공통 유틸리티 & 설정
// ─────────────────────────────────────────────────────────────
const csrfToken = document.querySelector('input[name="csrf_token"]')?.value || '';
// 진행바 업데이트 (전역 함수로 등록하여 다른 곳에서 호출 가능)
window.updateProgress = function (val) {
const bar = document.getElementById('progressBar');
if (!bar) return;
const v = Math.max(0, Math.min(100, Number(val) || 0));
// 부모 컨테이너가 숨겨져 있다면 표시
const progressContainer = bar.closest('.progress');
if (progressContainer && progressContainer.parentElement.classList.contains('d-none')) {
progressContainer.parentElement.classList.remove('d-none');
}
bar.style.width = v + '%';
bar.setAttribute('aria-valuenow', v);
bar.innerHTML = `<span class="fw-semibold small">${v}%</span>`;
// 100% 도달 시 애니메이션 효과 제어 등은 필요 시 추가
};
// 줄 수 카운터 (script.js에서 가져옴)
function updateLineCount(textareaId, badgeId) {
const textarea = document.getElementById(textareaId);
const badge = document.getElementById(badgeId);
if (!textarea || !badge) return;
const updateCount = () => {
const text = textarea.value.trim();
if (text === '') {
badge.textContent = '0';
return;
}
// 빈 줄 제외하고 카운트
const lines = text.split('\n').filter(line => line.trim().length > 0);
badge.textContent = lines.length; // UI 간소화를 위해 '줄' 텍스트 제외하거나 포함 가능
};
updateCount();
['input', 'change', 'keyup', 'paste'].forEach(evt => {
textarea.addEventListener(evt, () => setTimeout(updateCount, 10));
});
}
// 초기화
updateLineCount('ips', 'ipLineCount');
updateLineCount('server_list_content', 'serverLineCount');
// 알림 자동 닫기
setTimeout(() => {
document.querySelectorAll('.alert').forEach(alert => {
const bsAlert = new bootstrap.Alert(alert);
bsAlert.close();
});
}, 5000);
// ─────────────────────────────────────────────────────────────
// 2. IP 처리 및 스캔 로직
// ─────────────────────────────────────────────────────────────
// 2-1. 스크립트 선택 시 XML 드롭다운 토글
const TARGET_SCRIPT = "02-set_config.py";
const scriptSelect = document.getElementById('script');
const xmlGroup = document.getElementById('xmlFileGroup');
function toggleXml() {
if (!scriptSelect || !xmlGroup) return;
if (scriptSelect.value === TARGET_SCRIPT) {
xmlGroup.style.display = 'block';
xmlGroup.classList.add('fade-in');
} else {
xmlGroup.style.display = 'none';
}
}
if (scriptSelect) {
// TomSelect 적용 전/후 모두 대응하기 위해 이벤트 리스너 등록
toggleXml();
scriptSelect.addEventListener('change', toggleXml);
// TomSelect 초기화
new TomSelect("#script", {
create: false,
sortField: { field: "text", direction: "asc" },
placeholder: "스크립트를 검색하거나 선택하세요...",
plugins: ['clear_button'],
allowEmptyOption: true,
onChange: toggleXml // TomSelect 변경 시에도 호출
});
}
// 2-2. IP 입력 데이터 보존 (Local Storage)
const ipTextarea = document.getElementById('ips');
const STORAGE_KEY_IP = 'ip_input_draft';
if (ipTextarea) {
const savedIps = localStorage.getItem(STORAGE_KEY_IP);
if (savedIps) {
ipTextarea.value = savedIps;
// 강제 이벤트 트리거하여 줄 수 카운트 업데이트
ipTextarea.dispatchEvent(new Event('input'));
}
ipTextarea.addEventListener('input', () => {
localStorage.setItem(STORAGE_KEY_IP, ipTextarea.value);
});
}
// 2-3. IP 스캔 (Modal / AJAX)
const btnScan = document.getElementById('btnStartScan');
if (btnScan) {
btnScan.addEventListener('click', async () => {
const startIp = '10.10.0.2';
const endIp = '10.10.0.255';
const ipsTextarea = document.getElementById('ips');
const progressBar = document.getElementById('progressBar');
// UI 잠금 및 로딩 표시
const originalIcon = btnScan.innerHTML;
btnScan.disabled = true;
btnScan.innerHTML = '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>';
if (progressBar) {
// 진행바 표시 및 초기화
const progressContainer = progressBar.closest('.progress');
if (progressContainer && progressContainer.parentElement) {
// 이미 존재하는 row 등을 찾아서 보여주기 (필요시)
}
window.updateProgress(100); // 스캔 중임을 알리기 위해 꽉 채움 (애니메이션)
progressBar.classList.add('progress-bar-striped', 'progress-bar-animated');
progressBar.textContent = 'IP 스캔 중...';
}
try {
const res = await fetch('/utils/scan_network', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-CSRFToken': csrfToken },
body: JSON.stringify({ start_ip: startIp, end_ip: endIp })
});
if (res.redirected) {
alert('세션이 만료되었습니다. 다시 로그인해주세요.');
window.location.reload();
return;
}
const contentType = res.headers.get("content-type");
if (!contentType || !contentType.includes("application/json")) {
const text = await res.text();
throw new Error(`서버 응답 오류: ${text.substring(0, 100)}...`);
}
const data = await res.json();
if (data.success) {
if (data.active_ips && data.active_ips.length > 0) {
ipsTextarea.value = data.active_ips.join('\n');
ipsTextarea.dispatchEvent(new Event('input')); // 저장 및 카운트 갱신
alert(`스캔 완료: ${data.active_ips.length}개의 활성 IP를 찾았습니다.`);
} else {
alert('활성 IP를 발견하지 못했습니다.');
}
} else {
throw new Error(data.error || 'Unknown error');
}
} catch (err) {
console.error(err);
alert('오류가 발생했습니다: ' + (err.message || err));
} finally {
// 복구
btnScan.disabled = false;
btnScan.innerHTML = originalIcon;
if (progressBar) {
window.updateProgress(0);
progressBar.classList.remove('progress-bar-striped', 'progress-bar-animated');
}
}
});
}
// 2-4. IP 지우기 버튼
const btnClear = document.getElementById('btnClearIps');
if (btnClear) {
btnClear.addEventListener('click', () => {
const ipsTextarea = document.getElementById('ips');
if (ipsTextarea && confirm('입력된 IP 목록을 모두 지우시겠습니까?')) {
ipsTextarea.value = '';
ipsTextarea.dispatchEvent(new Event('input'));
}
});
}
// 2-5. 메인 IP 폼 제출 및 진행률 폴링 (script.js 로직)
const ipForm = document.getElementById("ipForm");
if (ipForm) {
ipForm.addEventListener("submit", async (ev) => {
ev.preventDefault();
const formData = new FormData(ipForm);
const btn = ipForm.querySelector('button[type="submit"]');
const originalHtml = btn.innerHTML;
btn.disabled = true;
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>처리 중...';
// 진행바 초기화
window.updateProgress(0);
try {
const res = await fetch(ipForm.action, {
method: "POST",
body: formData
});
if (!res.ok) throw new Error("HTTP " + res.status);
const data = await res.json();
if (data.job_id) {
// 비동기 작업 시작됨 -> 폴링 시작
pollProgress(data.job_id);
} else {
// 동기 처리 완료
window.updateProgress(100);
setTimeout(() => location.reload(), 1000);
}
} catch (err) {
console.error("처리 중 오류:", err);
alert("처리 중 오류 발생: " + err.message);
btn.disabled = false;
btn.innerHTML = originalHtml;
}
});
}
// 폴링 함수
function pollProgress(jobId) {
const interval = setInterval(async () => {
try {
const res = await fetch(`/progress_status/${jobId}`);
if (!res.ok) {
clearInterval(interval);
return;
}
const data = await res.json();
if (data.progress !== undefined) {
window.updateProgress(data.progress);
}
if (data.progress >= 100) {
clearInterval(interval);
window.updateProgress(100);
setTimeout(() => location.reload(), 1500);
}
} catch (err) {
console.error('진행률 확인 중 오류:', err);
clearInterval(interval);
}
}, 500);
}
// ─────────────────────────────────────────────────────────────
// 3. 파일 관련 기능 (백업 이동, 파일 보기 등)
// ─────────────────────────────────────────────────────────────
// 3-1. 파일 보기 모달 (index.js)
const modalEl = document.getElementById('fileViewModal');
const titleEl = document.getElementById('fileViewModalLabel');
const contentEl = document.getElementById('fileViewContent');
if (modalEl) {
modalEl.addEventListener('show.bs.modal', async (ev) => {
const btn = ev.relatedTarget;
const folder = btn?.getAttribute('data-folder') || '';
const date = btn?.getAttribute('data-date') || '';
const filename = btn?.getAttribute('data-filename') || '';
titleEl.innerHTML = `<i class="bi bi-file-text me-2"></i>${filename || '파일'}`;
contentEl.textContent = '불러오는 중...';
const params = new URLSearchParams();
if (folder) params.set('folder', folder);
if (date) params.set('date', date);
if (filename) params.set('filename', filename);
try {
const res = await fetch(`/view_file?${params.toString()}`, { cache: 'no-store' });
if (!res.ok) throw new Error('HTTP ' + res.status);
const data = await res.json();
contentEl.textContent = data?.content ?? '(빈 파일)';
} catch (e) {
contentEl.textContent = '파일을 불러오지 못했습니다: ' + (e?.message || e);
}
});
}
// 3-2. 백업 파일 드래그 앤 드롭 이동 (index_custom.js)
let selectedItems = new Set();
const backupContainers = document.querySelectorAll('.backup-files-container');
// 다중 선택 처리
document.addEventListener('click', function (e) {
const item = e.target.closest('.backup-file-item');
if (item && !e.target.closest('a') && !e.target.closest('button')) {
if (e.ctrlKey || e.metaKey) {
toggleSelection(item);
} else {
const wasSelected = item.classList.contains('selected');
clearSelection();
if (!wasSelected) toggleSelection(item);
}
} else if (!e.target.closest('.backup-files-container')) {
// 배경 클릭 시 선택 해제? (UX에 따라 결정, 여기선 일단 패스)
}
});
// 빈 공간 클릭 시 선택 해제
document.addEventListener('mousedown', function (e) {
if (!e.target.closest('.backup-file-item') && !e.target.closest('.backup-files-container')) {
clearSelection();
}
});
function toggleSelection(item) {
if (item.classList.contains('selected')) {
item.classList.remove('selected');
selectedItems.delete(item);
} else {
item.classList.add('selected');
selectedItems.add(item);
}
}
function clearSelection() {
document.querySelectorAll('.backup-file-item.selected').forEach(el => el.classList.remove('selected'));
selectedItems.clear();
}
function updateFolderCount(folderDate) {
const container = document.querySelector(`.backup-files-container[data-folder="${folderDate}"]`);
if (container) {
const listItem = container.closest('.list-group-item');
if (listItem) {
const badge = listItem.querySelector('.badge');
if (badge) {
badge.textContent = `${container.children.length} 파일`;
}
}
}
}
// Sortable 초기화
backupContainers.forEach(container => {
if (typeof Sortable === 'undefined') return;
new Sortable(container, {
group: 'backup-files',
animation: 150,
ghostClass: 'sortable-ghost',
delay: 100,
delayOnTouchOnly: true,
onStart: function (evt) {
if (!evt.item.classList.contains('selected')) {
clearSelection();
toggleSelection(evt.item);
}
},
onEnd: function (evt) {
if (evt.to === evt.from) return;
const sourceFolder = evt.from.getAttribute('data-folder');
const targetFolder = evt.to.getAttribute('data-folder');
if (!sourceFolder || !targetFolder) {
alert('잘못된 이동 요청입니다.');
location.reload();
return;
}
let itemsToMove = Array.from(selectedItems);
if (itemsToMove.length === 0) itemsToMove = [evt.item];
else if (!itemsToMove.includes(evt.item)) itemsToMove.push(evt.item);
// UI 상 이동 처리 (Sortable이 하나는 처리해주지만 다중 선택은 직접 옮겨야 함)
itemsToMove.forEach(item => {
if (item !== evt.item) evt.to.appendChild(item);
});
// 서버 요청
if (!window.APP_CONFIG) {
console.error("Window APP_CONFIG not found!");
return;
}
const promises = itemsToMove.map(item => {
const filename = item.getAttribute('data-filename');
if (!filename) return Promise.resolve();
return fetch(window.APP_CONFIG.moveBackupUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': window.APP_CONFIG.csrfToken
},
body: JSON.stringify({
filename: filename,
source_folder: sourceFolder,
target_folder: targetFolder
})
})
.then(r => r.json())
.then(data => {
if (data.success) {
// 속성 업데이트 (다운로드 링크 등)
const btn = item.querySelector('.btn-view-backup');
if (btn) btn.setAttribute('data-date', targetFolder);
const link = item.querySelector('a[download]');
if (link && window.APP_CONFIG.downloadBaseUrl) {
const newHref = window.APP_CONFIG.downloadBaseUrl
.replace('PLACEHOLDER_DATE', targetFolder)
.replace('PLACEHOLDER_FILE', filename);
link.setAttribute('href', newHref);
}
}
return data;
});
});
Promise.all(promises).then(results => {
updateFolderCount(sourceFolder);
updateFolderCount(targetFolder);
clearSelection();
const failed = results.filter(r => r && !r.success);
if (failed.length > 0) {
alert(failed.length + '개의 파일 이동 실패. 새로고침이 필요합니다.');
location.reload();
}
}).catch(err => {
console.error(err);
alert('이동 중 통신 오류 발생');
});
}
});
});
// ─────────────────────────────────────────────────────────────
// 4. 슬롯 우선순위 설정 모달 (index_custom.js)
// ─────────────────────────────────────────────────────────────
const slotPriorityModal = document.getElementById('slotPriorityModal');
if (slotPriorityModal) {
const slotNumbersInput = document.getElementById('slotNumbersInput');
const slotCountDisplay = document.getElementById('slotCountDisplay');
const slotPreview = document.getElementById('slotPreview');
const slotPriorityInput = document.getElementById('slot_priority_input');
const modalServerListContent = document.getElementById('modal_server_list_content');
const serverListTextarea = document.getElementById('server_list_content');
const slotPriorityForm = document.getElementById('slotPriorityForm');
const btnClearSlots = document.getElementById('btnClearSlots');
const presetCountInput = document.getElementById('presetCountInput');
const btnApplyPreset = document.getElementById('btnApplyPreset');
const defaultPriority = ['38', '39', '37', '36', '32', '33', '34', '35', '31', '40'];
function loadSlots() {
const saved = localStorage.getItem('guidSlotNumbers');
slotNumbersInput.value = saved ? saved : defaultPriority.join(', ');
if (presetCountInput) presetCountInput.value = 10;
updateSlotPreview();
}
function saveSlots() {
localStorage.setItem('guidSlotNumbers', slotNumbersInput.value);
}
function parseSlots(input) {
if (!input || !input.trim()) return [];
return input.split(/[,\s\n]+/)
.map(s => s.trim())
.filter(s => s !== '' && /^\d+$/.test(s))
.filter((v, i, a) => a.indexOf(v) === i); // Unique
}
function updateSlotPreview() {
const slots = parseSlots(slotNumbersInput.value);
const count = slots.length;
slotCountDisplay.textContent = `${count}`;
slotCountDisplay.className = count > 0
? 'badge bg-primary text-white border border-primary rounded-pill px-3 py-1'
: 'badge bg-white text-dark border rounded-pill px-3 py-1';
if (count === 0) {
slotPreview.style.display = 'flex';
slotPreview.innerHTML = `
<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>`;
} else {
slotPreview.style.display = 'grid';
slotPreview.innerHTML = slots.map((slot, index) => `
<div class="slot-badge animate__animated animate__fadeIn" data-slot="${slot}" style="animation-delay: ${index * 0.02}s">
<span class="slot-index">${index + 1}</span>
<div>Slot ${slot}</div>
</div>
`).join('');
// 미리보기 Sortable
new Sortable(slotPreview, {
animation: 150,
ghostClass: 'sortable-ghost',
dragClass: 'sortable-drag',
onEnd: function () {
const items = slotPreview.querySelectorAll('.slot-badge');
const newSlots = Array.from(items).map(item => item.getAttribute('data-slot'));
slotNumbersInput.value = newSlots.join(', ');
items.forEach((item, index) => {
const idx = item.querySelector('.slot-index');
if (idx) idx.textContent = index + 1;
});
saveSlots();
}
});
}
saveSlots();
}
if (btnApplyPreset) {
btnApplyPreset.addEventListener('click', () => {
let count = parseInt(presetCountInput.value) || 10;
count = Math.max(1, Math.min(10, count));
presetCountInput.value = count;
slotNumbersInput.value = defaultPriority.slice(0, count).join(', ');
updateSlotPreview();
});
}
slotNumbersInput.addEventListener('input', updateSlotPreview);
btnClearSlots.addEventListener('click', () => {
if (confirm('모두 지우시겠습니까?')) {
slotNumbersInput.value = '';
updateSlotPreview();
}
});
slotPriorityModal.addEventListener('show.bs.modal', () => {
if (serverListTextarea) modalServerListContent.value = serverListTextarea.value;
loadSlots();
});
slotPriorityForm.addEventListener('submit', (e) => {
const slots = parseSlots(slotNumbersInput.value);
if (slots.length === 0) {
e.preventDefault();
alert('최소 1개 이상의 슬롯을 입력하세요.');
return;
}
slotPriorityInput.value = slots.join(',');
saveSlots();
});
}
// ─────────────────────────────────────────────────────────────
// 5. Quick Move (중복체크 포함) (index_custom.js)
// ─────────────────────────────────────────────────────────────
const quickMoveForms = ['macMoveForm', 'guidMoveForm', 'gpuMoveForm'];
let pendingAction = null;
const dupModalEl = document.getElementById('duplicateCheckModal');
const dupModal = dupModalEl ? new bootstrap.Modal(dupModalEl) : null;
const btnConfirmOverwrite = document.getElementById('btnConfirmOverwrite');
if (btnConfirmOverwrite) {
btnConfirmOverwrite.addEventListener('click', () => {
if (pendingAction) {
dupModal.hide();
pendingAction(true); // overwrite=true
pendingAction = null;
}
});
}
quickMoveForms.forEach(id => {
const form = document.getElementById(id);
if (form) {
form.addEventListener('submit', (e) => {
e.preventDefault();
const btn = form.querySelector('button[type="submit"]');
if (!btn || btn.disabled) return;
const originalContent = btn.innerHTML;
const executeMove = (overwrite = false) => {
btn.classList.add('disabled');
btn.disabled = true;
btn.innerHTML = '<div class="spinner-border spinner-border-sm text-primary" role="status"></div>';
fetch(form.action, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfToken // 전역 csrfToken 사용
},
body: JSON.stringify({ overwrite: overwrite })
})
.then(async response => {
const ct = response.headers.get("content-type");
if (!ct || !ct.includes("application/json")) {
// HTTP 200이지만 HTML이 올 경우 에러나 마찬가지 (로그인 리다이렉트 등)
if (response.ok && response.url.includes("login")) {
window.location.reload();
return;
}
// "MAC 이동 중 오류: HTTP 200" 등 텍스트일 수 있음
const txt = await response.text();
if (response.ok) {
// 성공으로 간주하고 리로드 (가끔 백엔드가 JSON 대신 빈 성공 응답을 줄 때)
window.location.reload();
return;
}
throw new Error(txt);
}
return response.json();
})
.then(data => {
if (!data) return; // 위에서 처리됨
if (data.requires_confirmation) {
showDuplicateModal(data.duplicates, data.duplicate_count);
pendingAction = executeMove;
resetButton();
} else if (data.success) {
window.location.reload();
} else {
alert(data.error || '작업 실패');
resetButton();
}
})
.catch(err => {
console.error(err);
// HTTP 200 에러 억제 요청 반영
if (err.message && err.message.includes("200")) {
window.location.reload();
return;
}
alert('오류 발생: ' + err);
resetButton();
});
};
const resetButton = () => {
btn.classList.remove('disabled');
btn.disabled = false;
btn.innerHTML = originalContent;
};
executeMove(false);
});
}
});
function showDuplicateModal(duplicates, count) {
const listEl = document.getElementById('dupList');
const countEl = document.getElementById('dupCount');
const moreEl = document.getElementById('dupMore');
const moreCountEl = document.getElementById('dupMoreCount');
if (countEl) countEl.textContent = count;
if (listEl) {
listEl.innerHTML = '';
const limit = 10;
duplicates.slice(0, limit).forEach(name => {
const li = document.createElement('li');
li.innerHTML = `<i class="bi bi-file-earmark text-secondary me-2"></i>${name}`;
listEl.appendChild(li);
});
if (duplicates.length > limit) {
if (moreEl) {
moreEl.style.display = 'block';
moreCountEl.textContent = duplicates.length - limit;
}
} else {
if (moreEl) moreEl.style.display = 'none';
}
}
if (dupModal) dupModal.show();
}
});

View File

@@ -532,3 +532,303 @@ label, .form-label, .card-title, .list-group-item strong {
min-height: calc(1em * var(--btn-line) + (var(--btn-py) * 2)) !important;
box-sizing: border-box;
}
/* ========================================================================== */
/* Imported from index.css & index_custom.css */
/* ========================================================================== */
/* ===== 공통 ?<3F>일 카드 컴팩???<3F><>???===== */
.file-card-compact {
transition: all 0.2s ease;
background: #fff;
min-width: 120px;
max-width: 200px;
}
.file-card-compact:hover {
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}
.file-card-compact a {
font-size: 0.9rem;
overflow: hidden;
text-overflow: ellipsis;
max-width: 180px;
}
/* ===== 목록<EBAAA9><EBA19D>?버튼 분리 규칙 ===== */
/* 처리???<3F>일 목록 ?<3F>용 컨테?<3F>너(보기/??<3F><> 2?? */
.processed-list .file-card-buttons {
display: grid;
grid-template-columns: 1fr 1fr;
gap: .5rem;
}
/* 보기(처리?? */
.processed-list .btn-view-processed {
border-color: #3b82f6;
color: #1d4ed8;
padding: .425rem .6rem;
font-size: .8125rem;
font-weight: 600;
}
.processed-list .btn-view-processed:hover {
background: rgba(59, 130, 246, .08);
}
/* ??<3F><>(처리?? ?????<3F>게 */
.processed-list .btn-delete-processed {
border-color: #ef4444;
color: #b91c1c;
padding: .3rem .5rem;
font-size: .75rem;
font-weight: 600;
}
.processed-list .btn-delete-processed:hover {
background: rgba(239, 68, 68, .08);
}
/* 백업 ?<3F>일 목록 ?<3F>용 컨테?<3F>너(?<3F>일 버튼) */
.backup-list .file-card-single-button {
display: flex;
margin-top: .25rem;
}
/* 보기(백업) ??강조 ?<3F>상 */
.backup-list .btn-view-backup {
width: 100%;
border-color: #10b981;
color: #047857;
padding: .45rem .75rem;
font-size: .8125rem;
font-weight: 700;
}
.backup-list .btn-view-backup:hover {
background: rgba(16, 185, 129, .08);
}
/* ===== 백업 ?<3F>일 ?<3F>짜 ?<3F>더 ===== */
.list-group-item .bg-light {
transition: background-color 0.2s ease;
}
.list-group-item:hover .bg-light {
background-color: #e9ecef !important;
}
/* ===== 진행<ECA784><ED9689>??<3F>니메이??===== */
.progress {
border-radius: 10px;
overflow: hidden;
}
.progress-bar {
transition: width 0.6s ease;
}
/* ===== 반응???<3F>스??===== */
@media (max-width: 768px) {
.card-body {
padding: 1.5rem !important;
}
}
/* ===== ?<3F>크롤바 ?<3F><>??<3F>링(모달) ===== */
.modal-body pre::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.modal-body pre::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
.modal-body pre::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4px;
}
.modal-body pre::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* 백업 ?<3F>일 ?<3F>중 ?<3F>택 ?<3F><>???*/
.backup-file-item.selected .file-card-compact {
border-color: #0d6efd !important;
background-color: #e7f1ff !important;
box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}
.file-card-compact {
transition: all 0.2s ease-in-out;
cursor: pointer;
}
/* 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 버튼 ?<3F>버 ?<3F>과 */
.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);
}
/* Modern Minimalist Styles */
.hover-bg-light {
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.hover-bg-light:hover {
background-color: #f8f9fa !important;
border-color: #dee2e6 !important;
}
/* Slot Badge - Clean & Flat */
.slot-badge {
position: relative;
padding: 0.4rem 0.8rem 0.4rem 2rem;
background: #ffffff;
border: 1px solid #e5e7eb;
border-radius: 9999px;
/* Pill shape */
color: #374151;
font-weight: 600;
font-family: monospace;
font-size: 0.85rem;
transition: all 0.2s ease;
user-select: none;
display: flex;
align-items: center;
}
.slot-badge:hover {
border-color: #3b82f6;
/* Primary Blue */
color: #3b82f6;
}
.slot-index {
position: absolute;
left: 0.35rem;
width: 1.3rem;
height: 1.3rem;
background: #f3f4f6;
color: #6b7280;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.7rem;
font-weight: 700;
}
/* Grid Layout for Preview */
#slotPreview {
display: grid !important;
grid-template-columns: repeat(5, 1fr);
/* 5 items per line */
gap: 0.5rem;
align-content: start;
}
/* Slot Badge - Draggable & Card-like */
.slot-badge {
position: relative;
padding: 0.5rem 0.2rem;
background: #ffffff;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
color: #374151;
font-weight: 600;
font-family: monospace;
font-size: 0.75rem;
/* Reduced font size */
transition: all 0.2s ease;
user-select: none;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: grab;
height: 100%;
min-height: 80px;
overflow: hidden;
/* Prevent overflow */
word-break: break-all;
/* Ensure wrapping if needed */
}
.slot-badge:active {
cursor: grabbing;
}
.slot-badge:hover {
border-color: #3b82f6;
color: #3b82f6;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}
.slot-index {
background: #f3f4f6;
color: #6b7280;
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
font-weight: 700;
margin-bottom: 0.5rem;
}
.slot-badge:hover .slot-index {
background: #eff6ff;
color: #3b82f6;
}
/* Dragging state */
.sortable-ghost {
opacity: 0.4;
background: #e2e8f0;
border: 1px dashed #94a3b8;
}
.sortable-drag {
opacity: 1;
background: #fff;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
transform: scale(1.02);
}

View File

@@ -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 기준 */
}
/* 툴바 (헤더) */

View File

@@ -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') }}">

View File

@@ -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="슬롯 번호를 입력하세요.&#10;구분자: 쉼표(,) 공백( ) 줄바꿈&#10;&#10;예시: 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 %}

View File

@@ -82,7 +82,7 @@ class Config:
# ── 페이지네이션/병렬
FILES_PER_PAGE = int(os.getenv("FILES_PER_PAGE", 35))
BACKUP_FILES_PER_PAGE = int(os.getenv("BACKUP_FILES_PER_PAGE", 3))
BACKUP_FILES_PER_PAGE = int(os.getenv("BACKUP_FILES_PER_PAGE", 5))
MAX_WORKERS = int(os.getenv("MAX_WORKERS", 60))
# ── 세션

View File

@@ -0,0 +1,12 @@
1BZ7HG4
Slot.38: 3825:F303:0085:07A6
Slot.39: 3825:F303:0084:FDBA
Slot.37: 3825:F303:0085:07EE
Slot.36: 3825:F303:0085:1E66
Slot.32: 3825:F303:0084:FABE
Slot.33: 3825:F303:0084:FE76
Slot.34: 3825:F303:0084:FE5E
Slot.35: 3825:F303:0085:07EA
Slot.31: 3825:F303:0084:FC26
Slot.40: 3825:F303:0084:FBCA
GUID: 0x3825F303008507A6;0x3825F3030084FDBA;0x3825F303008507EE;0x3825F30300851E66;0x3825F3030084FABE;0x3825F3030084FE76;0x3825F3030084FE5E;0x3825F303008507EA;0x3825F3030084FC26;0x3825F3030084FBCA

View File

@@ -0,0 +1,12 @@
1T48HG4
Slot.38: B45C:B503:000D:C3FA
Slot.39: B45C:B503:000D:C3AA
Slot.37: B45C:B503:000D:C3B6
Slot.36: B45C:B503:000D:C3AE
Slot.32: B45C:B503:000D:C3DE
Slot.33: 605E:6503:00EE:1FC8
Slot.34: 605E:6503:00EE:1FEC
Slot.35: 605E:6503:00EE:1F40
Slot.31: 605E:6503:00EE:1FC4
Slot.40: B45C:B503:000D:C3CE
GUID: 0xB45CB503000DC3FA;0xB45CB503000DC3AA;0xB45CB503000DC3B6;0xB45CB503000DC3AE;0xB45CB503000DC3DE;0x605E650300EE1FC8;0x605E650300EE1FEC;0x605E650300EE1F40;0x605E650300EE1FC4;0xB45CB503000DC3CE

View File

@@ -0,0 +1,12 @@
1V48HG4
Slot.38: B45C:B503:000D:C602
Slot.39: B45C:B503:000D:C61E
Slot.37: 605E:6503:00EE:1DF0
Slot.36: B45C:B503:000D:C616
Slot.32: B45C:B503:000D:C60A
Slot.33: B45C:B503:000D:C5EE
Slot.34: 605E:6503:00EE:1D70
Slot.35: 605E:6503:00EE:1E3C
Slot.31: 605E:6503:00EE:1B6C
Slot.40: B45C:B503:000D:C5C2
GUID: 0xB45CB503000DC602;0xB45CB503000DC61E;0x605E650300EE1DF0;0xB45CB503000DC616;0xB45CB503000DC60A;0xB45CB503000DC5EE;0x605E650300EE1D70;0x605E650300EE1E3C;0x605E650300EE1B6C;0xB45CB503000DC5C2

View File

@@ -0,0 +1,12 @@
152F7G4
Slot.38: B45C:B503:000D:CE2A
Slot.39: B45C:B503:000D:CDBE
Slot.37: B45C:B503:000D:CE32
Slot.36: B45C:B503:000D:CE66
Slot.32: B45C:B503:000D:CE2E
Slot.33: B45C:B503:000D:CE1A
Slot.34: B45C:B503:000D:CE56
Slot.35: B45C:B503:000D:CE76
Slot.31: B45C:B503:000D:CE3E
Slot.40: B45C:B503:000D:CE12
GUID: 0xB45CB503000DCE2A;0xB45CB503000DCDBE;0xB45CB503000DCE32;0xB45CB503000DCE66;0xB45CB503000DCE2E;0xB45CB503000DCE1A;0xB45CB503000DCE56;0xB45CB503000DCE76;0xB45CB503000DCE3E;0xB45CB503000DCE12

View File

@@ -0,0 +1,12 @@
17Z7HG4
Slot.38: 3825:F303:0085:04AE
Slot.39: 3825:F303:0085:0576
Slot.37: 3825:F303:0085:04A2
Slot.36: 3825:F303:0085:054E
Slot.32: 3825:F303:0085:0546
Slot.33: 3825:F303:0085:0572
Slot.34: 3825:F303:0085:04FA
Slot.35: 3825:F303:0085:049A
Slot.31: 3825:F303:0085:0516
Slot.40: 3825:F303:0085:051A
GUID: 0x3825F303008504AE;0x3825F30300850576;0x3825F303008504A2;0x3825F3030085054E;0x3825F30300850546;0x3825F30300850572;0x3825F303008504FA;0x3825F3030085049A;0x3825F30300850516;0x3825F3030085051A

View File

@@ -0,0 +1,12 @@
18Z7HG4
Slot.38: B45C:B503:000D:E44E
Slot.39: B45C:B503:000D:E53A
Slot.37: B45C:B503:000D:E452
Slot.36: B45C:B503:000D:E42A
Slot.32: B45C:B503:000D:E4C6
Slot.33: B45C:B503:000D:E502
Slot.34: B45C:B503:000D:E506
Slot.35: B45C:B503:000D:E53E
Slot.31: B45C:B503:000D:E436
Slot.40: B45C:B503:000D:E43A
GUID: 0xB45CB503000DE44E;0xB45CB503000DE53A;0xB45CB503000DE452;0xB45CB503000DE42A;0xB45CB503000DE4C6;0xB45CB503000DE502;0xB45CB503000DE506;0xB45CB503000DE53E;0xB45CB503000DE436;0xB45CB503000DE43A

View File

@@ -0,0 +1,12 @@
19Z7HG4
Slot.38: 3825:F303:0085:04E6
Slot.39: 3825:F303:0085:0596
Slot.37: 3825:F303:0085:05BA
Slot.36: 3825:F303:0085:05B2
Slot.32: 3825:F303:0085:05A2
Slot.33: 3825:F303:0085:04B6
Slot.34: 3825:F303:0085:05B6
Slot.35: 3825:F303:0085:05AE
Slot.31: 3825:F303:0085:058E
Slot.40: 3825:F303:0085:0552
GUID: 0x3825F303008504E6;0x3825F30300850596;0x3825F303008505BA;0x3825F303008505B2;0x3825F303008505A2;0x3825F303008504B6;0x3825F303008505B6;0x3825F303008505AE;0x3825F3030085058E;0x3825F30300850552

View File

@@ -0,0 +1,12 @@
1BZ7HG4
Slot.38: 3825:F303:0085:07A6
Slot.39: 3825:F303:0084:FDBA
Slot.37: 3825:F303:0085:07EE
Slot.36: 3825:F303:0085:1E66
Slot.32: 3825:F303:0084:FABE
Slot.33: 3825:F303:0084:FE76
Slot.34: 3825:F303:0084:FE5E
Slot.35: 3825:F303:0085:07EA
Slot.31: 3825:F303:0084:FC26
Slot.40: 3825:F303:0084:FBCA
GUID: 0x3825F303008507A6;0x3825F3030084FDBA;0x3825F303008507EE;0x3825F30300851E66;0x3825F3030084FABE;0x3825F3030084FE76;0x3825F3030084FE5E;0x3825F303008507EA;0x3825F3030084FC26;0x3825F3030084FBCA

View File

@@ -0,0 +1,12 @@
1T48HG4
Slot.38: B45C:B503:000D:C3FA
Slot.39: B45C:B503:000D:C3AA
Slot.37: B45C:B503:000D:C3B6
Slot.36: B45C:B503:000D:C3AE
Slot.32: B45C:B503:000D:C3DE
Slot.33: 605E:6503:00EE:1FC8
Slot.34: 605E:6503:00EE:1FEC
Slot.35: 605E:6503:00EE:1F40
Slot.31: 605E:6503:00EE:1FC4
Slot.40: B45C:B503:000D:C3CE
GUID: 0xB45CB503000DC3FA;0xB45CB503000DC3AA;0xB45CB503000DC3B6;0xB45CB503000DC3AE;0xB45CB503000DC3DE;0x605E650300EE1FC8;0x605E650300EE1FEC;0x605E650300EE1F40;0x605E650300EE1FC4;0xB45CB503000DC3CE

View File

@@ -0,0 +1,12 @@
1V48HG4
Slot.38: B45C:B503:000D:C602
Slot.39: B45C:B503:000D:C61E
Slot.37: 605E:6503:00EE:1DF0
Slot.36: B45C:B503:000D:C616
Slot.32: B45C:B503:000D:C60A
Slot.33: B45C:B503:000D:C5EE
Slot.34: 605E:6503:00EE:1D70
Slot.35: 605E:6503:00EE:1E3C
Slot.31: 605E:6503:00EE:1B6C
Slot.40: B45C:B503:000D:C5C2
GUID: 0xB45CB503000DC602;0xB45CB503000DC61E;0x605E650300EE1DF0;0xB45CB503000DC616;0xB45CB503000DC60A;0xB45CB503000DC5EE;0x605E650300EE1D70;0x605E650300EE1E3C;0x605E650300EE1B6C;0xB45CB503000DC5C2

View File

@@ -0,0 +1,12 @@
1XZCZC4
Slot.38: 3825:F303:00C4:15EC
Slot.39: 3825:F303:00C4:15F8
Slot.37: 3825:F303:00C4:15E8
Slot.36: 3825:F303:00C4:15E4
Slot.32: 3825:F303:00C4:1564
Slot.33: 3825:F303:00C4:1560
Slot.34: 3825:F303:00C4:0AF4
Slot.35: 3825:F303:00C4:1600
Slot.31: 3825:F303:00C4:0910
Slot.40: 3825:F303:00C4:1608
GUID: 0x3825F30300C415EC;0x3825F30300C415F8;0x3825F30300C415E8;0x3825F30300C415E4;0x3825F30300C41564;0x3825F30300C41560;0x3825F30300C40AF4;0x3825F30300C41600;0x3825F30300C40910;0x3825F30300C41608

View File

@@ -0,0 +1,12 @@
2058HG4
Slot.38: B45C:B503:000D:C41E
Slot.39: 605E:6503:00EE:20B0
Slot.37: 605E:6503:0075:307C
Slot.36: 605E:6503:0075:30CC
Slot.32: 605E:6503:00EE:20A8
Slot.33: 605E:6503:0075:3028
Slot.34: 605E:6503:0075:2F80
Slot.35: 605E:6503:0075:3218
Slot.31: 605E:6503:0075:3260
Slot.40: 605E:6503:00EE:204C
GUID: 0xB45CB503000DC41E;0x605E650300EE20B0;0x605E65030075307C;0x605E6503007530CC;0x605E650300EE20A8;0x605E650300753028;0x605E650300752F80;0x605E650300753218;0x605E650300753260;0x605E650300EE204C

View File

@@ -0,0 +1,12 @@
26Z7HG4
Slot.38: B45C:B503:0039:DE8E
Slot.39: B45C:B503:0039:DF22
Slot.37: B45C:B503:0039:DF36
Slot.36: B45C:B503:0039:DF06
Slot.32: B45C:B503:0039:DF6E
Slot.33: B45C:B503:0039:DF2A
Slot.34: B45C:B503:0039:DF72
Slot.35: B45C:B503:0039:DF32
Slot.31: B45C:B503:0039:DF42
Slot.40: B45C:B503:0039:DEAA
GUID: 0xB45CB5030039DE8E;0xB45CB5030039DF22;0xB45CB5030039DF36;0xB45CB5030039DF06;0xB45CB5030039DF6E;0xB45CB5030039DF2A;0xB45CB5030039DF72;0xB45CB5030039DF32;0xB45CB5030039DF42;0xB45CB5030039DEAA

View File

@@ -0,0 +1,12 @@
273HZC4
Slot.38: 5C25:7303:000C:386A
Slot.39: 5C25:7303:000C:3932
Slot.37: 5C25:7303:000C:388A
Slot.36: 5C25:7303:000C:3A7A
Slot.32: 5C25:7303:000C:3A82
Slot.33: 5C25:7303:000C:3AC2
Slot.34: 5C25:7303:000C:3B22
Slot.35: 5C25:7303:000C:3886
Slot.31: 5C25:7303:000C:3AFA
Slot.40: 5C25:7303:000C:3B1E
GUID: 0x5C257303000C386A;0x5C257303000C3932;0x5C257303000C388A;0x5C257303000C3A7A;0x5C257303000C3A82;0x5C257303000C3AC2;0x5C257303000C3B22;0x5C257303000C3886;0x5C257303000C3AFA;0x5C257303000C3B1E

View File

@@ -0,0 +1,12 @@
28Z7HG4
Slot.38: 3825:F303:0085:0696
Slot.39: 3825:F303:0085:06CE
Slot.37: 3825:F303:0085:06BE
Slot.36: 3825:F303:0085:03FE
Slot.32: 3825:F303:0085:051E
Slot.33: 3825:F303:0085:058A
Slot.34: 3825:F303:0085:06A6
Slot.35: 3825:F303:0085:06C6
Slot.31: 3825:F303:0085:06C2
Slot.40: 3825:F303:0085:0726
GUID: 0x3825F30300850696;0x3825F303008506CE;0x3825F303008506BE;0x3825F303008503FE;0x3825F3030085051E;0x3825F3030085058A;0x3825F303008506A6;0x3825F303008506C6;0x3825F303008506C2;0x3825F30300850726

View File

@@ -0,0 +1,12 @@
2NYCZC4
Slot.38: 3825:F303:00C4:042C
Slot.39: 3825:F303:00C4:04A8
Slot.37: 3825:F303:00C4:0420
Slot.36: 3825:F303:00C4:0418
Slot.32: 3825:F303:00C4:0508
Slot.33: 3825:F303:00C4:12B4
Slot.34: 3825:F303:00C4:12EC
Slot.35: 3825:F303:00C4:122C
Slot.31: 3825:F303:00C4:0484
Slot.40: 3825:F303:00C4:048C
GUID: 0x3825F30300C4042C;0x3825F30300C404A8;0x3825F30300C40420;0x3825F30300C40418;0x3825F30300C40508;0x3825F30300C412B4;0x3825F30300C412EC;0x3825F30300C4122C;0x3825F30300C40484;0x3825F30300C4048C

View File

@@ -0,0 +1,12 @@
2T48HG4
Slot.38: B45C:B503:000D:C402
Slot.39: 605E:6503:00EE:2038
Slot.37: 605E:6503:00EE:1FE0
Slot.36: 605E:6503:00EE:1FD8
Slot.32: B45C:B503:000D:C40E
Slot.33: 605E:6503:00EE:2080
Slot.34: B45C:B503:000D:C406
Slot.35: 605E:6503:00EE:2054
Slot.31: B45C:B503:000D:C45A
Slot.40: 605E:6503:00EE:20C8
GUID: 0xB45CB503000DC402;0x605E650300EE2038;0x605E650300EE1FE0;0x605E650300EE1FD8;0xB45CB503000DC40E;0x605E650300EE2080;0xB45CB503000DC406;0x605E650300EE2054;0xB45CB503000DC45A;0x605E650300EE20C8

View File

@@ -0,0 +1,12 @@
2V48HG4
Slot.38: 605E:6503:00EE:1AA8
Slot.39: 605E:6503:00EE:1A5C
Slot.37: 605E:6503:00EE:1A1C
Slot.36: 605E:6503:00EE:1AD8
Slot.32: 605E:6503:00EE:1A98
Slot.33: 605E:6503:00EE:1A54
Slot.34: 605E:6503:00EE:1A70
Slot.35: 605E:6503:00EE:1AA4
Slot.31: 605E:6503:00EE:1A58
Slot.40: 605E:6503:00EE:1A18
GUID: 0x605E650300EE1AA8;0x605E650300EE1A5C;0x605E650300EE1A1C;0x605E650300EE1AD8;0x605E650300EE1A98;0x605E650300EE1A54;0x605E650300EE1A70;0x605E650300EE1AA4;0x605E650300EE1A58;0x605E650300EE1A18

View File

@@ -0,0 +1,12 @@
2XZCZC4
Slot.38: 3825:F303:00C4:0AEC
Slot.39: 3825:F303:00C4:0AD8
Slot.37: 3825:F303:00C4:0AC8
Slot.36: 3825:F303:00C4:15F4
Slot.32: 3825:F303:00C4:0AD0
Slot.33: 3825:F303:00C4:0AE0
Slot.34: 3825:F303:00C4:0ADC
Slot.35: 3825:F303:00C4:1568
Slot.31: 3825:F303:00C4:0AE8
Slot.40: 3825:F303:00C4:0AD4
GUID: 0x3825F30300C40AEC;0x3825F30300C40AD8;0x3825F30300C40AC8;0x3825F30300C415F4;0x3825F30300C40AD0;0x3825F30300C40AE0;0x3825F30300C40ADC;0x3825F30300C41568;0x3825F30300C40AE8;0x3825F30300C40AD4

View File

@@ -0,0 +1,12 @@
3058HG4
Slot.38: 605E:6503:00EE:1F58
Slot.39: 605E:6503:00EE:1FBC
Slot.37: 605E:6503:00EE:2090
Slot.36: B45C:B503:000D:C502
Slot.32: 605E:6503:00EE:1FB8
Slot.33: 605E:6503:00EE:2084
Slot.34: 605E:6503:00EE:1F70
Slot.35: 605E:6503:00EE:1F80
Slot.31: B45C:B503:000D:C4BA
Slot.40: B45C:B503:000D:C4B2
GUID: 0x605E650300EE1F58;0x605E650300EE1FBC;0x605E650300EE2090;0xB45CB503000DC502;0x605E650300EE1FB8;0x605E650300EE2084;0x605E650300EE1F70;0x605E650300EE1F80;0xB45CB503000DC4BA;0xB45CB503000DC4B2

View File

@@ -0,0 +1,12 @@
332F7G4
Slot.38: B45C:B503:000D:CF5A
Slot.39: B45C:B503:000D:D5AE
Slot.37: B45C:B503:000D:D51E
Slot.36: B45C:B503:000D:D67E
Slot.32: B45C:B503:000D:D502
Slot.33: B45C:B503:000D:D5C6
Slot.34: B45C:B503:000D:D4FE
Slot.35: B45C:B503:000D:D646
Slot.31: B45C:B503:000D:CF8E
Slot.40: B45C:B503:000D:CF96
GUID: 0xB45CB503000DCF5A;0xB45CB503000DD5AE;0xB45CB503000DD51E;0xB45CB503000DD67E;0xB45CB503000DD502;0xB45CB503000DD5C6;0xB45CB503000DD4FE;0xB45CB503000DD646;0xB45CB503000DCF8E;0xB45CB503000DCF96

View File

@@ -0,0 +1,12 @@
38Z7HG4
Slot.38: B45C:B503:000D:DB7A
Slot.39: B45C:B503:000D:DB5E
Slot.37: 3825:F303:0084:FE56
Slot.36: B45C:B503:000D:DB9A
Slot.32: B45C:B503:000D:DB66
Slot.33: B45C:B503:000D:DB76
Slot.34: B45C:B503:000D:DAE2
Slot.35: 3825:F303:0084:FE6E
Slot.31: B45C:B503:000D:DB5A
Slot.40: 3825:F303:0084:FE72
GUID: 0xB45CB503000DDB7A;0xB45CB503000DDB5E;0x3825F3030084FE56;0xB45CB503000DDB9A;0xB45CB503000DDB66;0xB45CB503000DDB76;0xB45CB503000DDAE2;0x3825F3030084FE6E;0xB45CB503000DDB5A;0x3825F3030084FE72

View File

@@ -0,0 +1,12 @@
39Z7HG4
Slot.38: B45C:B503:0039:DF1A
Slot.39: 3825:F303:0085:0262
Slot.37: B45C:B503:000D:E48A
Slot.36: B45C:B503:000D:E4A6
Slot.32: B45C:B503:000D:E37A
Slot.33: B45C:B503:000D:E4B6
Slot.34: 3825:F303:0085:0202
Slot.35: B45C:B503:000D:E432
Slot.31: B45C:B503:000D:E49E
Slot.40: 3825:F303:0085:025A
GUID: 0xB45CB5030039DF1A;0x3825F30300850262;0xB45CB503000DE48A;0xB45CB503000DE4A6;0xB45CB503000DE37A;0xB45CB503000DE4B6;0x3825F30300850202;0xB45CB503000DE432;0xB45CB503000DE49E;0x3825F3030085025A

View File

@@ -0,0 +1,12 @@
3LYCZC4
Slot.38: 5000:E603:0068:F204
Slot.39: 5000:E603:0068:F464
Slot.37: 5000:E603:0068:F2B8
Slot.36: 5000:E603:0068:F2FC
Slot.32: 5000:E603:0068:F294
Slot.33: 5000:E603:0068:F504
Slot.34: 5000:E603:0068:F450
Slot.35: 5000:E603:0068:F2C4
Slot.31: 5000:E603:0068:F50C
Slot.40: 5000:E603:0068:F4FC
GUID: 0x5000E6030068F204;0x5000E6030068F464;0x5000E6030068F2B8;0x5000E6030068F2FC;0x5000E6030068F294;0x5000E6030068F504;0x5000E6030068F450;0x5000E6030068F2C4;0x5000E6030068F50C;0x5000E6030068F4FC

View File

@@ -0,0 +1,12 @@
3MYCZC4
Slot.38: 5000:E603:0068:F480
Slot.39: 5000:E603:0068:F254
Slot.37: 5000:E603:0068:F408
Slot.36: 5000:E603:0068:F33C
Slot.32: 5000:E603:0068:F40C
Slot.33: 5000:E603:0068:F4AC
Slot.34: 5000:E603:0068:F4C8
Slot.35: 5000:E603:0068:F410
Slot.31: 5000:E603:0068:F490
Slot.40: 5000:E603:0068:F3A0
GUID: 0x5000E6030068F480;0x5000E6030068F254;0x5000E6030068F408;0x5000E6030068F33C;0x5000E6030068F40C;0x5000E6030068F4AC;0x5000E6030068F4C8;0x5000E6030068F410;0x5000E6030068F490;0x5000E6030068F3A0

View File

@@ -0,0 +1,12 @@
3PYCZC4
Slot.38: 5000:E603:0068:F460
Slot.39: 5000:E603:0068:F44C
Slot.37: 5000:E603:0068:F380
Slot.36: 5000:E603:0068:F2BC
Slot.32: 5000:E603:0068:F4EC
Slot.33: 5000:E603:0068:F274
Slot.34: 5000:E603:0068:F4E4
Slot.35: 5000:E603:0068:F284
Slot.31: 5000:E603:0068:F3DC
Slot.40: 5000:E603:0068:F354
GUID: 0x5000E6030068F460;0x5000E6030068F44C;0x5000E6030068F380;0x5000E6030068F2BC;0x5000E6030068F4EC;0x5000E6030068F274;0x5000E6030068F4E4;0x5000E6030068F284;0x5000E6030068F3DC;0x5000E6030068F354

View File

@@ -0,0 +1,12 @@
3SJCZC4
Slot.38: 7C8C:0903:00AE:614C
Slot.39: 7C8C:0903:00AE:6158
Slot.37: 7C8C:0903:00AE:615C
Slot.36: 7C8C:0903:00B6:A96A
Slot.32: 7C8C:0903:00AE:6124
Slot.33: 7C8C:0903:00B6:A976
Slot.34: 7C8C:0903:00AE:6204
Slot.35: 7C8C:0903:00AE:6208
Slot.31: 7C8C:0903:00AE:61C0
Slot.40: 7C8C:0903:00B6:A972
GUID: 0x7C8C090300AE614C;0x7C8C090300AE6158;0x7C8C090300AE615C;0x7C8C090300B6A96A;0x7C8C090300AE6124;0x7C8C090300B6A976;0x7C8C090300AE6204;0x7C8C090300AE6208;0x7C8C090300AE61C0;0x7C8C090300B6A972

View File

@@ -0,0 +1,12 @@
3Y48HG4
Slot.38: B45C:B503:000D:C4B6
Slot.39: B45C:B503:000D:C6EA
Slot.37: B45C:B503:000D:C4CA
Slot.36: B45C:B503:000D:C49E
Slot.32: B45C:B503:000D:C49A
Slot.33: B45C:B503:000D:C6D2
Slot.34: B45C:B503:000D:C6BA
Slot.35: B45C:B503:000D:C4AE
Slot.31: B45C:B503:000D:C4DA
Slot.40: B45C:B503:000D:C4D2
GUID: 0xB45CB503000DC4B6;0xB45CB503000DC6EA;0xB45CB503000DC4CA;0xB45CB503000DC49E;0xB45CB503000DC49A;0xB45CB503000DC6D2;0xB45CB503000DC6BA;0xB45CB503000DC4AE;0xB45CB503000DC4DA;0xB45CB503000DC4D2

View File

@@ -0,0 +1,12 @@
4058HG4
Slot.38: 605E:6503:00EE:1FA8
Slot.39: 605E:6503:00EE:1F88
Slot.37: 605E:6503:00EE:208C
Slot.36: 605E:6503:00EE:2010
Slot.32: 605E:6503:00EE:1E30
Slot.33: 605E:6503:00EE:1DEC
Slot.34: 605E:6503:00EE:1FA0
Slot.35: 605E:6503:00EE:1F9C
Slot.31: 605E:6503:00EE:1EC8
Slot.40: 605E:6503:00EE:1EA4
GUID: 0x605E650300EE1FA8;0x605E650300EE1F88;0x605E650300EE208C;0x605E650300EE2010;0x605E650300EE1E30;0x605E650300EE1DEC;0x605E650300EE1FA0;0x605E650300EE1F9C;0x605E650300EE1EC8;0x605E650300EE1EA4

View File

@@ -0,0 +1,12 @@
442F7G4
Slot.38: B45C:B503:000D:CFC6
Slot.39: B45C:B503:000D:CFB6
Slot.37: B45C:B503:000D:D6D2
Slot.36: B45C:B503:000D:D6DE
Slot.32: B45C:B503:000D:C57E
Slot.33: B45C:B503:000D:CE36
Slot.34: B45C:B503:000D:C59A
Slot.35: B45C:B503:000D:C5CA
Slot.31: B45C:B503:000D:D6CE
Slot.40: B45C:B503:000D:D00A
GUID: 0xB45CB503000DCFC6;0xB45CB503000DCFB6;0xB45CB503000DD6D2;0xB45CB503000DD6DE;0xB45CB503000DC57E;0xB45CB503000DCE36;0xB45CB503000DC59A;0xB45CB503000DC5CA;0xB45CB503000DD6CE;0xB45CB503000DD00A

View File

@@ -0,0 +1,12 @@
472B7G4
Slot.38: B45C:B503:000D:D60E
Slot.39: 605E:6503:00EE:1C00
Slot.37: B45C:B503:000D:D612
Slot.36: 605E:6503:00EE:1C1C
Slot.32: B45C:B503:000D:D69E
Slot.33: B45C:B503:000D:CF1A
Slot.34: 605E:6503:00EE:1C7C
Slot.35: B45C:B503:000D:CF16
Slot.31: B45C:B503:000D:D56E
Slot.40: B45C:B503:000D:D582
GUID: 0xB45CB503000DD60E;0x605E650300EE1C00;0xB45CB503000DD612;0x605E650300EE1C1C;0xB45CB503000DD69E;0xB45CB503000DCF1A;0x605E650300EE1C7C;0xB45CB503000DCF16;0xB45CB503000DD56E;0xB45CB503000DD582

View File

@@ -0,0 +1,12 @@
48Z7HG4
Slot.38: B45C:B503:000D:E4BE
Slot.39: B45C:B503:000D:E4AA
Slot.37: B45C:B503:000D:E476
Slot.36: B45C:B503:000D:E47A
Slot.32: B45C:B503:000D:E46E
Slot.33: B45C:B503:000D:E48E
Slot.34: B45C:B503:000D:E4AE
Slot.35: B45C:B503:000D:E4E6
Slot.31: B45C:B503:000D:E482
Slot.40: B45C:B503:000D:E4B2
GUID: 0xB45CB503000DE4BE;0xB45CB503000DE4AA;0xB45CB503000DE476;0xB45CB503000DE47A;0xB45CB503000DE46E;0xB45CB503000DE48E;0xB45CB503000DE4AE;0xB45CB503000DE4E6;0xB45CB503000DE482;0xB45CB503000DE4B2

View File

@@ -0,0 +1,12 @@
49Z7HG4
Slot.38: 3825:F303:0085:02DA
Slot.39: 3825:F303:0085:075A
Slot.37: 3825:F303:0085:086A
Slot.36: 3825:F303:0085:075E
Slot.32: 3825:F303:0085:074A
Slot.33: 3825:F303:0085:07F2
Slot.34: 3825:F303:0085:070A
Slot.35: 3825:F303:0085:086E
Slot.31: 3825:F303:0085:0786
Slot.40: 3825:F303:0085:0662
GUID: 0x3825F303008502DA;0x3825F3030085075A;0x3825F3030085086A;0x3825F3030085075E;0x3825F3030085074A;0x3825F303008507F2;0x3825F3030085070A;0x3825F3030085086E;0x3825F30300850786;0x3825F30300850662

View File

@@ -0,0 +1,12 @@
4K8XHG4
Slot.38: 605E:6503:00EE:1104
Slot.39: 605E:6503:00EE:111C
Slot.37: 605E:6503:00EE:10EC
Slot.36: 605E:6503:00EE:1110
Slot.32: 605E:6503:00EE:114C
Slot.33: 605E:6503:00EE:1128
Slot.34: 605E:6503:00EE:1114
Slot.35: 605E:6503:00EE:1140
Slot.31: 605E:6503:00EE:113C
Slot.40: 605E:6503:00EE:1134
GUID: 0x605E650300EE1104;0x605E650300EE111C;0x605E650300EE10EC;0x605E650300EE1110;0x605E650300EE114C;0x605E650300EE1128;0x605E650300EE1114;0x605E650300EE1140;0x605E650300EE113C;0x605E650300EE1134

View File

@@ -0,0 +1,12 @@
4T48HG4
Slot.38: 605E:6503:00EE:1D80
Slot.39: 605E:6503:00EE:1AC8
Slot.37: 605E:6503:00EE:192C
Slot.36: 605E:6503:00EE:1AD4
Slot.32: 605E:6503:00EE:1DA0
Slot.33: 605E:6503:00EE:1B08
Slot.34: 605E:6503:00EE:1988
Slot.35: 605E:6503:00EE:1D9C
Slot.31: 605E:6503:00EE:1DBC
Slot.40: 605E:6503:00EE:1D88
GUID: 0x605E650300EE1D80;0x605E650300EE1AC8;0x605E650300EE192C;0x605E650300EE1AD4;0x605E650300EE1DA0;0x605E650300EE1B08;0x605E650300EE1988;0x605E650300EE1D9C;0x605E650300EE1DBC;0x605E650300EE1D88

View File

@@ -0,0 +1,12 @@
4XZCZC4
Slot.38: 5000:E603:0068:F318
Slot.39: 5000:E603:0068:F458
Slot.37: 5000:E603:0068:F23C
Slot.36: 5000:E603:0068:F090
Slot.32: 5000:E603:0068:F448
Slot.33: 5000:E603:0068:F440
Slot.34: 5000:E603:0068:F310
Slot.35: 5000:E603:0068:F430
Slot.31: 5000:E603:0068:F3C8
Slot.40: 5000:E603:0068:F438
GUID: 0x5000E6030068F318;0x5000E6030068F458;0x5000E6030068F23C;0x5000E6030068F090;0x5000E6030068F448;0x5000E6030068F440;0x5000E6030068F310;0x5000E6030068F430;0x5000E6030068F3C8;0x5000E6030068F438

View File

@@ -0,0 +1,12 @@
552F7G4
Slot.38: B45C:B503:000D:DA6E
Slot.39: B45C:B503:000D:D972
Slot.37: B45C:B503:000D:DCEA
Slot.36: B45C:B503:000D:DD1A
Slot.32: B45C:B503:000D:DBAA
Slot.33: B45C:B503:000D:DBAE
Slot.34: B45C:B503:000D:DC5E
Slot.35: B45C:B503:000D:DC22
Slot.31: B45C:B503:000D:DCD2
Slot.40: B45C:B503:000D:DC5A
GUID: 0xB45CB503000DDA6E;0xB45CB503000DD972;0xB45CB503000DDCEA;0xB45CB503000DDD1A;0xB45CB503000DDBAA;0xB45CB503000DDBAE;0xB45CB503000DDC5E;0xB45CB503000DDC22;0xB45CB503000DDCD2;0xB45CB503000DDC5A

View File

@@ -0,0 +1,12 @@
572B7G4
Slot.38: B45C:B503:000D:D576
Slot.39: B45C:B503:000D:D61E
Slot.37: B45C:B503:000D:CF72
Slot.36: B45C:B503:000D:D632
Slot.32: B45C:B503:000D:C55A
Slot.33: B45C:B503:000D:D4B2
Slot.34: B45C:B503:000D:D046
Slot.35: B45C:B503:000D:CF46
Slot.31: B45C:B503:000D:D60A
Slot.40: B45C:B503:000D:C562
GUID: 0xB45CB503000DD576;0xB45CB503000DD61E;0xB45CB503000DCF72;0xB45CB503000DD632;0xB45CB503000DC55A;0xB45CB503000DD4B2;0xB45CB503000DD046;0xB45CB503000DCF46;0xB45CB503000DD60A;0xB45CB503000DC562

View File

@@ -0,0 +1,12 @@
5BZ7HG4
Slot.38: 3825:F303:0084:FE62
Slot.39: 3825:F303:0084:FDD6
Slot.37: 3825:F303:0084:FDB2
Slot.36: 3825:F303:0084:FDCE
Slot.32: 3825:F303:0084:FE5A
Slot.33: 3825:F303:0084:FE66
Slot.34: 3825:F303:0084:FE6A
Slot.35: 3825:F303:0084:FDC2
Slot.31: 3825:F303:0084:FE7A
Slot.40: 3825:F303:0084:FE52
GUID: 0x3825F3030084FE62;0x3825F3030084FDD6;0x3825F3030084FDB2;0x3825F3030084FDCE;0x3825F3030084FE5A;0x3825F3030084FE66;0x3825F3030084FE6A;0x3825F3030084FDC2;0x3825F3030084FE7A;0x3825F3030084FE52

View File

@@ -0,0 +1,12 @@
5GZ7HG4
Slot.38: 3825:F303:0084:FA52
Slot.39: 3825:F303:0084:FB46
Slot.37: 3825:F303:0084:FB7A
Slot.36: 3825:F303:0084:FB86
Slot.32: 3825:F303:0084:FB4E
Slot.33: 3825:F303:0084:FB52
Slot.34: 3825:F303:0084:F6B6
Slot.35: 3825:F303:0084:F796
Slot.31: 3825:F303:0084:F832
Slot.40: 3825:F303:0084:F8EE
GUID: 0x3825F3030084FA52;0x3825F3030084FB46;0x3825F3030084FB7A;0x3825F3030084FB86;0x3825F3030084FB4E;0x3825F3030084FB52;0x3825F3030084F6B6;0x3825F3030084F796;0x3825F3030084F832;0x3825F3030084F8EE

View File

@@ -0,0 +1,12 @@
5MYCZC4
Slot.38: 7C8C:0903:00E4:DE9E
Slot.39: 7C8C:0903:00E4:DEDE
Slot.37: 7C8C:0903:00E4:DE96
Slot.36: 7C8C:0903:00E4:DF42
Slot.32: 7C8C:0903:00E4:DE86
Slot.33: 7C8C:0903:00E4:DED2
Slot.34: 7C8C:0903:00E4:ED06
Slot.35: 7C8C:0903:00E4:DF3E
Slot.31: 7C8C:0903:00E4:DEEA
Slot.40: 7C8C:0903:00E4:DED6
GUID: 0x7C8C090300E4DE9E;0x7C8C090300E4DEDE;0x7C8C090300E4DE96;0x7C8C090300E4DF42;0x7C8C090300E4DE86;0x7C8C090300E4DED2;0x7C8C090300E4ED06;0x7C8C090300E4DF3E;0x7C8C090300E4DEEA;0x7C8C090300E4DED6

View File

@@ -0,0 +1,12 @@
5NYCZC4
Slot.38: 3825:F303:00C4:0230
Slot.39: 3825:F303:00C4:0FA4
Slot.37: 3825:F303:00C4:023C
Slot.36: 3825:F303:00C4:0EB4
Slot.32: 3825:F303:00C4:0FB0
Slot.33: 3825:F303:00C4:0244
Slot.34: 3825:F303:00C4:0FA0
Slot.35: 3825:F303:00C4:0F90
Slot.31: 3825:F303:00C4:0FA8
Slot.40: 3825:F303:00C4:0F78
GUID: 0x3825F30300C40230;0x3825F30300C40FA4;0x3825F30300C4023C;0x3825F30300C40EB4;0x3825F30300C40FB0;0x3825F30300C40244;0x3825F30300C40FA0;0x3825F30300C40F90;0x3825F30300C40FA8;0x3825F30300C40F78

View File

@@ -0,0 +1,12 @@
5PRS3H4
Slot.38: 605E:6503:00EE:17D4
Slot.39: 605E:6503:00EE:17B0
Slot.37: 605E:6503:00EE:1764
Slot.36: 605E:6503:00EE:1808
Slot.32: 605E:6503:00EE:1738
Slot.33: 605E:6503:00EE:17F8
Slot.34: 605E:6503:00EE:1790
Slot.35: 605E:6503:00EE:17CC
Slot.31: 605E:6503:00EE:17E4
Slot.40: 605E:6503:00EE:17C8
GUID: 0x605E650300EE17D4;0x605E650300EE17B0;0x605E650300EE1764;0x605E650300EE1808;0x605E650300EE1738;0x605E650300EE17F8;0x605E650300EE1790;0x605E650300EE17CC;0x605E650300EE17E4;0x605E650300EE17C8

View File

@@ -0,0 +1,12 @@
5V48HG4
Slot.38: 605E:6503:00EE:2068
Slot.39: 605E:6503:00EE:2070
Slot.37: B45C:B503:000D:C4C2
Slot.36: B45C:B503:000D:C4C6
Slot.32: B45C:B503:000D:C4DE
Slot.33: B45C:B503:000D:C4A6
Slot.34: 605E:6503:00EE:1F2C
Slot.35: B45C:B503:000D:C4EA
Slot.31: 605E:6503:00EE:1F84
Slot.40: 605E:6503:00EE:207C
GUID: 0x605E650300EE2068;0x605E650300EE2070;0xB45CB503000DC4C2;0xB45CB503000DC4C6;0xB45CB503000DC4DE;0xB45CB503000DC4A6;0x605E650300EE1F2C;0xB45CB503000DC4EA;0x605E650300EE1F84;0x605E650300EE207C

View File

@@ -0,0 +1,12 @@
5Y48HG4
Slot.38: B45C:B503:000D:C426
Slot.39: 605E:6503:00EE:209C
Slot.37: B45C:B503:000D:C416
Slot.36: 605E:6503:00EE:2004
Slot.32: 605E:6503:00EE:20A4
Slot.33: 605E:6503:00EE:2030
Slot.34: 605E:6503:00EE:20A0
Slot.35: 605E:6503:00EE:203C
Slot.31: 605E:6503:00EE:2098
Slot.40: 605E:6503:00EE:1F08
GUID: 0xB45CB503000DC426;0x605E650300EE209C;0xB45CB503000DC416;0x605E650300EE2004;0x605E650300EE20A4;0x605E650300EE2030;0x605E650300EE20A0;0x605E650300EE203C;0x605E650300EE2098;0x605E650300EE1F08

View File

@@ -0,0 +1,12 @@
66Z7HG4
Slot.38: B45C:B503:000D:CC2E
Slot.39: B45C:B503:000D:CBFA
Slot.37: B45C:B503:000D:CE22
Slot.36: B45C:B503:000D:CE1E
Slot.32: B45C:B503:000D:CC06
Slot.33: B45C:B503:000D:CC12
Slot.34: B45C:B503:000D:CD52
Slot.35: B45C:B503:000D:CDF6
Slot.31: B45C:B503:000D:CDE6
Slot.40: B45C:B503:000D:CD3A
GUID: 0xB45CB503000DCC2E;0xB45CB503000DCBFA;0xB45CB503000DCE22;0xB45CB503000DCE1E;0xB45CB503000DCC06;0xB45CB503000DCC12;0xB45CB503000DCD52;0xB45CB503000DCDF6;0xB45CB503000DCDE6;0xB45CB503000DCD3A

View File

@@ -0,0 +1,12 @@
68Z7HG4
Slot.38: B45C:B503:000D:D7F2
Slot.39: B45C:B503:000D:D7DE
Slot.37: B45C:B503:000D:D852
Slot.36: B45C:B503:000D:D812
Slot.32: B45C:B503:000D:D76A
Slot.33: B45C:B503:000D:D75A
Slot.34: B45C:B503:000D:D856
Slot.35: B45C:B503:000D:D82E
Slot.31: B45C:B503:000D:D7FA
Slot.40: B45C:B503:000D:D81A
GUID: 0xB45CB503000DD7F2;0xB45CB503000DD7DE;0xB45CB503000DD852;0xB45CB503000DD812;0xB45CB503000DD76A;0xB45CB503000DD75A;0xB45CB503000DD856;0xB45CB503000DD82E;0xB45CB503000DD7FA;0xB45CB503000DD81A

View File

@@ -0,0 +1,12 @@
69Z7HG4
Slot.38: 3825:F303:0085:00AE
Slot.39: 3825:F303:0085:037A
Slot.37: 3825:F303:0085:03C2
Slot.36: 3825:F303:0085:03E2
Slot.32: 3825:F303:0085:037E
Slot.33: 3825:F303:0085:038A
Slot.34: 3825:F303:0085:0386
Slot.35: 3825:F303:0085:03B6
Slot.31: 3825:F303:0085:03DE
Slot.40: 3825:F303:0085:03E6
GUID: 0x3825F303008500AE;0x3825F3030085037A;0x3825F303008503C2;0x3825F303008503E2;0x3825F3030085037E;0x3825F3030085038A;0x3825F30300850386;0x3825F303008503B6;0x3825F303008503DE;0x3825F303008503E6

View File

@@ -0,0 +1,12 @@
6GZ7HG4
Slot.38: 3825:F303:0085:0116
Slot.39: 3825:F303:0085:0222
Slot.37: 3825:F303:0085:0106
Slot.36: 3825:F303:0085:01AA
Slot.32: 3825:F303:0085:010E
Slot.33: 3825:F303:0085:026E
Slot.34: 3825:F303:0085:026A
Slot.35: 3825:F303:0085:01B2
Slot.31: 3825:F303:0085:021E
Slot.40: 3825:F303:0085:011E
GUID: 0x3825F30300850116;0x3825F30300850222;0x3825F30300850106;0x3825F303008501AA;0x3825F3030085010E;0x3825F3030085026E;0x3825F3030085026A;0x3825F303008501B2;0x3825F3030085021E;0x3825F3030085011E

View File

@@ -0,0 +1,12 @@
6T48HG4
Slot.38: B45C:B503:000D:C5E2
Slot.39: B45C:B503:000D:C622
Slot.37: 605E:6503:00EE:1C0C
Slot.36: 605E:6503:00EE:1A4C
Slot.32: 605E:6503:00EE:1A88
Slot.33: 605E:6503:00EE:1C58
Slot.34: 605E:6503:00EE:1DCC
Slot.35: 605E:6503:00EE:1F98
Slot.31: B45C:B503:000D:C612
Slot.40: 605E:6503:00EE:1C54
GUID: 0xB45CB503000DC5E2;0xB45CB503000DC622;0x605E650300EE1C0C;0x605E650300EE1A4C;0x605E650300EE1A88;0x605E650300EE1C58;0x605E650300EE1DCC;0x605E650300EE1F98;0xB45CB503000DC612;0x605E650300EE1C54

View File

@@ -0,0 +1,12 @@
6XZCZC4
Slot.38: 3825:F303:00C4:0874
Slot.39: 3825:F303:00C4:035C
Slot.37: 3825:F303:00C4:1450
Slot.36: 3825:F303:00C4:08DC
Slot.32: 3825:F303:00C4:086C
Slot.33: 3825:F303:00C4:0884
Slot.34: 3825:F303:00C4:153C
Slot.35: 3825:F303:00C4:0688
Slot.31: 3825:F303:00C4:096C
Slot.40: 3825:F303:00C4:0870
GUID: 0x3825F30300C40874;0x3825F30300C4035C;0x3825F30300C41450;0x3825F30300C408DC;0x3825F30300C4086C;0x3825F30300C40884;0x3825F30300C4153C;0x3825F30300C40688;0x3825F30300C4096C;0x3825F30300C40870

View File

@@ -0,0 +1,12 @@
76Z7HG4
Slot.38: 3825:F303:0084:FAD2
Slot.39: 3825:F303:0084:FA5A
Slot.37: 3825:F303:0084:FA6A
Slot.36: 3825:F303:0084:FA4A
Slot.32: 3825:F303:0084:FACE
Slot.33: 3825:F303:0084:FA56
Slot.34: 3825:F303:0084:F77E
Slot.35: 3825:F303:0084:FAEE
Slot.31: 3825:F303:0084:FAC6
Slot.40: 3825:F303:0084:F722
GUID: 0x3825F3030084FAD2;0x3825F3030084FA5A;0x3825F3030084FA6A;0x3825F3030084FA4A;0x3825F3030084FACE;0x3825F3030084FA56;0x3825F3030084F77E;0x3825F3030084FAEE;0x3825F3030084FAC6;0x3825F3030084F722

View File

@@ -0,0 +1,12 @@
77Z7HG4
Slot.38: 3825:F303:0085:0472
Slot.39: 3825:F303:0085:05D2
Slot.37: 3825:F303:0085:049E
Slot.36: 3825:F303:0085:048E
Slot.32: 3825:F303:0085:05EA
Slot.33: 3825:F303:0085:035A
Slot.34: 3825:F303:0085:034A
Slot.35: 3825:F303:0085:047A
Slot.31: 3825:F303:0085:0602
Slot.40: 3825:F303:0085:0622
GUID: 0x3825F30300850472;0x3825F303008505D2;0x3825F3030085049E;0x3825F3030085048E;0x3825F303008505EA;0x3825F3030085035A;0x3825F3030085034A;0x3825F3030085047A;0x3825F30300850602;0x3825F30300850622

View File

@@ -0,0 +1,12 @@
78Z7HG4
Slot.38: B45C:B503:000D:D7A6
Slot.39: B45C:B503:000D:CF76
Slot.37: B45C:B503:000D:DB72
Slot.36: B45C:B503:000D:DB4E
Slot.32: B45C:B503:000D:D7B6
Slot.33: B45C:B503:000D:D71A
Slot.34: B45C:B503:000D:CF7E
Slot.35: B45C:B503:000D:CF66
Slot.31: B45C:B503:000D:CF2A
Slot.40: B45C:B503:000D:DB4A
GUID: 0xB45CB503000DD7A6;0xB45CB503000DCF76;0xB45CB503000DDB72;0xB45CB503000DDB4E;0xB45CB503000DD7B6;0xB45CB503000DD71A;0xB45CB503000DCF7E;0xB45CB503000DCF66;0xB45CB503000DCF2A;0xB45CB503000DDB4A

View File

@@ -0,0 +1,12 @@
79Z7HG4
Slot.38: B45C:B503:000D:C5AE
Slot.39: B45C:B503:000D:D9BE
Slot.37: B45C:B503:000D:D836
Slot.36: B45C:B503:000D:D83E
Slot.32: B45C:B503:000D:D8B6
Slot.33: B45C:B503:000D:D8BE
Slot.34: B45C:B503:000D:D9C6
Slot.35: B45C:B503:000D:D9FA
Slot.31: B45C:B503:000D:D9EA
Slot.40: B45C:B503:000D:D9DA
GUID: 0xB45CB503000DC5AE;0xB45CB503000DD9BE;0xB45CB503000DD836;0xB45CB503000DD83E;0xB45CB503000DD8B6;0xB45CB503000DD8BE;0xB45CB503000DD9C6;0xB45CB503000DD9FA;0xB45CB503000DD9EA;0xB45CB503000DD9DA

View File

@@ -0,0 +1,12 @@
7BZ7HG4
Slot.38: B45C:B503:000D:DACE
Slot.39: B45C:B503:0039:DEDA
Slot.37: B45C:B503:000D:DAA2
Slot.36: B45C:B503:000D:DAF6
Slot.32: B45C:B503:000D:DAAE
Slot.33: B45C:B503:000D:DACA
Slot.34: B45C:B503:000D:DA66
Slot.35: B45C:B503:0039:DEC2
Slot.31: B45C:B503:0039:DECA
Slot.40: B45C:B503:000D:DAB2
GUID: 0xB45CB503000DDACE;0xB45CB5030039DEDA;0xB45CB503000DDAA2;0xB45CB503000DDAF6;0xB45CB503000DDAAE;0xB45CB503000DDACA;0xB45CB503000DDA66;0xB45CB5030039DEC2;0xB45CB5030039DECA;0xB45CB503000DDAB2

View File

@@ -0,0 +1,12 @@
7F8XHG4
Slot.38: 605E:6503:00EE:1500
Slot.39: 605E:6503:00EE:14F0
Slot.37: 605E:6503:00EE:14CC
Slot.36: 605E:6503:00EE:1494
Slot.32: 605E:6503:00EE:14E8
Slot.33: 605E:6503:00EE:142C
Slot.34: 605E:6503:00EE:1470
Slot.35: 605E:6503:00EE:1478
Slot.31: 605E:6503:00EE:14E0
Slot.40: 605E:6503:00EE:147C
GUID: 0x605E650300EE1500;0x605E650300EE14F0;0x605E650300EE14CC;0x605E650300EE1494;0x605E650300EE14E8;0x605E650300EE142C;0x605E650300EE1470;0x605E650300EE1478;0x605E650300EE14E0;0x605E650300EE147C

View File

@@ -0,0 +1,12 @@
7G4F7G4
Slot.38: B45C:B503:000D:CD66
Slot.39: B45C:B503:000D:CD6A
Slot.37: B45C:B503:000D:CD7A
Slot.36: B45C:B503:000D:CD72
Slot.32: B45C:B503:000D:CD1E
Slot.33: B45C:B503:000D:CCFE
Slot.34: B45C:B503:000D:CD6E
Slot.35: B45C:B503:000D:CD2A
Slot.31: B45C:B503:000D:CD5E
Slot.40: B45C:B503:000D:CD56
GUID: 0xB45CB503000DCD66;0xB45CB503000DCD6A;0xB45CB503000DCD7A;0xB45CB503000DCD72;0xB45CB503000DCD1E;0xB45CB503000DCCFE;0xB45CB503000DCD6E;0xB45CB503000DCD2A;0xB45CB503000DCD5E;0xB45CB503000DCD56

View File

@@ -0,0 +1,12 @@
7MYCZC4
Slot.38: 7C8C:0903:00E4:DE62
Slot.39: 7C8C:0903:00E4:DE4A
Slot.37: 7C8C:0903:00E4:DE4E
Slot.36: 7C8C:0903:00E4:ECFA
Slot.32: 7C8C:0903:00E4:ECE2
Slot.33: 7C8C:0903:00E4:DE52
Slot.34: 7C8C:0903:00E4:DE76
Slot.35: 7C8C:0903:00E4:ECDE
Slot.31: 7C8C:0903:00E4:DE5A
Slot.40: 7C8C:0903:00E4:ED2E
GUID: 0x7C8C090300E4DE62;0x7C8C090300E4DE4A;0x7C8C090300E4DE4E;0x7C8C090300E4ECFA;0x7C8C090300E4ECE2;0x7C8C090300E4DE52;0x7C8C090300E4DE76;0x7C8C090300E4ECDE;0x7C8C090300E4DE5A;0x7C8C090300E4ED2E

View File

@@ -0,0 +1,12 @@
7S48HG4
Slot.38: B45C:B503:000D:C6E6
Slot.39: B45C:B503:000D:C6CA
Slot.37: 605E:6503:00EE:16D8
Slot.36: 605E:6503:00EE:160C
Slot.32: B45C:B503:000D:C4E6
Slot.33: 605E:6503:00EE:161C
Slot.34: 605E:6503:00EE:1384
Slot.35: 605E:6503:00EE:15F8
Slot.31: B45C:B503:000D:C4FE
Slot.40: 605E:6503:00EE:132C
GUID: 0xB45CB503000DC6E6;0xB45CB503000DC6CA;0x605E650300EE16D8;0x605E650300EE160C;0xB45CB503000DC4E6;0x605E650300EE161C;0x605E650300EE1384;0x605E650300EE15F8;0xB45CB503000DC4FE;0x605E650300EE132C

View File

@@ -0,0 +1,12 @@
7T48HG4
Slot.38: 605E:6503:0075:2D64
Slot.39: 605E:6503:00EE:1924
Slot.37: 605E:6503:00EE:19D0
Slot.36: 605E:6503:00EE:1AFC
Slot.32: 605E:6503:00EE:1A24
Slot.33: 605E:6503:00EE:18B0
Slot.34: 605E:6503:0075:2EC4
Slot.35: 605E:6503:0075:2D30
Slot.31: 605E:6503:00EE:1C4C
Slot.40: 605E:6503:0075:2B78
GUID: 0x605E650300752D64;0x605E650300EE1924;0x605E650300EE19D0;0x605E650300EE1AFC;0x605E650300EE1A24;0x605E650300EE18B0;0x605E650300752EC4;0x605E650300752D30;0x605E650300EE1C4C;0x605E650300752B78

View File

@@ -0,0 +1,12 @@
7XZCZC4
Slot.38: 5000:E603:0068:F498
Slot.39: 5000:E603:0068:F37C
Slot.37: 5000:E603:0068:F2B0
Slot.36: 5000:E603:0068:F418
Slot.32: 5000:E603:0068:F478
Slot.33: 5000:E603:0068:F488
Slot.34: 5000:E603:0068:F3F4
Slot.35: 5000:E603:0068:F474
Slot.31: 5000:E603:0068:F2A8
Slot.40: 5000:E603:0068:F2AC
GUID: 0x5000E6030068F498;0x5000E6030068F37C;0x5000E6030068F2B0;0x5000E6030068F418;0x5000E6030068F478;0x5000E6030068F488;0x5000E6030068F3F4;0x5000E6030068F474;0x5000E6030068F2A8;0x5000E6030068F2AC

View File

@@ -0,0 +1,12 @@
87Z7HG4
Slot.38: B45C:B503:000D:DBCE
Slot.39: B45C:B503:000D:DCBA
Slot.37: B45C:B503:000D:DC8E
Slot.36: B45C:B503:000D:DBBE
Slot.32: B45C:B503:000D:DC96
Slot.33: B45C:B503:000D:DD46
Slot.34: B45C:B503:000D:DC9E
Slot.35: B45C:B503:000D:DC9A
Slot.31: B45C:B503:000D:DD4A
Slot.40: B45C:B503:000D:DAAA
GUID: 0xB45CB503000DDBCE;0xB45CB503000DDCBA;0xB45CB503000DDC8E;0xB45CB503000DDBBE;0xB45CB503000DDC96;0xB45CB503000DDD46;0xB45CB503000DDC9E;0xB45CB503000DDC9A;0xB45CB503000DDD4A;0xB45CB503000DDAAA

View File

@@ -0,0 +1,12 @@
88Z7HG4
Slot.38: 3825:F303:0085:032A
Slot.39: 3825:F303:0085:042A
Slot.37: 3825:F303:0085:029A
Slot.36: 3825:F303:0085:057A
Slot.32: 3825:F303:0085:0476
Slot.33: 3825:F303:0085:047E
Slot.34: 3825:F303:0085:0342
Slot.35: 3825:F303:0085:0336
Slot.31: 3825:F303:0085:0412
Slot.40: 3825:F303:0085:050A
GUID: 0x3825F3030085032A;0x3825F3030085042A;0x3825F3030085029A;0x3825F3030085057A;0x3825F30300850476;0x3825F3030085047E;0x3825F30300850342;0x3825F30300850336;0x3825F30300850412;0x3825F3030085050A

View File

@@ -0,0 +1,12 @@
89Z7HG4
Slot.38: B45C:B503:000D:DB62
Slot.39: B45C:B503:000D:DB42
Slot.37: B45C:B503:000D:DB56
Slot.36: B45C:B503:000D:DB46
Slot.32: B45C:B503:000D:D9CE
Slot.33: B45C:B503:000D:DB6E
Slot.34: B45C:B503:000D:DB86
Slot.35: B45C:B503:000D:DB9E
Slot.31: B45C:B503:000D:D822
Slot.40: B45C:B503:000D:DB3E
GUID: 0xB45CB503000DDB62;0xB45CB503000DDB42;0xB45CB503000DDB56;0xB45CB503000DDB46;0xB45CB503000DD9CE;0xB45CB503000DDB6E;0xB45CB503000DDB86;0xB45CB503000DDB9E;0xB45CB503000DD822;0xB45CB503000DDB3E

View File

@@ -0,0 +1,12 @@
8BZ7HG4
Slot.38: B45C:B503:000D:DAEA
Slot.39: B45C:B503:000D:DA2A
Slot.37: B45C:B503:000D:DA22
Slot.36: B45C:B503:000D:DB02
Slot.32: B45C:B503:000D:DADE
Slot.33: B45C:B503:000D:DA3E
Slot.34: B45C:B503:000D:DA32
Slot.35: B45C:B503:000D:DA36
Slot.31: B45C:B503:000D:DAF2
Slot.40: B45C:B503:000D:DB0A
GUID: 0xB45CB503000DDAEA;0xB45CB503000DDA2A;0xB45CB503000DDA22;0xB45CB503000DDB02;0xB45CB503000DDADE;0xB45CB503000DDA3E;0xB45CB503000DDA32;0xB45CB503000DDA36;0xB45CB503000DDAF2;0xB45CB503000DDB0A

View File

@@ -0,0 +1,12 @@
8F8XHG4
Slot.38: 605E:6503:0093:51BC
Slot.39: B45C:B503:000D:C412
Slot.37: 605E:6503:00EE:20C4
Slot.36: B45C:B503:000D:C3A6
Slot.32: 605E:6503:0093:5100
Slot.33: 605E:6503:0093:5198
Slot.34: 605E:6503:0093:510C
Slot.35: 605E:6503:0093:5120
Slot.31: B45C:B503:000D:C3CA
Slot.40: B45C:B503:000D:C39E
GUID: 0x605E6503009351BC;0xB45CB503000DC412;0x605E650300EE20C4;0xB45CB503000DC3A6;0x605E650300935100;0x605E650300935198;0x605E65030093510C;0x605E650300935120;0xB45CB503000DC3CA;0xB45CB503000DC39E

View File

@@ -0,0 +1,12 @@
8GZ7HG4
Slot.38: B45C:B503:000D:DCA6
Slot.39: B45C:B503:000D:DC1A
Slot.37: B45C:B503:000D:DD3A
Slot.36: B45C:B503:000D:DCBE
Slot.32: B45C:B503:000D:DC16
Slot.33: B45C:B503:000D:DC0A
Slot.34: B45C:B503:000D:E1B2
Slot.35: B45C:B503:000D:DC82
Slot.31: B45C:B503:000D:DCA2
Slot.40: B45C:B503:000D:DCDA
GUID: 0xB45CB503000DDCA6;0xB45CB503000DDC1A;0xB45CB503000DDD3A;0xB45CB503000DDCBE;0xB45CB503000DDC16;0xB45CB503000DDC0A;0xB45CB503000DE1B2;0xB45CB503000DDC82;0xB45CB503000DDCA2;0xB45CB503000DDCDA

Some files were not shown because too many files have changed in this diff Show More