Files
VestaCP/web/templates/admin/list_services.html
2013-01-19 23:57:58 +04:00

153 lines
9.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 0 8px 6px">
<div style="text-align: right; float: right;">
<form action="/search/" method="get" >
<input type="text" name="q" style="margin: 2px 2px 0px 0px; width: 250px; padding: 3px;" size="30">
<input type="submit" value="<?php print _('Search');?>" class="button" style="font-size: 12px; height: 24px;">
</form>
</div>
<div style="float:left; padding-left: 0px;">
<form action="/bulk/service/" method="post" id="objects">
<a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> <?php print _('toggle all');?> </a>
<select style="margin:0 2px 0 0px;" name="action">
<option><?php print _('apply to selected');?></option>
<option<?php print _('stop');?>></option>
<option><?php print _('start');?></option>
<option><?php print _('restart');?></option>
</select>
<input type="submit" name="ok" value="" class="button" style="width: 37px; font-size: 12px; height: 24px;">
</div>
<?php
if (!empty($_SESSION['error_srv'])) {
?>
<div>
<script type="text/javascript">
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
<div id="dialog-message" title="Error">
<p><?php echo $_SESSION['error_srv'] ?></p>
</div>
</div>
<?php
unset($_SESSION['error_srv']);
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="vstobjects">
<table class='data'>
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['STATE'] == 'running') {
$status = 'active';
$action = 'stop';
} else {
$status = 'suspended';
$action = 'start';
}
$cpu = $data[$key]['CPU'] / 10;
$cpu = number_format($cpu, 1);
if ($cpu == '0.0') $cpu = 0;
?>
<tr class="data-row">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
<table class="data-col1">
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="service[]" value="<?php echo $key ?>" ></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo _($data[$key]['STATE']); ?></b></td></tr>
</table>
</td>
<td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<tr>
<td></td>
<td class="data-controls" width="68px"><a href="/restart/service/?srv=<?php echo $key ?>"><img src="/images/reload.png" width="6px" height="7px"> <?php print _('restart');?></a></td>
<td class="data-controls" width="48px"><a href="/<?php echo $action ?>/service/?srv=<?php echo $key ?>"><img src="/images/<?php echo $action ?>.png" width="7px" height="7px"> <?php echo _($action); ?></a></td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr>
<td colspan=4 class="domain" style="padding: 0 0 0 4px;">
<b><?php echo $key ?></b>
</td>
</tr>
<tr>
<td style="vertical-align:top;" width="200px">
<table>
<tr>
<td class="counter-name" style="padding: 2px 0 0 0">
<?php echo $data[$key]['SYSTEM'] ?>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="150px">
<table>
<tr>
<td class="counter-name">
<?php print _('CPU');?>:
</td>
<td>
<a class="counter-value"> <?php echo $cpu ?>%</a>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" width="180px">
<table>
<tr>
<td class="counter-name">
<?php print _('Memory');?>:
</td>
<td>
<a class="counter-value"><?php echo $data[$key]['MEM'] ?> <?php print _('mb');?></a>
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;" >
<table>
<tr>
<td class="counter-name">
<?php print _('Run Time');?>:
</td>
<td>
<a class="counter-value"><?php echo humanize_time($data[$key]['RTIME']) ?> </a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
</form>
</div>