98 lines
3.9 KiB
HTML
98 lines
3.9 KiB
HTML
{# Fragment — no <script> tags (injected via innerHTML) #}
|
|
|
|
{% if error %}
|
|
<div class="pve-panel" id="analysis-result">
|
|
<div class="pve-panel-header">
|
|
<span class="pve-panel-title">Analysis Failed</span>
|
|
</div>
|
|
<div class="pve-panel-body">
|
|
<div class="pve-alert pve-alert-error">{{ error }}</div>
|
|
<a href="/" class="pve-btn" style="margin-top:0.75rem;">Try Again</a>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="pve-panel" id="step2">
|
|
<div class="pve-panel-header">
|
|
<span class="pve-panel-title">Analysis Result</span>
|
|
</div>
|
|
<div class="pve-panel-body">
|
|
|
|
<table class="pve-table">
|
|
<tr><td>File</td><td>{{ analysis.filename }}</td></tr>
|
|
<tr><td>Disk Format</td><td>{{ analysis.disk_format }}</td></tr>
|
|
<tr><td>Disk Size</td><td>{{ analysis.disk_size_gb }} GB</td></tr>
|
|
<tr><td>Operating System</td><td>{{ analysis.os_type or 'Unknown' }}</td></tr>
|
|
<tr><td>EFI Bootable</td><td>{{ 'Yes' if analysis.efi_detectable else 'Unknown' }}</td></tr>
|
|
</table>
|
|
|
|
<p class="pve-dim" style="margin:0.75rem 0;">Is this correct? Configure the VM below and submit the conversion job.</p>
|
|
|
|
<form id="confirm-form" data-vmid="{{ vmid }}" data-source-filename="{{ source_filename }}">
|
|
<input type="hidden" name="vmid" value="{{ vmid }}">
|
|
<input type="hidden" name="source_filename" value="{{ source_filename }}">
|
|
<input type="hidden" name="disk_format" value="{{ analysis.disk_format }}">
|
|
|
|
<div class="pve-row">
|
|
<div class="pve-form-group">
|
|
<label>VM Name *</label>
|
|
<input type="text" name="vm_name" required class="pve-input" value="{{ vm_name or '' }}"
|
|
placeholder="my-converted-vm">
|
|
</div>
|
|
<div class="pve-form-group">
|
|
<label>Target Disk Size (GB)</label>
|
|
<input type="number" name="target_disk_size_gb" class="pve-input"
|
|
value="{{ analysis.disk_size_gb }}"
|
|
placeholder="Leave blank for auto-shrink">
|
|
<span class="pve-hint">
|
|
{{ analysis.disk_size_gb }} GB detected. Auto-shrink to {{ (analysis.disk_size_gb * 0.1)|round(0)|int if (analysis.disk_size_gb * 0.1) > 20 else 20 }} GB if left blank.<br>
|
|
<strong>Warning:</strong> shrinking can break complex layouts (LVM, encryption).
|
|
If unsure, enter the full size ({{ analysis.disk_size_gb }} GB) to skip.
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="pve-row">
|
|
<div class="pve-form-group">
|
|
<label>CPU Cores</label>
|
|
<input type="number" name="cpu_cores" class="pve-input" value="2" min="1">
|
|
</div>
|
|
<div class="pve-form-group">
|
|
<label>RAM (MB)</label>
|
|
<input type="number" name="ram_mb" class="pve-input" value="4096" min="512">
|
|
</div>
|
|
</div>
|
|
<div class="pve-row">
|
|
<div class="pve-form-group">
|
|
<label>Storage Pool</label>
|
|
{% if storage_pools %}
|
|
<select name="target_storage" class="pve-select">
|
|
{% for pool in storage_pools %}
|
|
<option value="{{ pool.name }}">{{ pool.name }} ({{ pool.type }})</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% else %}
|
|
<input type="text" name="target_storage" class="pve-input" value="local-lvm">
|
|
{% endif %}
|
|
</div>
|
|
<div class="pve-form-group">
|
|
<label>Boot Detection</label>
|
|
<select name="auto_detect_boot" class="pve-select">
|
|
<option value="true" selected>Auto-detect (recommended)</option>
|
|
<option value="false">Manual</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="pve-form-group" id="boot-type-group" style="display:none;">
|
|
<label>Boot Type</label>
|
|
<select name="boot_type" class="pve-select">
|
|
<option value="uefi">UEFI</option>
|
|
<option value="legacy">Legacy BIOS</option>
|
|
</select>
|
|
</div>
|
|
|
|
<button type="submit" id="submit-btn" class="pve-btn pve-btn-primary">Start Conversion</button>
|
|
</form>
|
|
|
|
<div id="submit-status" class="pve-hidden" style="margin-top:1rem;"></div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|