|
<h2><?php echo __('Device template') ?> - <?php echo $device_template->name ?></h2><br />
|
|
<?php
|
|
|
|
$arr_links = array();
|
|
|
|
if ($this->acl_check_edit('Devices_Controller', 'devices'))
|
|
$arr_links[] = html::anchor('device_templates/edit/' . $device_template->id, __('Edit'));
|
|
|
|
if ($this->acl_check_delete('Devices_Controller', 'devices'))
|
|
$arr_links[] = html::anchor('device_templates/delete/' . $device_template->id, __('Delete'), array('class' => 'delete_link'));
|
|
|
|
echo implode(' | ', $arr_links);
|
|
|
|
?>
|
|
|
|
<br /><br />
|
|
|
|
<table class="extended" cellspacing="0">
|
|
<tr>
|
|
<th><?php echo __('Trade name') ?></th>
|
|
<td><?php echo $device_template->name ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo __('Type') ?></th>
|
|
<td><?php echo $device_template->enum_type->get_value() ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo __('Default') ?></th>
|
|
<td><?php echo $device_template->default ? __('Yes') : __('No') ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo __('Default interface') ?> <?php echo help::hint(__('Default iface is used as filled iface in permitting of the connection request')) ?></th>
|
|
<td><?php echo (preg_match('/^(\d+):(\d+)$/', @$ivals['default_iface'], $r) !== FALSE) ? @$ivals[$r[1]]['items'][$r[2]]['name'] : '<span class="red">' . __('Not set') . '</span>' ?></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br /><h3><?php echo __('Ethernet interfaces') ?></h3>
|
|
|
|
<table class="extended" cellspacing="0">
|
|
<tr>
|
|
<th><?php echo __('Count') ?></th>
|
|
<td><?php echo $ivals[Iface_Model::TYPE_ETHERNET]['count'] ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo __('Names') ?></th>
|
|
<td><?php foreach ($ivals[Iface_Model::TYPE_ETHERNET]['items'] as $item) echo ($item['name']) ? $item['name'] . ', ' : '' ?></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br /><h3><?php echo __('Wireless interfaces') ?></h3>
|
|
|
|
<table class="extended" cellspacing="0">
|
|
<tr>
|
|
<th><?php echo __('Minimal count') ?></th>
|
|
<td><?php echo $ivals[Iface_Model::TYPE_WIRELESS]['min_count'] ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo __('Maximal count') ?></th>
|
|
<td><?php echo $ivals[Iface_Model::TYPE_WIRELESS]['max_count'] ?></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br />
|
|
|
|
<table class="extended" cellspacing="0">
|
|
<tr>
|
|
<th><?php echo __('Name') ?></th>
|
|
<th><?php echo __('Wireless mode') ?></th>
|
|
<th><?php echo __('Antenna type') ?></th>
|
|
<th><?php echo __('Antenna gain') ?></th>
|
|
<th><?php echo __('Antenna azimuth') ?></th>
|
|
</tr>
|
|
<?php foreach ($ivals[Iface_Model::TYPE_WIRELESS]['items'] as $item): ?>
|
|
<tr>
|
|
<td><?php echo $item['name'] ?></td>
|
|
<td><?php echo Iface_Model::get_wireless_mode(@$item['wireless_mode']) ?></td>
|
|
<td><?php echo Iface_Model::get_wireless_antenna(@$item['wireless_antenna']) ?></td>
|
|
<td><?php echo @$item['wireless_antenna_gain'] ?></td>
|
|
<td><?php echo @$item['wireless_antenna_azimuth'] ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
|
|
<br /><h3><?php echo __('Ports') ?></h3>
|
|
|
|
<table class="extended" cellspacing="0">
|
|
<tr>
|
|
<th><?php echo __('Count') ?></th>
|
|
<td><?php echo $ivals[Iface_Model::TYPE_PORT]['count'] ?></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br />
|
|
|
|
<table class="extended" cellspacing="0">
|
|
<tr>
|
|
<th><?php echo __('Name') ?></th>
|
|
<th><?php echo __('Port number') ?></th>
|
|
<th><?php echo __('Port mode') ?></th>
|
|
</tr>
|
|
<?php foreach ($ivals[Iface_Model::TYPE_PORT]['items'] as $item): ?>
|
|
<tr>
|
|
<td><?php echo $item['name'] ?></td>
|
|
<td><?php echo __('Port') ?> <?php echo $item['number'] ?></td>
|
|
<td><?php echo Iface_Model::get_port_mode($item['port_mode']) ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
|
|
<br /><h3><?php echo __('Internal interfaces') ?></h3>
|
|
|
|
<table class="extended" cellspacing="0">
|
|
<tr>
|
|
<th><?php echo __('Count') ?></th>
|
|
<td><?php echo $ivals[Iface_Model::TYPE_INTERNAL]['count'] ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th><?php echo __('Names') ?></th>
|
|
<td><?php foreach ($ivals[Iface_Model::TYPE_INTERNAL]['items'] as $item) echo ($item['name']) ? $item['name'] . ', ' : '' ?></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<?php if ($this->acl_check_view('Device_active_links_Controller', 'active_links')): ?>
|
|
<br /><h3><?php echo __('Device active links') ?></h3>
|
|
<?php echo $active_links_grid; ?>
|
|
<?php endif; ?>
|