|
Author: adrianc
Date: Sun Jul 15 16:09:26 2012 New Revision: 1361724 URL: http://svn.apache.org/viewvc?rev=1361724&view=rev Log: New feature - New feature - performance metrics. Webtools UI. Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml ofbiz/trunk/framework/webtools/widget/Menus.xml ofbiz/trunk/framework/webtools/widget/StatsForms.xml ofbiz/trunk/framework/webtools/widget/StatsScreens.xml Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml?rev=1361724&r1=1361723&r2=1361724&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml (original) +++ ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml Sun Jul 15 16:09:26 2012 @@ -18,7 +18,7 @@ specific language governing permissions and limitations under the License. --> -<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz.properties.xsd"> <property key="ConnectionPoolStatus"> <value xml:lang="en">Connection Pool Status</value> <value xml:lang="vi">Trạng thái chia sẻ kết ná»i cÆ¡ sá» dữ liá»u</value> @@ -3052,6 +3052,18 @@ <value xml:lang="zh">å å</value> <value xml:lang="zh_TW">è¨æ¶é«</value> </property> + <property key="WebtoolsMetrics"> + <value xml:lang="en">Metrics</value> + </property> + <property key="WebtoolsMetricsRate"> + <value xml:lang="en">Service Rate (mS)</value> + </property> + <property key="WebtoolsMetricsThreshold"> + <value xml:lang="en">Threshold</value> + </property> + <property key="WebtoolsMetricsTotalEvents"> + <value xml:lang="en">Total Events</value> + </property> <property key="WebtoolsMiscSetupTools"> <value xml:lang="de">Versch. Setup Tools</value> <value xml:lang="en">Misc. Setup Tools</value> @@ -5113,6 +5125,9 @@ <value xml:lang="zh">æµè§æ¥å¿</value> <value xml:lang="zh_TW">ç覽æ¥èª</value> </property> + <property key="WebtoolsViewMetrics"> + <value xml:lang="en">View Metrics</value> + </property> <property key="WebtoolsViewPermissionError"> <value xml:lang="de">Sie haben keine Berechtigung um diesen Bereich anzusehen (Sie benötigen OFBTOOLS_VIEW oder OFBIZTOOLS_ADMIN Berechtigung)</value> <value xml:lang="en">You do not have permission to view this page. ("OFBTOOLS_VIEW" or "OFBTOOLS_ADMIN" needed)</value> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=1361724&r1=1361723&r2=1361724&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Sun Jul 15 16:09:26 2012 @@ -226,6 +226,18 @@ under the License. <security https="true" auth="true"/> <response name="success" type="view" value="StatBinsHistory"/> </request-map> + <request-map uri="ViewMetrics"> + <security https="true" auth="true"/> + <metric name="URL: webtools/ViewMetrics" /><!-- Here for demonstration --> + <response name="success" type="view" value="ViewMetrics"/> + </request-map> + <request-map uri="ResetMetric"> + <security https="true" auth="true"/> + <event type="service" invoke="resetMetric"/> + <response name="success" type="view" value="ViewMetrics"/> + <response name="error" type="view" value="ViewMetrics"/> + </request-map> + <!-- Loggin Setup --> <request-map uri="LogConfiguration"> @@ -639,6 +651,7 @@ under the License. <view-map name="StatsSinceStart" type="screen" page="component://webtools/widget/StatsScreens.xml#StatsSinceStart"/> <view-map name="StatBinsHistory" type="screen" page="component://webtools/widget/StatsScreens.xml#StatBinsHistory"/> + <view-map name="ViewMetrics" type="screen" page="component://webtools/widget/StatsScreens.xml#ViewMetrics"/> <view-map name="EntityPerformanceTest" type="screen" page="component://webtools/widget/EntityScreens.xml#EntityPerformanceTest"/> Modified: ofbiz/trunk/framework/webtools/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/Menus.xml?rev=1361724&r1=1361723&r2=1361724&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/Menus.xml (original) +++ ofbiz/trunk/framework/webtools/widget/Menus.xml Sun Jul 15 16:09:26 2012 @@ -216,6 +216,16 @@ under the License. </menu-item> </menu> + <menu name="StatsTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" + selected-menuitem-context-field-name="tabButtonItem"> + <menu-item name="stats" title="${uiLabelMap.WebtoolsStatistics}"> + <link target="StatsSinceStart"/> + </menu-item> + <menu-item name="metrics" title="${uiLabelMap.WebtoolsMetrics}"> + <link target="ViewMetrics"/> + </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"> @@ -228,9 +238,6 @@ under the License. </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"/> Modified: ofbiz/trunk/framework/webtools/widget/StatsForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/StatsForms.xml?rev=1361724&r1=1361723&r2=1361724&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/StatsForms.xml (original) +++ ofbiz/trunk/framework/webtools/widget/StatsForms.xml Sun Jul 15 16:09:26 2012 @@ -31,7 +31,7 @@ under the License. <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=" "> + <field name="viewBins" title=" " widget-area-style="button-col"> <hyperlink description="${uiLabelMap.WebtoolsStatsViewBins}" target="StatBinsHistory"> <parameter param-name="statsId" from-field="requestId"/> <parameter param-name="type" from-field="requestType"/> @@ -45,4 +45,20 @@ under the License. <form name="ListRequestBins" extends="ListStats" list-name="requestList"> <field name="viewBins"><hidden/></field> </form> + + <form name="ListMetrics" type="list" list-name="metricsList" paginate-target="ViewMetrics" + header-row-style="header-row-2" default-table-style="basic-table light-grid"> + <actions> + <service service-name="getAllMetrics" /> + </actions> + <field name="name" title="${uiLabelMap.CommonName}"><display/></field> + <field name="serviceRate" title="${uiLabelMap.WebtoolsMetricsRate}"><display/></field> + <field name="threshold" title="${uiLabelMap.WebtoolsMetricsThreshold}"><display/></field> + <field name="totalEvents" title="${uiLabelMap.WebtoolsMetricsTotalEvents}"><display/></field> + <field name="resetMetric" title=" " widget-area-style="button-col"> + <hyperlink description="${uiLabelMap.CommonReset}" target="ResetMetric"> + <parameter param-name="name"/> + </hyperlink> + </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=1361724&r1=1361723&r2=1361724&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/StatsScreens.xml (original) +++ ofbiz/trunk/framework/webtools/widget/StatsScreens.xml Sun Jul 15 16:09:26 2012 @@ -21,12 +21,10 @@ under the License. <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> - <screen name="StatsSinceStart"> + <screen name="StatsDecorator"> <section> <actions> - <set field="titleProperty" value="WebtoolsStatsMainPageTitle"/> <set field="headerItem" value="stats"/> - <script location="component://webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> @@ -36,22 +34,11 @@ under the License. <if-has-permission permission="SERVER_STATS" action="_VIEW"/> </condition> <widgets> - <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> + <include-menu name="StatsTabBar" location="component://webtools/widget/Menus.xml"/> + <decorator-section-include name="body"/> </widgets> <fail-widgets> - <label style="h3">${uiLabelMap.WebtoolsStatsPermissionMsg}</label> + <label style="h3">${uiLabelMap.WebtoolsPermissionError}</label> </fail-widgets> </section> </decorator-section> @@ -60,28 +47,81 @@ under the License. </section> </screen> + <screen name="StatsSinceStart"> + <section> + <actions> + <set field="titleProperty" value="WebtoolsStatsMainPageTitle"/> + <set field="tabButtonItem" value="stats"/> + <script location="component://webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.groovy"/> + </actions> + <widgets> + <decorator-screen name="StatsDecorator" location="${parameters.statsDecoratorLocation}"> + <decorator-section name="body"> + <section> + <widgets> + <container style="page-title"> + <label text="${uiLabelMap[titleProperty]}"/> + </container> + <include-menu name="StatsSinceStart" location="component://webtools/widget/Menus.xml"/> + <label>${uiLabelMap.WebtoolsStatsCurrentTime} ${nowTimestamp}</label> + <screenlet title="${uiLabelMap.WebtoolsStatsRequestStats}" padded="false"> + <include-form name="ListRequestStats" location="component://webtools/widget/StatsForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.WebtoolsStatsEventStats}" padded="false"> + <include-form name="ListEventStats" location="component://webtools/widget/StatsForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.WebtoolsStatsViewStats}" padded="false"> + <include-form name="ListViewStats" location="component://webtools/widget/StatsForms.xml"/> + </screenlet> + </widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="StatBinsHistory"> <section> <actions> <set field="titleProperty" value="WebtoolsStatsBinsPageTitle"/> - <set field="headerItem" value="stats"/> + <set field="tabButtonItem" value="stats"/> <script location="component://webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.groovy"/> </actions> <widgets> - <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="StatsDecorator" location="${parameters.statsDecoratorLocation}"> <decorator-section name="body"> <section> - <condition> - <if-has-permission permission="SERVER_STATS" action="_VIEW"/> - </condition> <widgets> - <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> + <container style="page-title"> + <label text="${uiLabelMap[titleProperty]}"/> + </container> + <include-menu name="StatsBinHistory" location="component://webtools/widget/Menus.xml"/> + <label>${uiLabelMap.WebtoolsStatsCurrentTime} ${nowTimestamp}</label> + <include-form name="ListRequestBins" location="component://webtools/widget/StatsForms.xml"/> + </widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="ViewMetrics"> + <section> + <actions> + <set field="titleProperty" value="WebtoolsViewMetrics" /> + <set field="tabButtonItem" value="metrics"/> + </actions> + <widgets> + <decorator-screen name="StatsDecorator" location="${parameters.statsDecoratorLocation}"> + <decorator-section name="body"> + <section> + <widgets> + <container style="page-title"> + <label text="${uiLabelMap[titleProperty]}"/> + </container> + <include-form name="ListMetrics" location="component://webtools/widget/StatsForms.xml" /> </widgets> </section> </decorator-section> |
| Free forum by Nabble | Edit this page |
