openwrt页面显示问题修改

页面显示错误如下:

在不应该的位置显示了这个,查看配置文件:

config igmpproxy
        option quickleave '1'

config phyint 
        option network 'wan'
        option direction 'upstream'
        list altnet '10.10.10.10'

config phyint 
        option network 'net'
        option direction 'downstream'

以及代码部分:

s = m:section(TypedSection, "phyint", translate("upstream setting"))
s.addremove = false
s.anonymous = true

发现是由于代码部分识别时,使用了类型识别,而配置文件中存在2个相同类型。因此,更改代码和配置文件如下:

config igmpproxy
        option quickleave '1'

config phyint 'upstream'
        option network 'wan'
        option direction 'upstream'
        list altnet '10.10.10.10'

config phyint 'downstream'
        option network 'net'
        option direction 'downstream'

代码部分修改如下:

s = m:section(NamedSection, "upstream", phyint, translate("upstream setting"))
s.addremove = false
s.anonymous = true

修改后,界面显示正常,如下:

posted @ 2017-11-02 16:07  hbg-rohens  阅读(1543)  评论(0编辑  收藏  举报