You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2014/12/17 11:44:12 UTC

stratos git commit: Adding created date property to list-tenants cli command

Repository: stratos
Updated Branches:
  refs/heads/4.1.0-test aa5032702 -> ef1c73970


Adding created date property to list-tenants cli command


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/ef1c7397
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/ef1c7397
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/ef1c7397

Branch: refs/heads/4.1.0-test
Commit: ef1c73970008899e457587f33236e3f4f4b9ab55
Parents: aa50327
Author: Imesh Gunaratne <im...@apache.org>
Authored: Wed Dec 17 16:14:02 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Wed Dec 17 16:14:02 2014 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/cli/RestCommandLineService.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/ef1c7397/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 36b0128..d1d4d96 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -52,6 +52,7 @@ import javax.net.ssl.*;
 import java.lang.reflect.Type;
 import java.net.ConnectException;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 
@@ -578,7 +579,7 @@ public class RestCommandLineService {
                     data[1] = "" + tenantInfo.getTenantId();
                     data[2] = tenantInfo.getEmail();
                     data[3] = tenantInfo.isActive() ? "Active" : "De-active";
-                    //data[4] = tenantInfo.getCreatedDate();
+                    data[4] = new Date(tenantInfo.getCreatedDate()).toString();
                     return data;
                 }
             };
@@ -587,7 +588,7 @@ public class RestCommandLineService {
             tenantArray = tenantInfoList.toArray(tenantArray);
 
             System.out.println("Tenants:");
-            CliUtils.printTable(tenantArray, rowMapper, "Domain", "Tenant ID", "Email", "State");
+            CliUtils.printTable(tenantArray, rowMapper, "Domain", "Tenant ID", "Email", "State", "Created Date");
         } catch (Exception e) {
             String message = "Could not list tenants";
             printError(message, e);