ilscipio/scipio-erp

View on GitHub
framework/webtools/widget/CacheForms.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.
-->

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

    <form name="MemoryInfo" type="single" default-map-name="memoryInfo">
        <field name="memory" title="${uiLabelMap.WebtoolsTotalMemory}"><display/></field>
        <field name="maxMemory" title="${uiLabelMap.WebtoolsMaxMemory}"><display/></field>
        <field name="freeMemory" title="${uiLabelMap.WebtoolsFreeMemory}"><display/></field>
        <field name="usedMemory" title="${uiLabelMap.WebtoolsUsedMemory}"><display/></field>
        <field name="totalCacheMemory" title="${uiLabelMap.WebtoolsCacheMemory}"><display/></field>
    </form>
    <form name="ListCache" type="list" list-name="cacheList" paginate-target="FindUtilCache" separate-columns="true" odd-row-style="alternate-row" header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="cacheName" title="${uiLabelMap.WebtoolsCacheName}" sort-field="true"><display/></field>
        <field name="cacheSize" title="${uiLabelMap.WebtoolsSize}" sort-field="true"><display/></field>
        <field name="hitCount" title="${uiLabelMap.WebtoolsHits}" sort-field="true"><display/></field>
        <!-- Uncomment for further information
        <field name="misses" title="${uiLabelMap.WebtoolsMisses}" sort-field="true"><display description="${missCountTot}/${missCountNotFound}/${missCountExpired}/${missCountSoftRef}"/></field>
        <field name="removes" title="${uiLabelMap.WebtoolsRemoves}" sort-field="true"><display description="${removeHitCount}/${removeMissCount}"/></field>-->
        <field name="sizeLimit" title="${uiLabelMap.WebtoolsMaxSize}" sort-field="true"><display/></field>
        <field name="maxInMemory" title="${uiLabelMap.WebtoolsMaxInMemory}" sort-field="true"><display/></field>
        <field name="expireTime" title="${uiLabelMap.WebtoolsExpireTime}" sort-field="true"><display/></field>
        <field name="useSoftReference" title="${uiLabelMap.WebtoolsUseSoftRef}" sort-field="true"><display/></field>
        <field name="cacheMemory" title="${uiLabelMap.WebtoolsCacheMemory}" sort-field="true"><display/></field>
        <field name="administration" title=" " widget-style="${styles.link_nav} ${styles.action_find}" use-when="hasUtilCacheEdit">
            <hyperlink description="${uiLabelMap.WebtoolsElements}" target="FindUtilCacheElements">
                <parameter param-name="UTIL_CACHE_NAME" from-field="cacheName"/>
            </hyperlink>
        </field>
        <field name="admin_edit" title=" " widget-style="${styles.link_nav} ${styles.action_update}" use-when="hasUtilCacheEdit">
            <hyperlink description="${uiLabelMap.CommonEdit}" target="EditUtilCache">
                <parameter param-name="UTIL_CACHE_NAME" from-field="cacheName"/>
            </hyperlink>
        </field>
        <field name="admin_clear" title=" " widget-style="${styles.link_run_sys} ${styles.action_clear}" use-when="hasUtilCacheEdit">
            <hyperlink description="${uiLabelMap.CommonClear}" target="FindUtilCacheClear">
                <parameter param-name="UTIL_CACHE_NAME" from-field="cacheName"/>
            </hyperlink>
        </field>
    </form>

    <form name="ListCacheElements" type="list" list-name="cacheElementsList" paginate-target="FindUtilCacheElements" separate-columns="true" odd-row-style="alternate-row" header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="elementKey" title="${uiLabelMap.WebtoolsCacheElementKey}" sort-field="true"><display/></field>
        <field name="expireTimeMillis" title="${uiLabelMap.WebtoolsExpireTime}" sort-field="true"><display/></field>
        <field name="lineSize" title="${uiLabelMap.WebtoolsBytes}" sort-field="true"><display/></field>

        <field name="administration" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}" use-when="hasUtilCacheEdit">
            <hyperlink description="${uiLabelMap.CommonRemove}" target="FindUtilCacheElementsRemoveElement">
                <parameter param-name="UTIL_CACHE_NAME" from-field="cacheName"/>
                <parameter param-name="UTIL_CACHE_ELEMENT_NUMBER" from-field="keyNum"/>
            </hyperlink>
        </field>
    </form>

    <form name="EditCache" type="single" target="EditUtilCacheUpdate" default-map-name="cache">
        <field name="UTIL_CACHE_NAME" entry-name="cacheName" title="${uiLabelMap.WebtoolsCacheName}"><display/></field>
        <field name="cacheSize" title="${uiLabelMap.WebtoolsSize}"><display/></field>
        <field name="hitCount" title="${uiLabelMap.WebtoolsHits}"><display/></field>
        <field name="missCountTot" title="${uiLabelMap.WebtoolsMissesTotal}"><display/></field>
        <field name="missCountNotFound" title="${uiLabelMap.WebtoolsMissesNotFound}"><display/></field>
        <field name="missCountExpired" title="${uiLabelMap.WebtoolsMissesExpire}"><display/></field>
        <field name="missCountSoftRef" title="${uiLabelMap.WebtoolsMissesSoftReference}"><display/></field>
        <field name="removeHitCount" title="${uiLabelMap.WebtoolsRemovesHit}"><display/></field>
        <field name="removeMissCount" title="${uiLabelMap.WebtoolsRemovesMisses}"><display/></field>
        <field name="UTIL_CACHE_MAX_SIZE" entry-name="sizeLimit" title="${uiLabelMap.WebtoolsMaxSize}"><text/></field><!-- SCIPIO: added 2017-05-23 -->
        <field name="UTIL_CACHE_MAX_IN_MEMORY" entry-name="maxInMemory" title="${uiLabelMap.WebtoolsMaxInMemory}"><text/></field>
        <field name="UTIL_CACHE_EXPIRE_TIME" entry-name="expireTime" title="${uiLabelMap.WebtoolsExpireTime}"><text/></field>
        <field name="UTIL_CACHE_USE_SOFT_REFERENCE" entry-name="useSoftReference" title="${uiLabelMap.WebtoolsUseSoftRef}">
            <drop-down allow-empty="false">
                <option key="false" description="${uiLabelMap.CommonFalse}"/>
                <option key="true" description="${uiLabelMap.CommonTrue}"/>
            </drop-down>
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonApply}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
    </form>
    
    <!-- SCIPIO: small form to filter caches by name -->
    <form name="FindCache" type="single" target="FindUtilCache" method="get">
        <field name="cacheName" title="${uiLabelMap.WebtoolsCacheName}"><text-find/></field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}"><submit/></field>
    </form>
</forms>