-
Notifications
You must be signed in to change notification settings - Fork 80
Updates for libvirt image removal and use diretory #1722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
8b495f8
6663975
12da995
81dd45a
c1cf813
ea49630
f2822c7
28ec848
de53cf4
3ffebdf
a9d8167
7b03382
fca221a
d5d3bad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1711,7 +1711,11 @@ Stop VMs from Autostarting\Starting when VM Manager starts or open is run from t | |||||||||||||||||||||||||
| :end | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :vms_libvirt_volume_help: | ||||||||||||||||||||||||||
| This is the libvirt volume. | ||||||||||||||||||||||||||
| This is the libvirt volume/directory. | ||||||||||||||||||||||||||
| :end | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :vms_libvirt_secondary_volume_help: | ||||||||||||||||||||||||||
| This is a location for storing previous versions of xml and nvram at change. | ||||||||||||||||||||||||||
| :end | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :vms_libvirt_vdisk_size_help: | ||||||||||||||||||||||||||
|
|
@@ -1720,7 +1724,11 @@ To resize an existing image file, specify the new size here. Next time the Libvi | |||||||||||||||||||||||||
| :end | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :vms_libvirt_location_help: | ||||||||||||||||||||||||||
| You must specify an image file for Libvirt. The system will automatically create this file when the Libvirt service is first started. | ||||||||||||||||||||||||||
| You must specify an image file/directory for Libvirt. The system will automatically create this file/directory when the Libvirt service is first started. | ||||||||||||||||||||||||||
| :end | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :vms_libvirt_secondary_location_help: | ||||||||||||||||||||||||||
| This is a directory for storing previous versions of xml and nvram at change. Does not need to be specified. | ||||||||||||||||||||||||||
| :end | ||||||||||||||||||||||||||
|
Comment on lines
+1730
to
1732
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix grammar in help text. Same grammar issue as line 1718. The phrase "at change" should be improved: -This is a directory for storing previous versions of xml and nvram at change. Does not need to be specified.
+This is a directory for storing previous versions of xml and nvram when changed. Does not need to be specified.or -This is a directory for storing previous versions of xml and nvram at change. Does not need to be specified.
+This is a directory for storing previous versions of xml and nvram on change. Does not need to be specified.📝 Committable suggestion
Suggested change
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :vms_libvirt_storage_help: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -123,7 +123,7 @@ $libvirt_log = file_exists("/var/log/libvirt/libvirtd.log"); | |||||
| <input type="hidden" name="#file" value="<?=htmlspecialchars($domain_cfgfile)?>"> | ||||||
| <input type="hidden" name="#command" value="/plugins/dynamix/scripts/emcmd"> | ||||||
| <input type="hidden" name="#arg[1]" value="cmdStatus=Apply"> | ||||||
|
|
||||||
| <input type="hidden" id="OLD_IMAGE_FILE" name="OLD_IMAGE_FILE" value="<?=htmlspecialchars($domain_cfg['IMAGE_FILE']);?>"> | ||||||
| _(Enable VMs)_: | ||||||
| : <select id="SERVICE" name="SERVICE"> | ||||||
| <?= mk_option($libvirt_service, 'disable', _('No'))?> | ||||||
|
|
@@ -150,6 +150,7 @@ _(Disable Autostart/Start option for VMs)_: | |||||
| <?if ($libvirt_up):?> | ||||||
| <?$libvirt_info = libvirt_version('libvirt')?> | ||||||
| <?$qemu_info = $lv->get_connect_information()?> | ||||||
|
|
||||||
| _(Libvirt version)_: | ||||||
| : <?=$libvirt_info['libvirt.major'].'.'.$libvirt_info['libvirt.minor'].'.'.$libvirt_info['libvirt.release']?> | ||||||
|
|
||||||
|
|
@@ -299,7 +300,7 @@ _(VFIO allow unsafe interrupts)_: | |||||
|
|
||||||
| <?endif;?> | ||||||
|
|
||||||
| <?if ($libvirt_up && trim(shell_exec('stat -c %T -f /etc/libvirt'))=='btrfs'):?> | ||||||
| <?if ($libvirt_up && trim(shell_exec('stat -c %T -f /etc/libvirt'))=='btrfs' && strpos($domain_cfg['IMAGE_FILE'],".img")) :?> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix imprecise string matching for The condition
Since the intent is to show this section only for image files (not directories), consider using a more precise check: -<?if ($libvirt_up && trim(shell_exec('stat -c %T -f /etc/libvirt'))=='btrfs' && strpos($domain_cfg['IMAGE_FILE'],".img")) :?>
+<?if ($libvirt_up && trim(shell_exec('stat -c %T -f /etc/libvirt'))=='btrfs' && substr($domain_cfg['IMAGE_FILE'], -4) === '.img') :?>This checks if the path ends with 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| <div class="advanced" markdown="1"> | ||||||
| <div class="title"><span class="left"><i class="title fa fa-list"></i>_(Libvirt volume info)_</span></div> | ||||||
| _(btrfs filesystem show)_: | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix grammar in help text.
The phrase "at change" is awkward. Consider one of these alternatives:
or
📝 Committable suggestion
🤖 Prompt for AI Agents