Git Product home page Git Product logo

luci-app-tn-netports's Introduction

Network ports status LuCI application

Description

This package allows you to monitor current state of the network interfaces specified in configuration file (/etc/config/luci_netports).

Dependencies

This LuCI application developed for LuCI master branch. Application requires luabitop package to be installed.

Master branch of this repository requires index status page client side view implementation in the LuCI (see commit https://github.com/openwrt/luci/commit/c85af3d7618b55c499ce4bf58e3896068bd413ae). Support for older LuCI releases (e.g. for version 18.06.x) is left in the v1.x branch of this repository.

Supported languages

  • English
  • Russian

UCI configuration

UCI configuration for this application is stored in /etc/config/luci_netports file.

This file contain one global section with global application settings and one or more port sections with network ports settings.

Global settings

The global section contains global application settings. Default global section configuration:

config global 'global'
	option default_additional_info 'false'
	option default_h_mode          'false'
	option hv_mode_switch_button   'false'

These options can be set in the global section:

Name Type Required Default Description
default_additional_info boolean no false Display additional information in horizontal view mode by default.
default_h_mode boolean no false Use horizontal view mode by default.
hv_mode_switch_button boolean no false Show button for manual switching between horizontal and vertical view modes.

Horizontal display mode can be used maximum for 6 interfaces. If there are more interfaces, the vertical display mode will be automatically activated without the possibility of switching to the horizontal mode.

Ports settings

Sections of the type port declare network port settings for displaying in application.

A minimal port declaration consists of the following lines:

config port
	option ifname 'eth0'

These options can be set in the port sections:

Name Type Required Default Description
ifname string yes (none) Network interface name.
name string no value of ifname Custom port name for displaying in application.
type string no auto Custom port type. Available port types listed in the table below.
disable boolean no false Do not display specified interface.

Available port types (type setting):

Type(s) Disabled icon Linkdown icon Linkup icon Description
auto - - - Automatically detect type by interface name (see next table).
copper copper_disabled copper_down copper_up Wired (RJ45) connection.
sfp sfp_disabled sfp_down sfp_up SFP connection.
fixed fixed_disabled fixed_down fixed_up Intercircuit fixed link connection.
wifi, usb_wifi wifi_disabled wifi_down wifi_up Wireless connection.
usb_rndis usb_rndis_disabled usb_rndis_down usb_rndis_up USB RNDIS connection.
usb_stick, usb_2g, usb_3g, usb_4g usb_stick_disabled usb_stick_down usb_stick_up USB 2G/3G/4G modem connection.
gprs gprs_disabled gprs_down gprs_up GPRS connection.
vpn, tunnel tunnel_disabled tunnel_down tunnel_up Tunnel connection.
ppp ppp_disabled ppp_down ppp_up PPP connection.

Automatic network port type detection (auto type):

Interface name regular expression(s) Example(s) Detected type
^eth\d+,
^sw\d+p\d+,
^en[a-z]\d+[a-z]\d+
eth0, eth32,
sw1p4,
enp0s4, ens9f0
copper
^wlan\d+,
^wl[a-z]\d+[a-z]\d+
wlan0,
wlp0s4, wls1f4
wifi
^usb\d+ usb0 usb_rndis
^wwan\d+,
^ww[a-z]\d+[a-z]\d+
wwan0,
wwp0s4, wws1f4
usb_stick
^ppp\d+ ppp0 ppp
^tun\d+,
^tap\d+,
^wg\d+
tun0, tap0, wg0 tunnel

Screenshots

Vertical mode

Vertical view mode

Horizontal mode

Without additional information:

Horizontal view mode

With additional information:

Horizontal view mode (with extra information)

luci-app-tn-netports's People

Contributors

c0de4j0y avatar namedun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

luci-app-tn-netports's Issues

not sure if "luasrc" folder should exist

Hi

should the luasrc folder exist?

There is a pscp command trying to copy the folder but it isn't exist...:

IF EXIST %~dp0/luasrc (
 	pscp -r %EXTRA_OPTIONS% %~dp0/luasrc/* %HOST%:%LUCI_LUASRC_PATH%
)

No data display

QQ截图20191213230252

openwrt master
Luabitop is already installed
Use full profile

config global 'global'
option default_additional_info 'true'
option default_h_mode 'false'
option hv_mode_switch_button 'false'

config port
option ifname 'ifb0'
option disable '1'

config port
option ifname 'ifb1'
option disable '1'

config port
option name 'Port 1'
option ifname 'eth0'
option type 'copper'

config port
option name 'Port 2'
option ifname 'eth1'
option type 'copper'

config port
option name 'Port 3'
option ifname 'eth2'
option type 'copper'

config port
option name 'Port 4'
option ifname 'eth3'
option type 'copper'

config port 'hotplug_ip6tnl0'
option name 'ip6tnl0'
option ifname 'ip6tnl0'
option type 'auto'

config port 'hotplug_gre0'
option name 'gre0'
option ifname 'gre0'
option type 'auto'

config port 'hotplug_gretap0'
option name 'gretap0'
option ifname 'gretap0'
option type 'auto'

config port 'hotplug_erspan0'
option name 'erspan0'
option ifname 'erspan0'
option type 'auto'

config port 'hotplug_bond0'
option name 'bond0'
option ifname 'bond0'
option type 'auto'

config port 'hotplug_teql0'
option name 'teql0'
option ifname 'teql0'
option type 'auto'

config port 'hotplug_imq0'
option name 'imq0'
option ifname 'imq0'
option type 'auto'

config port 'hotplug_imq1'
option name 'imq1'
option ifname 'imq1'
option type 'auto'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.