Skip to content

Commit

Permalink
use eth
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Jun 10, 2023
1 parent 5a91018 commit 60aa294
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
-- SPDX-FileCopyrightText: 2023, Leonardo Mörlein <[email protected]>

local uci = require("simple-uci").cursor()
local platform = require 'gluon.platform'
local ethernet = require 'gluon.ethernet'

local wan = uci:get_all("network", "wan")
Expand Down Expand Up @@ -147,7 +146,7 @@ s_vlan:element('model/warning', {
'using legacy OpenWRT Switch Config (swconfig). ' ..
'This device needs to be ported to DSA for this feature to work.'
),
hide = not platform.is_swconfig(),
hide = not ethernet.get_switch_type() == 'swconfig',
}, 'dsa_warning')

local action = s_vlan:option(ListValue, "action", translate("Action"))
Expand Down Expand Up @@ -200,7 +199,7 @@ end

-- Show options

if not platform.is_swconfig() then
if not ethernet.get_switch_type() ~= 'swconfig' then
action:value("create_vlan_interface", translate("Create VLAN interface config"))
action:value("delete_vlan_interface", translate("Delete VLAN interface config"))
end
Expand Down

0 comments on commit 60aa294

Please sign in to comment.