@@------------------------------------------------------------------------------
@@--                              Ada Web Server                              --
@@--                                                                          --
@@--                     Copyright (C) 2000-2012, AdaCore                     --
@@--                                                                          --
@@--  This library is free software;  you can redistribute it and/or modify   --
@@--  it under terms of the  GNU General Public License  as published by the  --
@@--  Free Software  Foundation;  either version 3,  or (at your  option) any --
@@--  later version. This library 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.                    --
@@--                                                                          --
@@--  As a special exception under Section 7 of GPL version 3, you are        --
@@--  granted additional permissions described in the GCC Runtime Library     --
@@--  Exception, version 3.1, as published by the Free Software Foundation.   --
@@--                                                                          --
@@--  You should have received a copy of the GNU General Public License and   --
@@--  a copy of the GCC Runtime Library Exception along with this program;    --
@@--  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see   --
@@--  <http://www.gnu.org/licenses/>.                                         --
@@--                                                                          --
@@--  As a special exception, if other files instantiate generics from this   --
@@--  unit, or you link this unit with other files to produce an executable,  --
@@--  this  unit  does not  by itself cause  the resulting executable to be   --
@@--  covered by the GNU General Public License. This exception does not      --
@@--  however invalidate any other reasons why the executable file  might be  --
@@--  covered by the  GNU Public License.                                     --
@@------------------------------------------------------------------------------
@@--
@@--  VARIOUS TEMPLATES_PARSER CONSTANTS
@@--
@@--  This constant controls the amount of session data to output.
@@--  Set this to @_SESSIONS_V'Length_@ to output all sessions.
@@--  WARNING! On a busy server with sessions enabled, this can
@@--  produce a very large table, so use with caution.
@@SET@@ AMOUNT_OF_SESSIONS_TO_OUTPUT    = 20
@@--
@@SET@@ ALERT_FONT_COLOR                = #f00
@@SET@@ BODY_FONT_COLOR                 = #005696
@@SET@@ BODY_BGCOLOR                    = #555
@@SET@@ BORDER_LEFT_AND_TOP             = #8caec9
@@SET@@ BORDER_RIGHT_AND_BOTTOM         = #192036
@@SET@@ COPYRIGHT_BORDER_COLOR          = #587891
@@SET@@ COPYRIGHT_FONT_COLOR            = #f1f1f1
@@SET@@ DATA_FONT_COLOR                 = #000
@@SET@@ DEVELOPER_BORDER_COLOR          = #8caec9
@@SET@@ DEVELOPER_COLOR                 = #192036
@@SET@@ GENERIC_INFO_COLOR              = #f1f1f1
@@SET@@ HOTPLUG_LINK_COLOR              = #7c9847
@@SET@@ HOTPLUG_LINK_HOVER_COLOR        = #546b89
@@SET@@ LINK_COLOR                      = #b4d278
@@SET@@ LINK_HOVER_COLOR                = #f1f1f1
@@SET@@ HEADLINE_BGCOLOR                = #546b89
@@SET@@ HEADLINE_FONT_COLOR             = #fcfcfc
@@SET@@ SECTION_HEADLINE_COLOR          = #f1f1f1
@@SET@@ TABLE_BGCOLOR                   = #e5eef3
@@SET@@ TABLE_ROW_MODULUS_COLOR         = #fbfbf9
@@SET@@ TABLE_TD_BORDER_COLOR           = #546b89
@@--
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

        @_SERVER_NAME_@ - Status page

        body, div, table, a, tr, td, h3, h4, p {
            padding: 0px;
            margin: 0px;
        }

        body {
            width: 900px;
            padding: 25px 0px;
            margin-left: auto;
            margin-right: auto;
            color: @_BODY_FONT_COLOR_@;
            background-color: @_BODY_BGCOLOR_@;
            font-family: Verdana, sans-serif;
            font-size: 14px;
        }

        .headline_box {
            padding: 13px 0px 10px 0px;
            border-top: double 4px @_BORDER_LEFT_AND_TOP_@;
            border-right: double 4px @_BORDER_RIGHT_AND_BOTTOM_@;
            border-bottom: double 4px @_BORDER_RIGHT_AND_BOTTOM_@;
            border-left: double 4px @_BORDER_LEFT_AND_TOP_@;
            color: @_HEADLINE_FONT_COLOR_@;
            background-color: @_HEADLINE_BGCOLOR_@;
            text-align: center;
        }

        .headline_server_name {
            margin: 10px 0px;
        }

        .headline_version {
            font-size: 12px;
            font-weight: normal;
        }

        .section_headline {
            margin-top: 30px;
            margin-bottom: 5px;
            text-align: center;
            color: @_SECTION_HEADLINE_COLOR_@;
        }

        .link_box {
            text-align: center;
            font-size: 12px;
        }

        a {
            color: @_LINK_COLOR_@;
        }

        a:hover {
            color: @_LINK_HOVER_COLOR_@;
        }

        .alert {
            padding-left: 5px;
            color: @_ALERT_FONT_COLOR_@
        }

        table {
            margin-top: 15px;
            width: 100%;
            border-collapse: collapse;
            border-top: solid 3px @_BORDER_LEFT_AND_TOP_@;
            border-right: solid 2px @_BORDER_RIGHT_AND_BOTTOM_@;
            border-left: solid 3px @_BORDER_LEFT_AND_TOP_@;
            border-bottom: solid 2px @_BORDER_RIGHT_AND_BOTTOM_@;
            background-color: @_TABLE_BGCOLOR_@;
        }

        th {
            padding: 10px 5px;
            color: @_HEADLINE_FONT_COLOR_@;
            background-color: @_HEADLINE_BGCOLOR_@;
        }

        td {
            padding: 7px 5px;
        }

        .key {
            width: 35%;
            border-right: solid 1px @_TABLE_TD_BORDER_COLOR_@;
        }

        .background {
            background-color: @_TABLE_ROW_MODULUS_COLOR_@;
        }

        .bold {
            font-weight: bold;
        }

        .left {
            text-align: left !important;
        }

        .data_color {
            color: @_DATA_FONT_COLOR_@;
        }

        .slots_information {
            text-align: center;
            font-size: 12px;
        }

        .no_active_sessions,
        .no_hotplug_module {
            margin: 15px 0px 0px 5px;
            color: @_GENERIC_INFO_COLOR_@;
            text-align: center;
        }

        .sessions_information {
            font-size: 12px;
        }

        .sessions_information td {
            text-align: center;
            vertical-align: text-top;
        }

        .sessions_information div {
            padding-left: 5px;
            width: 430px;
            overflow: auto;
            text-align: left;
        }

        .italic {
            font-style: italic;
        }

        .more_session_data_available {
            margin: 8px 0px 0px 5px;
            font-size: 12px;
            color: @_GENERIC_INFO_COLOR_@;
        }

        .hotplug_modules td {
            text-align: center;
        }

        .hotplug_link {
            padding: 0px 5px;
        }

        .hotplug_link a {
            color: @_HOTPLUG_LINK_COLOR_@;
        }

        .hotplug_link a:hover {
            color: @_HOTPLUG_LINK_HOVER_COLOR_@ !important;
        }

        .copyright {
            margin-top: 40px;
            border: solid 1px @_COPYRIGHT_BORDER_COLOR_@;
            font-size: 12px;
            text-align: center;
        }

        .copyright p {
            margin: 10px;
            color: @_COPYRIGHT_FONT_COLOR_@;
        }
    </style>


            AWS Server Status Page

            "@_SERVER_NAME_@"

            AWS version @_VERSION_@

        Configuration

        AWS configuration options manual (http://docs.adacore.com/aws-docs/aws/using_aws.html#configuration-options)

                             Directive
            
                             Value

                             Accept Queue Size:
            
                             @_ACCEPT_QUEUE_SIZE_@

                             Case Sensitive Parameters:
            
                             @_YES_NO:CASE_SENSITIVE_PARAMETERS_@

                             Check URL Validity:
            
                             @_YES_NO:CHECK_URL_VALIDITY_@

                             Cleaner Client Data Timeout:
            
                             @_CLEANER_CLIENT_DATA_TIMEOUT_@ seconds

                             Cleaner Client Header Timeout:
            
                             @_CLEANER_CLIENT_HEADER_TIMEOUT_@ seconds

                             Cleaner Server Response Timeout:
            
                             @_CLEANER_SERVER_RESPONSE_TIMEOUT_@ seconds

                             Cleaner Wait For Client Timeout:
            
                             @_CLEANER_WAIT_FOR_CLIENT_TIMEOUT_@ seconds

                             Context Lifetime:
            
                             @_CONTEXT_LIFETIME_@ seconds

                             Directory Browser Page:
            
                             @_DIRECTORY_BROWSER_PAGE_@

                             Exchange Certificate:
            
                             @_YES_NO:EXCHANGE_CERTIFICATE_@

                             Force Client Data Timeout:
            
                             @_FORCE_CLIENT_DATA_TIMEOUT_@ seconds

                             Force Client Header Timeout:
            
                             @_FORCE_CLIENT_HEADER_TIMEOUT_@ seconds

                             Force Server Response Timeout:
            
                             @_FORCE_SERVER_RESPONSE_TIMEOUT_@ seconds

                             Force Wait For Client Timeout:
            
                             @_FORCE_WAIT_FOR_CLIENT_TIMEOUT_@ seconds

                             Free Slots Keep Alive Limit:
            
                             @_FREE_SLOTS_KEEP_ALIVE_LIMIT_@

                             Hotplug Port:
            
                             @_HOTPLUG_PORT_@

                             Input Line Size Limit:
            
                             @_INPUT_LINE_SIZE_LIMIT_@

                             Keep Alive Force Limit:
            
                             @_KEEP_ALIVE_FORCE_LIMIT_@

                             Key (RSA):
            
                             @@IF@@ @_RSA_KEY_@ /= ""
                    @_RSA_KEY_@
                @@ELSE@@
                    Not set
                @@END_IF@@

                             Line Stack Size:
            
                             @_LINE_STACK_SIZE_@ bytes

                             Max Concurrent Download:
            
                             @_MAX_CONCURRENT_DOWNLOAD_@

                             Max WebSocket Handler:
            
                             @_MAX_WEBSOCKET_HANDLER_@

                             Maximum Connections:
            
                             @_MAX_CONNECTION_@

                             Receive Timeout:
            
                             @_RECEIVE_TIMEOUT_@ seconds

                             Reuse Address:
            
                             @_YES_NO:REUSE_ADDRESS_@
                @@IF@@ @_REUSE_ADDRESS_@
                    (unsafe setting. Use with caution)
                @@END_IF@@

                             Security Mode:
            
                             @_SECURITY_MODE_@

                             Send Timeout:
            
                             @_SEND_TIMEOUT_@ seconds

                             Server Has Session:
            
                             @_YES_NO:SESSION_@

                             Server Host:
            
                             @_SERVER_HOST_@
                @@IF@@ not @_EXIST:SERVER_HOST_@
                    Not set
                @@END_IF@@

                             Server Port:
            
                             @_SERVER_PORT_@

                             Server Security:
            
                             @_YES_NO:SECURITY_@

                             Server Socket:
            
                             @_SERVER_SOCK_@

                             Session Cleanup Interval:
            
                             @_SESSION_CLEANUP_INTERVAL_@ seconds

                             Session Id Length:
            
                             @_SESSION_ID_LENGTH_@

                             Session Lifetime:
            
                             @_SESSION_LIFETIME_@ seconds

                             Session Name:
            
                             @_SESSION_NAME_@

                             Transient Cleanup Interval:
            
                             @_TRANSIENT_CLEANUP_INTERVAL_@ seconds

                             Transient Lifetime:
            
                             @_TRANSIENT_LIFETIME_@ seconds

                             Upload Directory:
            
                             @@IF@@ @_UPLOAD_DIRECTORY_@ /= ""
                    @_UPLOAD_DIRECTORY_@
                @@ELSE@@
                    Not set
                @@END_IF@@

                             Upload Size Limit:
            
                             @_UPLOAD_SIZE_LIMIT_@ bytes

                             WebSocket Message Queue Size:
            
                             @_WEBSOCKET_MESSAGE_QUEUE_SIZE_@

                             WebSocket Origin:
            
                             @@IF@@ @_WEBSOCKET_ORIGIN_@ /= ""
                    @_WEBSOCKET_ORIGIN_@
                @@ELSE@@
                    Any origin
                @@END_IF@@

                             WWW Root:
            
                             @_WWW_ROOT_@

        Server Information

                             Directive
            
                             Value

                             Acceptor Length:
            
                             @_ACCEPTOR_LENGTH_@

                             Current Amount Of Sessions:
            
                             @_SESSIONS_V'Length_@

                             Current Connections:
            
                             @_CURRENT_CONNECTIONS_@

                             Started On:
            
                             @@--  The START_TIME tag date format is "YYYY-MM-DD HH:MM:SS" so it can be manipulated
                @@--  with the FORMAT_DATE filter. Assuming START_TIME at "2010-27-04 10:42:13" here are
                @@--  some examples:
                @@--  @_FORMAT_DATE(%a %D %T):START_TIME_@ results in "Tue 04/27/10 10:42:13"
                @@--  @_FORMAT_DATE(%d%m%y %H%M%S):START_TIME_@ results in "270410 133256"
                @@--  @_FORMAT_DATE(%d-%m-%y %T):START_TIME_@ results in "27-04-10 13:32:56"

                @_FORMAT_DATE(%d-%m-%y %T):START_TIME_@
            </td>
        </tr>
        <tr class="background">
            <td class="key">
                Resources Served:
            </td>
            <td class="data_color">
                @_RESOURCES_SERVED_@
            </td>
        </tr>
    </table>
    <h3 class="section_headline">
        Log Information
    </h3>
    <table>
        <tr>
            <th>
                Directive
            </th>
            <th>
                Value
            </th>
        </tr>
        <tr class="background">
            <td class="key">
                Log File Directory:
            </td>
            <td class="data_color">
                @_LOG_FILE_DIRECTORY_@
            </td>
        </tr>
        <tr>
            <td class="key">
                Error Log Filename Prefix:
            </td>
            <td class="data_color">
                @_ERROR_LOG_FILENAME_PREFIX_@
            </td>
        </tr>
        <tr class="background">
            <td class="key">
                Error Log Split Mode:
            </td>
            <td class="data_color">
                @_ERROR_LOG_SPLIT_MODE_@
            </td>
        </tr>
        <tr>
            <td class="key">
                Error Log:
            </td>
            <td class="data_color">
                @@IF@@ @_ERROR_LOG_@
                    @_ERROR_LOG_FILE_@
                @@ELSE@@
                    Not set
                @@END_IF@@
            </td>
        </tr>
        <tr class="background">
            <td class="key">
                Log Filename Prefix:
            </td>
            <td class="data_color">
                @_LOG_FILENAME_PREFIX_@
            </td>
        </tr>
         <tr>
            <td class="key">
                Log mode:
            </td>
            <td class="data_color">
                @_LOG_MODE_@
            </td>
        </tr>
        <tr class="background">
            <td class="key">
                Log:
            </td>
            <td class="data_color">
                @@IF@@ @_LOG_@
                    @_LOG_FILE_@
                @@ELSE@@
                    Not set
                @@END_IF@@
            </td>
        </tr>
        <tr class="background">
            <td class="key">
                Log Extended Fields:
            </td>
            <td class="data_color">
                @@IF@@ @_LOG_EXTENDED_FIELDS_@ /= ""
                    @_LOG_EXTENDED_FIELDS_@
                @@ELSE@@
                    Not set
                @@END_IF@@
            </td>
        </tr>
    </table>
    <h3 class="section_headline">
        Slots Information
    </h3>
    <table class="slots_information data_color">
        <tr>
            <th>
                Slot no.
            </th>
            <th>
                Socket
            </th>
            <th>
                Last Client IP
            </th>
            <th>
                Phase
            </th>
            <th>
                Abortable
            </th>
            <th>
                Slot Counter
            </th>
            <th>
                Socket Counter
            </th>
            <th>
                Activity Time Stamp
            </th>
        </tr>
        @@TABLE@@
            @@BEGIN@@
            <tr class="background">
            @@SECTION@@
            <tr>
            @@END@@
                <td>
                @_TABLE_LINE_@
                </td>
                <td>
                @_SOCK_V_@
                </td>
                @@IF@@ @_EXIST:PEER_NAME_V_@
                <td>
                @_PEER_NAME_V_@
                </td>
                @@ELSE@@
                <td>
                &nbsp;
                </td>
                @@END_IF@@
                <td>
                @_CAPITALIZE:PHASE_V_@
                </td>
                <td>
                @_YES_NO:ABORTABLE_V_@
                </td>
                <td>
                @_ACTIVITY_COUNTER_V_@
                </td>
                <td>
                @_SLOT_ACTIVITY_COUNTER_V_@
                </td>
                <td>
                @_FORMAT_DATE(%d-%m-%y %T):ACTIVITY_TIME_STAMP_V_@
                </td>
            </tr>
        @@END_TABLE@@
    </table>
    <h3 class="section_headline">
        Sessions Information
    </h3>
    @@IF@@ @_IS_EMPTY:SESSIONS_V_@
        <p class="no_active_sessions">
            No active sessions on server.
        </p>
    @@ELSE@@
        <table class="sessions_information data_color">
            <tr>
                <th>
                Session ID
                </th>
                <th>
                Start
                </th>
                <th>
                End
                </th>
                <th>
                Session Data
                </th>
            </tr>
            @@TABLE@@
                @@IF@@ (@_TABLE_LINE_@ <= @_AMOUNT_OF_SESSIONS_TO_OUTPUT_@)
                    @@IF@@ @_MOD(2):TABLE_LINE_@ = 0
                    <tr>
                    @@ELSE@@
                    <tr class="background">
                    @@END_IF@@
                        <td class="left">
                            @_SESSIONS_V_@
                        </td>
                        <td>
                            @_FORMAT_DATE(%d-%m-%y %T):SESSIONS_TS_V_@
                        </td>
                        <td>
                            @_FORMAT_DATE(%d-%m-%y %T):SESSIONS_TERMINATE_V_@
                        </td>
                        <td>
                            <div>
                                @@INLINE(")(", ")(")@@
                                    @@TABLE@@
                                        @_KEYS_M_@=@_VALUES_M_@
                                    @@END_TABLE@@
                                @@END_INLINE@@
                            </div>
                        </td>
                    </tr>
                @@END_IF@@
            @@END_TABLE@@
        </table>
        @@IF@@ (@_AMOUNT_OF_SESSIONS_TO_OUTPUT_@ < @_SESSIONS_V'Length_@)
            <p class="more_session_data_available italic">
                More session data is available. To see this, adjust the AMOUNT_OF_SESSIONS_TO_OUTPUT constant in this template.
            </p>
        @@END_IF@@
    @@END_IF@@
    <h3 class="section_headline">
        Hotplug Modules
    </h3>
    @@IF@@ @_IS_EMPTY:HP_REGEXP_V_@
        <p class="no_hotplug_module">
            No hotplug module loaded.
        </p>
    @@ELSE@@
        <table class="hotplug_modules data_color">
            <tr>
                <th>
                    Order
                </th>
                <th>
                    Module Regexp
                </th>
                <th>
                    Server Address
                </th>
                <th>
                    Actions
                </th>
            </tr>
            @@TABLE@@
                @@BEGIN@@
                <tr class="background">
                @@SECTION@@
                <tr>
                @@END@@
                    <td>
                        @_TABLE_LINE_@
                    </td>
                    <td>
                        @_HP_REGEXP_V_@
                    </td>
                    <td>
                        @_HP_URL_V_@
                    </td>
                    <td>
                        <span class="hotplug_link bold"><a href="@_ADMIN_@-HPup?N=@_TABLE_LINE_@">UP</a></span>
                        <span class="hotplug_link bold"><a href="@_ADMIN_@-HPdown?N=@_TABLE_LINE_@">DOWN</a></span>
                    </td>
                </tr>
            @@END_TABLE@@
        </table>
    @@END_IF@@
    <div class="copyright">
        <p>
            AWS has been developed in Ada with the GNAT compiler (see the <a href="http://www.adacore.com">AdaCore</a> web site).
        </p>
        <p>
            <a href="mailto:anisimkov@ada-ru.org">Dmitriy Anisimkov</a> | <a href="mailto:pascal@obry.net">Pascal Obry</a>
        </p>
        <p>
            Copyright (C) 2000-2014, AdaCore
        </p>
    </div>


