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"/>
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;}
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();
30 {% with
1 as popout %}
31 {% include
"ganeti/virtual_machine/novnc.html" %}
33 <script type=
"text/javascript">
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]);
46 var auto_connect
= getQueryString()["auto_connect"];
47 if (auto_connect
== undefined) auto_connect
= false;
48 if (auto_connect
) $("connect").click();