Commit c90635d7b003f490da1a318eedb45ffab364a997

Authored by Paul Brodner
1 parent 4d55b7935d
Exists in master

info

src/main/java/org/alfresco/tasenvironment/controller/IndexController.java
... ... @@ -19,7 +19,7 @@ public class IndexController
19 19  
20 20 public ViewContainerHelper environments()
21 21 {
22   - ViewContainerHelper vt = new ViewContainerHelper("Environments", "environment/index.ftl");
  22 + ViewContainerHelper vt = new ViewContainerHelper("Test Environments", "environment/index.ftl");
23 23 Iterable<Environment> environments = environmentRepo.findAll();
24 24  
25 25 vt.addAttribute("environments", environments);
... ...
src/main/java/org/alfresco/tasenvironment/models/Environment.java
... ... @@ -138,7 +138,7 @@ public class Environment
138 138 HttpClient client = new HttpClient();
139 139 GetMethod get = new GetMethod("http://"+ getIp() + ":" + getPort() + "/alfresco/service/api/server");
140 140 String version = "Unknown";
141   - get.getParams().setSoTimeout(5000);
  141 + get.getParams().setSoTimeout(1000);
142 142 try
143 143 {
144 144 client.executeMethod(get);
... ...
src/main/resources/spark/template/freemarker/environment/index.ftl
1   -<a href="/environment/new" class="btn btn-warning" data-toggle="tooltip" title="Add a new Environment!">Add New</a>
2 1  
3   -<table class="table table-striped table-bordered table-condensed">
  2 +<blockquote>
  3 + <p>Please add a new environment that is not in the list. This page will query all this envs and retrieve the information presented in the table bellow</p>
  4 +</blockquote>
  5 +
  6 +<a href="/environment/new" class="btn btn-warning" data-toggle="tooltip" title="Add a new Environment!">Add New</a>
  7 +<table class="table table-striped table-bordered table-condensed dataTable" id="environments">
4 8 <thead>
5 9 <tr>
6 10 <th>Name</th>
... ... @@ -30,4 +34,6 @@
30 34 </#list>
31 35 </tbody>
32 36 </table>
  37 +
  38 +
33 39  
34 40 \ No newline at end of file
... ...
src/main/resources/spark/template/freemarker/environment/new.ftl
  1 +<blockquote>
  2 + <p>Please add the Name of the environment, the IP (like: 10.11.12.23) and port (like: 8080). There is no validation yet on this form.</p>
  3 +</blockquote>
  4 +
1 5 <form method="POST" action="/environment/new">
2 6 <div class="form-group">
3 7 <label for="inputdefault">Name</label>
... ...
src/main/resources/spark/template/freemarker/layout.ftl
1 1 <html>
2 2 <head>
3 3 <title>TAS Environments</title>
  4 + <script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
4 5 <link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
5 6 <link href="/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" >
6   - <link href="/css/starter-template.css" rel="stylesheet" type="text/css" >
  7 + <link href="/css/starter-template.css" rel="stylesheet" type="text/css" >
  8 + </script>
7 9 </head>
8 10 <body>
9 11  
... ... @@ -34,4 +36,10 @@
34 36 <script src="/js/jquery.min.js"></script>
35 37 <script src="/js/bootstrap.min.js"></script>
36 38 </body>
  39 +
  40 + <script type="text/javascript">
  41 + $('#environments').dataTable();
  42 +</script>
  43 +
  44 +
37 45 </html>
... ...