Merge tag '0.10.2'
[ganeti_webmgr.git] / ganeti_web / templates / ganeti / virtual_machine / vnc_popout.html
blobb3d4c88540faa04703bb7f39687e887e08774f02
1 <html>
2 <head>
3 <title>Ganeti Web Manager</title>
4 <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/base.css"/>
5 <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/content.css"/>
6 <style>
7 body {background: none; height:400px; padding:3px;}
8 #actions {clear:both; margin-bottom:0 !important;}
9 #VNC_canvas {width:750px !important;}
10 #VNC_canvas.connected {width:inherit !important;}
11 </style>
12 <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.js"></script>
13 <script type="text/javascript" src="{{STATIC_URL}}/js/ajax_csrf_protection.js"></script>
14 <script type="text/javascript">
15 $(document).ready(function() {
16 // Trigger the proper event (POST) when clicking buttons
17 $("a.power").click(function(event) {
18 event.preventDefault();
19 if (confirm("Are you sure you want to " + this.title + " this VM?")) {
20 // POST to the parent window so jobs can be displayed
21 window.opener.$.post(this.href, window.opener.action_response);
22 // If shutdown, close the window
23 if (this.title == "shut down") window.close();
25 });
26 });
27 </script>
28 </head>
29 <body>
30 {% with 1 as popout %}
31 {% include "ganeti/virtual_machine/novnc.html" %}
32 {% endwith %}
33 <script type="text/javascript">
34 $(function() {
35 function getQueryString() {
36 var result = {}, queryString = location.search.substring(1),
37 re = /([^&=]+)=([^&]*)/g, m;
39 while (m = re.exec(queryString)) {
40 result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
43 return result;
46 var auto_connect = getQueryString()["auto_connect"];
47 if (auto_connect == undefined) auto_connect = false;
48 if (auto_connect) $("connect").click();
49 });
50 </script>
51 </body>
52 </html>