syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdisabat...@apache.org
Subject svn commit: r1367079 - in /incubator/syncope/trunk: client/src/main/java/org/apache/syncope/client/to/ console/src/main/java/org/apache/syncope/console/pages/ console/src/main/java/org/apache/syncope/console/pages/panels/ console/src/main/resources/org...
Date Mon, 30 Jul 2012 13:27:12 GMT
Author: mdisabatino
Date: Mon Jul 30 13:27:12 2012
New Revision: 1367079

URL: http://svn.apache.org/viewvc?rev=1367079&view=rev
Log:
SYNCOPE-116 display execution task date on Task and Report list items

Modified:
    incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/ReportTO.java
    incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/TaskTO.java
    incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java
    incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java
    incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports.properties
    incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports_it.properties
    incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks.properties
    incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks_it.properties
    incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ReportTestITCase.java
    incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/TaskTestITCase.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ReportDataBinder.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java

Modified: incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/ReportTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/ReportTO.java?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/ReportTO.java
(original)
+++ incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/ReportTO.java
Mon Jul 30 13:27:12 2012
@@ -44,6 +44,10 @@ public class ReportTO extends AbstractBa
 
     private Date nextExec;
 
+    private Date startDate;
+
+    private Date endDate;
+
     public ReportTO() {
         super();
 
@@ -138,4 +142,28 @@ public class ReportTO extends AbstractBa
             this.nextExec = new Date(nextExec.getTime());
         }
     }
+     
+    public Date getStartDate() {
+        return startDate == null
+                ? null
+                : new Date(startDate.getTime());
+    }
+
+    public void setStartDate(Date startDate) {
+        if (startDate != null) {
+            this.startDate = new Date(startDate.getTime());
+        }
+    }
+
+    public Date getEndDate() {
+        return endDate == null
+                ? null
+                : new Date(endDate.getTime());
+    }
+
+    public void setEndDate(Date endDate) {
+        if (endDate != null) {
+            this.endDate = new Date(endDate.getTime());
+        }
+    }
 }

Modified: incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/TaskTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/TaskTO.java?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/TaskTO.java
(original)
+++ incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/TaskTO.java
Mon Jul 30 13:27:12 2012
@@ -19,6 +19,7 @@
 package org.apache.syncope.client.to;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import org.apache.syncope.client.AbstractBaseBean;
 
@@ -31,6 +32,10 @@ public class TaskTO extends AbstractBase
     private String latestExecStatus;
 
     private List<TaskExecTO> executions;
+    
+    private Date startDate;
+    
+    private Date endDate;
 
     public TaskTO() {
         super();
@@ -69,4 +74,28 @@ public class TaskTO extends AbstractBase
     public void setExecutions(List<TaskExecTO> executions) {
         this.executions = executions;
     }
+
+    public Date getStartDate() {
+        return startDate == null
+                ? null
+                : new Date(startDate.getTime());
+    }
+
+    public void setStartDate(Date startDate) {
+        if (startDate != null) {
+            this.startDate = new Date(startDate.getTime());
+        }
+    }
+
+    public Date getEndDate() {
+        return endDate == null
+                ? null
+                : new Date(endDate.getTime());
+    }
+
+    public void setEndDate(Date endDate) {
+        if (endDate != null) {
+            this.endDate = new Date(endDate.getTime());
+        }
+    }
 }

