-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add "view, edit, and add Video devices" to detailspage #1795
base: main
Are you sure you want to change the base?
Add "view, edit, and add Video devices" to detailspage #1795
Conversation
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.
Thanks for the PR!
Without diving to deep into the PR and testing it out. We have discussed improving the VNC/Spice UI in the past here making it configurable. I need to look if I can find more recent design proposals.
Is adding more devices a hard requirement or is just changing the default port/host/password good enough?
@Shotaro-Kawaguchi : Thanks! Some initial notes:
I suggest to start with a single feature addition (like set/change VNC password), cover it with proper tests, and then add more things as follow-up PRs if there's any use case. |
Thanks for this PR! We have had a design for this for a few years already, as @jelly pointed out. Hopefully this PR is enough to push the feature forward. If that's the case, perhaps I can find some time to revisit the design and adjust it. It's been in a "holding pattern", waiting for someone to start working on it, so I can allocate time to it again. Having fewer options (in other words: removing SPICE) should help simplify the UI further too. Are there any use cases for having more than one VNC display per VM? All I can think about are:
We shouldn't add something because you can do it, but because it's actually useful to do. I don't think any of the above are really typical uses of running VMs on a server using Cockpit. (Please prove me wrong though, and/or provide other realistic cases.) We had an issue suggesting adding VNC like in this PR before, but it doesn't make sense, as we have a dedicated place for graphics and remote graphics is quite different from other devices for several reasons. (It's integrated in-page, it really probably should be just 1 connection, it has graphical and text modes, it's not really a standard virtualize device provided to the VM like disks and network cards, and we already have a place for graphics at the top so we shouldn't have two different places for it.) Also, I need to point out again that this feature is mostly useless as-is standalone, as it requires having access to the ports, which means either poking holes in the firewall or turning off a firewall. To really make this useful, we'd want to add in firewall integration. This doesn't mean we shouldn't make it better (we definitely should), but that we shouldn't stop just here. In other words, we need to make sure this works on a remote server (without jumping through hoops), not just from localhost. Again, thank you for "getting the ball rolling again" with this PR! It's a good first step to getting remote graphics support improved overall! |
@jelly Thank you for your response.
|
@martinpitt Thank you for your response.
I was not aware that the SPICE type is deprecated. Thank you for pointing it out.
I was not aware of the number of devices that can be added. Thank you for pointing it out.
I will try to create test code.
In this pull request, I will make it possible to view, delete, and change the password of VNC devices. |
Would it be good to move the button as shown in the attached image? |
@Shotaro-Kawaguchi: Can you reply to my comment above please? Have you looked at the mockups? (The current mockups are @ #553 (comment).) I'll have to adapt the mockups for the SPICE removal (and I've started doing that). But I won't merge this PR if it's about adding VNC in a different place. We need to have the VNC console be an integrated experience, not scattered across the page. Since you're interested, I did dust off the old designs and started to update them and would be happy to work with you to get the features integrated... as long as the design of it is considered. Thanks! (I think we always have VNC in all VMs Cockpit creates. In VMs where it's not enabled, we could have edit implicitly create it. In the edit dialog, we could also have a remove action. I could try to illustrate this in a mockup tomorrow, as it's getting late here today.) |
I apologize for the delayed reply.
I was not aware that assigning multiple VNC displays to a VM would prevent the VM from starting due to the following error. So, I think one VNC display is sufficient.
|
I've spent a little bit of time to start to update the mockups a bit and even designed an "empty state" pattern that would make it easy to add VNC if it hadn't been added to a machine already. By default, machines with VNC and serial text consoles would look like this: Here's what clicking on "Text" would look like: If a machine does not have VNC support, then it should probably default to text, and if the VNC tab is active, then we could display a message saying that the support has not been enabled and that it can be added. That would look like this, which would have a button that would add VNC support with defaults set up in the same way VNC support is added to VMs created by Cockpit: |
Thank you for sending the mockups. |
We still support SPICE on Fedora as only RHEL dropped it but Fedora and other distros still have it around. So it should be possible add or remove it. |
I plan to proceed with the implementation according to the mockup created by Garrett. |
@Shotaro-Kawaguchi There's no "source code" for the mockup, as it's a mockup (and not a prototype). I do have a Penpot file of the current state: (You'd have to extract the zip file, then import the penpot file in Penpot.) I've already exported the interesting parts as PNGs and attached them above. |
@garrett Thank you for sharing the mockup. |
There are some differences from the mockup, but I have implemented the functional parts of addition and editing. |
@@ -43,11 +49,18 @@ | |||
}; | |||
|
|||
class Consoles extends React.Component { | |||
static contextType = DialogsContext; | |||
|
Check warning
Code scanning / CodeQL
Unused or undefined state property Warning
written
Component state property 'addVncInProgress' is
written
Component state property 'addVncInProgress' is
written
@garrett @martinpitt |
Added a feature to display video devices in virtual machine information.
With this commit, it will be possible to add, edit, and delete video devices.
This feature was implemented by a use case that sets a VNC password.
Screenshot viewing video device.
Click the "Add video device" button to display the following screen.
Click the "Edit" button to display the following screen.
Click the "..." button to display the following screen.
Click the "Remove" button to display the following screen.