Univention Bugzilla – Bug 33164
noVNC tab title should include VM Name
Last modified: 2014-02-06 13:37:06 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.
Please also the virtualization host!
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'); }); },
Created attachment 5687 [details] Add URI-escaping for title As the title is user-supplied, it needs to be URI-escaped.
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".
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
http://errata.univention.de/ucs/3.2/51.html