Revision 9c901aec ui/static/synnefo.js
b/ui/static/synnefo.js | ||
---|---|---|
697 | 697 |
// Show VNC console |
698 | 698 |
function show_vnc_console(host, port, password) { |
699 | 699 |
// FIXME: Must be made into parameters, in settings.py |
700 |
width = 800 |
|
701 |
height = 600 |
|
702 |
win_width = 850 |
|
703 |
win_height= 650 |
|
704 |
vnc = open("", "displayWindow", |
|
705 |
"width="+win_width+",height="+win_height+",status=yes,toolbar=yes,menubar=yes"); |
|
706 |
|
|
707 |
vnc.document.open(); |
|
708 |
html="<html><head><title>Console"; |
|
709 |
html += "</title></head><body>"; |
|
710 |
html += "<APPLET CODE=VncViewer.class ARCHIVE=static/vncviewer/VncViewer.jar WIDTH=" + width + " HEIGHT=" + height + ">"; |
|
711 |
|
|
712 |
// Set VNC connection parameters based on API reply |
|
713 |
html += "<PARAM NAME=\"HOST\" VALUE=\"" + host + "\">" |
|
714 |
html += "<PARAM NAME=\"PORT\" VALUE=\"" + port + "\">" |
|
715 |
html += "<PARAM NAME=\"PASSWORD\" VALUE=\"" + password + "\">" |
|
716 |
vnc.document.write(html); |
|
717 |
vnc.document.close() |
|
700 |
vnc = open('/machines/console', 'console', 'width=800, height=600, status=yes,toolbar=yes,menubar=yes'); |
|
701 |
content = vnc.window.open(); |
|
702 |
content.body.children[0].children[0].value = 'onomahost' |
|
703 |
// content.body.children[0].children[0].value = 'change_change_change'; |
|
704 |
content.close(); |
|
705 |
return false; |
|
718 | 706 |
} |
719 | 707 |
|
708 |
|
|
720 | 709 |
// console action |
721 | 710 |
function console(serverIDs){ |
722 | 711 |
if (!serverIDs.length){ |
Also available in: Unified diff