m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu
diff options
context:
space:
mode:
authorMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-11 20:12:29 +0100
committerMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-11 20:12:29 +0100
commit15aa720ee781885df4e3ab12f01e95ef97039618 (patch)
tree3070e04301c8d32cc1e79d3f2607dd1474b88399 /src/main/java/pl/edu
parent3831d80df5dcd5d75d95308c8906dd9e3c054334 (diff)
parent75d1a57f80883867c94b133da417d484cc5c54cc (diff)
Merge branch 'add_addr_config' of github.com:m-chrzan/CloudAtlas into add_addr_config
Diffstat (limited to 'src/main/java/pl/edu')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java20
1 files changed, 13 insertions, 7 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 0715af5..210505d 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java
@@ -24,7 +24,8 @@ import java.util.*;
* /attribs - GET - displays attribute submission form
* /attribs - POST - posts attribute submission data
* /values - GET - displays attributes values
- * /values - POST - posts zone change data
+ * /zones - GET - displays zone change data
+ * /zones - POST - posts zone change data
* /attribNumValues - REST API to get numerical attribute values
* /attribAllValues - REST API to get all attribute values
*/
@@ -325,9 +326,6 @@ public class ClientController {
@GetMapping("/values")
public String valuesPage(Model model) {
- model.addAttribute("availableZones", getAvailableZonesString());
- model.addAttribute("currentZone", "Current zone: " + this.currentZoneName);
- model.addAttribute("zoneName", new DataStringInput());
return "attribChart";
}
@@ -439,13 +437,21 @@ public class ClientController {
return processAttribValues(getValuesTable(false));
}
- @PostMapping("/values")
- public String valuesPage(@ModelAttribute DataStringInput zoneName, Model model) {
+ @GetMapping("/zones")
+ public String zonesGetPage(Model model) {
+ model.addAttribute("availableZones", getAvailableZonesString());
+ model.addAttribute("currentZone", "Current zone: " + this.currentZoneName);
+ model.addAttribute("zoneName", new DataStringInput());
+ return "zoneForm";
+ }
+
+ @PostMapping("/zones")
+ public String zonesPostPage(@ModelAttribute DataStringInput zoneName, Model model) {
this.currentZoneName = zoneName.getString();
this.attributes.clear();
model.addAttribute("currentZone", "Current zone: " + this.currentZoneName);
model.addAttribute("availableZones", getAvailableZonesString());
model.addAttribute("zoneName", new DataStringInput());
- return "attribChart";
+ return "zoneForm";
}
}