From a7d3c46b79c489dedac2061ee9d2bf1693998c80 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 14 Jun 2018 22:33:08 +0800 Subject: [PATCH] update new luci style for x86/x64 --- package/lean/autocore/Makefile | 2 +- package/lean/autocore/files/index.htm | 628 +++++++++++--------------- 2 files changed, 270 insertions(+), 360 deletions(-) diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index 248628f34..341fb904d 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autocore PKG_VERSION:=1 -PKG_RELEASE:=10 +PKG_RELEASE:=12 include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/autocore/files/index.htm b/package/lean/autocore/files/index.htm index 7112337a9..67601633f 100644 --- a/package/lean/autocore/files/index.htm +++ b/package/lean/autocore/files/index.htm @@ -6,6 +6,7 @@ <% local fs = require "nixio.fs" + local ipc = require "luci.ip" local util = require "luci.util" local stat = require "luci.tools.status" local ver = require "luci.version" @@ -58,6 +59,8 @@ } if wan then + local dev = wan:get_interface() + local link = dev and ipc.link(dev:name()) rv.wan = { ipaddr = wan:ipaddr(), gwaddr = wan:gwaddr(), @@ -66,12 +69,19 @@ expires = wan:expires(), uptime = wan:uptime(), proto = wan:proto(), + i18n = wan:get_i18n(), ifname = wan:ifname(), - link = wan:adminlink() + link = wan:adminlink(), + mac = dev and dev:mac(), + type = dev and dev:type(), + name = dev and dev:get_i18n(), + ether = link and link.type == 1 } end if wan6 then + local dev = wan6:get_interface() + local link = dev and ipc.link(dev:name()) rv.wan6 = { ip6addr = wan6:ip6addr(), gw6addr = wan6:gw6addr(), @@ -79,8 +89,13 @@ ip6prefix = wan6:ip6prefix(), uptime = wan6:uptime(), proto = wan6:proto(), + i18n = wan6:get_i18n(), ifname = wan6:ifname(), - link = wan6:adminlink() + link = wan6:adminlink(), + mac = dev and dev:mac(), + type = dev and dev:type(), + name = dev and dev:get_i18n(), + ether = link and link.type == 1 } end @@ -106,7 +121,7 @@ <%+header%> - +