Call的方式:
在/usr/lib/lua/luci/controller/admin/new_tab.lua 文件中添加如下红色部分的内容:
-- Copyright 2008 fulinux <[email protected]>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
module("luci.controller.admin.new_tab", package.seeall) --notice that new_tab is the name of the file new_tab.lua
function index()
entry({"admin", "new_tab"}, firstchild(), "New tab", 30).dependent=false --this adds the top level tab and defaults to the
entry({"admin", "new_tab", "tab_from_cbi"}, cbi("admin_myapp/cbi_tab"), "CBI Tab", 1) --this adds the first sub-tab that is
entry({"admin", "new_tab", "tab_from_view"}, tem