diff options
Diffstat (limited to 'src/main/java/pl/edu')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java index 022c665..be853b9 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java @@ -202,6 +202,23 @@ public class ClientController { @GetMapping("/values") public String valuesPage(Model model) { + model.addAttribute("zoneName", new ContactsString()); + return "attribChart"; + } + + @PostMapping("/values") + public String valuesPage(@ModelAttribute ContactsString zoneName, Model model) { + boolean success = true; + AttributesMap attribData; + + try { + attribData = api.getZoneAttributeValues(zoneName.getString()); + } catch (Exception e) { + success = false; + System.err.println("Client exception:"); + e.printStackTrace(); + } + return "attribChart"; } } |