From 0f0d45f6a041050eb53878ea8af7bbfe292cff23 Mon Sep 17 00:00:00 2001 From: Leonardo Lenoci Date: Fri, 28 Jun 2024 17:00:56 +0200 Subject: [PATCH] [39] Addresses suggestions re iRODS file system setup UX --- .../com/researchspace/netfiles/NfsFactory.java | 8 +++++++- .../resources/bundles/system/system.properties | 2 +- .../WEB-INF/pages/system/netfilesystem_ajax.jsp | 8 ++++---- .../scripts/pages/system/netfilesystem_mod.js | 14 ++++++++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/researchspace/netfiles/NfsFactory.java b/src/main/java/com/researchspace/netfiles/NfsFactory.java index 239684429..4bf521131 100644 --- a/src/main/java/com/researchspace/netfiles/NfsFactory.java +++ b/src/main/java/com/researchspace/netfiles/NfsFactory.java @@ -89,10 +89,16 @@ public NfsClient getNfsClient(String nfsusername, String nfspassword, NfsFileSys fileSystem.getClientOption(NfsFileSystemOption.SFTP_SERVER_PUBLIC_KEY)); } if (NfsClientType.IRODS.equals(clientType)) { + int irodsPort; + if (StringUtils.isEmpty(fileSystem.getClientOption(NfsFileSystemOption.IRODS_PORT))) { + irodsPort = 1247; + } else { + irodsPort = Integer.parseInt(fileSystem.getClientOption(NfsFileSystemOption.IRODS_PORT)); + } return new IRODSClient( new IRODSAccount( fileSystem.getUrl(), - Integer.parseInt(fileSystem.getClientOption(NfsFileSystemOption.IRODS_PORT)), + irodsPort, nfsusername, nfspassword, fileSystem.getClientOption(NfsFileSystemOption.IRODS_HOME_DIR), diff --git a/src/main/resources/bundles/system/system.properties b/src/main/resources/bundles/system/system.properties index 4cd8c632a..2cecccbf9 100644 --- a/src/main/resources/bundles/system/system.properties +++ b/src/main/resources/bundles/system/system.properties @@ -277,7 +277,7 @@ system.netfilesystem.details.client.sftp.server.public.key=SFTP server public ke system.netfilesystem.details.client.sftp.server.dir.choice=User subdirectory required system.netfilesystem.details.client.irods=iRODS system.netfilesystem.details.client.irods.zone=iRODS Zone -system.netfilesystem.details.client.irods.homedir=Home Directory +system.netfilesystem.details.client.irods.homedir=iRODS Search Path system.netfilesystem.details.client.irods.port= iRODS Port system.netfilesystem.details.auth=Authentication Type system.netfilesystem.details.auth.password=Username/Password diff --git a/src/main/webapp/WEB-INF/pages/system/netfilesystem_ajax.jsp b/src/main/webapp/WEB-INF/pages/system/netfilesystem_ajax.jsp index a6720bf80..86313a724 100644 --- a/src/main/webapp/WEB-INF/pages/system/netfilesystem_ajax.jsp +++ b/src/main/webapp/WEB-INF/pages/system/netfilesystem_ajax.jsp @@ -123,12 +123,12 @@ - + - +