[virt-tools-list] virt-manager XML editing UI WIP

Pavel Hrdina phrdina at redhat.com
Wed Apr 24 08:20:40 UTC 2019


On Mon, Apr 15, 2019 at 02:51:28PM -0400, Cole Robinson wrote:
> I published a virt-manager branch with some inprogress work to add a raw
> XML editing UI. The code is here:
> 
> https://github.com/crobinso/virt-manager/tree/uixml
> 
> The implementation is a bit hacky right now, there's still some internal
> API bits that need some thought. That branch adds it for:
> 
> * Editing <network> XML in Connection Details
> * Editing <pool> XML in Connection Details
> * Editing device XML in addhardware
> 
> There's some screenshots here: https://imgur.com/a/fduqpv6
> 
> It's structured as a gtknotebook with two tabs
> 
> * 'Details' which shows the existing UI in the above cases
> * 'XML' which switches to a GtkSourceView with the XML
> 
> It reuses the existing UI 'apply'/'finish' buttons to actually commit
> the changes. If you edit the 'XML' and try to switch tabs before
> 'apply'ing we warn that changes will be lost, because we don't really
> have any way to switch back and forth between editing individual XML
> fields and editing the XML raw. It's not the nicest looking thing but
> it's the best I could think of that's a reusable UI pattern, and
> reusable means it simplifies wiring this up everywhere else.
> 
> The remaining places this can be added:
> 
> * Details dialog for the whole <domain> XML
> * Details dialog for individual device XML pages
> * createnet dialog
> * createpool dialog
> * createvol dialog
> * clone dialog?
> 
> I'll also be generating a list of UI bits that I think we should drop
> once this is in place. That will be a separate mail at some point. But
> possibly: <network> QoS editing, <disk> driver io, <disk> driver type,
> <disk> serial, <interface> vport stuff, likely some <graphics> options.

Hi Cole,

I've pulled your branch and tried it out to see how it looks and works.
However, I'm still not convinced whether we should introduce something
like that into virt-manager and drop some UI options in favor of XML
editing.

To me personally if feels like step backwards and it will be more
difficult to use for basic users if they will have to manually modify
libvirt XML.

I'm not convinced whether we want to have the XML editing in
virt-manager at all.  For one-time task where you need to edit one
specific part of libvirt XML user can use virt-xml or simply virsh
and if user have to do that more often they will probably have some
script to automate that task as manual XML editing is not ideal.

This feels more like that we will add XML editing as replacement for
new future features in UI.  It's obvious that we cannot cover all
libvirt XML bits in our UI so we will not satisfy all users of
virt-manager but this XML editing feels like it complicates the UI way
too much and makes it easier for basic users to screw up their WMs.

Pavel

> Also I think we should slim the createnet and createpool dialogs down to
> a single screen, possibly with a pattern like the addhardware wizard
> with a single list on the side for choosing pool or network types. This
> scales better, but also by limiting to a single screen will force us to
> make sure the exposed options aren't out of control and taking up too
> much real estate.
> 
> Comments welcome
> 
> Thanks,
> Cole
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20190424/4d039b97/attachment.sig>


More information about the virt-tools-list mailing list