-
Notifications
You must be signed in to change notification settings - Fork 354
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
feat(VncConsole): Introduce VncConsole component #288
Conversation
Pull Request Test Coverage Report for Build 1055
💛 - Coveralls |
Pull Request Test Coverage Report for Build 1364
💛 - Coveralls |
First use of the component will be in the |
The Tests for unrelated components (like Toolbar) are failing since they import other patternfly-react components via Selected node_modules subdirectories need to be babelized for There is no such issue for For consuming application, it can be fixed i.e. like within cockpit-project/cockpit#8894 (see change to webpack.config.js). |
The issue is fixed similar way as for Cockpit - by adding |
Remains issue with |
Workaround for missing |
Added babel-loader for |
887bb9a
to
0fd32af
Compare
Rebased |
@mareklibra with the merge of #311, we've updated where the consoles code should live. Can you please update your code to be under https://github.com/patternfly/patternfly-react/tree/master/packages/console ? |
Rebased since #160 is merged. |
This is ready for review. |
Rebased after #332 |
May I ask for review, please? |
{textSendShortcut} | ||
|
||
<Button | ||
bsClass="btn btn-default console-actions-buttons-pf" |
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.
no need for btn or btn-default
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.
done
take a look at virt-viewer;-) |
So what to include in the pattern? All the shurtcuts implemented within virt-viewer? In addition, Alt-F4 is handed by browser recently, causing it's window to be closed. Or provide an extension mechanism to add additional ones? |
@mareklibra might it be possible to allow for the following by default Ctrl+Alt+Backspace , Ctrl+Alt+Del & Printscreen (but allow them to be not shown)? You could also allow for a mechanism to add additional commands, but that could be a future contribution as well. |
onCtrlAltDel: noop, | ||
|
||
textCtrlAltDel: 'Ctrl+Alt+Del', | ||
textSendShortcut: 'Send key' |
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.
please use initial caps ... "Send Key"
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.
done
bsStyle="default" | ||
id="console-send-shortcut" | ||
onClick={[Function]} | ||
title="Send key" |
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.
please use initial caps ... "Send Key"
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.
done
@serenamarie125 , this makes sense. If it is ok, I would postpone that work to a follow-up to avoid further prolonging merge of this. |
Rebased.
|
+1 sounds good, thank you! I've created #422 to track the enhancement. |
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 contribution!
src/test.env.js
Outdated
|
||
// referenced from '@novnc/nvnc/core/util/events.js' | ||
// The MutationObserver is available in supported browsers, this is workaround for "jest" | ||
global.MutationObserver = global.MutationObserver || MutationObserverPolyfill; |
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.
This seems like the right way to do this. I am not sure if the noVNC lib will be able to fix this since it is a test environment specific thing. I am good with leaving this here if others are.
package.json
Outdated
@@ -167,6 +168,9 @@ | |||
"roots": [ | |||
"<rootDir>/packages", | |||
"<rootDir>/scripts" | |||
], | |||
"transformIgnorePatterns": [ | |||
"node_modules/(?!@novnc)" |
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.
this needs to be added to the one on line 165. Looks like a rebase issue.
"transformIgnorePatterns": [
"node_modules/(?!@patternfly)",
"node_modules/(?!@novnc)"
],
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.
That should fix the build
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.
right, a rebase issue.
Thanks for spotting this.
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.
LGTM once the build is working again.
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.
LGTM, thanks @mareklibra!
fe804bf
Rebased and fixed the former rebase issue with package.json |
affects: @patternfly/react-console New VncComponent is introduced for patternfly/react-console. The component wraps HTML-based noVNC client [1] [1] https://github.com/novnc/noVNC
…environment affects: @patternfly/react-console, patternfly-react Referenced from noVNC (@novnc/nvnc/core/util/events.js). Workaround for the 'jest' testing only since the MutationObserver is available in browsers otherwise. Attempt to fix the issue by using 'browser' jest configuration option did not work in this case.
May I ask for (final) review? @dmiller9911 , @jeff-phillips-18 |
Going to merge this though we dropped coverage. Hopefully we can address this soon. |
What:
Provide reusable component to access server/virtual machine via VNC protocol.
Link to Storybook:
Mock VNC backend is not available, so storybook is just a formal one, not showing the functionality.
Screenshots will substitute it in this case.
Link: https://mareklibra.github.io/patternfly-react/
Additional issues:
Depends on:
#160 (SerialConsole)Future work:
If this change is accepted, higher-level
<Consoles/>
component wrapping selection of eitherVncConsole
orSerialConsole
will be implemented.