<%@page import="java.util.List"%>
<%@page import="paqueteBL.*"%>

<%
    Pool pool=(Pool)request.getAttribute("pool");
%>

<div class="degradado">Gestión del Pool<br/><div >
<table class="menuVentana"  width="100%">
<tr>
<td align="center"><a href="javascript:gestMenuPool('nuevoHost');" onclick="this.href;">Nuevo Host</a></td>
<td align="center"><a href="" onclick="this.href;">Recargar</a></td>
<td align="center"><a href="javascript:gestMenuPool('guardar');" onclick="this.href;">Guardar</a></td>
</tr>
</table>
</div>
</div>
<div class="separador3"/>

<table class='tablaForm' >
    <table class="contenidoForm">
        <tr><td class="labelForm">DataStore:</td><td><input name="txtDataStore" class="tamCajasTexto" type="text" value="<%= pool.getDataStore() %>"/></td></tr>
        <tr><td class="labelForm">Responsable:</td><td><input name="txtResponsable" class="tamCajasTexto" type="text" value="<%= pool.getResponsable() %>"/></td></tr>
        <tr><td class="labelForm">Hora backup:</td><td><input name="txtHoraBackup" class="tamCajasTexto" type="text" value="<%= pool.getStrHora() %>"/></td></tr>
        <tr><td class="labelForm">Path backup:</td><td><input name="txtPathBackup" class="tamCajasTexto" type="text" value="<%= pool.getPathBackup() %>"/></td></tr>
    </table>
</table>

<BR/>

<table class='tablaGral' style='margin-top:-10px;'>
    <thead><td></td><td align='left' colspan='2'>Plantilla</td></thead>
<%
List<Plantilla> lista=pool.getPlantillas();
int i;
lista.add(new Plantilla());
out.println("<tr><td></td><td><input type='hidden' name='nPlantillas' id='nPlantillas' value='"+lista.size()+"'/></td><td></td></tr>");
for(i=0;i<lista.size();i++)
{
    out.println("<tr>");
    if (i!=lista.size()-1) out.println("<td><input name='chkPlantilla"+i+"' id='chkPlantilla"+i+"' type='checkbox' checked value='on' onchange='this.value=this.checked;'/></td>"); else out.println("<td></td>");
    out.println("<td align='left'><input name='IDplantilla"+i+"' type='hidden' value='"+lista.get(i).getId()+"'/><input name='txtPlantilla"+i+"' type='text' class='tamCajasDoblesDer' value='"+lista.get(i).getNombre()+"'/></td><td><input type='text' name='txtPathPlantilla"+i+"' class='tamCajasDoblesDer' value='"+lista.get(i).getPath()+"'/></td></tr>");
}
%>
</table>

<BR/>
<BR/>

<table class='tablaGral' style='margin-top:-10px;'>
<thead><td>Eventos:</td><td align="right">Hora/Fecha</td></thead>
<%

    List<Evento> eventos=pool.getEventos();
    Evento evento;
    for(i=0;i<eventos.size();i++)
    {
        evento=eventos.get(i);
        out.println("<tr><td class='labelForm'>"+evento.getEvento()+"</td><td align='right'>"+evento.getStrFecha()+"</td></tr>");
    }
%>
</table>