<%inherit file="/layout/message.html" />
<%!
title = 'PDF Server Status'
%>
<%def name="header()">
    <h1>PDF Server status</h1>
</%def>

<style type="text/css">
    .masterContainer { background-color: #fff;}
    table { width: 100%; }
    td.k { width: 150px; }
    iframe { border: 2px solid #66ADFF; height: 300px; width: 500px; }
</style>

<h2>Configuration</h2>

<table>
    <tr>
        <td class="k">PDF server is installed</td>
        <td class="v splFont-mono">${status['pdfIsInstalled'] | h}</td>
    </tr>
    <tr>
        <td class="k">PDF server is enabled</td>
        <td class="v splFont-mono">${status['pdfIsEnabled'] | h}</td>
    </tr>
    <tr>
        <td class="k">SMTP server set</td>
        <td class="v splFont-mono">${status['smtpIsSet'] | h}</td>
    </tr>
</table>
<table>
    % for k in status['configuration']:
        <tr>
            <td class="k">${k | h}</td>
            <td class="v splFont-mono">${status['configuration'][k] | h}</td>
        </tr>
    % endfor
</table>

<h2>Test PDF generation</h2>

% if status['pdfIsEnabled']:

    <p>The blue box below is a test PDF container that tests the PDF generation service.  It will take from 5-20 seconds for the PDF to show up.</p>\
    <p><strong>NOTE:</strong> Firefox users will see a PDF open in a separate window.  IE, Safari, and Chrome users will see the PDF directly inside the blue box</p>
    <p>If this box is blank or no download occurs after 60 seconds, the PDF server may not be functioning correctly.</p>
    <iframe id="splunkd_echo" src="${make_url('/debug/pdf_echo_loopback') | h}">loading...</iframe>

% else:

    <p>The PDF server is disabled.  Enable the PDF server to see test PDF generation.</p>
    
% endif
