m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw
diff options
context:
space:
mode:
authorMagdalena GrodziƄska <mag.grodzinska@gmail.com>2020-01-11 20:07:26 +0100
committerGitHub <noreply@github.com>2020-01-11 20:07:26 +0100
commit75d1a57f80883867c94b133da417d484cc5c54cc (patch)
tree6c1fb0f35da7e544cb5e0c2b4f28e7d8340658a0 /src/main/java/pl/edu/mimuw
parent22ec12d762db07b6ecc65462b1e7cb38c8ca1578 (diff)
parent55be079e9b183c430662606548548ef935bbdf40 (diff)
Merge branch 'master' into add_addr_config
Diffstat (limited to 'src/main/java/pl/edu/mimuw')
-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";
}
}