Commit Graph

70 Commits

Author SHA1 Message Date
Cole Robinson
0891fc9ee1 manager: Clean up new conn/vm handling 2016-05-20 11:44:18 -04:00
Cole Robinson
c65e9d1e16 manager: fix --show-domain * manager conn populating
We need to register the conn internally before connecting
vm-added, otherwise the VMs don't end up in the UI
2016-05-20 11:44:18 -04:00
Cole Robinson
3aa941571a uiutil: Drop check for old pygobject row handling
Once upon a time it couldn't handle setting a row value to None,
but we've bumped the dep now
2016-05-17 17:49:56 -04:00
Cole Robinson
f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Cole Robinson
febe0abdd2 virt-manager: Drop manual dbusapi, use GtkApplication
So I was confused here and completely missed that GtkApplication is
meant to handle the common case of invoking actions in an existing
app instance. So drop the manual dbus server and use the simpler
Gtk support.

Fix a bunch of other errors in this area too
2015-12-06 15:41:49 -05:00
Pavel Hrdina
fedf2e7b66 ui: improve pause/resume tooltip
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1238618

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-12 13:13:19 +01:00
Cole Robinson
3e049583cc details: Drop ignorePause variable; just block the signals 2015-11-10 18:30:31 -05:00
Cole Robinson
bcc13dca31 virt-manager: Only save window dimensions on app exit (bz 1262561)
Rather than on every window change event which spams dconf and hits
the disk repeatedly. The new method is roughly what is suggested by
https://wiki.gnome.org/HowDoI/SaveWindowState

https://bugzilla.redhat.com/show_bug.cgi?id=1262561
2015-09-13 14:07:43 -04:00
Cole Robinson
fdad3efe24 uiutil: streamline column vs rowidx parameter name 2015-05-19 18:29:45 -04:00
Cole Robinson
a65c1f62ec conn: Audit get_$obj callers, drop KeyError handling
These functions don't throw KeyErrors anymore, so adjust callers that
were handling it
2015-05-07 12:26:10 -04:00
Cole Robinson
fbf841151d conn/domain: Condense the internal stats APIs 2015-05-04 18:05:54 -04:00
Cole Robinson
3d2afbaf6f connection: Allow setting a custom 'pretty name' (bz 784701)
We've had multiple requests over the years for something similar. People
might have to connect to multiple IP addresses, or really large hostnames,
that become difficult to distinguish in the UI.

Add a field in the host details page that allows setting a custom name,
and store it in gsettings.
2015-04-11 13:39:25 -04:00
Cole Robinson
4781ad6cd6 connection: Simplify manager row 'pretty name' handling
Unify all the callers, and use some UI ellipsizing to handle
crazy long hostnames.

This drops the conn name collision prevention stuff which can be
useful when you have lots of similar connection names. But upcoming
patches will make it mostly redundant.
2015-04-11 12:57:32 -04:00
Cole Robinson
a3f8d73a9c libvirtobject: Unify internal status APIs and signals
Drop config-changes vs. status-changed and just use one signal, since they
are largely the same code paths for all users.
2015-04-10 15:00:34 -04:00
Cole Robinson
01bf07ba11 libvirtobject: Unify status signals
Dispatch them all from the actual object and not proxied through
the connection. Use the same signal name for all objects with the same
signature.
2015-04-10 15:00:33 -04:00
Cole Robinson
606069b1f4 manager: Use case-insensitive sort for VM names (bz 1155227) 2015-03-26 19:13:29 -04:00
Cole Robinson
cff08223ba util: Move uri_split to its own URISplit class
Does what uri_split did, but wraps it all up in an object that makes
handling the data easier, and makes it easy to extend.
2014-12-09 08:43:19 -05:00
Guido Günther
1726505fd6 s/gconf/gsettings/
GConf got replaced by GSettings but some methods kept the old name
2014-09-29 08:56:37 -04:00
Cole Robinson
226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson
bd5e57dbdc connection: Simplify state management 2014-09-12 16:28:37 -04:00
Cole Robinson
b398a46e9b domain: Cache has_managed_save value
Otherwise we call it every time a domain row is selected, which makes
things choppy on remote connections.
2014-09-12 16:28:37 -04:00
Cole Robinson
7fcdd61920 manager: Expand logic to avoid colliding connection descriptions
And drop some unused code
2014-07-04 18:20:54 -04:00
Giuseppe Scrivano
32b9653f5b virt-manager: select the initial connection
Automatically select the connection in this order:

- URI specified via command line --connect
- First active connection
- First connection

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-02 15:31:41 +02:00
Cole Robinson
72d0d5d8ea manager: Make it clear which functions are called from engine.py 2014-06-26 09:05:34 -04:00
Cole Robinson
aefd4c4824 connection: Use name instead of uuid for object keys
And clean up the API mess while we are at it. Treat the key as an opaque
value that users shouldn't depend on.

