From 5bb71d396ab2ce43398b31ecd70bb9423032a0f1 Mon Sep 17 00:00:00 2001 From: girirajsharma Date: Fri, 29 May 2015 19:13:56 +0530 Subject: [PATCH] [KEYCLOAK-1200] From and To filter fields in Event viewer in admin app --- .../admin/resources/partials/realm-events-admin.html | 4 ++-- .../base/admin/resources/partials/realm-events.html | 4 ++-- .../services/resources/admin/RealmAdminResource.java | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events-admin.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events-admin.html index 8469d71f70..cb32dc4d3e 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events-admin.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events-admin.html @@ -48,13 +48,13 @@
- +
- +
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events.html index 8df1629d68..2540603894 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events.html @@ -52,13 +52,13 @@
- +
- +
diff --git a/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java b/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java index 666537bc6e..b27ce49430 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java @@ -392,7 +392,7 @@ public class RealmAdminResource { try { from = df.parse(dateFrom); } catch (ParseException e) { - throw new BadRequestException("Invalid value for 'Date(From)', excepted format is yyyy-MM-dd"); + throw new BadRequestException("Invalid value for 'Date(From)', expected format is yyyy-MM-dd"); } query.fromDate(from); } @@ -403,7 +403,7 @@ public class RealmAdminResource { try { to = df.parse(dateTo); } catch (ParseException e) { - throw new BadRequestException("Invalid value for 'Date(To)', excepted format is yyyy-MM-dd"); + throw new BadRequestException("Invalid value for 'Date(To)', expected format is yyyy-MM-dd"); } query.toDate(to); } @@ -485,18 +485,18 @@ public class RealmAdminResource { try { from = df.parse(dateFrom); } catch (ParseException e) { - throw new BadRequestException("Invalid value for 'Date(From)', excepted format is yyyy-MM-dd"); + throw new BadRequestException("Invalid value for 'Date(From)', expected format is yyyy-MM-dd"); } query.fromTime(from); } if(dateTo != null) { - SimpleDateFormat df = new SimpleDateFormat("Invalid value for 'Date(To)', excepted format is yyyy-MM-dd"); + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); Date to = null; try { to = df.parse(dateTo); } catch (ParseException e) { - throw new BadRequestException("An unexpected server error has occurred"); + throw new BadRequestException("Invalid value for 'Date(To)', expected format is yyyy-MM-dd"); } query.toTime(to); }