Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
VncConsole: render console type
Browse files Browse the repository at this point in the history
Text "Console: VNC" is rendered on top of the VncCOnsole component.

Once design of console componenents is stabilized in pf-react, esp.
around the ConsolleSwitcher component, this change will be moved to pf-react.
  • Loading branch information
mareklibra authored and rawagner committed Oct 10, 2018
1 parent 6844948 commit 6342cfc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/public/kubevirt/_style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import "components/vm";
@import '~kubevirt-web-ui-components/dist/sass/components';
@import '~patternfly/dist/sass/patternfly/wizard';
@import '~patternfly/dist/sass/patternfly/forms';

@import 'components/vm';
@import 'components/vmconsoles';
9 changes: 9 additions & 0 deletions frontend/public/kubevirt/components/_vmconsoles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vnc-console .toolbar-pf-results {
border-top: none; /** Override PF default. Once approved, this should get into pf-react VncConsole*/
}

.vmconsoles-type {
/*position: absolute;
left: 3.5em;
*/
}
10 changes: 10 additions & 0 deletions frontend/public/kubevirt/components/vmconsoles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ const VmIsNotRunning = () => (
</div>
);

/**
* Once design is stabilized, this will go to pf-react's VncConsole.
*/
const ConsoleType = ({ type }) => (
<div className="vmconsoles-type">
<b>Console</b> {type}
</div>
);

/**
* Actual component for consoles.
*/
Expand All @@ -23,6 +32,7 @@ const VmConsoles = ({ vmi }) => {
const vncConDetails = getVncConnectionDetails(vmi);
return (
<div className="co-m-pane__body">
<ConsoleType type="VNC" />
<VncConsole {...vncConDetails} />
</div>
);
Expand Down

0 comments on commit 6342cfc

Please sign in to comment.