Rework network ports

This commit is contained in:
crschnick
2026-09-14 15:45:16 +00:00
parent e4108a8206
commit fc3cba399d
6 changed files with 11 additions and 11 deletions
@@ -93,7 +93,7 @@ public class StoreSectionConfig {
&& (selector.excludeNonShown() || !matchesSelector)) {
var showProvider = true;
try {
showProvider = section.getEntry().getProvider().shouldShow(section.getWrapper());
showProvider = section.getEntry().getProvider().shouldShow(section);
} catch (Exception ignored) {
}
if (!showProvider) {
@@ -97,7 +97,7 @@ public interface DataStoreProvider {
return true;
}
default boolean shouldShow(StoreEntryWrapper w) {
default boolean shouldShow(StoreSection section) {
return true;
}
@@ -22,7 +22,7 @@ public interface ShellStore extends DataStore, FileSystemStore, ValidatableStore
stopSessionIfNeeded();
} else {
existingSession.getShellControl().waitForSubShellExit();
return new StubShellControl(existingSession.getShellControl());
return existingSession.getShellControl();
}
}
@@ -32,13 +32,13 @@ public interface ShellStore extends DataStore, FileSystemStore, ValidatableStore
// Then, the cache returns null
// getSession()
return new StubShellControl(session.getShellControl());
return session.getShellControl();
}
@Override
default ShellSession newSession() {
var func = shellFunction();
var session = new ShellSession(() -> func.control());
var session = new ShellSession(() -> new StubShellControl(func.control()));
session.addListener(this);
return session;
}
@@ -37,8 +37,8 @@ public class IncusContainerStoreProvider implements ShellStoreProvider {
}
@Override
public boolean shouldShow(StoreEntryWrapper w) {
IncusContainerStore s = w.getEntry().getStore().asNeeded();
public boolean shouldShow(StoreSection section) {
IncusContainerStore s = section.getEntry().getStore().asNeeded();
var state = s.getState();
return Boolean.TRUE.equals(state.getRunning())
|| s.getInstall().getStore().getState().isShowNonRunning();
@@ -37,8 +37,8 @@ public class LxdContainerStoreProvider implements ShellStoreProvider {
}
@Override
public boolean shouldShow(StoreEntryWrapper w) {
LxdContainerStore s = w.getEntry().getStore().asNeeded();
public boolean shouldShow(StoreSection section) {
LxdContainerStore s = section.getEntry().getStore().asNeeded();
var state = s.getState();
return Boolean.TRUE.equals(state.getRunning())
|| s.getCmd().getStore().getState().isShowNonRunning();
@@ -29,8 +29,8 @@ public class PodmanContainerStoreProvider implements ShellStoreProvider {
}
@Override
public boolean shouldShow(StoreEntryWrapper w) {
PodmanContainerStore s = w.getEntry().getStore().asNeeded();
public boolean shouldShow(StoreSection section) {
PodmanContainerStore s = section.getEntry().getStore().asNeeded();
var state = s.getState();
return Boolean.TRUE.equals(state.getRunning())
|| s.getCmd() == null