-
Notifications
You must be signed in to change notification settings - Fork 71
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
Added NoVNC console page #956
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.
What do you guys think about the possibility of adding a full screen button into the console page? We could place it in the lower right hand corner of the console screen. |
I'm not sure the novnc component supports full screen mode. @bond95 ? |
@gregsheremeta well, yeah, component doesn't have any props for it, but it doesn't mean that we can't add it. But I think it would be better to do in separate PR. |
Agree. I was just wondering if novnc supports it at all. |
@lwrigh added icons |
Looks good to me 👍 |
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.
First pass - mostly questions and some nit-picks. I'll take a deeper look later.
@bond95, @gregsheremeta - Try opening a VNC browser console and leave it open for awhile. Seems to crash my tab every time, I just haven't been able to time it out consistently. Update: And now I've had a VNC console to a command line session open without errors for >4 hours. 🤷♂️ |
@lwrigh, @gregsheremeta, @bond95 - Thoughts on the breadcrumb title? Right now it is the VM's console ID. Maybe just the word "Console" instead? |
@gregsheremeta - Thought ... this could probably be adapted to webadmin via ui-extensions without all that much extra work. |
Just having 'Console' as the third breadcrumb makes sense to me. |
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.
Overall the structure looks good and works well enough.
A few general comments:
-
The way the
ConsoleConfirmationModal
is tightly tied to the redux store seems to work but seems very unique to this component. Feels a bit over complicated, but I don't have any specific suggestions on how to simplify it. -
For the customized version of
@patterfly/react-console
, it would be helpful to do 2 things:- Put the custom code in a distinct folder like
src/patternfly-overrides
and refernce it there. That will make it a lot more obvious as to where the code came from and that it could be replace in future by an updated component. - Put comments in the components you needed to change summarizing what you needed to add or change. That will help simplify the review/verification. (I had to look at the sources in the patternfly-react repo and visually compare differences to see what was tweaked for web-ui).
- Put the custom code in a distinct folder like
-
Using the React portal to push the VNC toolbar to the right place is great work! It would be nice to adopt that style for all the page toolbars so they don't have to be tied in via the routes.
Fixed comments, moved VncConsole
to src/react-console
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.
Very close. Only a few style updates and localization work are still needed.
if (!toolbarContainer) { | ||
return toolbar | ||
} | ||
return document.getElementById(toolbarContainer) && |
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.
It would be more appropriate for toolbarContainer
to already be a createPortal
compatible element by now...probably passed in as a component already.
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.
Actually I don't see big difference, but I prefer more this way, because in this case props more clear and easier to read.
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.
I haven't seen any other patternfly-react or react-bootstrap code do containers/portals this way. The component always accepts another element to use as the target.
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.
According to what I saw, patternfly-react has both id and element, so user can choose which one to use, and it seems to me better solution.
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.
I looked again and found exactly 1 instance of getElementById
use in a component in patternfly-react. That use actually looks for a component in one param (scrollable) and if it isn't there, uses a different param (scrollableElementId). Either way, it's up to Marek in the patternfly-react patch to approve what will be integrated with react-console
and ultimately adopted here.
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.
feel free to get his opinion now ...
path={proxyTicket} | ||
host={websocket.get('host')} | ||
port={websocket.get('port')} | ||
toolbarContainer='vm-console-toolbar-sendkeys' |
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.
Grab the DOM element directly here instead of passing in the element id. Don't make the VncConsole
component have to do any work fetching. Make it easy by passing in the element that can be the portal target for the container.
@bond95, @gregsheremeta, @lwrigh - FYI, an easy way to tell if you got all of the strings into the translation bundle is to run the app with the dummy locale. A script will generate a dummy locale for you that surrounds all of the english with some arrows. No arrows on a piece of text means the text is data or needs to be localized.
Then open the app with the locale on the URL:
|
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.
3 issues to address remain:
VmConsole
's use ofVncConsole
needs localized text- Recheck the CSS in
src/index-nomodules.css
- attempting to open a console on a VM with a broken/stopped/non-responsive guest agent doesn't work #966 is a valid issue and should probably be addressed before we merge
…es to console modal settings
…ix some issues (including pool console button style)
…el, added message about bad certs after disconnect,fixed bug in force VMs update
@bond95 , @leistnerova - How is this PR looking? Latest round of code changes look ok. Does it just need another round of testing? |
I'll do a quick test of last changes, not the whole testing. |
ci build please |
I would suggest changing the text to read, "Cannot connect to websocket proxy server. Please check your websocket proxy certificate or ask your administrator for help. For further information please refer to the console manual(linked). Press the 'Connect' button to reconnect to the console.". |
@lwrigh Done |
Nice looks good to me! |
LGTM |
Just noticed while redoing a demo video: At least on Chrome, if you click directly from the console to the details in the breadcrumbs, the charts on the details page don't render: My best guess is that c3 gets broken somewhere when you don't explicitly click the disconnect button. Eventually my browser tab (Chrome) will straight crash as well. @bond95, @lwrigh, @leistnerova - Can you guys reproduce? |
@sjd78 Unfortunately, no, everything works fine for me in Chrome Version 73.0.3683.86 (Official Build). |
I'll do some additional testing permutations (Chrome on a Mac connecting to dev server web-ui and connecting to web-ui installed to my dev ovirt-engine instance). If it still comes up, I'll log a separate issue. I'm ok with merging this as-is. |
Great, thank you. |
@sjd78 I also did not reproduce is, tested in Chrome 74.0 on Fedora |
I tested Chrome 74.0 on Mac against the web-ui dev server and against web-ui installed to my dev ovirt-engine and was able to reproduce the c3 no charts problem and the browser tab crashing problem. The tab appears to crash because of a massive memory leak. I also tested with Firefox on fedora against my dev ovirt-engine with web-ui installed and recreated the memory leak there. Firefox's tab doesn't crash as politely as the Chrome tab. Here is a video of the Chrome 74.0 on Mac C3 fail followed by memory leak and tab crash: |
It seems I have the reproduction steps:
It doesn't happen 100%, but mostly. Reproduced in Google Chrome 74.0 and also Firefox 66.0 |
@leistnerova thanks! @sjd78 does the console code terminate properly when VM is shut down? if not...could be novnc bug or our code around it. Generally as soon as VM is down the console should die with it. |
Console code must be terminated with VmConsole component. When user go to detail page from console page, VmConsole is unmounting and console terminate as well. According to my experiments problem can be in charts, because this bug cause frequent update of charts, which can be cause of growing memory usage. |
@bond95 @sjd78 if both #966 and #490 is handled by this PR then can we please merge this as discussed and open a new issue for #956 (comment) ? |
@sgratch yes, of course, I'll merge this. |
Pull Request: oVirt/ovirt-web-ui#956 Change-Id: I9fefb7a09922c3ad05908be70850a89b5017782f Signed-off-by: Scott J Dickerson <[email protected]>
Fixes: #490
Fixes: #966
ConsoleConfirmationModal
architectureLoader
componentPatterfly-react PR: patternfly/patternfly-react#1402