Modified: incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java
(original)
+++ incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java
Mon Jul 30 13:27:12 2012
@@ -131,6 +131,8 @@ public class Reports extends BasePage {
         columns.add(new PropertyColumn(new ResourceModel("name"), "name", "name"));
         columns.add(new DatePropertyColumn(new ResourceModel("lastExec"), "lastExec", "lastExec"));
         columns.add(new DatePropertyColumn(new ResourceModel("nextExec"), "nextExec", "nextExec"));
+        columns.add(new DatePropertyColumn(new ResourceModel("startDate"), "startDate", "startDate"));
+        columns.add(new DatePropertyColumn(new ResourceModel("endDate"), "endDate", "endDate"));
         columns.add(new PropertyColumn(new ResourceModel("latestExecStatus"), "latestExecStatus",
"latestExecStatus"));
         columns.add(new AbstractColumn<ReportTO>(new ResourceModel("actions", ""))
{
 

Modified: incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java
(original)
+++ incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java
Mon Jul 30 13:27:12 2012
@@ -50,6 +50,7 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.Tasks;
 import org.apache.syncope.console.pages.Tasks.TasksProvider;
 import org.apache.syncope.console.rest.TaskRestClient;
+import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 
@@ -108,6 +109,10 @@ public class PropagationTasks extends Pa
 
         columns.add(new PropertyColumn(new ResourceModel("propagationOperation"), "propagationOperation",
                 "propagationOperation"));
+        
+        columns.add(new DatePropertyColumn(new ResourceModel("startDate"), "startDate", "startDate"));
+        
+        columns.add(new DatePropertyColumn(new ResourceModel("endDate"), "endDate", "endDate"));
 
         columns.add(new PropertyColumn(new ResourceModel("latestExecStatus"), "latestExecStatus",
"latestExecStatus"));
 

Modified: incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports.properties
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports.properties?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports.properties
(original)
+++ incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports.properties
Mon Jul 30 13:27:12 2012
@@ -21,3 +21,5 @@ nextExec=Next Execution
 latestExecStatus=Last status
 category=Category
 subcategory=Subcategory
+startDate=Start date
+endDate=End date
\ No newline at end of file

Modified: incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports_it.properties
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports_it.properties?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports_it.properties
(original)
+++ incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports_it.properties
Mon Jul 30 13:27:12 2012
@@ -21,3 +21,5 @@ nextExec=Prossima Esecuzione
 latestExecStatus=Ultimo stato
 category=Categoria
 subcategory=Sottocategoria
+startDate=Data di avvio
+endDate=Data di conclusione
\ No newline at end of file

Modified: incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks.properties
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks.properties?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks.properties
(original)
+++ incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks.properties
Mon Jul 30 13:27:12 2012
@@ -24,3 +24,5 @@ edit=Edit
 propagationMode=Propagation Mode
 propagationOperation=Propagation Operation
 latestExecStatus=Last status
+startDate=Start date
+endDate=End date
\ No newline at end of file

Modified: incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks_it.properties
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks_it.properties?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks_it.properties
(original)
+++ incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks_it.properties
Mon Jul 30 13:27:12 2012
@@ -24,3 +24,5 @@ edit=Modifica
 propagationMode=Propagazione
 propagationOperation=Operazione
 latestExecStatus=Ultimo stato
+startDate=Data di avvio
+endDate=Data di conclusione

Modified: incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ReportTestITCase.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ReportTestITCase.java?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ReportTestITCase.java
(original)
+++ incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ReportTestITCase.java
Mon Jul 30 13:27:12 2012
@@ -27,7 +27,7 @@ public class ReportTestITCase extends Ab
         selenium.click("css=img[alt=\"Reports\"]");
         selenium.waitForCondition("selenium.isElementPresent(\"//div[@id='tabs']\");", "30000");
 
-        selenium.click("//table/tbody/tr/td[6]/span/span[7]/a");
+        selenium.click("//table/tbody/tr/td[8]/span/span[7]/a");
         selenium.waitForCondition("selenium.isElementPresent("
                 + "\"//form/div[2]/div/div/span/div/div[5]/div[2]/span/div[2]/div/a\");",
"30000");
 
@@ -49,7 +49,7 @@ public class ReportTestITCase extends Ab
 
         selenium.waitForCondition("selenium.isElementPresent(\"//div[@id='tabs']\");", "30000");
 
-        selenium.click("//table/tbody/tr/td[6]/span/span[3]/a");
+        selenium.click("//table/tbody/tr/td[8]/span/span[3]/a");
 
         selenium.waitForCondition("selenium.isTextPresent(\"Operation executed successfully\");",
"30000");
     }

Modified: incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/TaskTestITCase.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/TaskTestITCase.java?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/TaskTestITCase.java
(original)
+++ incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/TaskTestITCase.java
Mon Jul 30 13:27:12 2012
@@ -29,11 +29,11 @@ public class TaskTestITCase extends Abst
         selenium.waitForCondition("selenium.isElementPresent(\"//div[@id='tabs']\");", "30000");
 
         selenium.click("//div[@id='tabs']/ul/li[4]/a");
-        selenium.click("//*[span=1]/../td[7]/span/span[3]/a");
+        selenium.click("//*[span=1]/../td[9]/span/span[3]/a");
 
         selenium.waitForCondition("selenium.isTextPresent(" + "\"Operation executed successfully\");",
"30000");
 
-        selenium.click("//*[span=1]/../td[7]/span/span[7]/a");
+        selenium.click("//*[span=1]/../td[9]/span/span[7]/a");
 
         selenium.waitForCondition("selenium.isElementPresent("
                 + "\"//form/div[2]/div/div/span/div/div/div[2]/span/input\");", "30000");

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ReportDataBinder.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ReportDataBinder.java?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ReportDataBinder.java
(original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ReportDataBinder.java
Mon Jul 30 13:27:12 2012
@@ -121,6 +121,14 @@ public class ReportDataBinder {
                 ? ""
                 : latestExec.getStatus());
 
+        reportTO.setStartDate(latestExec == null
+                ? null
+                : latestExec.getStartDate());
+
+        reportTO.setEndDate(latestExec == null
+                ? null
+                : latestExec.getEndDate());
+
         for (ReportExec reportExec : report.getExecs()) {
             reportTO.addExecution(getReportExecTO(reportExec));
         }

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java?rev=1367079&r1=1367078&r2=1367079&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java
(original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java
Mon Jul 30 13:27:12 2012
@@ -149,8 +149,7 @@ public class TaskDataBinder {
 
             case SYNC:
                 if (!(taskTO instanceof SyncTaskTO)) {
-                    throw new ClassCastException("taskUtil is type SyncTask but taskTO is
not SyncTaskTO: " + taskTO.
-                            getClass().getName());
+                    throw new ClassCastException("taskUtil is type SyncTask but taskTO is
not SyncTaskTO: " + taskTO.getClass().getName());
                 }
                 SyncTaskTO syncTaskTO = (SyncTaskTO) taskTO;
 
@@ -177,8 +176,7 @@ public class TaskDataBinder {
                         getName());
             }
             if (!(taskTO instanceof SyncTaskTO)) {
-                throw new ClassCastException("taskUtil is type SyncTask but taskTO is not
SyncTaskTO: " + taskTO.
-                        getClass().getName());
+                throw new ClassCastException("taskUtil is type SyncTask but taskTO is not
SyncTaskTO: " + taskTO.getClass().getName());
             }
 
             fill((SyncTask) task, (SyncTaskTO) taskTO);
@@ -226,6 +224,14 @@ public class TaskDataBinder {
                 ? ""
                 : latestExec.getStatus());
 
+        taskTO.setStartDate(latestExec == null
+                ? null
+                : latestExec.getStartDate());
+        
+        taskTO.setEndDate(latestExec == null
+                ? null
+                : latestExec.getEndDate());
+
         for (TaskExec execution : task.getExecs()) {
             taskTO.addExecution(getTaskExecTO(execution));
         }



Mime
View raw message