Improve UI of the website
[proteocache.git] / server / compbio / controllers / DailyStatisticsController.java
index fd7a0db..22df505 100644 (file)
@@ -26,6 +26,14 @@ public class DailyStatisticsController {
 
        @RequestMapping(value = "/stat", method = RequestMethod.GET)
        public String initFindForm(Map<String, Object> model) {
+               Calendar cal = Calendar.getInstance();
+               String date2 = cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.DATE);
+               cal.add(Calendar.DATE, -3);
+               String date1 = cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.DATE);
+
+               model.put("date1", date1);
+               model.put("date2", date2);
+               
                return "queryJobStatistics";
        }
 
@@ -40,13 +48,13 @@ public class DailyStatisticsController {
                        date1 = StatisticsProt.DateFormatYYMMDD(cr.earliestDate());
                        date2 = cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.DAY_OF_MONTH);
                }
-               model.put("data1", date1);
-               model.put("data2", date2);
+               model.put("date1", date1);
+               model.put("date2", date2);
                List<DataBase> res = cr.countJobs(date1, date2);
                model.put("result", res);
                final long endTime = System.currentTimeMillis();
                model.put("timeExecution", (endTime - startTime));
-               model.put("flag", option);
+               model.put("option", option);
                return "/reportJobStatistics";
        }