m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java17
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";
}
}