Commit dc5ab8f6143ab583d03f76451cac0d77569aed44

Authored by Paul Brodner
1 parent 2e845c186a
Exists in master

fix bug on mongoExeception

src/main/java/org/alfresco/tasenvironment/models/Environment.java
... ... @@ -12,8 +12,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
12 12 @Document(collection = "environments")
13 13 public class Environment
14 14 {
15   - ServerHealth serverHealth = new ServerHealth();
16   - private TenantConsole tenantConsole = new TenantConsole();
  15 +
17 16  
18 17  
19 18 @Id
... ... @@ -89,6 +88,8 @@ public class Environment
89 88  
90 89 public String getStatus()
91 90 {
  91 + ServerHealth serverHealth = new ServerHealth();
  92 +
92 93 boolean isOnline = false;
93 94 try
94 95 {
... ... @@ -117,17 +118,20 @@ public class Environment
117 118  
118 119 public String getTenant()
119 120 {
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   - }
  121 + 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 "";
131 135  
132 136 }
133 137 }
134 138 \ No newline at end of file
... ...