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/02/11 19:53:05 UTC
svn commit: r1444923 - in
/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main:
java/org/apache/uima/ducc/ws/server/DuccHandler.java
webapp/root/$imports-classic.jsp webapp/root/$imports.jsp
webapp/root/job.details.jsp webapp/root/js/ducc.js
Author: degenaro
Date: Mon Feb 11 18:53:05 2013
New Revision: 1444923
URL: http://svn.apache.org/r1444923
Log:
UIMA-2656 Display pipeline initialization information with cluetip
Added:
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports-classic.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports.jsp
Modified:
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
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=1444923&r1=1444922&r2=1444923&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 Mon Feb 11 18:53:05 2013
@@ -61,6 +61,7 @@ import org.apache.uima.ducc.common.utils
import org.apache.uima.ducc.common.utils.Version;
import org.apache.uima.ducc.common.utils.id.DuccId;
import org.apache.uima.ducc.orchestrator.authentication.DuccWebAdministrators;
+import org.apache.uima.ducc.transport.agent.IUimaPipelineAEComponent;
import org.apache.uima.ducc.transport.event.ProcessInfo;
import org.apache.uima.ducc.transport.event.cli.SpecificationProperties;
import org.apache.uima.ducc.transport.event.common.DuccWorkJob;
@@ -399,6 +400,7 @@ public class DuccHandler extends DuccAbs
}
sb.append("</td>");
// Time:initialization
+ List<IUimaPipelineAEComponent> upcList = jp.getUimaPipelineComponents();
TimeWindow t;
t = (TimeWindow) process.getTimeWindowInit();
long timeInitMillis = 0;
@@ -411,6 +413,7 @@ public class DuccHandler extends DuccAbs
if(t != null) {
initTime = t.getElapsed(job);
}
+
sb.append("<td align=\"right\">");
if((t != null) && (t.isEstimated())) {
sb.append("<span title=\"estimated\" class=\"health_green\">");
@@ -421,7 +424,47 @@ public class DuccHandler extends DuccAbs
if(initTime == null) {
initTime = "0";
}
+ if(!job.isOperational()) {
+ if(upcList == null) {
+ initTime = "";
+ }
+ else {
+ if(upcList.isEmpty()) {
+ initTime = "";
+ }
+ }
+ }
initTime = chomp("00:", initTime);
+ if(upcList != null) {
+ if(!upcList.isEmpty()) {
+ String id = ""+process.getDuccId().getFriendly();
+ initTime = "<a class=\"classLoad\" title=\""+id+"\" href=\"#loadme"+id+"\" rel=\"#loadme"+id+"\">"+initTime+"</a>";
+ StringBuffer loadme = new StringBuffer();
+ loadme.append("<div id=\"loadme"+id+"\">");
+ loadme.append("<table>");
+ loadme.append("<tr>");
+ String ch1 = "Name";
+ String ch2 = "State";
+ String ch3 = "Time";
+ loadme.append("<td>"+"<b>"+ch1+"</b>");
+ loadme.append("<td>"+"<b>"+ch2+"</b>");
+ loadme.append("<td>"+"<b>"+ch3+"</b>");
+ Iterator<IUimaPipelineAEComponent> upcIterator = upcList.iterator();
+ while(upcIterator.hasNext()) {
+ IUimaPipelineAEComponent upc = upcIterator.next();
+ String iName = upc.getAeName();
+ String iState = upc.getAeState().toString();
+ String iTime = formatDuration(upc.getInitializationTime());
+ loadme.append("<tr>");
+ loadme.append("<td>"+iName);
+ loadme.append("<td>"+iState);
+ loadme.append("<td>"+iTime);
+ }
+ loadme.append("</table>");
+ loadme.append("</div>");
+ sb.append(loadme);
+ }
+ }
sb.append(initTime);
sb.append("</span>");
sb.append("</td>");
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports-classic.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24imports-classic.jsp?rev=1444923&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports-classic.jsp (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports-classic.jsp Mon Feb 11 18:53:05 2013
@@ -0,0 +1,29 @@
+<!--
+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.
+-->
+ <script src="opensources/jquery-1.4.2.js" type="text/javascript"></script>
+ <script src="opensources/cluetip/jquery.cluetip.js" type="text/javascript"></script>
+ <link href="opensources/cluetip/jquery.cluetip.css" rel="stylesheet" type="text/css">
+ <script type="text/javascript" src="opensources/sorttable.js"></script>
+ <script src="opensources/jgrowl/jquery.jgrowl.js" type="text/javascript"></script>
+ <link rel="stylesheet" href="opensources/jgrowl/jquery.jgrowl.css" type="text/css"/>
+ <link href="opensources/jquery-ui-1.8.4/gallery/jquery-ui-themes-1.8.4/themes/redmond/jquery-ui.css" rel="stylesheet" type="text/css"/>
+ <script src="opensources/jquery-ui-1.8.4/ui/minified/jquery-ui.min.js"></script>
+ <link href="opensources/navigation/menu.css" rel="stylesheet" type="text/css">
+ <script src="js/ducc.js"></script>
+ <link href="ducc.css" rel="stylesheet" type="text/css">
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24imports.jsp?rev=1444923&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports.jsp (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports.jsp Mon Feb 11 18:53:05 2013
@@ -0,0 +1,65 @@
+<!--
+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.
+-->
+<%
+String table_style = "scroll";
+String cookieName = "ducc:table_style";
+String cookieValue = null;
+Cookie cookie = null;
+Cookie cookies [] = request.getCookies ();
+if (cookies != null)
+{
+ for (int i = 0; i < cookies.length; i++)
+ {
+ if (cookies [i].getName().equals (cookieName))
+ {
+ cookie = cookies[i];
+ cookieValue = cookie.getValue();
+ if(cookieValue != null) {
+ table_style = cookieValue;
+ }
+ break;
+ }
+ }
+}
+%>
+ <script src="opensources/jquery-1.4.2.js" type="text/javascript"></script>
+ <script src="opensources/cluetip/jquery.cluetip.js" type="text/javascript"></script>
+ <link href="opensources/cluetip/jquery.cluetip.css" rel="stylesheet" type="text/css">
+<%
+if (table_style.equals("scroll")) {
+%>
+ <script type="text/javascript" language="javascript" src="opensources/DataTables-1.9.1/media/js/jquery.dataTables.min.js"></script>
+ <script type="text/javascript" language="javascript" src="opensources/DataTables-plugins/fnReloadAjax.js"></script>
+<%
+}
+%>
+<%
+if (table_style.equals("classic")) {
+%>
+ <script type="text/javascript" src="opensources/sorttable.js"></script>
+<%
+}
+%>
+ <script src="opensources/jgrowl/jquery.jgrowl.js" type="text/javascript"></script>
+ <link rel="stylesheet" href="opensources/jgrowl/jquery.jgrowl.css" type="text/css"/>
+ <link href="opensources/jquery-ui-1.8.4/gallery/jquery-ui-themes-1.8.4/themes/redmond/jquery-ui.css" rel="stylesheet" type="text/css"/>
+ <script src="opensources/jquery-ui-1.8.4/ui/minified/jquery-ui.min.js"></script>
+ <link href="opensources/navigation/menu.css" rel="stylesheet" type="text/css">
+ <script src="js/ducc.js"></script>
+ <link href="ducc.css" rel="stylesheet" type="text/css">
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=1444923&r1=1444922&r2=1444923&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 Mon Feb 11 18:53:05 2013
@@ -16,20 +16,13 @@ KIND, either express or implied. See th
specific language governing permissions and limitations
under the License.
-->
+<%@ page language="java" %>
<html>
<head>
<link rel="shortcut icon" href="uima.ico" />
<title>ducc-mon</title>
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
- <script src="opensources/jquery-1.4.2.js" type="text/javascript"></script>
- <script src="opensources/jgrowl/jquery.jgrowl.js" type="text/javascript"></script>
- <link rel="stylesheet" href="opensources/jgrowl/jquery.jgrowl.css" type="text/css"/>
- <link href="opensources/jquery-ui-1.8.4/gallery/jquery-ui-themes-1.8.4/themes/redmond/jquery-ui.css" rel="stylesheet" type="text/css"/>
- <script src="opensources/jquery-ui-1.8.4/ui/minified/jquery-ui.min.js"></script>
- <link href="opensources/navigation/menu.css" rel="stylesheet" type="text/css">
- <script src="js/ducc.js"></script>
- <script type="text/javascript" src="opensources/sorttable.js"></script>
- <link href="ducc.css" rel="stylesheet" type="text/css">
+ <%@ include file="$imports-classic.jsp" %>
<script type="text/javascript">
$(function() {
$("#tabs").tabs();
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=1444923&r1=1444922&r2=1444923&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 Mon Feb 11 18:53:05 2013
@@ -35,6 +35,19 @@ function ducc_cluetips() {
closeText: '<img src="opensources/cluetip/cross.png" alt="close" />',
mouseOutClose: true
});
+ $('a.classLoad').cluetip('destroy');
+ $('a.classLoad').cluetip({
+ width: 'auto',
+ local:true,
+ cluetipClass: 'jtip',
+ activation: 'click',
+ sticky: true,
+ titleAttribute: 'title',
+ closePosition: 'title',
+ mouseOutClose: true,
+ dropShadow: false,
+ arrows: true
+ });
}
catch(err) {
//ducc_error("ducc_cluetips",err);
@@ -568,6 +581,7 @@ function ducc_load_job_processes_data()
success : function (data)
{
$("#processes_list_area").html(data);
+ ducc_cluetips();
hide_show();
ducc_timestamp();
ducc_authentication();