diff --git a/pkg/Makefile.am b/pkg/Makefile.am index 5b003773f709..30657bc949c5 100644 --- a/pkg/Makefile.am +++ b/pkg/Makefile.am @@ -13,21 +13,14 @@ playground_DATA = \ dist/playground/extra.de.po: pkg/playground/extra.de.po $(COPY_RULE) -dist/machines/base.css: node_modules/noVNC/include/base.css - $(COPY_RULE) - ovirtdir = $(pkgdatadir)/ovirt ovirt_DATA = \ dist/ovirt/install.sh \ - dist/ovirt/base.css \ $(NULL) dist/ovirt/install.sh: pkg/ovirt/install.sh $(COPY_RULE) -dist/ovirt/base.css: node_modules/noVNC/include/base.css - $(COPY_RULE) - metainfodir = ${datarootdir}/metainfo metainfo_DATA = pkg/sosreport/org.cockpit-project.cockpit-sosreport.metainfo.xml \ pkg/kdump/org.cockpit-project.cockpit-kdump.metainfo.xml \ @@ -41,8 +34,6 @@ EXTRA_DIST += \ pkg/playground/extra.de.po \ pkg/users/mock \ pkg/lib/qunit-template.html \ - node_modules/noVNC/package.json \ - node_modules/noVNC/include/base.css \ pkg/ovirt/install.sh \ $(playground_DATA) \ $(pkg_TESTS) \ diff --git a/pkg/machines/vnc.css b/pkg/machines/vnc.css deleted file mode 100644 index ff707c9e2f39..000000000000 --- a/pkg/machines/vnc.css +++ /dev/null @@ -1,18 +0,0 @@ -.vnc-custom-body { - margin: 0px; - overflow-y: hidden; -} - -.vnc-custom-container { - height: inherit !important; -} - -.vnc-custom-status-bar { - margin-top: 0px; - margin-bottom: 2px; -} - -.vnc-custom-status-bar { - position: relative; - height: auto; -} \ No newline at end of file diff --git a/pkg/machines/vnc.html b/pkg/machines/vnc.html deleted file mode 100644 index 4632cec68999..000000000000 --- a/pkg/machines/vnc.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - noVNC - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- Loading -
-
-
- - - Canvas not supported. - -
- - - - diff --git a/pkg/machines/vnc.js b/pkg/machines/vnc.js deleted file mode 100644 index 0e31bee76f8a..000000000000 --- a/pkg/machines/vnc.js +++ /dev/null @@ -1,197 +0,0 @@ -/* global window, cockpit, RFB, WebUtil, $D */ - -/* - * These are modules that both global and noVNC code expect to use, - * but only use them via their entry points. They are not nodejs - * style modules, so we need to use the exports loader to get the - * right exported object out of their scopes. - */ -window.Util = require("exports?Util!noVNC/include/util.js"); -window.WebUtil = require("exports?WebUtil!noVNC/include/webutil.js"); - -/* - * This is a real nodejs module.expotrs form, which other code - * then expects to use. We must export it globally - */ -window.inflator = require("noVNC/include/inflator.js"); - -/* - * This is a hodgepodge of old-school javascript with hundreds of - * interdependencies between files. We concatenate them with our custom - * cat.js webpack loader. - */ -window.RFB = require("exports?RFB!./cat?noVNC/include/base64.js&noVNC/include/websock.js&noVNC/include/des.js&noVNC/include/keysymdef.js&noVNC/include/keyboard.js&noVNC/include/input.js&noVNC/include/display.js&noVNC/include/rfb.js!noVNC/include/keysym.js"); - -var rfb; -var resizeTimeout; - -function ensureVisibility() { - window.setTimeout(function () { - var containerId = decodeURIComponent(WebUtil.getConfigVar("containerId", "")); - console.log("Scrolling VNC frame into view, containerId = ", containerId); - - var toBeVisible = window.parent.document.querySelector("tr[data-row-id='" + containerId + "']"); - var toBeVisibleRow = window.parent.document.getElementById(containerId + "-row"); - - if (toBeVisible && toBeVisibleRow && toBeVisible.scrollIntoView) { - toBeVisible.scrollIntoView(); // ensure maximal visibility of the VNC iframe + VM-controls - toBeVisibleRow.scrollIntoView(); // ensure the VM's name is visible - } else { - console.log('scrollIntoView() is not supported'); - } - }, 50); -} - -function UIresize() { - var containerId = decodeURIComponent(WebUtil.getConfigVar('containerId', '')); - if (!containerId) { - console.error("containerId not found in noVNC frame params!"); - return ; - } - - // Normally, the frame/container size shall resize the VM. - // Since this is not working, let's do it vice-versa: adapt browser's component height according to inner display's size. - // Another workaround is in canvas resizing which effectively leads to scaling. But this seems not look good. - if (WebUtil.getConfigVar('resize', false)) { - var height = ($D('noVNC_canvas').height + 60)+ "px"; - console.log('Resizing noVNC, height = ', height); - - var novncContainerId = containerId + "-novnc-frame-container"; - var novncContainer = window.parent.document.getElementById(novncContainerId); - if (novncContainer) - novncContainer.style.height = height; - - // no need to resize width - already 100%, potential scrollbar - - ensureVisibility(); - } -} - -function FBUComplete(rfb, fbu) { - UIresize(); - rfb.set_onFBUComplete(function() { }); - console.log('Setting focus'); - $D('noVNC_canvas').focus(); -} -function passwordRequired(rfb) { - var msg; - msg = '