diff --git a/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua b/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua index c4ef8392730..774ba4d341a 100644 --- a/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua +++ b/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua @@ -3,7 +3,6 @@ -- SPDX-FileCopyrightText: 2023, Leonardo Mörlein local uci = require("simple-uci").cursor() -local platform = require 'gluon.platform' local ethernet = require 'gluon.ethernet' local wan = uci:get_all("network", "wan") @@ -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")) @@ -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