Project

General

Profile

« Previous | Next » 

Revision 24841ac2

Added by Andreas Kohlbecker almost 11 years ago

start, stop of instances and reload of configuration implemented, see #3471 (cdmlib-remote-webapp instances can be stopped / started individually)

View differences:

src/main/webapp/manage/BootloaderService.jsp
32 32

  
33 33
   for(CdmInstance instance: instances){
34 34
    i++;
35
    Configuration props = instance.getConfiguration();
36
    String basePath = request.getContextPath() + "/" + props.getInstanceName();
35
    ObjectNode instanceNode = jsonMapper.createObjectNode();
36
    instanceNode.put("status", instance.getStatus().name());
37
    instanceNode.put("messages", jsonMapper.valueToTree(instance.getProblems()));
38

  
39

  
40
    Configuration conf = instance.getConfiguration();
41
    String basePath = request.getContextPath() + "/" + conf.getInstanceName();
37 42
      URL fullURL = new URL(request.getScheme(),
38 43
                  request.getServerName(),
39 44
                  request.getServerPort(),
40 45
                  basePath);
41 46

  
42
      JsonNode jsonNode = jsonMapper.valueToTree(props);
43
      if(jsonNode instanceof ObjectNode){
44
           ((ObjectNode)jsonNode).put("basePath", basePath);
45
           ((ObjectNode)jsonNode).put("fullUrl", fullURL.toString());
46
           ((ObjectNode)jsonNode).remove("password");
47
      JsonNode configNode = jsonMapper.valueToTree(conf);
48
      if(configNode instanceof ObjectNode){
49
           ((ObjectNode)configNode).put("basePath", basePath);
50
           ((ObjectNode)configNode).put("fullUrl", fullURL.toString());
51
           ((ObjectNode)configNode).remove("password");
47 52
      }
48
      arrayNode.add(jsonNode);
53

  
54
      ((ObjectNode)instanceNode).put("configuration", configNode);
55
      arrayNode.add(instanceNode);
49 56
   }
50 57
   out.append(arrayNode.toString());
51 58
  }%>

Also available in: Unified diff