From b59ba76a51af23fc6b5b75a653f91cb5a1fcad9d Mon Sep 17 00:00:00 2001 From: MMaiero Date: Tue, 26 Sep 2023 15:30:32 +0200 Subject: [PATCH 1/4] fix: Cellular tab activation fix Signed-off-by: MMaiero --- .../eclipse/kura/web/client/ui/network/NetworkTabsUi.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java index 279e803a9dc..0342f6bb352 100644 --- a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java +++ b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java @@ -321,7 +321,7 @@ private void arrangeOptionalTabs() { } else if (wrapper.isModem()) { includeDhcpNat = false; this.modemGpsTabAnchorItem.setEnabled(wrapper.isGpsSupported() && !isUnmanagedSelected()); - showModemTabs(); + showModemTabs(isIpv4Disabled); } else { showEthernetTabs(); if (wrapper.isLoopback()) { @@ -354,11 +354,11 @@ private void showWirelessTabs() { insertTab(this.dhcp4NatTabAnchorItem); } - private void showModemTabs() { + private void showModemTabs(boolean isIpv4Disabled) { removeTab(this.wirelessTabAnchorItem); removeTab(this.dhcp4NatTabAnchorItem); - this.modemTabAnchorItem.setEnabled(true); + this.modemTabAnchorItem.setEnabled(!isIpv4Disabled); this.modemAntennaTabAnchorItem.setEnabled(isModemLTE()); insertTab(this.modemTabAnchorItem); From dbb57fb10887a39fe56772726de93d674b260abd Mon Sep 17 00:00:00 2001 From: MMaiero Date: Tue, 26 Sep 2023 17:44:43 +0200 Subject: [PATCH 2/4] fix: wrong management of modem gps and diversity Signed-off-by: MMaiero --- .../eclipse/kura/web/client/ui/network/NetworkTabsUi.java | 2 -- .../eclipse/kura/web/client/ui/network/TabWirelessUi.java | 5 ----- 2 files changed, 7 deletions(-) diff --git a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java index 0342f6bb352..ccf3124750e 100644 --- a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java +++ b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java @@ -389,8 +389,6 @@ private void removeOptionalTabs() { this.visibleTabs.remove(this.net8021xTabAnchorItem); this.visibleTabs.remove(this.dhcp4NatTabAnchorItem); this.visibleTabs.remove(this.modemTabAnchorItem); - this.visibleTabs.remove(this.modemGpsTabAnchorItem); - this.visibleTabs.remove(this.modemAntennaTabAnchorItem); } private void refreshAllVisibleTabs() { diff --git a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java index cb74bacba13..453a1b950bb 100644 --- a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java +++ b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java @@ -434,15 +434,12 @@ public boolean isValid() { @Override public void setNetInterface(GwtNetInterfaceConfig config) { - logger.info("Start setNetInterface"); - setDirty(true); if (this.tcpStatus == null || this.selectedNetIfConfig != config) { this.tcpStatus = this.tcpTab.getStatus(); } if (config instanceof GwtWifiNetInterfaceConfig) { this.selectedNetIfConfig = (GwtWifiNetInterfaceConfig) config; - logger.info("Selected ifconfig: " + selectedNetIfConfig.getProperties()); this.activeConfig = this.selectedNetIfConfig.getActiveWifiConfig(); if (Objects.nonNull(this.activeConfig)) { @@ -456,8 +453,6 @@ public void setNetInterface(GwtNetInterfaceConfig config) { } loadCountryCode(); } - - logger.info("Finished setNetInterface"); } private void updateChanneList(GwtWifiConfig config) { From 16dbe7f3ac1b561f4f62e8d71de88f7cbe753487 Mon Sep 17 00:00:00 2001 From: MMaiero Date: Wed, 27 Sep 2023 16:43:26 +0200 Subject: [PATCH 3/4] fix: applied same fixes also to the wi-fi section Signed-off-by: MMaiero --- .../eclipse/kura/web/client/ui/network/NetworkTabsUi.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java index ccf3124750e..127fc928ef3 100644 --- a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java +++ b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java @@ -314,7 +314,7 @@ private void arrangeOptionalTabs() { InterfaceConfigWrapper wrapper = new InterfaceConfigWrapper(this.netIfConfig); if (wrapper.isWireless()) { - showWirelessTabs(); + showWirelessTabs(isIpv4Disabled); if (!isWirelessAP) { includeDhcpNat = false; } @@ -339,12 +339,12 @@ private void arrangeOptionalTabs() { } } - private void showWirelessTabs() { + private void showWirelessTabs(boolean isIpv4Disabled) { removeTab(this.modemTabAnchorItem); removeTab(this.modemGpsTabAnchorItem); removeTab(this.modemAntennaTabAnchorItem); - this.wirelessTabAnchorItem.setEnabled(true); + this.wirelessTabAnchorItem.setEnabled(!isIpv4Disabled); insertTab(this.wirelessTabAnchorItem); if (this.isNet2) { From 1dc15a3ae9e5a5264641a14a6b6cd14f91cab60c Mon Sep 17 00:00:00 2001 From: MMaiero Date: Sat, 30 Sep 2023 16:15:01 +0200 Subject: [PATCH 4/4] fix: not managed state Signed-off-by: MMaiero --- .../kura/web/client/ui/network/NetworkTabsUi.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java index 127fc928ef3..ece754a28c1 100644 --- a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java +++ b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/NetworkTabsUi.java @@ -314,14 +314,14 @@ private void arrangeOptionalTabs() { InterfaceConfigWrapper wrapper = new InterfaceConfigWrapper(this.netIfConfig); if (wrapper.isWireless()) { - showWirelessTabs(isIpv4Disabled); + showWirelessTabs(isIpv4Disabled || isUnmanagedSelected()); if (!isWirelessAP) { includeDhcpNat = false; } } else if (wrapper.isModem()) { includeDhcpNat = false; this.modemGpsTabAnchorItem.setEnabled(wrapper.isGpsSupported() && !isUnmanagedSelected()); - showModemTabs(isIpv4Disabled); + showModemTabs(isIpv4Disabled || isUnmanagedSelected()); } else { showEthernetTabs(); if (wrapper.isLoopback()) { @@ -339,12 +339,12 @@ private void arrangeOptionalTabs() { } } - private void showWirelessTabs(boolean isIpv4Disabled) { + private void showWirelessTabs(boolean interfaceNotEnabled) { removeTab(this.modemTabAnchorItem); removeTab(this.modemGpsTabAnchorItem); removeTab(this.modemAntennaTabAnchorItem); - this.wirelessTabAnchorItem.setEnabled(!isIpv4Disabled); + this.wirelessTabAnchorItem.setEnabled(!interfaceNotEnabled); insertTab(this.wirelessTabAnchorItem); if (this.isNet2) { @@ -354,11 +354,11 @@ private void showWirelessTabs(boolean isIpv4Disabled) { insertTab(this.dhcp4NatTabAnchorItem); } - private void showModemTabs(boolean isIpv4Disabled) { + private void showModemTabs(boolean interfaceNotEnabled) { removeTab(this.wirelessTabAnchorItem); removeTab(this.dhcp4NatTabAnchorItem); - this.modemTabAnchorItem.setEnabled(!isIpv4Disabled); + this.modemTabAnchorItem.setEnabled(!interfaceNotEnabled); this.modemAntennaTabAnchorItem.setEnabled(isModemLTE()); insertTab(this.modemTabAnchorItem);