Author: buscob
Date: Fri Sep 3 21:58:57 2010 New Revision: 992491 URL: http://svn.apache.org/viewvc?rev=992491&view=rev Log: Converted WebTools->Statistics screens from FTL to form widgets Added: ofbiz/trunk/framework/webtools/widget/StatsForms.xml Removed: ofbiz/trunk/framework/webtools/webapp/webtools/stats/ Modified: ofbiz/trunk/framework/webtools/widget/Menus.xml ofbiz/trunk/framework/webtools/widget/StatsScreens.xml Modified: ofbiz/trunk/framework/webtools/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/Menus.xml?rev=992491&r1=992490&r2=992491&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/Menus.xml (original) +++ ofbiz/trunk/framework/webtools/widget/Menus.xml Fri Sep 3 21:58:57 2010 @@ -203,4 +203,27 @@ under the License. </link> </menu-item> </menu> + + <menu name="StatsSinceStart" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="clearStats" title="${uiLabelMap.WebtoolsStatsClearSince}"> + <link target="StatsSinceStart"> + <parameter param-name="clear" value="true"/> + </link> + </menu-item> + <menu-item name="refresh" title="${uiLabelMap.CommonRefresh}" widget-style="buttontext refresh"> + <link target="StatsSinceStart"/> + </menu-item> + </menu> + + <menu name="StatsBinHistory" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="statsSinceStart" title="${uiLabelMap.WebtoolsStatsMainPageTitle}"> + <link target="StatsSinceStart"/> + </menu-item> + <menu-item name="refresh" title="${uiLabelMap.CommonRefresh}" widget-style="buttontext refresh"> + <link target="StatBinsHistory"> + <parameter param-name="statsId" from-field="parameters.statsId"/> + <parameter param-name="type" from-field="parameters.type"/> + </link> + </menu-item> + </menu> </menus> Added: ofbiz/trunk/framework/webtools/widget/StatsForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/StatsForms.xml?rev=992491&view=auto ============================================================================== --- ofbiz/trunk/framework/webtools/widget/StatsForms.xml (added) +++ ofbiz/trunk/framework/webtools/widget/StatsForms.xml Fri Sep 3 21:58:57 2010 @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> + + <form name="ListStats" type="list" paginate-target="StatsSinceStart" separate-columns="true" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> + <field name="requestId" title="${uiLabelMap.WebtoolsStatsRequestId}"><display/></field> + <field name="startTime" title="${uiLabelMap.WebtoolsStatsStart}"><display/></field> + <field name="endTime" title="${uiLabelMap.WebtoolsStatsStop}"><display/></field> + <field name="lengthMins" title="${uiLabelMap.WebtoolsStatsMinutes}"><display/></field> + <field name="numberHits" title="${uiLabelMap.WebtoolsStatsHits}"><display/></field> + <field name="minTime" title="${uiLabelMap.WebtoolsStatsMin}"><display/></field> + <field name="avgTime" title="${uiLabelMap.WebtoolsStatsAvg}"><display/></field> + <field name="maxTime" title="${uiLabelMap.WebtoolsStatsMax}"><display/></field> + <field name="hitsPerMin" title="${uiLabelMap.WebtoolsStatsHitsPerMin}"><display/></field> + <field name="viewBins" widget-style="buttontext" title="${uiLabelMap.CommonEmptyHeader}"> + <hyperlink description="${uiLabelMap.WebtoolsStatsViewBins}" target="StatBinsHistory"> + <parameter param-name="statsId" from-field="requestId"/> + <parameter param-name="type" from-field="requestType"/> + </hyperlink> + </field> + </form> + + <form name="ListRequestStats" extends="ListStats" list-name="requestList"/> + <form name="ListEventStats" extends="ListStats" list-name="eventList"/> + <form name="ListViewStats" extends="ListStats" list-name="viewList"/> + <form name="ListRequestBins" extends="ListStats" list-name="requestList"> + <field name="viewBins"><hidden/></field> + </form> +</forms> Modified: ofbiz/trunk/framework/webtools/widget/StatsScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/StatsScreens.xml?rev=992491&r1=992490&r2=992491&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/StatsScreens.xml (original) +++ ofbiz/trunk/framework/webtools/widget/StatsScreens.xml Fri Sep 3 21:58:57 2010 @@ -32,13 +32,27 @@ under the License. <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <section> + <condition> + <if-has-permission permission="SERVER_STATS" action="_VIEW"/> + </condition> <widgets> - <platform-specific> - <html> - <html-template location="component://webtools/webapp/webtools/stats/StatsSinceStart.ftl"/> - </html> - </platform-specific> + <screenlet title="${uiLabelMap.WebtoolsStatsMainPageTitle}"> + <include-menu name="StatsSinceStart" location="component://webtools/widget/Menus.xml"/> + <label>${uiLabelMap.WebtoolsStatsCurrentTime} ${nowTimestamp}</label> + <screenlet title="${uiLabelMap.WebtoolsStatsRequestStats}"> + <include-form name="ListRequestStats" location="component://webtools/widget/StatsForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.WebtoolsStatsEventStats}"> + <include-form name="ListEventStats" location="component://webtools/widget/StatsForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.WebtoolsStatsViewStats}"> + <include-form name="ListViewStats" location="component://webtools/widget/StatsForms.xml"/> + </screenlet> + </screenlet> </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.WebtoolsStatsPermissionMsg}</label> + </fail-widgets> </section> </decorator-section> </decorator-screen> @@ -49,7 +63,7 @@ under the License. <screen name="StatBinsHistory"> <section> <actions> - <set field="titleProperty" value="WebtoolsStatsMainPageTitle"/> + <set field="titleProperty" value="WebtoolsStatsBinsPageTitle"/> <set field="headerItem" value="stats"/> <script location="component://webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.groovy"/> </actions> @@ -57,12 +71,17 @@ under the License. <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <section> + <condition> + <if-has-permission permission="SERVER_STATS" action="_VIEW"/> + </condition> <widgets> - <platform-specific> - <html> - <html-template location="component://webtools/webapp/webtools/stats/StatBinsHistory.ftl"/> - </html> - </platform-specific> + <screenlet title="${uiLabelMap.WebtoolsStatsBinsPageTitle}"> + <include-menu name="StatsBinHistory" location="component://webtools/widget/Menus.xml"/> + <label>${uiLabelMap.WebtoolsStatsCurrentTime} ${nowTimestamp}</label> + <screenlet title="${uiLabelMap.WebtoolsStatsRequestStats}"> + <include-form name="ListRequestBins" location="component://webtools/widget/StatsForms.xml"/> + </screenlet> + </screenlet> </widgets> </section> </decorator-section> |
Free forum by Nabble | Edit this page |