Skip to content

Commit c0279f4

Browse files
committed
vmm: UI for storage fs selection
1 parent 6b80ce1 commit c0279f4

File tree

1 file changed

+82
-3
lines changed

1 file changed

+82
-3
lines changed

vmm/src/console.html

Lines changed: 82 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,56 @@
492492
font-family: monospace;
493493
}
494494
</style>
495+
<style>
496+
/* Help icon tooltip styles */
497+
.help-icon {
498+
display: inline-block;
499+
margin-left: 5px;
500+
color: #666;
501+
cursor: help;
502+
position: relative;
503+
}
504+
505+
.help-icon:hover {
506+
color: #4285F4;
507+
}
508+
509+
.help-icon .tooltip {
510+
visibility: hidden;
511+
width: 300px;
512+
background-color: #333;
513+
color: #fff;
514+
text-align: left;
515+
border-radius: 6px;
516+
padding: 10px;
517+
position: absolute;
518+
z-index: 1000;
519+
bottom: 125%;
520+
left: 50%;
521+
margin-left: -150px;
522+
opacity: 0;
523+
transition: opacity 0.3s;
524+
font-size: 12px;
525+
line-height: 1.4;
526+
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
527+
}
528+
529+
.help-icon .tooltip::after {
530+
content: "";
531+
position: absolute;
532+
top: 100%;
533+
left: 50%;
534+
margin-left: -5px;
535+
border-width: 5px;
536+
border-style: solid;
537+
border-color: #333 transparent transparent transparent;
538+
}
539+
540+
.help-icon:hover .tooltip {
541+
visibility: visible;
542+
opacity: 1;
543+
}
544+
</style>
495545
<style>
496546
.ml-text-ro {
497547
white-space: pre-wrap;
@@ -662,9 +712,27 @@ <h2>Deploy a new instance</h2>
662712
</div>
663713

664714
<div class="form-group">
665-
<label for="diskSize">Disk Size (GB)</label>
715+
<label for="diskSize">Storage (GB)</label>
666716
<input id="diskSize" v-model.number="vmForm.disk_size" type="number"
667-
placeholder="Disk size in GB" required>
717+
placeholder="Storage size in GB" required>
718+
</div>
719+
720+
<div class="form-group">
721+
<label for="storageFs">Storage Filesystem
722+
<span class="help-icon">
723+
<i class="fas fa-question-circle"></i>
724+
<span class="tooltip">
725+
<strong>ZFS:</strong> Ensures filesystem integrity with built-in data protection features.<br><br>
726+
<strong>ext4:</strong> Provides better performance for database applications
727+
with lower overhead and faster I/O operations.
728+
</span>
729+
</span>
730+
</label>
731+
<select id="storageFs" v-model="vmForm.storage_fs">
732+
<option value="">Default (ZFS)</option>
733+
<option value="zfs">ZFS</option>
734+
<option value="ext4">ext4</option>
735+
</select>
668736
</div>
669737

670738
<div class="form-group full-width">
@@ -1000,6 +1068,11 @@ <h4 style="margin: 0 0 12px 0;">App Information</h4>
10001068
<span class="detail-label">Features:</span>
10011069
<span class="detail-value">{{ getFlags(vm) || 'None' }}</span>
10021070
</div>
1071+
<div class="detail-item">
1072+
<span class="detail-label">Storage FS:</span>
1073+
<span class="detail-value">{{ vm.appCompose?.storage_fs ?
1074+
vm.appCompose.storage_fs.toUpperCase() : 'ZFS (default)' }}</span>
1075+
</div>
10031076
</div>
10041077

10051078
<h4 style="margin: 0 0 12px 0;">Docker Compose File</h4>
@@ -1464,6 +1537,7 @@ <h3>Derive VM</h3>
14641537
username: '',
14651538
token_key: ''
14661539
},
1540+
storage_fs: '',
14671541
app_id: '',
14681542
kms_enabled: true,
14691543
local_key_provider_enabled: false,
@@ -1642,6 +1716,10 @@ <h3>Derive VM</h3>
16421716
"secure_time": false,
16431717
};
16441718

1719+
if (vmForm.value.storage_fs) {
1720+
app_compose.storage_fs = vmForm.value.storage_fs;
1721+
}
1722+
16451723
if (vmForm.value.preLaunchScript?.trim()) {
16461724
app_compose.pre_launch_script = vmForm.value.preLaunchScript;
16471725
}
@@ -2336,7 +2414,8 @@ <h3>Derive VM</h3>
23362414
() => vmForm.value.docker_config.enabled,
23372415
() => vmForm.value.docker_config.username,
23382416
() => vmForm.value.docker_config.token_key,
2339-
() => vmForm.value.encryptedEnvs
2417+
() => vmForm.value.encryptedEnvs,
2418+
() => vmForm.value.storage_fs
23402419
], async () => {
23412420
try {
23422421
const appCompose = await makeAppComposeFile();

0 commit comments

Comments
 (0)