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.
- {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/METADATA +1 -1
- virtui_manager-1.3.0.dist-info/RECORD +73 -0
- vmanager/constants.py +737 -108
- vmanager/dialog.css +24 -0
- vmanager/firmware_manager.py +4 -1
- vmanager/i18n.py +32 -0
- vmanager/libvirt_utils.py +132 -3
- vmanager/locales/de/LC_MESSAGES/virtui-manager.po +3012 -0
- vmanager/locales/fr/LC_MESSAGES/virtui-manager.mo +0 -0
- vmanager/locales/fr/LC_MESSAGES/virtui-manager.po +3124 -0
- vmanager/locales/it/LC_MESSAGES/virtui-manager.po +3012 -0
- vmanager/locales/virtui-manager.pot +3012 -0
- vmanager/modals/bulk_modals.py +13 -12
- vmanager/modals/cache_stats_modal.py +6 -5
- vmanager/modals/capabilities_modal.py +133 -0
- vmanager/modals/config_modal.py +25 -24
- vmanager/modals/cpu_mem_pc_modals.py +22 -21
- vmanager/modals/custom_migration_modal.py +10 -9
- vmanager/modals/disk_pool_modals.py +60 -59
- vmanager/modals/host_dashboard_modal.py +137 -0
- vmanager/modals/howto_disk_modal.py +13 -72
- vmanager/modals/howto_network_modal.py +13 -39
- vmanager/modals/howto_overlay_modal.py +13 -52
- vmanager/modals/howto_ssh_modal.py +12 -67
- vmanager/modals/howto_virtiofs_modal.py +13 -64
- vmanager/modals/input_modals.py +11 -10
- vmanager/modals/log_modal.py +2 -1
- vmanager/modals/migration_modals.py +20 -18
- vmanager/modals/network_modals.py +45 -36
- vmanager/modals/provisioning_modals.py +56 -56
- vmanager/modals/select_server_modals.py +8 -7
- vmanager/modals/selection_modals.py +7 -6
- vmanager/modals/server_modals.py +24 -23
- vmanager/modals/server_prefs_modals.py +103 -87
- vmanager/modals/utils_modals.py +10 -9
- vmanager/modals/virsh_modals.py +3 -2
- vmanager/modals/virtiofs_modals.py +6 -5
- vmanager/modals/vm_type_info_modal.py +2 -1
- vmanager/modals/vmanager_modals.py +19 -19
- vmanager/modals/vmcard_dialog.py +57 -57
- vmanager/modals/vmdetails_modals.py +115 -123
- vmanager/modals/xml_modals.py +3 -2
- vmanager/network_manager.py +4 -1
- vmanager/storage_manager.py +182 -42
- vmanager/utils.py +39 -6
- vmanager/vm_actions.py +28 -24
- vmanager/vm_queries.py +67 -25
- vmanager/vm_service.py +8 -5
- vmanager/vmanager.css +46 -0
- vmanager/vmanager.py +178 -112
- vmanager/vmcard.py +161 -159
- vmanager/webconsole_manager.py +21 -21
- virtui_manager-1.1.5.dist-info/RECORD +0 -65
- {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/WHEEL +0 -0
- {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/entry_points.txt +0 -0
- {virtui_manager-1.1.5.dist-info → virtui_manager-1.3.0.dist-info}/licenses/LICENSE +0 -0
- {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(
|
|
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(
|
|
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(
|
|
52
|
+
yield Button(ButtonLabels.SEARCH_VMS, variant="primary", id="search-vms-btn")
|
|
52
53
|
|
|
53
|
-
yield 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(
|
|
59
|
-
yield Button(
|
|
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)
|
vmanager/modals/server_modals.py
CHANGED
|
@@ -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(
|
|
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(
|
|
26
|
-
yield Button(
|
|
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(
|
|
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(
|
|
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(
|
|
47
|
-
yield Button(
|
|
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(
|
|
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(
|
|
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(
|
|
79
|
-
yield Button(
|
|
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(
|
|
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(
|
|
111
|
-
yield Button(
|
|
112
|
-
yield Button(
|
|
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(
|
|
115
|
-
yield Button(
|
|
116
|
-
yield Button(
|
|
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(
|
|
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(
|
|
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(
|
|
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):
|