Add multi-host Proxmox support with SSL certificate handling
- Added support for multiple Proxmox hosts (pve7.0bin.in:443, Healthport PVE:8006) - Enhanced VM management APIs to accept host parameter - Fixed WebSocket URL generation bug (dynamic port handling) - Added comprehensive SSL certificate trust help system - Implemented host selection dropdown in UI - Added VNC connection failure detection and automatic SSL help redirection - Updated session management to store host_key information - Enhanced error handling for different Proxmox configurations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -77,12 +77,34 @@
|
||||
<div class="col-12">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2><i class="fas fa-desktop"></i> Proxmox VM 관리</h2>
|
||||
<div>
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<!-- 호스트 선택 드롭다운 -->
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="hostSelector" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fas fa-server"></i> {{ current_host_name or '호스트 선택' }}
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="hostSelector">
|
||||
{% for host_key, host_info in available_hosts.items() %}
|
||||
<li>
|
||||
<a class="dropdown-item {% if host_key == current_host_key %}active{% endif %}"
|
||||
href="/vms?host={{ host_key }}"
|
||||
onclick="changeHost('{{ host_key }}')">
|
||||
<i class="fas fa-server me-2"></i>
|
||||
<strong>{{ host_info.name }}</strong><br>
|
||||
<small class="text-muted">{{ host_info.host }}{% if host_info.port != 443 %}:{{ host_info.port }}{% endif %}</small>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<button id="refresh-btn" class="btn btn-outline-primary">
|
||||
<i class="fas fa-sync-alt"></i> 새로고침
|
||||
</button>
|
||||
<span class="text-muted ms-3">
|
||||
<i class="fas fa-server"></i> {{ host }}
|
||||
|
||||
<span class="text-muted">
|
||||
<i class="fas fa-network-wired"></i>
|
||||
<small>{{ current_host_info.host }}{% if current_host_info.port != 443 %}:{{ current_host_info.port }}{% endif %}</small>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -271,7 +293,8 @@
|
||||
body: JSON.stringify({
|
||||
node: node,
|
||||
vmid: vmid,
|
||||
vm_name: vmName
|
||||
vm_name: vmName,
|
||||
host: new URLSearchParams(window.location.search).get('host') || 'pve7.0bin.in'
|
||||
})
|
||||
});
|
||||
|
||||
@@ -312,7 +335,8 @@
|
||||
},
|
||||
body: JSON.stringify({
|
||||
node: node,
|
||||
vmid: vmid
|
||||
vmid: vmid,
|
||||
host: new URLSearchParams(window.location.search).get('host') || 'pve7.0bin.in'
|
||||
})
|
||||
});
|
||||
|
||||
@@ -345,7 +369,8 @@
|
||||
},
|
||||
body: JSON.stringify({
|
||||
node: node,
|
||||
vmid: vmid
|
||||
vmid: vmid,
|
||||
host: new URLSearchParams(window.location.search).get('host') || 'pve7.0bin.in'
|
||||
})
|
||||
});
|
||||
|
||||
@@ -375,6 +400,13 @@
|
||||
location.reload();
|
||||
};
|
||||
|
||||
// 호스트 변경
|
||||
function changeHost(hostKey) {
|
||||
showSpinner();
|
||||
showToast('호스트 변경', `${hostKey} 호스트로 연결 중...`, 'info');
|
||||
// URL을 통해 페이지 이동 (이미 href에 설정되어 있음)
|
||||
};
|
||||
|
||||
// 스피너 표시/숨김
|
||||
function showSpinner() {
|
||||
document.querySelector('.loading-spinner').style.display = 'block';
|
||||
|
||||
Reference in New Issue
Block a user