diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-11-21 10:54:08 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-11-21 10:54:08 +0100 |
commit | f6cc5f269fd4391a75edaea6fb23e846d413029e (patch) | |
tree | aa67dfd15050f718d5a3b8d9438bd685eee672d2 /src/main | |
parent | d683a761b2710a252b0bfb1b3f0879a60247bb50 (diff) |
Add basic data fetching backend
Diffstat (limited to 'src/main')
-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"; } } |