Skip to content

openwrt-xiaomi/luci-app-tn-netports

 
 

Repository files navigation

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 '0'
	option default_h_mode          '1'
	option hv_mode_switch_button   '1'

These options can be set in the global section:

Name Type Required Default Description
default_additional_info int no 0 Display additional information in horizontal view mode by default.
default_h_mode int no 1 Use horizontal view mode by default.
hv_mode_switch_button int no 1 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)

About

Network ports status LuCI application

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 62.4%
  • Lua 26.8%
  • CSS 5.6%
  • Batchfile 2.5%
  • Makefile 2.4%
  • Shell 0.3%