From 55cc2738e9c4ea26a8391824dfabfc91dc7b18b0 Mon Sep 17 00:00:00 2001
From: yvesn <yvesn>
Date: Thu, 30 Nov 2017 12:44:21 +0000
Subject: [PATCH] SSDM-5891: showing shell command to connect to the
 server/folder containing the data in content copy info; made content copy
 info more readable

SVN: 38994
---
 .../basic/dto/FileSystemContentCopy.java      | 20 +++++++++----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/FileSystemContentCopy.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/FileSystemContentCopy.java
index 490f7d5a528..cbd1bec1556 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/FileSystemContentCopy.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/FileSystemContentCopy.java
@@ -36,27 +36,25 @@ public class FileSystemContentCopy implements IContentCopy
     @Override
     public String getLocation()
     {
-        String labelString;
-        if (label == null || label.length() == 0)
-        {
-            labelString = code;
-        } else
-        {
-            labelString = code + " (" + label + ")";
-        }
 
-        String location = "External DMS: " + labelString + "</br>Host: " + host + "<br/>Directory: " + directory + path;
+        String location = repr("External DMS", code) + repr("Host", host) + repr("Directory", path);
+        location += repr("Connect cmd", "ssh -t " + host + " \"cd " + path + "; bash\"");        	
+
         if (hash != null)
         {
-            location += "<br>Commit hash: " + hash;
+            location += repr("Commit hash", hash);
         }
         if (repositoryId != null)
         {
-            location += "<br>Repository id: " + repositoryId;
+            location += repr("Repository id", repositoryId);
         }
         return location;
     }
 
+    private String repr(String label, String value) {
+    	return "<p><b>" + label + ":</b> " + value + "</p>";
+    }
+
     @Override
     public String getExternalDMSCode()
     {
-- 
GitLab