virtui-manager 1.1.5__py3-none-any.whl → 1.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/METADATA +1 -1
  2. virtui_manager-1.3.0.dist-info/RECORD +73 -0
  3. vmanager/constants.py +737 -108
  4. vmanager/dialog.css +24 -0
  5. vmanager/firmware_manager.py +4 -1
  6. vmanager/i18n.py +32 -0
  7. vmanager/libvirt_utils.py +132 -3
  8. vmanager/locales/de/LC_MESSAGES/virtui-manager.po +3012 -0
  9. vmanager/locales/fr/LC_MESSAGES/virtui-manager.mo +0 -0
  10. vmanager/locales/fr/LC_MESSAGES/virtui-manager.po +3124 -0
  11. vmanager/locales/it/LC_MESSAGES/virtui-manager.po +3012 -0
  12. vmanager/locales/virtui-manager.pot +3012 -0
  13. vmanager/modals/bulk_modals.py +13 -12
  14. vmanager/modals/cache_stats_modal.py +6 -5
  15. vmanager/modals/capabilities_modal.py +133 -0
  16. vmanager/modals/config_modal.py +25 -24
  17. vmanager/modals/cpu_mem_pc_modals.py +22 -21
  18. vmanager/modals/custom_migration_modal.py +10 -9
  19. vmanager/modals/disk_pool_modals.py +60 -59
  20. vmanager/modals/host_dashboard_modal.py +137 -0
  21. vmanager/modals/howto_disk_modal.py +13 -72
  22. vmanager/modals/howto_network_modal.py +13 -39
  23. vmanager/modals/howto_overlay_modal.py +13 -52
  24. vmanager/modals/howto_ssh_modal.py +12 -67
  25. vmanager/modals/howto_virtiofs_modal.py +13 -64
  26. vmanager/modals/input_modals.py +11 -10
  27. vmanager/modals/log_modal.py +2 -1
  28. vmanager/modals/migration_modals.py +20 -18
  29. vmanager/modals/network_modals.py +45 -36
  30. vmanager/modals/provisioning_modals.py +56 -56
  31. vmanager/modals/select_server_modals.py +8 -7
  32. vmanager/modals/selection_modals.py +7 -6
  33. vmanager/modals/server_modals.py +24 -23
  34. vmanager/modals/server_prefs_modals.py +103 -87
  35. vmanager/modals/utils_modals.py +10 -9
  36. vmanager/modals/virsh_modals.py +3 -2
  37. vmanager/modals/virtiofs_modals.py +6 -5
  38. vmanager/modals/vm_type_info_modal.py +2 -1
  39. vmanager/modals/vmanager_modals.py +19 -19
  40. vmanager/modals/vmcard_dialog.py +57 -57
  41. vmanager/modals/vmdetails_modals.py +115 -123
  42. vmanager/modals/xml_modals.py +3 -2
  43. vmanager/network_manager.py +4 -1
  44. vmanager/storage_manager.py +182 -42
  45. vmanager/utils.py +39 -6
  46. vmanager/vm_actions.py +28 -24
  47. vmanager/vm_queries.py +67 -25
  48. vmanager/vm_service.py +8 -5
  49. vmanager/vmanager.css +46 -0
  50. vmanager/vmanager.py +178 -112
  51. vmanager/vmcard.py +161 -159
  52. vmanager/webconsole_manager.py +21 -21
  53. virtui_manager-1.1.5.dist-info/RECORD +0 -65
  54. {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/WHEEL +0 -0
  55. {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/entry_points.txt +0 -0
  56. {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/licenses/LICENSE +0 -0
  57. {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/top_level.txt +0 -0
@@ -8,6 +8,7 @@ from textual.containers import Horizontal, Vertical, VerticalScroll, Grid
8
8
  from textual.widgets import Button, Input, Label, DataTable, Checkbox
9
9
  from textual import on
10
10
  from .base_modals import BaseModal
11
+ from ..constants import StaticText, ButtonLabels
11
12
 
12
13
  class PatternSelectModal(BaseModal[set[str] | None]):
13
14
  """Modal for selecting VMs by pattern across servers."""
@@ -23,7 +24,7 @@ class PatternSelectModal(BaseModal[set[str] | None]):
23
24
 
24
25
  def compose(self) -> ComposeResult:
25
26
  with Vertical(id="pattern-select-container", classes="modal-container"):
26
- yield Label("Select VMs by Pattern (ctrl+u to unselect All VMS)", id="pattern-select-title")
27
+ yield Label(StaticText.SELECT_VMS_BY_PATTERN, id="pattern-select-title")
27
28
 
28
29
  with Horizontal(classes="pattern-input-row"):
29
30
  yield Input(
@@ -31,7 +32,7 @@ class PatternSelectModal(BaseModal[set[str] | None]):
31
32
  id="pattern-input",
32
33
  restrict=r"[a-zA-Z0-9_\-\*\?\.\^\|\$\( \[ \] \+\{\}\\]*"
33
34
  )
34
- yield Checkbox("Regex", id="regex-checkbox")
35
+ yield Checkbox(StaticText.REGEX, id="regex-checkbox")
35
36
 
36
37
  if self.available_servers:
37
38
  #yield Label("Search in Servers:")
@@ -48,15 +49,15 @@ class PatternSelectModal(BaseModal[set[str] | None]):
48
49
  grid.styles.grid_gutter_horizontal = 0
49
50
  yield grid
50
51
 
51
- yield Button("Search VMs", variant="primary", id="search-vms-btn")
52
+ yield Button(ButtonLabels.SEARCH_VMS, variant="primary", id="search-vms-btn")
52
53
 
53
- yield Label("Matching VMs:", id="results-label")
54
+ yield Label(StaticText.MATCHING_VMS, id="results-label")
54
55
  with VerticalScroll(id="results-container"):
55
56
  yield DataTable(id="results-table", cursor_type="row")
56
57
 
57
58
  with Horizontal(id="pattern-action-buttons"):
58
- yield Button("Select Matching", variant="success", id="select-btn", disabled=True)
59
- yield Button("Cancel", variant="error", id="cancel-btn")
59
+ yield Button(ButtonLabels.SELECT_MATCHING, variant="success", id="select-btn", disabled=True)
60
+ yield Button(ButtonLabels.CANCEL, variant="error", id="cancel-btn")
60
61
 
61
62
  def on_mount(self) -> None:
62
63
  table = self.query_one("#results-table", DataTable)
@@ -11,19 +11,20 @@ from .howto_ssh_modal import HowToSSHModal
11
11
  from .base_modals import BaseModal
12
12
 
13
13
  from ..config import save_config
14
+ from ..constants import ErrorMessages, SuccessMessages, ButtonLabels, StaticText
14
15
 
15
16
  class ConnectionModal(BaseModal[str | None]):
16
17
 
17
18
  def compose(self) -> ComposeResult:
18
19
  with Vertical(id="connection-dialog"):
19
- yield Label("Enter QEMU Connection URI:")
20
+ yield Label(StaticText.ENTER_QEMU_CONNECTION_URI)
20
21
  yield Input(
21
22
  placeholder="qemu+ssh://user@host/system or qemu:///system",
22
23
  id="uri-input",
23
24
  )
24
25
  with Horizontal():
25
- yield Button("Connect", variant="primary", id="connect-btn", classes="Buttonpage")
26
- yield Button("Cancel", variant="default", id="cancel-btn", classes="Buttonpage")
26
+ yield Button(ButtonLabels.CONNECT, variant="primary", id="connect-btn", classes="Buttonpage")
27
+ yield Button(ButtonLabels.CANCEL, variant="default", id="cancel-btn", classes="Buttonpage")
27
28
 
28
29
  def on_button_pressed(self, event: Button.Pressed) -> None:
29
30
  if event.button.id == "connect-btn":
@@ -37,14 +38,14 @@ class AddServerModal(BaseModal[Tuple[str, str] | None]):
37
38
  """Modal for adding a new server with autoconnect option."""
38
39
  def compose(self) -> ComposeResult:
39
40
  with Vertical(id="add-server-dialog"):
40
- yield Label("Add New Server")
41
+ yield Label(StaticText.ADD_NEW_SERVER)
41
42
  yield Input(placeholder="Server Name", id="server-name-input")
42
43
  yield Input(placeholder="qemu+ssh://user@host/system", id="server-uri-input")
43
- yield Label("")
44
- yield Checkbox("Autoconnect at startup", id="autoconnect-checkbox", value=False)
44
+ yield Label(StaticText.EMPTY_LABEL)
45
+ yield Checkbox(StaticText.AUTOCONNECT_AT_STARTUP, id="autoconnect-checkbox", value=False)
45
46
  with Horizontal():
46
- yield Button("Save", variant="primary", id="save-btn", classes="Buttonpage")
47
- yield Button("Cancel", variant="default", id="cancel-btn", classes="Buttonpage")
47
+ yield Button(ButtonLabels.SAVE, variant="primary", id="save-btn", classes="Buttonpage")
48
+ yield Button(ButtonLabels.CANCEL, variant="default", id="cancel-btn", classes="Buttonpage")
48
49
 
49
50
  def on_button_pressed(self, event: Button.Pressed) -> None:
50
51
  if event.button.id == "save-btn":
@@ -69,14 +70,14 @@ class EditServerModal(BaseModal[Tuple[str, str, bool] | None]):
69
70
 
70
71
  def compose(self) -> ComposeResult:
71
72
  with Vertical(id="edit-server-dialog"):
72
- yield Label("Edit Server")
73
+ yield Label(StaticText.EDIT_SERVER)
73
74
  yield Input(value=self.server_name, id="server-name-input")
74
75
  yield Input(value=self.server_uri, id="server-uri-input")
75
- yield Label("")
76
- yield Checkbox("Autoconnect at startup", id="autoconnect-checkbox", value=self.autoconnect)
76
+ yield Label(StaticText.EMPTY_LABEL)
77
+ yield Checkbox(StaticText.AUTOCONNECT_AT_STARTUP, id="autoconnect-checkbox", value=self.autoconnect)
77
78
  with Horizontal():
78
- yield Button("Save", variant="primary", id="save-btn", classes="Buttonpage")
79
- yield Button("Cancel", variant="default", id="cancel-btn", classes="Buttonpage")
79
+ yield Button(ButtonLabels.SAVE, variant="primary", id="save-btn", classes="Buttonpage")
80
+ yield Button(ButtonLabels.CANCEL, variant="default", id="cancel-btn", classes="Buttonpage")
80
81
 
81
82
  def on_button_pressed(self, event: Button.Pressed) -> None:
82
83
  if event.button.id == "save-btn":
@@ -102,18 +103,18 @@ class ServerManagementModal(BaseModal [str | None]):
102
103
 
103
104
  def compose(self) -> ComposeResult:
104
105
  with Vertical(id="server-management-dialog"): #, classes="info-details"):
105
- yield Label("Server List Management") #, id="server-list-title")
106
+ yield Label(StaticText.SERVER_LIST_MANAGEMENT) #, id="server-list-title")
106
107
  with ScrollableContainer(classes="info-details"):
107
108
  yield DataTable(id="server-table", classes="server-list")
108
109
  with Vertical(classes="server-list"):
109
110
  with Horizontal():
110
- yield Button("Add", id="add-server-btn", classes="add-button", variant="success")
111
- yield Button("Edit", id="edit-server-btn", disabled=True, classes="edit-button")
112
- yield Button("Delete", id="delete-server-btn", disabled=True,)
111
+ yield Button(ButtonLabels.ADD, id="add-server-btn", classes="add-button", variant="success")
112
+ yield Button(ButtonLabels.EDIT, id="edit-server-btn", disabled=True, classes="edit-button")
113
+ yield Button(ButtonLabels.DELETE, id="delete-server-btn", disabled=True,)
113
114
  with Horizontal():
114
- yield Button("Connect", id="select-btn", variant="primary", disabled=True, classes="Buttonpage")
115
- yield Button("Custom URL", id="custom-conn-btn", classes="Buttonpage")
116
- yield Button("SSH Help", id="ssh-help-btn", classes="Buttonpage")
115
+ yield Button(ButtonLabels.CONNECT, id="select-btn", variant="primary", disabled=True, classes="Buttonpage")
116
+ yield Button(ButtonLabels.CUSTOM_URL, id="custom-conn-btn", classes="Buttonpage")
117
+ yield Button(ButtonLabels.SSH_HELP, id="ssh-help-btn", classes="Buttonpage")
117
118
  #yield Button("Close", id="close-btn", classes="close-button")
118
119
 
119
120
  def on_mount(self) -> None:
@@ -193,13 +194,13 @@ class ServerManagementModal(BaseModal [str | None]):
193
194
  self.query_one("#edit-server-btn").disabled = True
194
195
  self.query_one("#delete-server-btn").disabled = True
195
196
  self.query_one("#select-btn").disabled = True
196
- self.app.show_success_message(f"Server '{server_name_to_delete}' deleted successfully.")
197
+ self.app.show_success_message(SuccessMessages.SERVER_DELETED_TEMPLATE.format(server_name=server_name_to_delete))
197
198
  logging.info(f"Successfully deleted Server '{server_name_to_delete}'")
198
199
  except Exception as e:
199
- self.app.show_error_message(f"Error deleting server '{server_name_to_delete}': {e}")
200
+ self.app.show_error_message(ErrorMessages.ERROR_DELETING_SERVER_TEMPLATE.format(server_name=server_name_to_delete, error=e))
200
201
 
201
202
  self.app.push_screen(
202
- ConfirmationDialog(f"Are you sure you want to delete Server;\n'{server_name_to_delete}'\nfrom list?"), on_confirm)
203
+ ConfirmationDialog(ErrorMessages.DELETE_SERVER_CONFIRMATION_TEMPLATE.format(server_name=server_name_to_delete)), on_confirm)
203
204
 
204
205
  elif event.button.id == "custom-conn-btn":
205
206
  def connection_callback(uri: str | None):