/[projects]/misc/xenconsole/webadmin.php
ViewVC logotype

Diff of /misc/xenconsole/webadmin.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1877 by torben, Fri Nov 30 08:27:52 2012 UTC revision 1878 by torben, Fri Nov 30 08:44:57 2012 UTC
# Line 60  function doAction(action, uuid) { Line 60  function doAction(action, uuid) {
60  }  }
61    
62  function console(url, session) {  function console(url, session) {
63            if (url == '')
64                    return;
65    
66          var key = prompt("Key");          var key = prompt("Key");
67          if (key == "" || key == null) {          if (key == "" || key == null) {
68                  return;                  return;
# Line 67  function console(url, session) { Line 70  function console(url, session) {
70          var url = "console.php?url=" + url + "&session=" + session + "&key=" + key;          var url = "console.php?url=" + url + "&session=" + session + "&key=" + key;
71    
72          //window.location = url;          //window.location = url;
73          $('#mainwindow').load(url);          //$('#mainwindow').load(url);
74            window.open(url);
75  }  }
76    
77  function loadServer() {  function loadServer() {
# Line 168  foreach($vms_array as $vm) { Line 172  foreach($vms_array as $vm) {
172                  $vps_topbg = 'vps_topred.png';                  $vps_topbg = 'vps_topred.png';
173          }          }
174    
175            $url = "";
176            $session = "";
177            foreach($vm["consoles"] as $conref) {
178                    $con = $xenserver->console__get_record( $conref );
179                    //var_dump($con);
180    
181                    if ($con["protocol"] == "rfb") {
182                            $url = urlencode( $con["location"] );
183                            $session = $xenserver->get_id();
184                    }
185            }
186    
187    
188    
189  //      echo "<a href='#' onclick=\"loadvm('$uuid');\">$name</a><br>\n";  //      echo "<a href='#' onclick=\"loadvm('$uuid');\">$name</a><br>\n";
190  ?>  ?>
# Line 176  foreach($vms_array as $vm) { Line 193  foreach($vms_array as $vm) {
193                  <tr background='gfx/vps_topbg.png'>                  <tr background='gfx/vps_topbg.png'>
194                          <td width='10' background='gfx/<?php echo $vps_topbg; ?>' class='small'>&nbsp;</td>                          <td width='10' background='gfx/<?php echo $vps_topbg; ?>' class='small'>&nbsp;</td>
195                          <td colspan='2' class='small'><b><?php echo $name; ?></b></td>                          <td colspan='2' class='small'><b><?php echo $name; ?></b></td>
196                          <td colspan='2' class='small' align='right'>(IP: 192.168.10.45, 172.10.0.34) <img src='gfx/icon-terminal.png' style='vertical-align: middle;'></td>                          <td colspan='2' class='small' align='right'>
197                                    (IP: 192.168.10.45, 172.10.0.34)
198                                    <a href="#" onclick="console('<?php echo $url;?>','<?php echo $session;?>')"><img src='gfx/icon-terminal.png' style='vertical-align: middle;'></a>
199                            </td>
200                  </tr>                  </tr>
201    
202                  <tr bgcolor='#eee'>                  <tr bgcolor='#eee'>

Legend:
Removed from v.1877  
changed lines
  Added in v.1878

  ViewVC Help
Powered by ViewVC 1.1.20