Besides the improved code clarity and API layout, this will help diagnose
'key error' issues, since we'll see an object name instead of UUID which
is hard to trace back.
2014-06-02 17:48:32 -04:00
Cole Robinson
932e6e00bb details: Fix changing graphics type (bz 1083903)
And clean up the API usage to avoid these types of issues in the future.
2014-04-03 10:53:54 -04:00
Cole Robinson
a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00
Cole Robinson
4b98a471b9 manager: Handle multiple vm-added signals
Our conn.tick idle dispatcher can be racey, handle it in manager.py
2014-02-13 11:17:14 -05:00
Cole Robinson
d220cc5d52 preferences: Allow disabling VM CPU poll
With this, the only libvirt API call we hit on each tick is the
connection nodeinfo.
2014-02-11 15:45:05 -05:00
Cole Robinson
7057afba56 manager: Add File->New Virtual Machine (bz 871682) 2014-02-01 13:36:02 -05:00
Cole Robinson
c5581c01d2 Move sharedui.py to vmmenu.py
Since that's all it contains now
2014-01-29 09:22:28 -05:00
Cole Robinson
889ec18031 uiutil: Use list selection helpers everywhere 2014-01-27 10:46:14 -05:00
Cole Robinson
708a2737cf Split uihelpers into sharedui and uiutil
Reserve uiutil for the little gtk helper functions, rest goes into shared
UI (which all should probably be factored into their own files but thats
a task for another day)
2014-01-26 18:15:50 -05:00
Cole Robinson
58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
Cole Robinson
55d6b7f377 prefs: Allow disabling all memorystats polling
Similar to how we allow disabling disk/net polling, not sure yet what
effect it might have on remote connections, so best to add this option
just to be safe.

Unlike disk/net stats, we enable this checking by default.
2014-01-12 17:39:21 -05:00
Thorsten Behrens
77b1143965 Add memory stats widget also to manager tree view.
(crobinso: Fix an initialization issue)
2014-01-06 12:08:55 -05:00
Giuseppe Scrivano
0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson
e7e97a8088 domain: If title present, print only it
Forcing the name to be in the picture reduces the usefulness IMO
2013-10-04 11:50:19 -04:00
Giuseppe Scrivano
b9e25100f5 virtManager: show the VM title in the manager window
If a title is defined for a VM, append it to the name of the VM.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-25 19:16:23 +02:00
Cole Robinson
d338bce329 Rename ui files to match source file names 2013-09-22 16:10:16 -04:00
Cole Robinson
e91cc84770 uihelpers: Add VMActionMenu, share between manager and systray 2013-09-22 15:45:53 -04:00
Cole Robinson
268b462126 uihelpers: Add VMShutdownMenu class
And use it in all the places where we are duplicating a similar menu
2013-09-22 15:45:49 -04:00
Giuseppe Scrivano
3861069f99 virt-manager: AUTOSIZE the VM name column in the manager window
Previously, if a very long "title" was shortened, the column was
maintaining its original size, leaving the second column far away.
To avoid it, enforce the first column to be automatically resized
whenever the name of the VM is changed.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-20 17:11:22 -04:00
Cole Robinson
b86c5b21ec manager: Use consistent row spacing even if we disable all graphs 2013-09-02 10:43:53 -04:00
Cole Robinson
f141c77c45 manager: Separate stats and state update callbacks
There's no need to be resetting row keys like VM name, state, on every
'resources-sampled' signals, since we have had finer grained status-changed
and config-changed signals for a while. This seems to reduce the memory
leak on F19 as well.
2013-09-02 09:32:50 -04:00
Cole Robinson
db7db9ab47 manager: Disable graph data func if graph isn't visible
Seems like pygobject is a bit leaky with tree row accesses, and
the cell cb hammers on that quite a bit, even if the graph isn't showing.
2013-09-02 08:42:25 -04:00
Cole Robinson
9d87b0d342 Replace set_property("visible") with modern set_visible 2013-09-01 20:18:14 -04:00
Cole Robinson
1bd6026515 manager: Merge some row creation, drop unneeded row keys 2013-09-01 18:36:58 -04:00
Cole Robinson
e8531b1f40 Initial snapshot support
This adds initial UI for managing snapshots: list, run/revert, delete,
add, and redefining (for changing <description>) supported, but currently
only for internal snapshots. The UI is mostly in its final form except for
some bells and whistles.

The real remaining question is what do we want to advertise and support.
Internal (qcow2) snapshots are by far the simplest to manage, very
mature, and already have the semantics we want.

However most recent libvirt and qemu work has been to facilitate
external snapshots, which are more extensible and can be performed
live, and with qemu-ga coordination for extra safety. However
they make things much harder for virt-manager at the moment.

Until we have a plan, this work should be considered experimental
and not be relied upon.
2013-08-21 18:41:42 -04:00
Giuseppe Scrivano
c1fa43ebb9 virt-manager: ignore VIR_ERR_NO_DOMAIN when a domain was just deleted
Some callbacks could try to access a domain that was just deleted and
not accessible anymore.  Detect these cases and don't propagate the
exception.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-08-16 11:51:15 -04:00