Bug 33546 - Copy-paste MAC address from VM
Copy-paste MAC address from VM
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Virtual machines (UVMM)
UCS 3.2
All Linux
: P5 enhancement (vote)
: UCS 4.1
Assigned To: Alexander Kramer
Philipp Hahn
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-22 18:39 CET by Philipp Hahn
Modified: 2015-11-17 12:11 CET (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-11-22 18:39:22 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))
Comment 1 Lutz Willek 2014-02-28 09:12:03 CET
ja nervt mich auch!
Comment 2 Philipp Hahn univentionstaff 2015-09-14 09:04:24 CEST
Again: UCS Technical Training Issue 2090
Comment 3 Alexander Kramer univentionstaff 2015-11-02 08:36:12 CET
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
Comment 4 Alexander Kramer univentionstaff 2015-11-02 08:39:30 CET
r 65068
changelog
Comment 5 Florian Best univentionstaff 2015-11-02 09:08:28 CET
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.
Comment 6 Alexander Kläser univentionstaff 2015-11-02 14:04:50 CET
(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.
Comment 7 Stefan Gohmann univentionstaff 2015-11-02 15:52:56 CET
(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.
Comment 8 Philipp Hahn univentionstaff 2015-11-03 13:17:49 CET
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
Comment 9 Stefan Gohmann univentionstaff 2015-11-04 21:02:40 CET
(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.
Comment 10 Alexander Kramer univentionstaff 2015-11-05 07:51:10 CET
(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.
Comment 11 Philipp Hahn univentionstaff 2015-11-05 09:38:13 CET
(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
Comment 12 Alexander Kramer univentionstaff 2015-11-05 16:28:58 CET
(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
Comment 13 Philipp Hahn univentionstaff 2015-11-05 18:29:37 CET
OK: r33546
OK: Iceweasel38 @ Debian-Squeeze using Ctrl-C
OK: Chromium46.0.2490.71
Comment 14 Stefan Gohmann univentionstaff 2015-11-17 12:11:40 CET
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".