<?xml version="1.0"?>
<!--
 -
 -  $Id$
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -
 -  Copyright (C) 1998-2018 OpenLink Software
 -
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -
 -  This program is distributed in the hope that it will be useful, but
 -  WITHOUT ANY WARRANTY; without even the implied warranty of
 -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 -  General Public License for more details.
 -
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -
-->
<v:page name="logs" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <vm:pagetitle>Upstream Error Log</vm:pagetitle>
  <vm:popup_page_wrapper>
    <vm:variables>
      <v:variable persist="0" name="v_oid" param-name="oid" type="integer" default="-1" />
    </vm:variables>
    <vm:pagebody>
      <?vsp
        http (sprintf ('<input type="hidden" name="sid"   value="%s" />', get_keyword ('sid',   self.vc_event.ve_params, '')));
        http (sprintf ('<input type="hidden" name="realm" value="%s" />', get_keyword ('realm', self.vc_event.ve_params, '')));
      ?>
      <v:data-set name="ds" sql="select * from CAL.WA.UPSTREAM_LOG where UL_UPSTREAM_ID = :p0 order by UL_DT desc" nrows="0" scrollable="1">
        <v:param name="p0" value="--self.v_oid" />

        <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
          <table class="ODS_grid">
            <thead>
              <tr>
                <th style="text-align: left;">Time</th>
                <th style="text-align: left;">Message</th>
              </tr>
            </thead>
          </table>
        </v:template>
        <v:template name="ds_repeat" type="repeat">

          <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
            <table>
              <tr>
                <td nowrap="nowrap">
                  <v:label value="--subseq (cast((control.vc_parent as vspx_row_template).te_column_value('UL_DT') as varchar), 0, 19)" />
                </td>
                <td nowrap="nowrap">
                  <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('UL_MESSAGE')" />
                </td>
              </tr>
            </table>
          </v:template>

        </v:template>

        <v:template type="simple" name-to-remove="table" set-to-remove="top">
          <table>
          </table>
        </v:template>

      </v:data-set>
    </vm:pagebody>
  </vm:popup_page_wrapper>
</v:page>
