Commit 6c7a449a87bc1ccc4baae1a1028a163cbd4a9516

Authored by Paul Brodner
1 parent dc5ab8f614
Exists in master

show tenants

src/main/java/org/alfresco/tasenvironment/models/Environment.java
... ... @@ -12,9 +12,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
12 12 @Document(collection = "environments")
13 13 public class Environment
14 14 {
15   -
16   -
17   -
  15 +
18 16 @Id
19 17 private String id;
20 18  
... ... @@ -88,8 +86,8 @@ public class Environment
88 86  
89 87 public String getStatus()
90 88 {
91   - ServerHealth serverHealth = new ServerHealth();
92   -
  89 + ServerHealth serverHealth = new ServerHealth();
  90 +
93 91 boolean isOnline = false;
94 92 try
95 93 {
... ... @@ -119,19 +117,16 @@ public class Environment
119 117 public String getTenant()
120 118 {
121 119 TenantConsole tenantConsole = new TenantConsole();
122   -// try
123   -// {
124   -// if (tenantConsole.tenantExist("http", getIp(), Integer.valueOf(getPort()), "admin", "admin"))
125   -// return "<span class=\"label label-danger\"> Yes</span>";
126   -// else
127   -// return "<span class=\"label label-success\">No</span>";
128   -// }
129   -// catch (Exception e)
130   -// {
131   -// return "<span class=\"label label-success\">No</span>";
132   -// }
133   -
134   - return "";
135   -
  120 + try
  121 + {
  122 + if (tenantConsole.tenantExist("http", getIp(), Integer.valueOf(getPort()), "admin", "admin"))
  123 + return "<span class=\"label label-danger\"> Yes</span>";
  124 + else
  125 + return "<span class=\"label label-success\">No</span>";
  126 + }
  127 + catch (Exception e)
  128 + {
  129 + return "<span class=\"label label-success\">No</span>";
  130 + }
136 131 }
137 132 }
138 133 \ No newline at end of file
... ...