Univention Bugzilla – Bug 33546
Copy-paste MAC address from VM
Last modified: 2015-11-17 12:11:40 CET
UCS technical training To configure DHCP for a Windows VM, it was necessary to get the MAC address of the interface of the Windows VM. While the VM is running, only the line in the interface grid of UVMM-UMC can be selected, but not the text showing the address individually. We had to restore to writing the MAC address to a piece of paper and typing it in again in the DHCP host entry. When the VM is not running, at least the detail page for the interface can be opened, which has an edit-text-field, from where the text can be copied. It would be nice if that would work in the grid-view as well. (Even better would be a mechanism to create a VM description and the corresponding computer entry in sync (configurable, as in our laiva environment that isn't wanted))
ja nervt mich auch!
Again: UCS Technical Training Issue 2090
The user can now select the mac address inside the grid by clicking on it. r 65065 univention-virtual-machine-manager-daemon (5.0.1-3) r 65066 univention-management-console-frontend-theme (1.0.1-5) Successful build Package: univention-management-console-frontend-theme Version: 1.0.1-5.106.201511020828 User: akramer Branch: ucs_4.1-0 Successful build Package: univention-virtual-machine-manager-daemon Version: 5.0.1-3.605.201511020835 User: akramer Branch: ucs_4.1-0
r 65068 changelog
The CSS changes which are only necessary for UVMM should only be in the UVMM package in a uvmm.css and not in the umc-theme package. You can use "xstyle/css!./uvmm.css" in the module dependencies to include the CSS file.
(In reply to Florian Best from comment #5) > The CSS changes which are only necessary for UVMM should only be in the UVMM > package in a uvmm.css and not in the umc-theme package. > > You can use "xstyle/css!./uvmm.css" in the module dependencies to include > the CSS file. I think it is useful to have these changes up there, as this is certainly of interest for other modules, as well.
(In reply to Alexander Kläser from comment #6) > I think it is useful to have these changes up there, as this is certainly of > interest for other modules, as well. OK, set to fixed again.
OK: aptitude install -y '?or(?source-package(univention-virtual-machine-manager-daemon),?source-package(univention-management-console-frontend-theme))~i' OK: dpkg-query -W python-univention-virtual-machine-manager univention-management-console-module-uvmm univention-virtual-machine-manager-daemon univention-management-console-frontend-theme python-univention-virtual-machine-manager 5.0.1-3.606.201511021336 univention-management-console-frontend-theme 1.0.1-5.106.201511020828 univention-management-console-module-uvmm 5.0.1-3.606.201511021336 univention-virtual-machine-manager-daemon 5.0.1-3.606.201511021336 OK: Click on MAC address to copy to clipboard - not very intuitive but does the job. OK: Chromium @ Debian-Squeeze OK: IE11 @ Windows7 OK: Opera33 @ Windows7 OK: Chrome46 @ Windows7 FAIL: Firefox41 @ Windows7 FAIL: Iceweasel38 @ Debian-Squeeze Text is selected in Firefox, but not copied to the selection buffer. Maybe <https://developer.mozilla.org/en-US/Firefox/Releases/41#InterfacesAPIsDOM> is needed? OK: r65065 r65068 r65066
(In reply to Philipp Hahn from comment #8) > FAIL: Firefox41 @ Windows7 > FAIL: Iceweasel38 @ Debian-Squeeze > Text is selected in Firefox, but not copied to the selection buffer. > Maybe > <https://developer.mozilla.org/en-US/Firefox/Releases/41#InterfacesAPIsDOM> > is needed? I think we can split it into a new issue and fix it later.
(In reply to Philipp Hahn from comment #8) > Text is selected in Firefox, but not copied to the selection buffer. As discussed with Stefan we are closing this Bug for now, but we will consider it within usability study in the future. FYI: The current fix only makes the mac address selectable and the JavaScript code just selects the address. There is no logic for coping data into any buffer. IMHO ATM we can not use: execCommand('copy') because of browser compatibility, so a user under Windows still have to press CTRL+C to copy the selection. But as I said we will test it.
(In reply to Alexander Kramer from comment #10) > (In reply to Philipp Hahn from comment #8) > > Text is selected in Firefox, but not copied to the selection buffer. > > As discussed with Stefan we are closing this Bug for now, but we will > consider it within usability study in the future. > > FYI: The current fix only makes the mac address selectable and the > JavaScript code just selects the address. There is no logic for coping data > into any buffer. > IMHO ATM we can not use: execCommand('copy') because of browser > compatibility, so a user under Windows still have to press CTRL+C to copy > the selection. But as I said we will test it. The problem is: Ctrl-C does *not* work! The text is selected, but when I press Ctrl-C, the clipboard is cleared - whatever text was previously in the clipboard is removed! I've patched my local version to show an alert(): On firefox it's empty; with Chromium it correctly shows the Ethernet MAC address. <http://xen12.knut.univention.de/univention-management-console/debug.html?lang=de-DE&username=Administrator&password=univention&module=uvmm#module=uvmm:uvmm:0:> The span is selected, but not the text-DOM-node. Reading <http://www.w3.org/TR/css-ui-4/#content-selection> I don't see 'initial' to be a valid value for 'user-select'; maybe Firefox treats that as 'none'. From my understanding 'contain' should be used, but doesn't work with Firefox. If I change it to 'text', it works with Firefox. OK: Konqueror4.14.2
(In reply to Philipp Hahn from comment #11) > Firefox. If I change it to 'text', it works with Firefox. Thank you for the hint. I changed the css rules from initial to text for every browser-family and tested it: UCC: OK - Firefox 41.0-2 OK - Chrome 46.0.2490.80 OK - Chromium 37.0.2062.120 Win7: OK - IE 9 OK - Firefox 29 OK - Chrome 46 r#33546 Successful build Package: univention-management-console-frontend-theme Version: 1.0.1-7.108.201511051626 Branch: ucs_4.1-0
OK: r33546 OK: Iceweasel38 @ Debian-Squeeze using Ctrl-C OK: Chromium46.0.2490.71
UCS 4.1 has been released: https://docs.software-univention.de/release-notes-4.1-0-en.html https://docs.software-univention.de/release-notes-4.1-0-de.html If this error occurs again, please use "Clone This Bug".