From 63dfe423c50e9c0f82ccced10b7ca04a30ec4200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Sun, 24 Nov 2019 21:55:39 +0100 Subject: Remove duration input as string and fix attribute helper messages --- src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java | 7 +------ .../pl/edu/mimuw/cloudatlas/client/templates/attribForm.html | 5 ++--- .../pl/edu/mimuw/cloudatlas/client/templates/contactsForm.html | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src/main') 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 @@ Use Json list for complex types and stick to proper format in duration and time.
Examples:
Time: 3600
- Duration (version 1): 3600
- Duration (version 2): +0 00:00:00.001
- Contact: { "contactName" : [ 1, 1, 1, 1 ] }
+ Duration: 3600
+ Contact: { "/contactName" : [ 1, 1, 1, 1 ] }
Query: { "&queryName" : "query" }
List: [ 1, 2, 3 ]
Set: [ [1, 2], [3, 4], [5, 6] ]
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 @@ Use Json format for entering contacts. Examples:
- Contact: { "contactName" : [ 1, 1, 1, 1 ] }
- Contact: { "contactName1" : [ 1, 1, 1, 1 ], "contactName2" : [ 2, 2, 2, 2 ] } + Contact: { "/contactName" : [ 1, 1, 1, 1 ] }
+ Contact: { "/contactName1" : [ 1, 1, 1, 1 ], "/contactName2" : [ 2, 2, 2, 2 ] }
-- cgit v1.2.3