You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2013/09/24 16:53:48 UTC

svn commit: r1525913 - in /uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main: java/org/apache/uima/ducc/ws/server/ webapp/root/ webapp/root/js/

Author: degenaro
Date: Tue Sep 24 14:53:48 2013
New Revision: 1525913

URL: http://svn.apache.org/r1525913
Log:
UIMA-2726 DUCC support Files tab (log directory contents) for Jobs/Reservations/Services details

Added:
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.table.files.jsp
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.table.files.jsp
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.table.files.jsp
Modified:
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccFile.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.jsp
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.jsp
    uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.jsp

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccFile.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccFile.java?rev=1525913&r1=1525912&r2=1525913&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccFile.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccFile.java Tue Sep 24 14:53:48 2013
@@ -26,9 +26,12 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.StringReader;
 import java.util.Properties;
+import java.util.TreeMap;
+import java.util.zip.GZIPInputStream;
 
 import org.apache.uima.ducc.cli.DuccUiConstants;
 import org.apache.uima.ducc.common.utils.AlienFile;
+import org.apache.uima.ducc.common.utils.FileHelper;
 import org.apache.uima.ducc.common.utils.Utils;
 import org.apache.uima.ducc.transport.event.common.IDuccWorkJob;
 
@@ -38,6 +41,22 @@ public class DuccFile {
 			Utils.resolvePlaceholderIfExists(
 					System.getProperty("ducc.agent.launcher.ducc_spawn_path"),System.getProperties());
 	
+	public static TreeMap<String, File> getFilesInLogDirectory(IDuccWorkJob job, String user) throws Throwable {
+		String directory = job.getUserLogsDir()+job.getDuccId().getFriendly()+File.separator;
+		TreeMap<String, File> map = new TreeMap<String, File>();
+		try {
+			File filedir = new File(directory);
+			File[] filelist = filedir.listFiles();
+			for(File file : filelist) {
+				map.put(file.getName(), file);
+			}
+		}
+		catch(Exception e) {
+			// no worries
+		}
+		return map;
+	}
+	
 	public static Properties getUserSpecifiedProperties(IDuccWorkJob job, String user) throws Throwable {
 		String directory = job.getUserLogsDir()+job.getDuccId().getFriendly()+File.separator;
 		String name = DuccUiConstants.user_specified_properties;
@@ -142,11 +161,16 @@ public class DuccFile {
 		InputStreamReader isr = null;
 		FileInputStream fis = new FileInputStream(path);
 		DataInputStream dis = new DataInputStream(fis);
-		isr = new InputStreamReader(dis);
+		if(FileHelper.isGzFileType(path)) {
+			GZIPInputStream gis = new GZIPInputStream(dis);
+			isr = new InputStreamReader(gis, FileHelper.encoding);
+		}
+		else {
+			isr = new InputStreamReader(dis);
+		}
 		return isr;
 	}
 	
-	
 	public static InputStreamReader getInputStreamReader(String path, String user) throws Throwable {
 		if(user == null) {
 			return getInputStreamReader(path);

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java?rev=1525913&r1=1525912&r2=1525913&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java Tue Sep 24 14:53:48 2013
@@ -34,6 +34,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
+import java.util.Set;
 import java.util.TimeZone;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentSkipListMap;
@@ -113,20 +114,25 @@ public class DuccHandler extends DuccAbs
 	private String duccAuthenticatorVersion 		= duccContext+"/authenticator-version";
 	private String duccAuthenticatorPasswordChecked	= duccContext+"/authenticator-password-checked";
 	
+	private String duccFileContents 				= duccContext+"/file-contents";
+	
 	private String duccJobIdData					= duccContext+"/job-id-data";
 	private String duccJobWorkitemsCountData		= duccContext+"/job-workitems-count-data";
 	private String duccJobProcessesData    			= duccContext+"/job-processes-data";
 	private String duccJobWorkitemsData				= duccContext+"/job-workitems-data";
 	private String duccJobPerformanceData			= duccContext+"/job-performance-data";
 	private String duccJobSpecificationData 		= duccContext+"/job-specification-data";
+	private String duccJobFilesData 				= duccContext+"/job-files-data";
 	private String duccJobInitializationFailData	= duccContext+"/job-initialization-fail-data";
 	private String duccJobRuntimeFailData			= duccContext+"/job-runtime-fail-data";
 	
 	private String duccReservationProcessesData    	= duccContext+"/reservation-processes-data";
 	private String duccReservationSpecificationData = duccContext+"/reservation-specification-data";
+	private String duccReservationFilesData 		= duccContext+"/reservation-files-data";
 	
 	private String duccServiceDeploymentsData    	= duccContext+"/service-deployments-data";
 	private String duccServiceRegistryData 			= duccContext+"/service-registry-data";
+	private String duccServiceFilesData 			= duccContext+"/service-files-data";
 	private String duccServiceSummaryData			= duccContext+"/service-summary-data";
 	
 	private String duccSystemAdminAdminData 		= duccContext+"/system-admin-admin-data";
@@ -1515,6 +1521,214 @@ public class DuccHandler extends DuccAbs
 		duccLogger.trace(methodName, null, messages.fetch("exit"));
 	}
 
+	private void handleDuccServletJobFilesData(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) 
+	throws IOException, ServletException
+	{
+		String methodName = "handleDuccServletJobFilesData";
+		duccLogger.trace(methodName, null, messages.fetch("enter"));
+		StringBuffer sb = new StringBuffer();
+		String jobNo = request.getParameter("id");
+		DuccWorkJob job = getJob(jobNo);
+		if(job != null) {
+			try {
+				String userId = duccWebSessionManager.getUserId(request);
+				TreeMap<String, File> map = DuccFile.getFilesInLogDirectory(job, userId);
+				Set<String> keys = map.keySet();
+				int counter = 0;
+				for(String key : keys) {
+					File file = map.get(key);
+					StringBuffer row = new StringBuffer();
+					//
+					String tr = trGet(counter);
+					sb.append(tr);
+					/*
+					// date
+					row.append("<td>");
+					row.append("<span title=\""+DuccConstants.hintPreferencesDateStyle+"\">");
+					String date = getTimeStamp(request,job.getDuccId(), ""+file.lastModified());
+					row.append(date);
+					row.append("</span>");
+					row.append("</td>");
+					*/
+					// name
+					row.append("<td>");
+					String href = "<a href=\""+duccFileContents+"?"+"fname="+file.getAbsolutePath()+"\" onclick=\"var newWin = window.open(this.href,'child','height=800,width=1200,scrollbars');  newWin.focus(); return false;\">"+file.getName()+"</a>";
+					row.append(href);
+					row.append("</td>");
+					// size
+					row.append("<td>");
+					row.append(getFileSize(file.getAbsolutePath()));
+					row.append("</td>");
+					//
+					row.append("</tr>");
+					sb.append(row);
+					counter++;
+				}
+			}
+			catch(Throwable t) {
+				duccLogger.warn(methodName, null, t);
+				sb = new StringBuffer();
+				sb.append("no data");
+			}
+		}
+		response.getWriter().println(sb);
+		duccLogger.trace(methodName, null, messages.fetch("exit"));
+	}
+		
+	private void handleDuccServletReservationFilesData(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) 
+	throws IOException, ServletException
+	{
+		String methodName = "handleDuccServletReservationFilesData";
+		duccLogger.trace(methodName, null, messages.fetch("enter"));
+		StringBuffer sb = new StringBuffer();
+		String reservationNo = request.getParameter("id");
+		DuccWorkJob reservation = getManagedReservation(reservationNo);
+		if(reservation != null) {
+			try {
+				String userId = duccWebSessionManager.getUserId(request);
+				TreeMap<String, File> map = DuccFile.getFilesInLogDirectory(reservation, userId);
+				Set<String> keys = map.keySet();
+				int counter = 0;
+				for(String key : keys) {
+					File file = map.get(key);
+					StringBuffer row = new StringBuffer();
+					//
+					String tr = trGet(counter);
+					sb.append(tr);
+					/*
+					// date
+					row.append("<td>");
+					row.append("<span title=\""+DuccConstants.hintPreferencesDateStyle+"\">");
+					String date = getTimeStamp(request,job.getDuccId(), ""+file.lastModified());
+					row.append(date);
+					row.append("</span>");
+					row.append("</td>");
+					*/
+					// name
+					row.append("<td>");
+					String href = "<a href=\""+duccFileContents+"?"+"fname="+file.getAbsolutePath()+"\" onclick=\"var newWin = window.open(this.href,'child','height=800,width=1200,scrollbars');  newWin.focus(); return false;\">"+file.getName()+"</a>";
+					row.append(href);
+					row.append("</td>");
+					// size
+					row.append("<td>");
+					row.append(getFileSize(file.getAbsolutePath()));
+					row.append("</td>");
+					//
+					row.append("</tr>");
+					sb.append(row);
+					counter++;
+				}
+			}
+			catch(Throwable t) {
+				duccLogger.warn(methodName, null, t);
+				sb = new StringBuffer();
+				sb.append("no data");
+			}
+		}
+		response.getWriter().println(sb);
+		duccLogger.trace(methodName, null, messages.fetch("exit"));
+	}
+	
+	private void buildServiceFilesListEntry(Request baseRequest,HttpServletRequest request, StringBuffer sb, DuccWorkJob job, IDuccProcess process, String type, int counter) {
+		if(job != null) {
+			try {
+				String userId = duccWebSessionManager.getUserId(request);
+				TreeMap<String, File> map = DuccFile.getFilesInLogDirectory(job, userId);
+				Set<String> keys = map.keySet();
+				for(String key : keys) {
+					File file = map.get(key);
+					StringBuffer row = new StringBuffer();
+					//
+					String tr = trGet(counter);
+					sb.append(tr);
+					/*
+					// date
+					row.append("<td>");
+					row.append("<span title=\""+DuccConstants.hintPreferencesDateStyle+"\">");
+					String date = getTimeStamp(request,job.getDuccId(), ""+file.lastModified());
+					row.append(date);
+					row.append("</span>");
+					row.append("</td>");
+					*/
+					// id
+					row.append("<td>");
+					row.append(job.getId()+"."+process.getDuccId());
+					row.append("</td>");
+					// name
+					row.append("<td>");
+					String href = "<a href=\""+duccFileContents+"?"+"fname="+file.getAbsolutePath()+"\" onclick=\"var newWin = window.open(this.href,'child','height=800,width=1200,scrollbars');  newWin.focus(); return false;\">"+file.getName()+"</a>";
+					row.append(href);
+					row.append("</td>");
+					// size
+					row.append("<td>");
+					row.append(getFileSize(file.getAbsolutePath()));
+					row.append("</td>");
+					//
+					row.append("</tr>");
+					sb.append(row);
+					counter++;
+				}
+			}
+			catch(Throwable t) {
+				// no worries
+			}
+		}
+	}
+	
+	private void handleDuccServletServiceFilesData(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) 
+	throws IOException, ServletException
+	{
+		String methodName = "handleDuccServletServiceFilesData";
+		duccLogger.trace(methodName, null, messages.fetch("enter"));
+		StringBuffer sb = new StringBuffer();
+		
+		String name = request.getParameter("name");
+		ServicesRegistry servicesRegistry = new ServicesRegistry();
+		ServicesRegistryMapPayload payload = servicesRegistry.findService(name);
+		Properties properties;
+		properties = payload.meta;
+		
+		ArrayList<String> implementors = servicesRegistry.getArrayList(properties.getProperty(IServicesRegistry.implementors));
+		
+		DuccWorkJob service = null;
+		DuccWorkMap duccWorkMap = DuccData.getInstance().get();
+		if(duccWorkMap.getServiceKeySet().size()> 0) {
+			Iterator<DuccId> iterator = null;
+			iterator = duccWorkMap.getServiceKeySet().iterator();
+			int counter = 0;
+			String type = "SPU";
+			String service_type = properties.getProperty(IServicesRegistry.service_type);
+			if(service_type != null) {
+				if(service_type.equalsIgnoreCase(IServicesRegistry.service_type_CUSTOM)) {
+					type = "SPC";
+				}
+			}
+			while(iterator.hasNext()) {
+				DuccId serviceId = iterator.next();
+				String fid = ""+serviceId.getFriendly();
+				if(implementors.contains(fid)) {
+					service = (DuccWorkJob) duccWorkMap.findDuccWork(serviceId);
+					IDuccProcessMap map = service.getProcessMap();
+					for(DuccId key : map.keySet()) {
+						IDuccProcess process = map.get(key);
+						buildServiceFilesListEntry(baseRequest,request,sb, service, process, type, ++counter);
+					}
+				}
+			}
+		}
+		
+		if(sb.length() == 0) {
+			sb.append("<tr>");
+			sb.append("<td>");
+			sb.append("not found");
+			sb.append("</td>");
+			sb.append("</tr>");
+		}
+		
+		response.getWriter().println(sb);
+		duccLogger.trace(methodName, null, messages.fetch("exit"));
+	}
+				
 	private void handleDuccServletJobInitializationFailData(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) 
 	throws IOException, ServletException
 	{
@@ -2784,6 +2998,50 @@ public class DuccHandler extends DuccAbs
 		duccLogger.trace(methodName, null, messages.fetch("exit"));
 	}
 	
+	private void handleDuccServletFileContents(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) 
+	throws IOException, ServletException
+	{
+		String methodName = "handleDuccServletFileContents";
+		duccLogger.trace(methodName, null, messages.fetch("enter"));
+		String fname = request.getParameter("fname");
+		StringBuffer sb = new StringBuffer();
+		InputStreamReader isr = null;
+		BufferedReader br = null;
+		try {
+			String userId = duccWebSessionManager.getUserId(request);
+			isr = DuccFile.getInputStreamReader(fname, userId);
+			br = new BufferedReader(isr);
+			String logLine;
+			while ((logLine = br.readLine()) != null)   {
+				if(fname.endsWith(".xml")) {
+					logLine = logLine.replace("<", "&lt");
+					logLine = logLine.replace(">", "&gt");
+				}
+				sb.append(logLine+"<br>");
+			}
+		}
+		catch(FileNotFoundException e) {
+			sb.append("File not found");
+		}
+		catch(Throwable t) {
+			sb.append("Error accessing file");
+		}
+		finally {
+			try {
+				br.close();
+			}
+			catch(Throwable t) {
+			}
+			try {
+				isr.close();
+			}
+			catch(Throwable t) {
+			}
+		}
+		response.getWriter().println(sb);
+		duccLogger.trace(methodName, null, messages.fetch("exit"));
+	}	
+	
 	private void handleDuccServletLogData(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) 
 	throws IOException, ServletException
 	{
@@ -3540,6 +3798,18 @@ public class DuccHandler extends DuccAbs
 				handleDuccServletJobSpecificationData(target, baseRequest, request, response);
 				DuccWebUtil.noCache(response);
 			}
+			else if(reqURI.startsWith(duccJobFilesData)) {
+				handleDuccServletJobFilesData(target, baseRequest, request, response);
+				DuccWebUtil.noCache(response);
+			}
+			else if(reqURI.startsWith(duccReservationFilesData)) {
+				handleDuccServletReservationFilesData(target, baseRequest, request, response);
+				DuccWebUtil.noCache(response);
+			}
+			else if(reqURI.startsWith(duccServiceFilesData)) {
+				handleDuccServletServiceFilesData(target, baseRequest, request, response);
+				DuccWebUtil.noCache(response);
+			}
 			else if(reqURI.startsWith(duccJobInitializationFailData)) {
 				handleDuccServletJobInitializationFailData(target, baseRequest, request, response);
 				DuccWebUtil.noCache(response);
@@ -3694,6 +3964,10 @@ public class DuccHandler extends DuccAbs
 				handleDuccServletLogData(target, baseRequest, request, response);
 				DuccWebUtil.noCache(response);
 			}
+			else if(reqURI.startsWith(duccFileContents)) {
+				handleDuccServletFileContents(target, baseRequest, request, response);
+				DuccWebUtil.noCache(response);
+			}
 			else if(reqURI.startsWith(duccJpInitSummary)) {
 				handleDuccServletJpInitSummary(target, baseRequest, request, response);
 				DuccWebUtil.noCache(response);

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.jsp?rev=1525913&r1=1525912&r2=1525913&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.jsp Tue Sep 24 14:53:48 2013
@@ -87,6 +87,7 @@ under the License.
 			<li><a href="#tabs-2">Work Items</a></li>
 			<li><a href="#tabs-3">Performance</a></li>
 			<li><a href="#tabs-4">Specification</a></li>
+			<li><a href="#tabs-5">Files</a></li>
 		</ul>
 			<div id="tabs-1">
 			    <%@ include file="job.details.table.processes.jsp" %>
@@ -100,6 +101,9 @@ under the License.
 			<div id="tabs-4">
    				<%@ include file="job.details.table.specification.jsp" %>
 			</div>
+			<div id="tabs-5">
+                <%@ include file="job.details.table.files.jsp" %>
+            </div>
 		</div>
 </td>
 </table>

Added: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.table.files.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.table.files.jsp?rev=1525913&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.table.files.jsp (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/job.details.table.files.jsp Tue Sep 24 14:53:48 2013
@@ -0,0 +1,35 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<div id=loading_files_area>
+</div>
+<table>
+  <caption><b>Files List</b><br><i><small>click column heading to sort</small></i></caption>
+  <tr>
+  <td>
+    <table class="sortable">
+    <thead>
+    <tr class="ducc-head">
+    <th title="The file name">Name</th>
+    <th title="The file size, in MB">Size</th>
+    </tr>
+    </thead>
+    <tbody id="files_data_area">
+    </tbody>
+    </table>
+</table>
\ No newline at end of file

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js?rev=1525913&r1=1525912&r2=1525913&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js Tue Sep 24 14:53:48 2013
@@ -626,6 +626,51 @@ function ducc_load_job_specification_dat
 	}	
 }
 
+function ducc_init_job_files_data()
+{
+    try {
+        data = "<img src=\"opensources/images/indicator.gif\" alt=\"waiting...\">"
+        $("#files_data_area").html(data);
+    }
+    catch(err) {
+        ducc_error("ducc_init_job_files_data",err);
+    }
+}
+
+var ms_load_job_files_data = +new Date() - ms_reload_min;
+
+function ducc_load_job_files_data()
+{
+    var ms_now = +new Date();
+    if(ms_now < ms_load_job_files_data + ms_reload_min) {
+        return;
+    }
+    ms_load_job_files_data = ms_now;
+    try {
+        data = "<img src=\"opensources/images/indicator.gif\" alt=\"waiting...\">";
+        $("#loading_files_area").html(data);
+        server_url= "/ducc-servlet/job-files-data"+location.search;
+        $.ajax(
+        {
+            url : server_url,
+            async: true,
+            success : function (data) 
+            {
+                $("#files_data_area").html(data);
+                hide_show();
+                data = "";
+                $("#loading_files_area").html(data);
+                sorttable.makeSortable(document.getElementById('files_table'));
+            }
+        });
+    }
+    catch(err) {
+        data = "";
+        $("#loading_files_area").html(data);
+        ducc_error("ducc_load_job_files_data",err);
+    }   
+}
+
 function ducc_init_reservation_specification_data()
 {
 	try {
@@ -664,6 +709,51 @@ function ducc_load_reservation_specifica
 	}	
 }
 
+function ducc_init_reservation_files_data()
+{
+    try {
+        data = "<img src=\"opensources/images/indicator.gif\" alt=\"waiting...\">"
+        $("#files_data_area").html(data);
+    }
+    catch(err) {
+        ducc_error("ducc_init_reservation_files_data",err);
+    }
+}
+
+var ms_load_reservation_files_data = +new Date() - ms_reload_min;
+
+function ducc_load_reservation_files_data()
+{
+    var ms_now = +new Date();
+    if(ms_now < ms_load_reservation_files_data + ms_reload_min) {
+        return;
+    }
+    ms_load_reservation_files_data = ms_now;
+    try {
+        data = "<img src=\"opensources/images/indicator.gif\" alt=\"waiting...\">";
+        $("#loading_files_area").html(data);
+        server_url= "/ducc-servlet/reservation-files-data"+location.search;
+        $.ajax(
+        {
+            url : server_url,
+            async: true,
+            success : function (data) 
+            {
+                $("#files_data_area").html(data);
+                hide_show();
+                data = "";
+                $("#loading_files_area").html(data);
+                sorttable.makeSortable(document.getElementById('files_table'));
+            }
+        });
+    }
+    catch(err) {
+        data = "";
+        $("#loading_files_area").html(data);
+        ducc_error("ducc_load_reservation_files_data",err);
+    }   
+}
+
 function ducc_init_service_registry_data()
 {
 	try {
@@ -763,6 +853,51 @@ function ducc_init_service_deployments_d
 	}
 }
 
+function ducc_init_service_files_data()
+{
+    try {
+        data = "<img src=\"opensources/images/indicator.gif\" alt=\"waiting...\">"
+        $("#files_data_area").html(data);
+    }
+    catch(err) {
+        ducc_error("ducc_init_service_files_data",err);
+    }
+}
+
+var ms_load_service_files_data = +new Date() - ms_reload_min;
+
+function ducc_load_service_files_data()
+{
+    var ms_now = +new Date();
+    if(ms_now < ms_load_service_files_data + ms_reload_min) {
+        return;
+    }
+    ms_load_service_files_data = ms_now;
+    try {
+        data = "<img src=\"opensources/images/indicator.gif\" alt=\"waiting...\">";
+        $("#loading_files_area").html(data);
+        server_url= "/ducc-servlet/service-files-data"+location.search;
+        $.ajax(
+        {
+            url : server_url,
+            async: true,
+            success : function (data) 
+            {
+                $("#files_data_area").html(data);
+                hide_show();
+                data = "";
+                $("#loading_files_area").html(data);
+                sorttable.makeSortable(document.getElementById('files_table'));
+            }
+        });
+    }
+    catch(err) {
+        data = "";
+        $("#loading_files_area").html(data);
+        ducc_error("ducc_load_service_files_data",err);
+    }   
+}
+
 function hide_show() {
 	var classpathdata = ducc_appl("classpathdata");
 	var c_value = ducc_get_cookie(classpathdata);
@@ -1528,11 +1663,13 @@ function ducc_init(type)
 			ducc_init_job_workitems_data();
 			ducc_init_job_performance_data();
 			ducc_init_job_specification_data();
+			ducc_init_job_files_data();
 			ducc_load_job_workitems_count_data();
 			ducc_load_job_processes_data();
 			ducc_load_job_workitems_data();
 			ducc_load_job_performance_data();
 			ducc_load_job_specification_data();
+			ducc_load_job_files_data();
 		}
 		if(type == "uima-initialization-report") {
 		    uima_initialization_report();
@@ -1540,16 +1677,20 @@ function ducc_init(type)
 		if(type == "reservation-details") {
 			ducc_init_reservation_processes_data();
 			ducc_init_reservation_specification_data();
+			ducc_init_reservation_files_data();
 			ducc_load_reservation_processes_data();
 			ducc_load_reservation_specification_data();
+			ducc_load_reservation_files_data();
 		}
 		if(type == "service-details") {
 			ducc_init_service_summary_data();
 			ducc_init_service_deployments_data();
 			ducc_init_service_registry_data();
+			ducc_init_service_files_data();
 			ducc_load_service_summary_data();
 			ducc_load_service_deployments_data();
 			ducc_load_service_registry_data();
+			ducc_load_service_files_data();
 			ducc_service_update_form_button();
 		}
 		if(type == "system-machines") {
@@ -1999,12 +2140,15 @@ function ducc_update_page(type)
 				ducc_load_job_workitems_data();
 				ducc_load_job_performance_data();
 				//ducc_load_job_specification_data();
+				ducc_load_job_files_data();
 			}
 			if(type == "reservation-details") {
 				//ducc_load_reservation_specification_data();
 				ducc_load_reservation_processes_data();
+				ducc_load_reservation_files_data();
 			}
 			if(type == "service-details") {
+				ducc_load_service_files_data();
 				ducc_load_service_registry_data();
 				ducc_load_service_deployments_data();
 				ducc_service_update_form_button();

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.jsp?rev=1525913&r1=1525912&r2=1525913&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.jsp Tue Sep 24 14:53:48 2013
@@ -77,6 +77,7 @@ under the License.
 		<ul>
 			<li><a href="#tabs-1">Processes</a></li>
 			<li><a href="#tabs-2">Specification</a></li>
+			<li><a href="#tabs-3">Files</a></li>
 		</ul>
 			<div id="tabs-1">
 			    <%@ include file="reservation.details.table.processes.jsp" %>
@@ -86,6 +87,9 @@ under the License.
    					<span id="specification_data_area"></span>
    				</div>
 			</div>
+			<div id="tabs-3">
+                <%@ include file="reservation.details.table.files.jsp" %>
+            </div>
 		</div>
 </td>
 </table>

Added: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.table.files.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.table.files.jsp?rev=1525913&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.table.files.jsp (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservation.details.table.files.jsp Tue Sep 24 14:53:48 2013
@@ -0,0 +1,35 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<div id=loading_files_area>
+</div>
+<table>
+  <caption><b>Files List</b><br><i><small>click column heading to sort</small></i></caption>
+  <tr>
+  <td>
+    <table class="sortable">
+    <thead>
+    <tr class="ducc-head">
+    <th title="The file name">Name</th>
+    <th title="The file size, in MB">Size</th>
+    </tr>
+    </thead>
+    <tbody id="files_data_area">
+    </tbody>
+    </table>
+</table>
\ No newline at end of file

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.jsp?rev=1525913&r1=1525912&r2=1525913&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.jsp Tue Sep 24 14:53:48 2013
@@ -80,6 +80,8 @@ under the License.
 		<ul>
 			<li><a href="#tabs-1">Deployments</a></li>
 			<li><a href="#tabs-2">Registry</a></li>
+			<li><a href="#tabs-3">Files</a></li>
+			
 		</ul>
 			<div id="tabs-1">
 			    <%@ include file="service.details.table.deployments.jsp" %>
@@ -92,6 +94,9 @@ under the License.
    					<span id="registry_data_area"></span>
    				</div>
 			</div>
+			<div id="tabs-3">
+                <%@ include file="service.details.table.files.jsp" %>
+            </div>
 		</div>
 </td>
 </table>

Added: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.table.files.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.table.files.jsp?rev=1525913&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.table.files.jsp (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/service.details.table.files.jsp Tue Sep 24 14:53:48 2013
@@ -0,0 +1,36 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<div id=loading_files_area>
+</div>
+<table>
+  <caption><b>Files List</b><br><i><small>click column heading to sort</small></i></caption>
+  <tr>
+  <td>
+    <table class="sortable">
+    <thead>
+    <tr class="ducc-head">
+    <th title="The service deployment id">Id</th>
+    <th title="The file name">Name</th>
+    <th title="The file size, in MB">Size</th>
+    </tr>
+    </thead>
+    <tbody id="files_data_area">
+    </tbody>
+    </table>
+</table>
\ No newline at end of file