Graphisme sur la page des VMs

This commit is contained in:
Alan Garcia 2013-10-18 08:22:12 +00:00
parent a0142f57be
commit ecd99c82f8
2 changed files with 29 additions and 29 deletions

View File

@ -50,14 +50,14 @@ include_once("head.php");
<hr/> <hr/>
<br/> <br/>
<?php if ($error) { ?> <?php if (!empty($error)) { ?>
<div> <div>
<span class="error"> <span class="error">
<?php echo implode('<br />', $error); ?> <?php echo implode(" - ", array_unique($error)); ?>
</span> </span>
</div> </div>
<br/> <br/>
<br/>
<?php } ?> <?php } ?>
<div> <div>
@ -92,37 +92,37 @@ include_once("head.php");
<br/> <br/>
<br/> <br/>
<hr/> <hr/>
<h3><?php __("Tips"); ?></h3> <h3><?php __("Tips"); ?></h3>
<a href="javascript:;" onclick="$('#tips-script').toggle();"><?php __("Can I start or stop my console access with a script?"); ?></a>
<div id='tips-script'> <div id="tabs-tips-vm">
<fieldset>
<ul>
<li class="help"><a href="#tabs-tips-soft"><?php __("Available softwares"); ?></a></li>
<li class="help"><a href="#tabs-tips-script"><?php __("Remotely start/stop a VM"); ?></a></li>
</ul>
<div id='tabs-tips-script'>
<?php __("You can script the launch the console access in command line by using this url:"); ?> <?php __("You can script the launch the console access in command line by using this url:"); ?>
<pre> <pre>http://<?php echo $mem->user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&amp;script=1&amp;action=start' ?></pre>
http://<?php echo $mem->user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&amp;script=1&amp;action=start' ?>
</pre>
<?php __("You can halt the vm by using:"); ?> <?php __("You can halt the vm by using:"); ?>
<pre> <pre>http://<?php echo $mem->user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&amp;script=1&amp;action=stop' ?></pre>
http://<?php echo $mem->user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&amp;script=1&amp;action=stop' ?>
</pre>
<?php __("And you can see existing vm information (if the vm is running) by using:"); ?> <?php __("And you can see existing vm information (if the vm is running) by using:"); ?>
<pre> <pre>http://<?php echo $mem->user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&amp;script=1' ?></pre>
http://<?php echo $mem->user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&amp;script=1' ?>
</pre>
<i><?php __("Warning: if you do not use HTTPS, your password will be transfered without any protection"); ?></i> <i><?php __("Warning: if you do not use HTTPS, your password will be transfered without any protection"); ?></i>
</fieldset>
</div> </div>
<div id='tabs-tips-soft'>
<?php __("To access a remote console with SSH, you can use Putty.");?>
<br/> <br/>
<a href="javascript:;" onclick="$('#tips-soft').toggle();"><?php __("Which software can I use?"); ?></a> <?php __("To transfer files, you can use Filezilla in SFTP mode."); ?>
<div id='tips-soft'>
<fieldset>
<?php __("To access a remote console with SSH, you can use Putty. To transfer files, you can use Filezilla in SFTP mode."); ?>
</fieldset>
</div> </div>
</div><!-- tabs-tips-vm -->
<script type="text/javascript"> <script type="text/javascript">
$('#tips-script').toggle(); $(function() {$( "#tabs-tips-vm" ).tabs();});
$('#tips-soft').toggle();
</script> </script>
<?php <?php

View File

@ -87,7 +87,7 @@ class m_lxc implements vm {
*/ */
private function sendMessage($params) { private function sendMessage($params) {
global $L_FQDN,$hooks; global $L_FQDN,$hooks;
$fp = fsockopen($this->IP, $this->PORT, $errno, $errstr, $this->TIMEOUT); $fp = @fsockopen($this->IP, $this->PORT, $errno, $errstr, $this->TIMEOUT);
if (!$fp) { if (!$fp) {
$this->error[] = 'Unable to connect'; $this->error[] = 'Unable to connect';
return FALSE; return FALSE;