improve display of end-time for jobs in Hyracks console

Change-Id: I80383dd0d35d0bbb83e00f56e094392d6d375a6d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1140
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java
index 709e406..32ac3f5 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.java
@@ -92,7 +92,10 @@
     }
 
     private String longToDateString(long milliseconds) {
-        SimpleDateFormat sdf = new SimpleDateFormat("MMM dd,yyyy HH:mm:ss");
+        if (milliseconds == 0) {
+            return "n/a";
+        }
+        SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss");
         Date date = new Date(milliseconds);
         return sdf.format(date);
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.html b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.html
index bdba2cb..bbb22b7 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.html
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/org/apache/hyracks/control/cc/adminconsole/pages/IndexPage.html
@@ -49,6 +49,7 @@
             <th>Status</th>
             <th>Create Time</th>
             <th>Start Time</th>
+            <th>End Time</th>
             <th>Job Details</th>
         </tr>
         <tr wicket:id="jobs-list">