From cb2f53285d54f7621d9459abecb29bc02fc56726 Mon Sep 17 00:00:00 2001 From: crschnick Date: Tue, 4 Mar 2025 15:36:00 +0000 Subject: [PATCH] Fixes --- .../ext/base/action/ScanStoreAction.java | 21 +++++++++++++ .../base/service/ServiceRefreshAction.java | 31 +++++++++++++++++++ lang/strings/translations_en.properties | 17 +++++----- 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/ext/base/src/main/java/io/xpipe/ext/base/action/ScanStoreAction.java b/ext/base/src/main/java/io/xpipe/ext/base/action/ScanStoreAction.java index d9eeec600..164453813 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/action/ScanStoreAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/action/ScanStoreAction.java @@ -61,6 +61,27 @@ public class ScanStoreAction implements ActionProvider { }; } + @Override + public BatchDataStoreCallSite getBatchDataStoreCallSite() { + return new BatchDataStoreCallSite() { + + @Override + public ObservableValue getName() { + return AppI18n.observable("scanConnections"); + } + + @Override + public String getIcon() { + return "mdi2l-layers-plus"; + } + + @Override + public Class getApplicableClass() { + return ShellStore.class; + } + }; + } + @Value static class Action implements ActionProvider.Action { diff --git a/ext/base/src/main/java/io/xpipe/ext/base/service/ServiceRefreshAction.java b/ext/base/src/main/java/io/xpipe/ext/base/service/ServiceRefreshAction.java index b3abd527c..6c03be288 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/service/ServiceRefreshAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/service/ServiceRefreshAction.java @@ -47,6 +47,37 @@ public class ServiceRefreshAction implements ActionProvider { }; } + @Override + public BatchDataStoreCallSite getBatchDataStoreCallSite() { + return new BatchDataStoreCallSite() { + + @Override + public boolean isApplicable(DataStoreEntryRef o) { + return o.getStore().allowManualServicesRefresh(); + } + + @Override + public ObservableValue getName() { + return AppI18n.observable("refreshServices"); + } + + @Override + public String getIcon() { + return "mdi2w-web"; + } + + @Override + public Class getApplicableClass() { + return FixedServiceCreatorStore.class; + } + + @Override + public ActionProvider.Action createAction(DataStoreEntryRef store) { + return new Action(store); + } + }; + } + @Value static class Action implements ActionProvider.Action { diff --git a/lang/strings/translations_en.properties b/lang/strings/translations_en.properties index 6ab847c05..10ebc4342 100644 --- a/lang/strings/translations_en.properties +++ b/lang/strings/translations_en.properties @@ -858,9 +858,11 @@ sshConfig=SSH config files autostart=Automatically connect on XPipe startup acceptHostKey=Accept host key modifyHostKeyPermissions=Modify host key permissions -attachContainer=Attach to container +#force +attachContainer=Attach openInVsCode=Open in VSCode -containerLogs=Show container logs +#force +containerLogs=Show logs openSftpClient=Open in external SFTP client openTermius=Open in Termius showInternalInstances=Show internal instances @@ -945,10 +947,10 @@ k8sCmd.displayName=kubectl client k8sCmd.displayDescription=Access Kubernetes clusters via kubectl k8sClusters=Kubernetes clusters shells=Available shells -startContainer=Start container -stopContainer=Stop container -inspectContainer=Inspect container -inspectContext=Inspect context +#force +inspectContainer=Inspect +#force +inspectContext=Inspect k8sClusterNameDescription=The name of the context the cluster is in. #context: kubernetes pod=Pod @@ -960,7 +962,8 @@ k8sClusterNamespaceDescription=The custom namespace or the default one if empty k8sConfigLocation=Config file k8sConfigLocationDescription=The custom kubeconfig file or the default one if left empty #context: kubernetes -inspectPod=Inspect pod +#force +inspectPod=Inspect showAllContainers=Show non-running containers showAllPods=Show non-running pods k8sPodHostDescription=The host on which the pod is located