mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 15:10:23 +00:00
Various fixes
This commit is contained in:
parent
6c21529789
commit
030faaa601
21 changed files with 33 additions and 32 deletions
|
@ -194,11 +194,9 @@ public final class BrowserFileListComp extends SimpleComp {
|
|||
? unix.getGroup()
|
||||
: m.getCache().getGroups().get(unix.getGid());
|
||||
var uid = String.valueOf(
|
||||
unix.getUid() != null ? unix.getUid() : m.getCache().getUidForUser(user))
|
||||
.replaceAll("000$", "k");
|
||||
unix.getUid() != null ? unix.getUid() : m.getCache().getUidForUser(user));
|
||||
var gid = String.valueOf(
|
||||
unix.getGid() != null ? unix.getGid() : m.getCache().getGidForGroup(group))
|
||||
.replaceAll("000$", "k");
|
||||
unix.getGid() != null ? unix.getGid() : m.getCache().getGidForGroup(group));
|
||||
if (uid.equals(gid)) {
|
||||
return user + " [" + uid + "]";
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BrowserAbstractSessionModel<T extends BrowserSessionTab<?>> {
|
|||
}
|
||||
}
|
||||
|
||||
void closeSync(BrowserSessionTab<?> e) {
|
||||
public void closeSync(BrowserSessionTab<?> e) {
|
||||
e.close();
|
||||
synchronized (BrowserAbstractSessionModel.this) {
|
||||
this.sessionEntries.remove(e);
|
||||
|
|
|
@ -35,10 +35,8 @@ public class StoreCreationMenu {
|
|||
menu.getItems()
|
||||
.add(category("addScript", "mdi2s-script-text-outline", DataStoreCreationCategory.SCRIPT, "script"));
|
||||
|
||||
menu.getItems().add(category("addService", "mdi2c-cloud-braces", DataStoreCreationCategory.SERVICE, null));
|
||||
|
||||
menu.getItems()
|
||||
.add(category("addTunnel", "mdi2v-vector-polyline-plus", DataStoreCreationCategory.TUNNEL, null));
|
||||
.add(category("addTunnel", "mdi2v-vector-polyline-plus", DataStoreCreationCategory.TUNNEL, "customService"));
|
||||
|
||||
menu.getItems().add(category("addCommand", "mdi2c-code-greater-than", DataStoreCreationCategory.COMMAND, null));
|
||||
|
||||
|
@ -82,8 +80,10 @@ public class StoreCreationMenu {
|
|||
category);
|
||||
event.consume();
|
||||
});
|
||||
// Ugly sorting
|
||||
var providers = sub.stream()
|
||||
.sorted((o1, o2) -> -o1.getModuleName().compareTo(o2.getModuleName()))
|
||||
.sorted((o1, o2) -> category == DataStoreCreationCategory.DESKTOP ?
|
||||
-o1.getModuleName().compareTo(o2.getModuleName()) : o1.getModuleName().compareTo(o2.getModuleName()))
|
||||
.toList();
|
||||
for (int i = 0; i < providers.size(); i++) {
|
||||
var dataStoreProvider = providers.get(i);
|
||||
|
|
|
@ -4,7 +4,6 @@ public enum DataStoreCreationCategory {
|
|||
HOST,
|
||||
DATABASE,
|
||||
SHELL,
|
||||
SERVICE,
|
||||
COMMAND,
|
||||
TUNNEL,
|
||||
SCRIPT,
|
||||
|
|
|
@ -520,7 +520,7 @@ public class DataStoreEntry extends StorageElement {
|
|||
try {
|
||||
incrementBusyCounter();
|
||||
notifyUpdate(false, false);
|
||||
lifecycleStore.initializeValidate();
|
||||
lifecycleStore.initializeStore();
|
||||
} catch (Exception e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
} finally {
|
||||
|
@ -536,7 +536,7 @@ public class DataStoreEntry extends StorageElement {
|
|||
try {
|
||||
incrementBusyCounter();
|
||||
notifyUpdate(false, false);
|
||||
lifecycleStore.finalizeValidate();
|
||||
lifecycleStore.finalizeStore();
|
||||
} catch (Exception e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
} finally {
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.xpipe.core.process;
|
|||
|
||||
import io.xpipe.core.store.FileNames;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -96,14 +97,18 @@ public interface OsType {
|
|||
@Override
|
||||
public List<String> determineInterestingPaths(ShellControl pc) throws Exception {
|
||||
var home = getUserHomeDirectory(pc);
|
||||
return List.of(
|
||||
var list = new ArrayList<>(List.of(
|
||||
home,
|
||||
FileNames.getParent(home),
|
||||
FileNames.join(home, "Downloads"),
|
||||
FileNames.join(home, "Documents"),
|
||||
"/etc",
|
||||
"/tmp",
|
||||
"/var");
|
||||
"/var"));
|
||||
var parentHome = FileNames.getParent(home);
|
||||
if (parentHome != null && !parentHome.equals("/")) {
|
||||
list.add(3, parentHome);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,7 +2,7 @@ package io.xpipe.core.store;
|
|||
|
||||
public interface ExpandedLifecycleStore extends DataStore {
|
||||
|
||||
default void initializeValidate() {}
|
||||
default void initializeStore() {}
|
||||
|
||||
default void finalizeValidate() throws Exception {}
|
||||
default void finalizeStore() throws Exception {}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ public interface SingletonSessionStore<T extends Session>
|
|||
extends ExpandedLifecycleStore, InternalCacheDataStore, SessionListener {
|
||||
|
||||
@Override
|
||||
default void finalizeValidate() throws Exception {
|
||||
default void finalizeStore() throws Exception {
|
||||
stopSessionIfNeeded();
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import io.xpipe.app.storage.DataStoreEntry;
|
|||
import io.xpipe.app.util.OptionsBuilder;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
import io.xpipe.core.store.NetworkTunnelStore;
|
||||
|
||||
import javafx.beans.property.Property;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
|
||||
|
@ -18,7 +17,7 @@ public class CustomServiceStoreProvider extends AbstractServiceStoreProvider {
|
|||
|
||||
@Override
|
||||
public DataStoreCreationCategory getCreationCategory() {
|
||||
return DataStoreCreationCategory.SERVICE;
|
||||
return DataStoreCreationCategory.TUNNEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -164,7 +164,7 @@ fixedServiceGroup.displayDescription=Liste over tilgængelige tjenester på et s
|
|||
mappedService.displayName=Service
|
||||
mappedService.displayDescription=Interagere med en tjeneste, der er eksponeret af en container
|
||||
customService.displayName=Service
|
||||
customService.displayDescription=Tilføj en ekstern serviceport til tunnel til din lokale maskine
|
||||
customService.displayDescription=Tunneler automatisk en ekstern serviceport til din lokale maskine
|
||||
fixedService.displayName=Service
|
||||
fixedService.displayDescription=Brug en foruddefineret tjeneste
|
||||
noServices=Ingen tilgængelige tjenester
|
||||
|
|
|
@ -155,7 +155,7 @@ fixedServiceGroup.displayDescription=Liste der verfügbaren Dienste auf einem Sy
|
|||
mappedService.displayName=Dienst
|
||||
mappedService.displayDescription=Interaktion mit einem Dienst, der von einem Container angeboten wird
|
||||
customService.displayName=Dienst
|
||||
customService.displayDescription=Füge einen Remote Service Port hinzu, um einen Tunnel zu deinem lokalen Rechner zu erstellen
|
||||
customService.displayDescription=Automatisches Tunneln eines entfernten Service-Ports zu deinem lokalen Rechner
|
||||
fixedService.displayName=Dienst
|
||||
fixedService.displayDescription=Einen vordefinierten Dienst verwenden
|
||||
noServices=Keine verfügbaren Dienste
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=List the available services on a system
|
|||
mappedService.displayName=Service
|
||||
mappedService.displayDescription=Interact with a service exposed by a container
|
||||
customService.displayName=Service
|
||||
customService.displayDescription=Add a remote service port to tunnel to your local machine
|
||||
customService.displayDescription=Automatically tunnel a remote service port to your local machine
|
||||
fixedService.displayName=Service
|
||||
fixedService.displayDescription=Use a predefined service
|
||||
noServices=No available services
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=Enumerar los servicios disponibles en un si
|
|||
mappedService.displayName=Servicio
|
||||
mappedService.displayDescription=Interactúa con un servicio expuesto por un contenedor
|
||||
customService.displayName=Servicio
|
||||
customService.displayDescription=Añade un puerto de servicio remoto para hacer un túnel a tu máquina local
|
||||
customService.displayDescription=Tuneliza automáticamente un puerto de servicio remoto a tu máquina local
|
||||
fixedService.displayName=Servicio
|
||||
fixedService.displayDescription=Utilizar un servicio predefinido
|
||||
noServices=No hay servicios disponibles
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=Liste les services disponibles sur un syst
|
|||
mappedService.displayName=Service
|
||||
mappedService.displayDescription=Interagir avec un service exposé par un conteneur
|
||||
customService.displayName=Service
|
||||
customService.displayDescription=Ajoute un port de service à distance pour établir un tunnel vers ta machine locale
|
||||
customService.displayDescription=Tunnelise automatiquement un port de service distant vers ta machine locale
|
||||
fixedService.displayName=Service
|
||||
fixedService.displayDescription=Utiliser un service prédéfini
|
||||
noServices=Aucun service disponible
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=Elenco dei servizi disponibili su un sistem
|
|||
mappedService.displayName=Servizio
|
||||
mappedService.displayDescription=Interagire con un servizio esposto da un contenitore
|
||||
customService.displayName=Servizio
|
||||
customService.displayDescription=Aggiungi una porta di servizio remoto per creare un tunnel verso la tua macchina locale
|
||||
customService.displayDescription=Esegui automaticamente il tunnel di una porta di servizio remota verso la tua macchina locale
|
||||
fixedService.displayName=Servizio
|
||||
fixedService.displayDescription=Utilizzare un servizio predefinito
|
||||
noServices=Nessun servizio disponibile
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=システムで利用可能なサービス
|
|||
mappedService.displayName=サービス
|
||||
mappedService.displayDescription=コンテナによって公開されたサービスとやりとりする
|
||||
customService.displayName=サービス
|
||||
customService.displayDescription=リモートサービスのポートを追加してローカルマシンにトンネリングする
|
||||
customService.displayDescription=リモートサービスのポートをローカルマシンに自動的にトンネリングする
|
||||
fixedService.displayName=サービス
|
||||
fixedService.displayDescription=定義済みのサービスを使う
|
||||
noServices=利用可能なサービスはない
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=Een lijst van beschikbare services op een s
|
|||
mappedService.displayName=Service
|
||||
mappedService.displayDescription=Interactie met een service die wordt aangeboden door een container
|
||||
customService.displayName=Service
|
||||
customService.displayDescription=Een servicepoort op afstand toevoegen om te tunnelen naar je lokale machine
|
||||
customService.displayDescription=Automatisch een servicepoort op afstand tunnelen naar je lokale machine
|
||||
fixedService.displayName=Service
|
||||
fixedService.displayDescription=Een vooraf gedefinieerde service gebruiken
|
||||
noServices=Geen beschikbare diensten
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=Lista os serviços disponíveis num sistema
|
|||
mappedService.displayName=Serviço
|
||||
mappedService.displayDescription=Interage com um serviço exposto por um contentor
|
||||
customService.displayName=Serviço
|
||||
customService.displayDescription=Adiciona uma porta de serviço remoto para criar um túnel para a tua máquina local
|
||||
customService.displayDescription=Faz o tunelamento automático de uma porta de serviço remoto para a tua máquina local
|
||||
fixedService.displayName=Serviço
|
||||
fixedService.displayDescription=Utiliza um serviço predefinido
|
||||
noServices=Não há serviços disponíveis
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=Список доступных серви
|
|||
mappedService.displayName=Сервис
|
||||
mappedService.displayDescription=Взаимодействие с сервисом, открываемым контейнером
|
||||
customService.displayName=Сервис
|
||||
customService.displayDescription=Добавьте порт удаленного сервиса для туннелирования к вашей локальной машине
|
||||
customService.displayDescription=Автоматическое туннелирование порта удаленного сервиса на твою локальную машину
|
||||
fixedService.displayName=Сервис
|
||||
fixedService.displayDescription=Использовать предопределенный сервис
|
||||
noServices=Нет доступных сервисов
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=Bir sistemdeki mevcut hizmetleri listeleme
|
|||
mappedService.displayName=Hizmet
|
||||
mappedService.displayDescription=Bir konteyner tarafından sunulan bir hizmetle etkileşim
|
||||
customService.displayName=Hizmet
|
||||
customService.displayDescription=Yerel makinenize tünel açmak için bir uzak hizmet bağlantı noktası ekleyin
|
||||
customService.displayDescription=Uzaktaki bir hizmet portunu otomatik olarak yerel makinenize tünelleme
|
||||
fixedService.displayName=Hizmet
|
||||
fixedService.displayDescription=Önceden tanımlanmış bir hizmet kullanın
|
||||
noServices=Mevcut hizmet yok
|
||||
|
|
|
@ -153,7 +153,7 @@ fixedServiceGroup.displayDescription=列出系统中可用的服务
|
|||
mappedService.displayName=服务
|
||||
mappedService.displayDescription=与容器暴露的服务交互
|
||||
customService.displayName=服务
|
||||
customService.displayDescription=添加远程服务端口,以隧道方式连接本地计算机
|
||||
customService.displayDescription=自动将远程服务端口传输到本地计算机
|
||||
fixedService.displayName=服务
|
||||
fixedService.displayDescription=使用预定义服务
|
||||
noServices=无可用服务
|
||||
|
|
Loading…
Reference in a new issue