1,6 → 1,7 |
<%@ page import="jomm.utils.MessageResources" %> |
<%@ page import="pt.estgp.estgweb.domain.JobServiceTaskImpl" %> |
<%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %> |
<%@ page import="jomm.utils.BytesUtils" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
14,10 → 15,77 |
<jomm:messages/> |
<html:errors/> |
|
<% |
String logid = "log" + BytesUtils.generateHexKey(); |
%> |
|
<%-- |
TaskLog styles |
normal or nothing in attribute |
task-log-xs (only progress bar and log link download url) |
task-log-sm (only progress bar,screen log small and log download url) |
task-log-md (table info, progress bar, screen log small and log download url) |
task-log-lg (panel title, table info, progress bar, screen log small and log download url) |
---%> |
|
|
<style> |
.task-log.task-log-xs *.task-log-panel > .panel-heading, |
.task-log.task-log-sm *.task-log-panel > .panel-heading, |
.task-log.task-log-md *.task-log-panel > .panel-heading |
{ |
display: none !important; |
} |
.task-log.task-log-xs *.task-log-table, |
.task-log.task-log-sm *.task-log-table |
{ |
display: none !important; |
} |
.task-log.task-log-sm *.task-log-screens |
{ |
height: 50px !important; |
font-size: 0.8em !important; |
} |
.task-log.task-log-sm *.task-log-screens-toogle, |
.task-log.task-log-md *.task-log-screens-toogle, |
.task-log.task-log-lg *.task-log-screens-toogle |
{ |
display: none !important; |
} |
|
.task-log.task-log-sm *.task-log-screens .screen, |
.task-log.task-log-xs *.task-log-screens .screen |
{ |
height: 150px !important; |
width: 100%; |
font-size: 0.7em !important; |
} |
.task-log.task-log-sm *.task-log-screens .header h2, .task-log-sm .task-log-screens .header a, |
.task-log.task-log-xs *.task-log-screens .header h2, .task-log-xs .task-log-screens .header a{ |
font-size: 0.7em !important; |
} |
</style> |
<script> |
$(document).ready(function(){ |
|
|
|
$(".task-log.task-log-sm *.task-log-screens").addClass("in"); |
$(".task-log.task-log-md *.task-log-screens").addClass("in"); |
$(".task-log.task-log-lg *.task-log-screens").addClass("in"); |
/* |
$(".task-log-xs .task-log-panel .panel .panel-heading").remove(); |
$(".task-log-sm .task-log-panel .panel .panel-heading").remove(); |
$(".task-log-md .task-log-panel .panel .panel-heading").remove(); |
$(".task-log-xs .task-log-table").remove(); |
$(".task-log-sm .task-log-table").remove(); |
$(".task-log-xs .task-log-screens").remove(); |
*/ |
}); |
</script> |
<script> |
|
var startStatus = ""; |
function updateStatus() |
{ |
$.getJSON( "<%=request.getContextPath()%>/admin/schedullerTasksJson?service=loadLog&id=${SchedulleTasksForm.jobServiceTask.id}", function( data ) { |
44,6 → 112,14 |
|
if(data.status == "STARTED" || data.status == "PENDING") |
setTimeout("updateStatus()",2000); |
|
if(startStatus == "") |
startStatus = data.status; |
|
if(data.progress >= 100 && startStatus != data.status) |
{ |
window.location.href = $("#<%=logid%>").closest('.task-log').data("href"); |
} |
}); |
|
} |
58,13 → 134,13 |
%> |
|
|
<div class="container-fluid"> |
<div class="panel panel-default"> |
|
<div class="panel panel-default task-log-panel" > |
<div class="panel-heading"> |
<bean:message key="configuration.taskLog"/> |
</div> |
<div class="panel-body"> |
<table class="tablesorter tablesortersimple"> |
<table class="tablesorter tablesortersimple task-log-table"> |
<thead> |
<tr> |
<th><bean:message key="configuration.task"/></th> |
119,14 → 195,20 |
</tbody> |
|
</table> |
<div class="progress"> |
<div class="progress task-log-progress"> |
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" |
aria-valuemin="0" aria-valuemax="100" style="width:0%"> |
70% |
</div> |
</div> |
<div id="screens"></div> |
<a href="<%=request.getContextPath()%>/logServiceStream/${SchedulleTasksForm.jobServiceTask.logFilePath}">Download Log Completo</a> |
|
<div class="task-log-screens-toogle"> |
<button type="button" class="btn btn-default" data-toggle="collapse" data-target="#<%=logid%>">Mostrar Log</button> |
</div> |
<div id="<%=logid%>" class="task-log-screens collapse"> |
<div id="screens"></div> |
<a href="<%=request.getContextPath()%>/logServiceStream/${SchedulleTasksForm.jobServiceTask.logFilePath}">Download Log Completo</a> |
</div> |
</div> |
</div> |
<script type="text/javascript" src="<%=request.getContextPath()%>/js/logtailer/logtail.js"></script> |
138,6 → 220,9 |
padding: 0.5em; |
font-family: sans-serif; |
} |
.header h2{ |
font-size: 1em; |
} |
|
.header .buttons { |
float: right; |
187,4 → 272,4 |
|
|
|
</div> |
|