# --
# AdminPerformanceLog.dtl - provides HTML form for AdminPerformanceLog
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AdminPerformanceLog.dtl,v 1.28 2010/11/03 09:10:55 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"Performance Log"}</h1>

    <div class="SidebarColumn">
<!-- dtl:block:ActionList -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Actions"}</h2>
            </div>
            <div class="Content">
                <ul class="ActionList">
<!-- dtl:block:ActionOverview -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"}" class="CallForAction"><span>$Text{"Go to overview"}</span></a>
                    </li>
<!-- dtl:block:ActionOverview -->
                </ul>
            </div>
        </div>
<!-- dtl:block:ActionList -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Hint"}</h2>
            </div>
            <div class="Content">
<!-- dtl:block:Enabled -->
                <form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="Action" value="AdminSysConfig"/>
                    <input type="hidden" name="Subaction" value="Edit"/>
                    <input type="hidden" name="SysConfigGroup" value="Framework"/>
                    <input type="hidden" name="SysConfigSubGroup" value="Core::PerformanceLog"/>
                    <h3>$Text{"This feature is enabled!"}</h3>
                    <fieldset>
                        <p class="FieldExplanation">
                            $Text{"Just use this feature if you want to log each request."}
                        </p>
                        <p class="Error">
                            $Text{"Activating this feature might affect your system performance!"}
                        </p>
                        <div class="Field SpacingTop">
                            <button class="CallForAction" type="submit" value="$Text{"Disable it here!"}">
                                <span>$Text{"Disable it here!"}</span>
                            </button>
                        </div>
                        <div class="Clear"></div>

                    </fieldset>
                </form>
<!-- dtl:block:Enabled -->
<!-- dtl:block:Disabled -->
                <form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="Action" value="AdminSysConfig"/>
                    <input type="hidden" name="Subaction" value="Edit"/>
                    <input type="hidden" name="SysConfigGroup" value="Framework"/>
                    <input type="hidden" name="SysConfigSubGroup" value="Core::PerformanceLog"/>
                    <h3>$Text{"This feature is disabled!"}</h3>
                    <fieldset>
                        <p class="FieldExplanation">
                            $Text{"Just use this feature if you want to log each request."}
                        </p>
                        <p class="Error">
                            $Text{"Activating this feature might affect your system performance!"}
                        </p>
                        <div class="Field SpacingTop">
                            <button class="CallForAction" type="submit" value="$Text{"Enable it here!"}">
                                <span>$Text{"Enable it here!"}</span>
                            </button>
                        </div>
                        <div class="Clear"></div>

                    </fieldset>
                </form>
<!-- dtl:block:Disabled -->
<!-- dtl:block:Reset -->
                <form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="Reset"/>
                    <h3>$Text{"Logfile too large!"} ($QData{"Size"})</h3>
                    <fieldset>
                        <p class="Error">
                            $Text{"The logfile is too large, you need to reset it"} ($QData{"Size"}).
                        </p>
                        <div class="Field SpacingTop">
                            <button class="CallForAction" type="submit" value="$Text{"Reset"}">
                                <span>$Text{"Reset"}</span>
                            </button>
                        </div>
                        <div class="Clear"></div>

                    </fieldset>
                </form>
<!-- dtl:block:Reset -->
            </div>
        </div>
    </div>

<!-- dtl:block:Overview -->
    <div class="ContentColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Overview"}</h2>
            </div>

<!-- dtl:block:OverviewTable -->
            <h3 class="Spacing">$Text{"Range"} ($Text{"last"} $QData{"Age"})</h3>
            <div class="Content">

                <table class="DataTable">
                    <thead>
                        <tr>
                            <th>$Text{"Interface"}</th>
                            <th>$Text{"Requests"}</th>
                            <th>$Text{"Min Response"}</th>
                            <th>$Text{"Max Response"}</th>
                            <th>$Text{"Average Response"}</th>
                        </tr>
                    </thead>
                    <tbody>
<!-- dtl:block:OverviewInterface -->
                        <tr>
                            <td>
                                <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=View;Interface=$LQData{"Interface"};Minute=$LQData{"Minute"}" title="$QData{"Interface"}">
                                    $QData{"Interface", "40"}
                                </a>
                            </td>
                            <td>$QData{"Count"}</td>
                            <td>$QData{"Min"}s</td>
                            <td>$QData{"Max"}s</td>
                            <td>$QData{"Average"}s</td>
                        </tr>
<!-- dtl:block:OverviewRow -->
                        <tr>
                            <td class="Indent">
                                <em>
                                <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=View;Interface=$LQData{"Interface"};Module=$LQData{"Module"};Minute=$LQData{"Minute"}" title="$QData{"Module"}">
                                    $QData{"Module", "40"}
                                </a>
                                </em>
                            </td>
                            <td><em>$QData{"Count"}</em></td>
                            <td><em>$QData{"Min"}s</em></td>
                            <td><em>$QData{"Max"}s</em></td>
                            <td><em>$QData{"Average"}s</em></td>
                        </tr>
<!-- dtl:block:OverviewRow -->
<!-- dtl:block:OverviewInterface -->
                    </tbody>
                </table>
<!-- dtl:block:OverviewTable -->
            </div>
        </div>
    </div>
<!-- dtl:block:Overview -->

<!-- dtl:block:View -->
    <div class="ContentColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Range"} ($Text{"last"} $QData{"Age"})</h2>
            </div>
            <div class="Content">
                <p>
                    <strong>$Text{"Interface"}:</strong> $QData{"Interface"},
                    <strong>$Text{"Module"}:</strong> $QData{"Module"},
                    <strong>$Text{"Period"}:</strong> $QData{"Period"} $Text{"minutes"}
                </p>
                <table class="DataTable SpacingTop AdminPerformanceLog">
                    <thead>
                        <tr>
                            <th>$Text{"Date"}</th>
                            <th>$Text{"Requests"}</th>
                            <th>$Text{"Min"}</th>
                            <th>$Text{"Max"}</th>
                            <th>$Text{"Average"}</th>
                            <th class="ProgressbarColumn"></th>
                        </tr>
                    </thead>
                    <tbody>
<!-- dtl:block:ViewRow -->
                        <tr>
                            <td><em>$TimeShort{"$QData{"Date"}"}</em></td>
                            <td><em>$QData{"Count"}</em></td>
                            <td><em>$QData{"Min"}s</em></td>
                            <td><em>$QData{"Max"}s</em></td>
                            <td><em>$QData{"Average"}s</em></td>
                            <td><div class="Progressbar" style="width:$QData{"Width"};">&nbsp;</div></td>
                        </tr>
<!-- dtl:block:ViewRow -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<!-- dtl:block:View -->
    <div class="Clear"></div>
</div>
