Rename display name

This commit is contained in:
crschnick 2024-07-24 11:04:21 +00:00
parent d8d62c0eff
commit 2ca2eefb29
5 changed files with 5 additions and 5 deletions

View file

@ -71,7 +71,7 @@ public interface DataStoreProvider {
return null; return null;
} }
default String browserDisplayName(DataStoreEntry entry) { default String displayName(DataStoreEntry entry) {
return entry.getName(); return entry.getName();
} }

View file

@ -879,7 +879,7 @@ public abstract class DataStorage {
return "?"; return "?";
} }
return entry.getProvider().browserDisplayName(entry); return entry.getProvider().displayName(entry);
} }
public Optional<DataStoreEntry> getStoreEntryIfPresent(UUID id) { public Optional<DataStoreEntry> getStoreEntryIfPresent(UUID id) {

View file

@ -87,7 +87,7 @@ public abstract class ScriptStore extends JacksonizedValue implements DataStore,
} }
return pc; return pc;
} catch (StackOverflowError t) { } catch (StackOverflowError t) {
throw new RuntimeException("Unable to set up scripts. Is there a circular script dependency?", t); throw ErrorEvent.expected(new RuntimeException("Unable to set up scripts. Is there a circular script dependency?", t));
} catch (Throwable t) { } catch (Throwable t) {
throw new RuntimeException("Unable to set up scripts", t); throw new RuntimeException("Unable to set up scripts", t);
} }

View file

@ -23,7 +23,7 @@ import java.util.List;
public abstract class AbstractServiceStoreProvider implements SingletonSessionStoreProvider, DataStoreProvider { public abstract class AbstractServiceStoreProvider implements SingletonSessionStoreProvider, DataStoreProvider {
public String browserDisplayName(DataStoreEntry entry) { public String displayName(DataStoreEntry entry) {
AbstractServiceStore s = entry.getStore().asNeeded(); AbstractServiceStore s = entry.getStore().asNeeded();
return DataStorage.get().getStoreEntryDisplayName(s.getHost().get()) + " - Port " + s.getRemotePort(); return DataStorage.get().getStoreEntryDisplayName(s.getHost().get()) + " - Port " + s.getRemotePort();
} }

View file

@ -10,7 +10,7 @@ import java.util.List;
public class MappedServiceStoreProvider extends FixedServiceStoreProvider { public class MappedServiceStoreProvider extends FixedServiceStoreProvider {
public String browserDisplayName(DataStoreEntry entry) { public String displayName(DataStoreEntry entry) {
MappedServiceStore s = entry.getStore().asNeeded(); MappedServiceStore s = entry.getStore().asNeeded();
return DataStorage.get().getStoreEntryDisplayName(s.getHost().get()) + " - Port " + s.getContainerPort(); return DataStorage.get().getStoreEntryDisplayName(s.getHost().get()) + " - Port " + s.getContainerPort();
} }