-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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") | ||
|
@@ -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 | ||
|