Bug 33164 - noVNC tab title should include VM Name
noVNC tab title should include VM Name
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2-0-errata
Assigned To: Philipp Hahn
Erik Damrose
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 18:18 CET by Erik Damrose
Modified: 2014-02-06 13:37 CET (History)
4 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:
hahn: Patch_Available+


Attachments
Add URI-escaping for title (1.15 KB, patch)
2013-12-03 08:11 CET, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Damrose univentionstaff 2013-11-06 18:18:00 CET
When administering a VM with the noVNC module, it would be nice to have the VMs name in the noVNC tab title. This way, it would be easier to select the correct tab when multiple instances are administered.
Comment 1 Florian Best univentionstaff 2013-11-06 18:18:57 CET
Please also the virtualization host!
Comment 2 Philipp Hahn univentionstaff 2013-12-02 14:13:47 CET
noVNC supports the query parameter "title":
> document.title = unescape(WebUtil.getQueryVar('title', 'noVNC'));

http://.../univention-novnc/vnc_auto.html?port=6080&path=?token=...&title=***

diff --git a/branches/ucs-3.2/ucs-3.2-0/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js b/branches/ucs-3.2/ucs-3.2-0/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js
index 2cc4d98..55a1038 100644
--- a/branches/ucs-3.2/ucs-3.2-0/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js
+++ b/branches/ucs-3.2/ucs-3.2-0/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js
@@ -318,10 +318,12 @@ define([
 		},
 
 		vncLink: function( ids, items ) {
-			array.forEach(ids, function(id) {
+			array.forEach(items, function(item) {
+				var id = item.id;
 				var uuid = id.slice(id.indexOf('#') + 1);
 				var port = window.location.port ? ':' + window.location.port : '';
-				var url = window.location.protocol + '//' + window.location.host + port + '/univention-novnc/vnc_auto.html?port=6080&path=?token=' + uuid;
+				var title = item.label + '@' + item.nodeName;
+				var url = window.location.protocol + '//' + window.location.host + port + '/univention-novnc/vnc_auto.html?port=6080&path=?token=' + uuid + '&title=' + title;
 				window.open(url, '_blank');
 			});
 		},
Comment 3 Philipp Hahn univentionstaff 2013-12-03 08:11:21 CET
Created attachment 5687 [details]
Add URI-escaping for title

As the title is user-supplied, it needs to be URI-escaped.
Comment 4 Philipp Hahn univentionstaff 2014-01-31 11:28:22 CET
r47554 | Bug #33164: UVMM: Set title on noVNC to VM name and host
r47557 | Bug #33164: UVMM: Set title on noVNC to VM name and host [YAML]

Package was built on ladda using --force-arch, since dimma is offline. *_amd64.changes was hard-linked to *_i386.changes to satisfy "announce_errata -V".
Comment 5 Erik Damrose univentionstaff 2014-01-31 14:35:10 CET
OK: YAML
OK: Title is set in the noVNC URL parameters
OK: Title is shown in noVNC tabs

noVNC does not decode umlauts and other special characters correctly -> Bug 34030

-> Verified
Comment 6 Moritz Muehlenhoff univentionstaff 2014-02-06 13:37:06 CET
http://errata.univention.de/ucs/3.2/51.html