### Magic DNS Smart Copy Features:
- **PBS servers**: Automatically append `:8007` port when copying
- **PVE servers**: Automatically append `:8006` port when copying
- **Other machines**: Copy Magic DNS address without port (existing behavior)
### UI Improvements:
- PBS servers: Blue button with `:8007` port hint
- PVE servers: Orange button with `:8006` port hint
- Enhanced tooltips with service-specific port information
- Visual distinction between different server types
### PBS Backup Server Monitoring:
- Complete PBS API integration with authentication
- Real-time backup/restore task monitoring with detailed logs
- Namespace-separated backup visualization with color coding
- Datastore usage monitoring and status tracking
- Task history with success/failure status and error details
### Technical Implementation:
- Smart port detection via JavaScript `addSmartPort()` function
- Jinja2 template logic for conditional button styling
- PBS API endpoints for comprehensive backup monitoring
- Enhanced clipboard functionality with user feedback
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added Git repository navigation item below Medivault link
- Links to working Headscale setup branch
- Opens in new tab for easy access to project source
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- base.html에서 매출 대시보드 링크를 showComingSoon()에서 실제 경로로 변경
- href="#" onclick="showComingSoon('매출 대시보드')" → href="{{ url_for('revenue_dashboard') }}"
- 이제 사이드바에서 매출 대시보드에 정상 접근 가능
- 구독 서비스 관리와 매출 대시보드 모두 완전 구현 완료
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
🔧 사이드바 메뉴 개선:
- 구독 서비스 관리 메뉴 추가 (/subscriptions)
- 매출 대시보드 메뉴 추가 (준비 중 알림)
- VM 관리 (VNC) 메뉴 정리
- PQON 사용자 관리로 명칭 통일
- showComingSoon() 함수로 준비 중 기능 알림
📊 구독 서비스 관리 페이지 (/subscriptions):
- 구독 현황 통계 카드 (월 매출, 구독 수, 구독률)
- 서비스별 구독 현황 차트 (클라우드PC, AI CCTV, CRM)
- 약국별 구독 현황 테이블 (검색 및 필터링 지원)
- 실시간 데이터 로딩 및 새로고침 기능
🎨 UI/UX 기능:
- 서비스별 이모지 아이콘 시스템 (💻📷📊)
- 반응형 디자인 및 색상 코딩
- 엔터키 지원 검색 기능
- 로딩 스피너 및 오류 처리
🔄 데이터 연동:
- /api/subscriptions/stats 통계 API 활용
- /api/pharmacies/subscriptions 약국 현황 API 활용
- 약국 상세 페이지 연동
📱 사용자 경험:
- 직관적인 네비게이션 구조
- 실시간 검색 및 필터링
- 상세 관리 버튼으로 약국별 구독 관리 접근
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- base.html 상단 네비게이션 브랜딩 변경
- 팜큐 약국 관리 시스템 → PharmQ Super Admin (PSA)
- UI 일관성 향상을 위한 브랜딩 통합
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 자동 매핑 버그 수정: 이름만으로 자동 연결되던 문제 해결
- 매핑되지 않은 약국 목록 API 추가 (/api/pharmacies/available)
- 사용자 연결 드롭다운에서 매핑 가능한 약국만 표시하도록 개선
- 기존 잘못된 매핑 초기화하여 명시적 링크만 허용
- UI 텍스트 업데이트: "Headscale 사용자 목록" → "PQON 사용자 목록"
- UI 텍스트 업데이트: "Headscale 네트워크 사용자" → "PharmQ-ON 사용자"
- 사이드 메뉴 링크 변경: "Headplane UI" → "Medivault" (https://medivault.co.kr/)
- SQLAlchemy or_ import 추가하여 복합 조건 쿼리 지원
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Headscale CLI 기반 사용자 생성/삭제 API 엔드포인트 추가
- 사용자-약국 매칭 정보 실시간 표시 및 관리
- 완전한 사용자 관리 웹 인터페이스 구현
- 통계 대시보드: 총 사용자, 약국 연결, 미연결, 노드 수
- 사용자별 노드 연결 상태 및 약국 정보 매칭 표시
- 새 사용자 생성 모달 (display_name, email 지원)
- 안전한 사용자 삭제 확인 기능
- 네비게이션 메뉴에 사용자 관리 추가
- Headplane과 동일한 기능 + 약국 매칭 정보 추가 제공
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Features
- 한국어 Flask 관리 인터페이스 with Bootstrap 5
- Headscale과 분리된 독립 데이터베이스 구조
- 약국 관리 시스템 (pharmacy management)
- 머신 모니터링 및 상태 관리
- 실시간 대시보드 with 통계 및 알림
- Headscale 사용자명과 약국명 분리 관리
## Database Architecture
- 별도 FARMQ SQLite DB (farmq.sqlite)
- Headscale DB와 외래키 충돌 방지
- 느슨한 결합 설계 (ID 참조만 사용)
## UI Components
- 반응형 대시보드 with 실시간 통계
- 약국별 머신 상태 모니터링
- 한국어 지역화 및 사용자 친화적 인터페이스
- 머신 온라인/오프라인 상태 표시 (24시간 타임아웃)
## API Endpoints
- `/api/sync/machines` - Headscale 머신 동기화
- `/api/sync/users` - Headscale 사용자 동기화
- `/api/pharmacy/<id>/update` - 약국 정보 업데이트
- 대시보드 통계 및 알림 API
## Problem Resolution
- Fixed foreign key conflicts preventing Windows client connections
- Resolved machine online status detection with proper timeout handling
- Separated technical Headscale usernames from business pharmacy names
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>