mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-22 08:15:13 +00:00
302 lines
9.6 KiB
HTML
302 lines
9.6 KiB
HTML
{% extends "base.html" %}
|
|
{% comment %}
|
|
#
|
|
# This file is part of Plinth.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
# ToDo: if connection is disabled, no information are visible anymore (Bug)
|
|
{% endcomment %}
|
|
{% block page_head %}
|
|
<style type="text/css">
|
|
.list-group-item .btn {
|
|
margin: -5px 0;
|
|
}
|
|
.form-inline {
|
|
display: inline;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
{% load bootstrap %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-sm-8">
|
|
<div>
|
|
<a href="{% url 'networks:edit' connection.uuid %}"
|
|
class="btn btn-primary" role="button"
|
|
title="Edit connection">Edit</a>
|
|
|
|
{% if active_connection %}
|
|
<form class="form form-inline" method="post"
|
|
action="{% url 'networks:deactivate' connection.uuid %}">
|
|
{% csrf_token %}
|
|
<button class="btn btn-default" type="submit">Deactivate</button>
|
|
</form>
|
|
{% else %}
|
|
<form class="form form-inline" method="post"
|
|
action="{% url 'networks:activate' connection.uuid %}">
|
|
{% csrf_token %}
|
|
<button class="btn btn-default" type="submit">Activate</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
<a href="{% url 'networks:delete' connection.uuid %}"
|
|
class="btn btn-default" role="button"
|
|
title="Delete connection">Delete</a>
|
|
</div>
|
|
|
|
<h3>Connection</h3>
|
|
|
|
<div class="list-group">
|
|
{% if connection.primary %}
|
|
<div class="list-group-item">
|
|
Primary connection
|
|
<div class="pull-right">
|
|
<span class="label label-success">yes</span>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="list-group-item">
|
|
Name
|
|
<div class="pull-right">{{ connection.id }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Device</h3>
|
|
|
|
<div class="list-group">
|
|
<div class="list-group-item">
|
|
State
|
|
<span class="pull-right">{{ device.state }}</span>
|
|
</div>
|
|
{% if device.state_reason != 'none' %}
|
|
<div class="list-group-item">
|
|
State reason
|
|
<span class="pull-right">{{ device.state_reason }}</span>
|
|
</div>
|
|
{% endif %}
|
|
<div class="list-group-item">
|
|
Type
|
|
<span class="pull-right">{{ device.type }}</span>
|
|
</div>
|
|
<div class="list-group-item">
|
|
MAC address
|
|
<span class="pull-right">{{ device.hw_address }}</span>
|
|
</div>
|
|
<div class="list-group-item">
|
|
Interface
|
|
<span class="pull-right">{{ device.interface_name }}</span>
|
|
</div>
|
|
<div class="list-group-item">
|
|
Description
|
|
<span class="pull-right">{{ device.description }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Physical Link</h3>
|
|
|
|
<div class="list-group">
|
|
{% if device.ethernet %}
|
|
<div class="list-group-item">
|
|
Link state
|
|
<div class="pull-right">
|
|
{% if device.ethernet.carrier %}
|
|
<span class='label label-success'>cable is connected</span>
|
|
{% else %}
|
|
<span class='label label-warning'>please check cable</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="list-group-item">
|
|
Speed
|
|
<span class="pull-right">{{ device.ethernet.speed }} Mbit/s</span>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if connection.type == "802-11-wireless" %}
|
|
<div class="list-group-item">
|
|
SSID
|
|
<span class="pull-right">{{ connection.wireless.ssid }}</span>
|
|
</div>
|
|
<div class="list-group-item">
|
|
Speed
|
|
<span class="pull-right">{{ device.wireless.bitrate }} Mbit/s</span>
|
|
</div>
|
|
<div class="list-group-item">
|
|
Mode
|
|
<span class="pull-right">{{ device.wireless.mode }}</span>
|
|
</div>
|
|
{% if access_point.channel %}
|
|
<div class="list-group-item">
|
|
Signal strength
|
|
<div class="pull-right">
|
|
<span class="btn btn-primary btn-xs">
|
|
{{ access_point.strength }}%
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if access_point.channel %}
|
|
<div class="list-group-item">
|
|
Channel
|
|
<span class="pull-right">{{ access_point.channel }}</span>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if active_connection %}
|
|
<h3>IPv4</h3>
|
|
|
|
<div class="list-group">
|
|
{% if connection.ipv4.method %}
|
|
<div class="list-group-item">
|
|
Method
|
|
<span class="pull-right">{{ connection.ipv4.method }}</span>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for address in device.ip4.addresses %}
|
|
<div class="list-group-item">
|
|
IP address
|
|
<span class="pull-right">
|
|
{{ address.address }}/{{ address.prefix }}
|
|
</span>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if device.ip4.gateway %}
|
|
<div class="list-group-item">
|
|
Gateway
|
|
<span class="pull-right">{{ device.ip4.gateway }}</span>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for server in device.ip4.nameservers %}
|
|
<div class="list-group-item">
|
|
DNS server
|
|
<span class="pull-right">{{ server }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if active_connection.ip4.default %}
|
|
<div class="list-group-item">
|
|
Default
|
|
<span class="pull-right">yes</span>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<h3>IPv6</h3>
|
|
|
|
<div class="list-group">
|
|
{% if connection.ipv6.method %}
|
|
<div class="list-group-item">
|
|
Method
|
|
<span class="pull-right">{{ connection.ipv6.method }}</span>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for address in device.ip6.addresses %}
|
|
<div class="list-group-item">
|
|
IP address
|
|
<span class="pull-right">{{ address.address }}/{{ address.prefix }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if device.ip6.gateway %}
|
|
<div class="list-group-item">
|
|
Gateway
|
|
<span class="pull-right">{{ device.ip6.gateway }}</span>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for server in device.ip6.nameservers %}
|
|
<div class="list-group-item">
|
|
DNS server
|
|
<span class="pull-right">{{ server }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if active_connection.ip6.default %}
|
|
<div class="list-group-item">
|
|
Default
|
|
<span class="pull-right">yes</span>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<h3>Status</h3>
|
|
|
|
<p>This connection is not active.</p>
|
|
{% endif %}
|
|
|
|
<h3>Security</h3>
|
|
|
|
{% if connection.zone == "internal" %}
|
|
<div class="list-group">
|
|
<div class="list-group-item">
|
|
Firewall zone
|
|
<div class="pull-right">
|
|
<span class="label label-success">{{ connection.zone }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="alert alert-info">
|
|
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
|
This interface should be connected to local network/machine. If you
|
|
connect this interface to a public network, services meant to
|
|
be available only internally will become available externally.
|
|
This is a security risk.
|
|
</div>
|
|
{% elif connection.zone == "external" %}
|
|
<div class="list-group">
|
|
<div class="list-group-item">
|
|
Firewall zone
|
|
<div class="pull-right">
|
|
<span class="label label-warning">{{ connection.zone }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="alert alert-info">
|
|
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
|
This interface should receive your Internet connection. If
|
|
you connect it your a local network/machine, many services
|
|
meant to available only internally will not be available.
|
|
</div>
|
|
{% else %}
|
|
<div class="list-group">
|
|
<div class="list-group-item">
|
|
Firewall zone
|
|
<div class="pull-right">
|
|
<span class="label label-danger">{{ connection.zone }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="alert alert-danger">
|
|
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
|
|
This interface is not maintained by FreedomBox. Its security
|
|
status is unknown to FreedomBox. Many FreedomBox services may
|
|
not be available on this interface. It is recommended that
|
|
you deactivate/delete this connection and re-configure it.
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|