diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-11-24 21:55:39 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-11-24 21:55:39 +0100 |
commit | 63dfe423c50e9c0f82ccced10b7ca04a30ec4200 (patch) | |
tree | ad6fa00f519619f06fa466213d0e9a58dd7df023 /src | |
parent | 852fe8974c9bf4fc6da70256233b092c9e8cca7e (diff) |
Remove duration input as string and fix attribute helper messages
Diffstat (limited to 'src')
3 files changed, 5 insertions, 11 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 9415888..4097afe 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java @@ -217,12 +217,7 @@ public class ClientController { attributeValue = new ValueTime(parseIntegerAsLong(attributeObject.getValueString())); break; case "Duration": - if (attributeObject.getValueString().matches("\\d+")) { - attributeValue = new ValueDuration(parseIntegerAsLong(attributeObject.getValueString())); - } else { - String valDuration = attributeObject.getValueString().trim(); - attributeValue = new ValueDuration(valDuration); - } + attributeValue = new ValueDuration(parseIntegerAsLong(attributeObject.getValueString())); break; case "Contact": DataStringInput contactsString = new DataStringInput(); diff --git a/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html b/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html index 3740491..e348a11 100644 --- a/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html +++ b/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/attribForm.html @@ -47,9 +47,8 @@ <small id="attributeValueHelpBlock" class="form-text text-muted"> Use Json list for complex types and stick to proper format in duration and time. <br> Examples: <br> Time: 3600 <br> - Duration (version 1): 3600 <br> - Duration (version 2): +0 00:00:00.001 <br> - Contact: { "contactName" : [ 1, 1, 1, 1 ] } <br> + Duration: 3600 <br> + Contact: { "/contactName" : [ 1, 1, 1, 1 ] } <br> Query: { "&queryName" : "query" } <br> List: [ 1, 2, 3 ] <br> Set: [ [1, 2], [3, 4], [5, 6] ] <br> diff --git a/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html b/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html index 79a9f5f..ba0a3a8 100644 --- a/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html +++ b/src/main/resources/pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html @@ -17,8 +17,8 @@ <textarea class="form-control" id="Textarea1" rows="3" th:field="*{string}"></textarea> <small id="attributeValueHelpBlock" class="form-text text-muted"> Use Json format for entering contacts. Examples: <br> - Contact: { "contactName" : [ 1, 1, 1, 1 ] } <br> - Contact: { "contactName1" : [ 1, 1, 1, 1 ], "contactName2" : [ 2, 2, 2, 2 ] } + Contact: { "/contactName" : [ 1, 1, 1, 1 ] } <br> + Contact: { "/contactName1" : [ 1, 1, 1, 1 ], "/contactName2" : [ 2, 2, 2, 2 ] } </small> </div> <button type="submit" class="btn btn-primary">Submit</button> |