05/75: showing an info log when receiving a 200 OK after an update. small typo correction in properties file
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit b65ba97a8017dedafae07939811e0a66160c3978 Author: servantie <servantie.c@gmail.com> Date: Wed May 18 16:04:40 2016 +0200 showing an info log when receiving a 200 OK after an update. small typo correction in properties file --- .../org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 14 +++++++++++++- .../ui/report/resources/TimerTaskUpdaterView.properties | 4 ++-- .../ui/report/resources/TimerTaskUpdaterView_fr.properties | 9 ++++----- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 1181dc2..045fcfd 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -44,6 +44,7 @@ import java.io.UnsupportedEncodingException; import java.net.*; import java.text.DateFormat; import java.util.*; +import java.util.List; import static org.chorem.jtimer.entities.TimerTaskHelper.taskToJSONFormat; @@ -377,8 +378,19 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener } try { - //todo: deal with responses ! InputStream response = connection.getInputStream(); + //get the header fields + Map<String, List<String>> map = connection.getHeaderFields(); + for (Map.Entry<String, List<String>> entry : map.entrySet()) { + for (String s : entry.getValue()) { + if (s.equals("HTTP/1.1 200 OK")) { + log.info("Synchronised!"); + //todo : make it update the lastSync Data + + } + } + } + } catch (IOException e) { e.printStackTrace(); diff --git a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties index 6359a52..3837279 100644 --- a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties +++ b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties @@ -30,12 +30,12 @@ updateWeekly=Weekly updateYearly=Yearly currentWeek.Action.icon = date_current.png -currentWeek.Action.shortDescription = Current week- +currentWeek.Action.shortDescription = Current week previousWeek.Action.icon = date_previous.png previousWeek.Action.shortDescription = Previous week -updateAnnotations.Action.text = Include annotations +updateAnnotations.text = Include annotations generateUpdate.Action.text = &Generate generateUpdate.Action.icon = applications-system.png diff --git a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties index 85d01e6..44943f0 100644 --- a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties +++ b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties @@ -38,16 +38,15 @@ updateProjects=Projets updateProjectsList=Liste des projets currentWeek.Action.icon = date_current.png -currentWeek.Action.shortDescription = Semaine courante- +currentWeek.Action.shortDescription = Semaine courante previousWeek.Action.icon = date_previous.png -previousWeek.Action.shortDescription = Semaine precedente +previousWeek.Action.shortDescription = Semaine pr\u00E9c\u00E9dente updateAnnotations.Action.text = Inclure les annotations +updateAnnotations.Action.shortDescription = Inclure les annotations - -showHiddenProjects.Action.text = Show hidden projects -showHiddenProjects.Action.shortDescription = Show hidden projects +* generateUpdate.Action.text = &G\u00E9n\u00E9rer generateUpdate.Action.icon = applications-system.png -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm