Revize 1442
Přidáno uživatelem David Raška před více než 12 roky(ů)
freenetis/branches/network/application/models/iface.php | ||
---|---|---|
*/
|
||
public function get_wireless_antenna($antenna = NULL)
|
||
{
|
||
if (!$antenna)
|
||
if ($antenna === NULL)
|
||
{
|
||
$antenna = $this->wireless_antenna;
|
||
}
|
freenetis/branches/network/application/controllers/ifaces.php | ||
---|---|---|
// access control
|
||
if (!$this->acl_check_view('Devices_Controller', 'iface', $iface->device->user->member_id))
|
||
Controller::error(ACCESS);
|
||
|
||
|
||
// ip addresses
|
||
$ip_address_model = new Ip_address_Model();
|
||
$ip_addresses = $ip_address_model->get_all_ip_addresses_of_iface($iface->id);
|
||
... | ... | |
$grid_ip_addresses->datasource($ip_addresses);
|
||
|
||
if ($iface->name != '')
|
||
$name = "$iface->name ($iface->mac)";
|
||
{
|
||
$name = $iface->name;
|
||
if ($iface->mac != '')
|
||
$name .= " ($iface->mac)";
|
||
}
|
||
else
|
||
{
|
||
$name = $iface->mac;
|
||
}
|
||
|
||
if (url::slice(url_lang::uri(Path::instance()->previous()), 0, 1) != 'ifaces')
|
||
{
|
||
... | ... | |
->html();
|
||
}
|
||
|
||
$headline = __('Interface detail').' - '.$iface->name;
|
||
$headline = __('Interface detail').' - '.$iface->name;
|
||
$view = new View('main');
|
||
$view->breadcrumbs = $breadcrumbs;
|
||
$view->title = $headline;
|
||
$view->content = new View('ifaces/show');
|
||
|
||
$detail = '';
|
||
|
||
switch ($iface->type) {
|
||
case Iface_Model::TYPE_WIRELESS:
|
||
$detail = new View('ifaces/detail');
|
||
$detail->ip_addresses = $grid_ip_addresses;
|
||
break;
|
||
case Iface_Model::TYPE_ETHERNET:
|
||
$detail = new View('ifaces/detail');
|
||
$detail->ip_addresses = $grid_ip_addresses;
|
||
break;
|
||
};
|
||
|
||
$view->content->iface = $iface;
|
||
$view->content->detail = $detail;
|
||
$view->content->headline = $headline;
|
||
$view->render(TRUE);
|
||
} // end of show
|
freenetis/branches/network/application/views/menu.php | ||
---|---|---|
<li><?php echo html::anchor('device_templates/show_all', __('Device templates')) ?></li>
|
||
<li><?php echo html::anchor('ifaces/show_all', __('Interfaces')) ?></li>
|
||
<li><?php echo html::anchor('links/show_all', __('Links')) ?></li>
|
||
<li><?php echo html::anchor('vlan_ifaces/show_all', __('Vlan interfaces')) ?></li>
|
||
<li><?php echo html::anchor('vlans/show_all', __('Vlans')) ?></li>
|
||
|
||
<?php if ($this->acl_check_view('VoIP_Controller', 'voip')): ?>
|
freenetis/branches/network/application/views/ifaces/show.php | ||
---|---|---|
<th><?php echo __('Type') ?></th>
|
||
<td><?php echo $iface->get_type() ?></td>
|
||
</tr>
|
||
<?php if (isset($iface->number)): ?>
|
||
<tr>
|
||
<th><?php echo __('Device name') ?></th>
|
||
<td><?php echo $iface->device->name ?></td>
|
||
<th><?php echo __('Number') ?></th>
|
||
<td><?php echo $iface->number ?></td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
<?php if (isset($iface->port_mode)): ?>
|
||
<tr>
|
||
<th><?php echo __('Segment name') ?></th>
|
||
<td><?php echo html::anchor('segments/show/'.$iface->segment_id, $iface->segment->name) ?></td>
|
||
<th><?php echo __('Port mode') ?></th>
|
||
<td><?php echo Iface_Model::get_port_mode($iface->port_mode) ?></td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
<tr>
|
||
<th><?php echo __('MAC') ?></th>
|
||
<th><?php echo __('Device name') ?></th>
|
||
<td><?php echo html::anchor('devices/show/'.$iface->device->id, $iface->device->name)?></td>
|
||
</tr>
|
||
<?php if (Iface_Model::type_has_mac_address($iface->type)): ?>
|
||
<tr>
|
||
<th><?php echo __('MAC address') ?></th>
|
||
<td><?php echo $iface->mac ?></td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
<?php if (isset($iface->wireless_mode)): ?>
|
||
<tr>
|
||
<th><?php echo __('Comment') ?></th>
|
||
<td><?php echo $iface->comment ?></td>
|
||
<th><?php echo __('Wireless mode') ?></th>
|
||
<td><?php echo Iface_Model::get_wireless_mode($iface->wireless_mode) ?></td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
<?php if (isset($iface->wireless_antenna)): ?>
|
||
<tr>
|
||
<th><?php echo __('Wireless antenna') ?></th>
|
||
<td><?php echo Iface_Model::get_wireless_antenna($iface->wireless_antenna) ?></td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
<?php if (Iface_Model::type_has_link($iface->type)):?>
|
||
<tr>
|
||
<th colspan="2"><?php echo __('Link') ?></th>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('ID') ?></th>
|
||
<td><?php echo $iface->link->id ?> </td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('Name') ?></th>
|
||
<td><?php echo html::anchor('links/show/'.$iface->link->id, $iface->link->name)?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('Medium') ?></th>
|
||
<td><?php echo Link_Model::get_medium_type($iface->link->medium) ?></td>
|
||
</tr>
|
||
<?php endif; ?>
|
||
</table>
|
||
|
||
<?php if ($iface->type == Iface_Model::TYPE_WIRELESS): ?>
|
||
<table class="extended" style="float:left; margin-left:25px" cellspacing="0">
|
||
<tr>
|
||
<th colspan="2"><?php echo __("Wireless setting") ?></th>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __("Mode") ?></th>
|
||
<td><?php echo $iface->wireless->get_wireless_mode() ?></td>
|
||
</tr>
|
||
<?php if ($iface->segment->wireless->ssid != ''): ?>
|
||
<tr>
|
||
<th><?php echo __("SSID") ?></th>
|
||
<td><?php echo $iface->segment->wireless->ssid ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($iface->segment->wireless->norm): ?>
|
||
<tr>
|
||
<th><?php echo __("Norm") ?></th>
|
||
<td><?php echo $iface->segment->wireless->get_wireless_norm() ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($iface->segment->wireless->frequence != ''): ?>
|
||
<tr>
|
||
<th><?php echo __("Frequence") ?></th>
|
||
<td><?php echo $iface->segment->wireless->frequence ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($iface->segment->wireless->channel != ''): ?>
|
||
<tr>
|
||
<th><?php echo __("Channel") ?></th>
|
||
<td><?php echo $iface->segment->wireless->channel ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($iface->segment->wireless->channel_width != ''): ?>
|
||
<tr>
|
||
<th><?php echo __("Channel width") ?></th>
|
||
<td><?php echo $iface->segment->wireless->channel_width ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($iface->wireless->antenna): ?>
|
||
<tr>
|
||
<th><?php echo __("Antenna") ?></th>
|
||
<td><?php echo $iface->wireless->get_wireless_antenna() ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($iface->segment->wireless->polarization): ?>
|
||
<tr>
|
||
<th><?php echo __("Polarization") ?></th>
|
||
<td><?php echo $iface->segment->wireless->get_wireless_polarization() ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
</table>
|
||
<?php endif ?>
|
||
<br class="clear" />
|
||
<br />
|
||
|
||
<?php if (Iface_Model::type_has_ip_address($iface->type))
|
||
echo $detail ?>
|
||
|
||
<br class="clear" />
|
||
<br />
|
||
|
freenetis/branches/network/application/views/ifaces/detail.php | ||
---|---|---|
<h3><?php echo __('ip addresses') ?></h3>
|
||
<?php echo $ip_addresses ?>
|
||
<br />
|
Také k dispozici: Unified diff
Upravy:
- Implementace zobrazeni ruznych typu rozhranni