Files
VestaCP/web/templates/admin/list_services.html
2013-04-25 21:33:43 +03:00

157 lines
10 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="submenu">
<tr>
<td style="padding: 2px 0 0 6px">
<div class="submenu-search-block">
<form action="/search/" method="get">
<input type="text" name="q" class="submenu-search-field">
<input type="submit" value="<?php print __('Search');?>" class="submenu-button" style="width: 96px;">
</form>
</div>
<div class="submenu-button-block">
<form action="/bulk/service/" method="post" id="objects">
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print __('toggle all');?> </a>
<select class="submenu-select-dropdown" name="action">
<option value=""><?php print __('apply to selected');?></option>
<option value="stop"><?php print __('stop');?></option>
<option value="start"><?php print __('start');?></option>
<option value="restart"><?php print __('restart');?></option>
</select>
<input type="submit" name="ok" value="" class="submenu-button" style="width: 36px;">
</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;">
<a href="/restart/service/?srv=<?php echo $key ?>" class="data-controls">
<span>
<img src="/images/reload.png" width="6px" height="7px">
<?php print __('restart'); ?>
</span>
</a>
<a href="/<?php echo $action ?>/service/?srv=<?php echo $key ?>" class="data-controls">
<span>
<img src="/images/<?php echo $action ?>.png" width="7px" height="7px">
<?php print __($action); ?>
</span>
</a>
<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 __('Uptime');?>:
</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>