Skip to content

Commit

Permalink
fix: Fixed wrong IPv6 status for modem interfaces [backport release-5…
Browse files Browse the repository at this point in the history
….5.0] (#5299)

fix: Fixed wrong IPv6 status for modem interfaces (#5296)

Signed-off-by: MMaiero <[email protected]>
(cherry picked from commit 2b15c00)

Co-authored-by: Matteo Maiero <[email protected]>
  • Loading branch information
github-actions[bot] and MMaiero authored Jun 29, 2024
1 parent 781591d commit 23e22f7
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
*
* SPDX-License-Identifier: EPL-2.0
*
*
* Contributors:
* Eurotech
* Areti
Expand Down Expand Up @@ -180,7 +180,7 @@ public TabIp6Ui(GwtSession currentSession, NetworkTabsUi netTabs) {
initListBoxes();
initTextBoxes();
}

public String getStatus() {
return this.status.getSelectedItemText();
}
Expand Down Expand Up @@ -594,6 +594,17 @@ public boolean isDirty() {
public void setNetInterface(GwtNetInterfaceConfig config) {
setDirty(true);
this.selectedNetIfConfig = Optional.of(config);
updateStatusValues();
}

private void updateStatusValues() {
this.status.clear();
this.status.addItem(MessageUtils.get(STATUS_DISABLED), STATUS_DISABLED);
if (this.selectedNetIfConfig.isPresent()
&& this.selectedNetIfConfig.get().getHwTypeEnum() != GwtNetIfType.MODEM) {
this.status.addItem(MessageUtils.get(STATUS_LAN), STATUS_LAN);
}
this.status.addItem(MessageUtils.get(STATUS_WAN), STATUS_WAN);
}

@Override
Expand Down

0 comments on commit 23e22f7

Please sign in to comment.