ilscipio/scipio-erp

View on GitHub
framework/webtools/widget/CommonWidgets.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">

    <screen name="DashboardServerTraffic">
        <section>
            <actions>
                <set field="chartType" value="bar"/>
                <set field="chartValue" value="count"/>
                <set field="chartData" value="day"/>
                <set field="chartLibrary" value="chart"/>
                <set field="chartIntervalScope" value="day"/> <!-- hour|day|week|month|year -->
                <set field="chartIntervalCount" value="1"/>     <!-- Look back x hours/days/weeks/months/years -->
                <script location="component://webtools/script/com/ilscipio/data/StatsServerTraffic.groovy"/>
                <set field="title" value="${uiLabelMap.CommonRequests} (${uiLabelMap.CommonPerDay})"/>
            </actions>
            <widgets>
                <platform-specific>
                    <html><html-template location="component://webtools/webapp/webtools/stats/statsServerTraffic.ftl"/></html>
                </platform-specific>
            </widgets>
        </section>
    </screen>

    <!-- Requires the sendHitBinLiveData scheduled service to be running:
            applications/party/data/ScheduledJobs.xml
        Configuration including distributed server/nginx may be needed in:
            framework/webtools/config/webtools.properties
        By default stock scipio shows stats for each machine only. -->
    <screen name="DashboardWSLiveRequests">
        <section>
            <actions>
                <set field="xlabel" value="Requests"/>
                <set field="ylabel" value="${uiLabelMap.CommonHour}"/>
                <set field="label1" value="Website Traffic"/>
                <set field="chartType" value="bar"/>
                <set field="chartValue" value="count"/>
                <set field="chartIntervalScope" value="minute"/> <!-- hour|day|week|month|year -->
                <set field="chartIntervalCount" value="0"/>     <!-- Look back x hours/days/weeks/months/years -->
                <set field="maxRequestsEntries" type="Integer" from-field="parameters.maxRequestsEntries" default-value="60"/>
                <script location="component://webtools/script/com/ilscipio/data/StatsServerTraffic.groovy"/>
                <set field="title" value="${uiLabelMap.CommonRequests} (${uiLabelMap.CommonPerHour})"/>
            </actions>
            <widgets>
                <platform-specific>
                    <html><html-template location="component://webtools/webapp/webtools/dashboard/wsLiveRequests.ftl"/></html>
                </platform-specific>
            </widgets>
        </section>
    </screen>
</screens>