|
Author: jacopoc
Date: Wed Jun 20 15:53:39 2012 New Revision: 1352171 URL: http://svn.apache.org/viewvc?rev=1352171&view=rev Log: Implemented screen that shows details about JobSandbox records, including their input data (RuntimeData.runtimeInfo deserialized) if available. ) Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/JobDetails.groovy Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml ofbiz/trunk/framework/webtools/widget/ServiceForms.xml ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml?rev=1352171&r1=1352170&r2=1352171&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml (original) +++ ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml Wed Jun 20 15:53:39 2012 @@ -525,6 +525,9 @@ <value xml:lang="zh">ä»»å¡å表</value> <value xml:lang="zh_TW">ä»»åå表</value> </property> + <property key="PageTitleJobDetails"> + <value xml:lang="en">Job Details</value> + </property> <property key="PageTitleLogConfiguration"> <value xml:lang="de">Log Konfiguration</value> <value xml:lang="en">Log Configuration</value> @@ -3996,6 +3999,9 @@ <value xml:lang="zh">è¿è¡æ¶é´</value> <value xml:lang="zh_TW">éè¡æé</value> </property> + <property key="WebtoolsRunTimeDataInfo"> + <value xml:lang="en">Run Time Data Info</value> + </property> <property key="WebtoolsSchedule"> <value xml:lang="de">Einplanen</value> <value xml:lang="en">Schedule</value> Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/JobDetails.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/JobDetails.groovy?rev=1352171&view=auto ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/JobDetails.groovy (added) +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/service/JobDetails.groovy Wed Jun 20 15:53:39 2012 @@ -0,0 +1,38 @@ +/* + * 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. + */ + +import org.ofbiz.entity.Delegator; +import org.ofbiz.entity.GenericValue +import org.ofbiz.base.util.UtilGenerics +import org.ofbiz.entity.serialize.XmlSerializer; + +GenericValue job = ((Delegator)delegator).findOne("JobSandbox", [jobId:parameters.jobId], false) +context.job = job +if (job) { + GenericValue runtimeData = job.getRelatedOne("RuntimeData", false) + if (runtimeData) { + runtimeInfoMap = UtilGenerics.checkMap(XmlSerializer.deserialize(runtimeData.getString("runtimeInfo"), delegator), String.class, Object.class) + runtimeInfoList = [] + runtimeInfoMap.each { key, value -> + valueMap = [key : key, value : value.toString()] + runtimeInfoList.add(valueMap) + } + context.runtimeInfoList = runtimeInfoList + } +} 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=1352171&r1=1352170&r2=1352171&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Wed Jun 20 15:53:39 2012 @@ -277,6 +277,10 @@ under the License. <security https="true" auth="true"/> <response name="success" type="view" value="FindJob"/> </request-map> + <request-map uri="JobDetails"> + <security https="true" auth="true"/> + <response name="success" type="view" value="JobDetails"/> + </request-map> <request-map uri="cancelJob"> <security https="true" auth="true"/> <event type="service" invoke="cancelScheduledJob"/> @@ -648,6 +652,7 @@ under the License. <view-map name="ServiceLog" type="screen" page="component://webtools/widget/LogScreens.xml#ServiceLog"/> <view-map name="ServiceList" type="screen" page="component://webtools/widget/ServiceScreens.xml#ServiceList"/> <view-map name="FindJob" type="screen" page="component://webtools/widget/ServiceScreens.xml#FindJob"/> + <view-map name="JobDetails" type="screen" page="component://webtools/widget/ServiceScreens.xml#JobDetails"/> <view-map name="serviceResult" type="screen" page="component://webtools/widget/ServiceScreens.xml#ServiceResult"/> <view-map name="threadList" type="screen" page="component://webtools/widget/ServiceScreens.xml#ThreadList"/> <view-map name="scheduleJob" type="screen" page="component://webtools/widget/ServiceScreens.xml#ScheduleJob"/> Modified: ofbiz/trunk/framework/webtools/widget/ServiceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/ServiceForms.xml?rev=1352171&r1=1352170&r2=1352171&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/ServiceForms.xml (original) +++ ofbiz/trunk/framework/webtools/widget/ServiceForms.xml Wed Jun 20 15:53:39 2012 @@ -82,7 +82,11 @@ under the License. </service> </actions> <field name="jobName" title="${uiLabelMap.WebtoolsJob}" sort-field="true"><display/></field> - <field name="jobId" title="${uiLabelMap.CommonId}" sort-field="true"><display/></field> + <field name="jobId" title="${uiLabelMap.CommonId}" sort-field="true"> + <hyperlink also-hidden="false" description="${jobId}" target="JobDetails"> + <parameter param-name="jobId" from-field="jobId"/> + </hyperlink> + </field> <field name="poolId" title="${uiLabelMap.WebtoolsPool}" sort-field="true"><display/></field> <field name="runTime" title="${uiLabelMap.WebtoolsRunTime}" sort-field="true"><display/></field> <field name="startDateTime" title="${uiLabelMap.CommonStartDateTime}" sort-field="true"><display/></field> @@ -99,6 +103,13 @@ under the License. </hyperlink> </field> </form> + <form name="JobDetails" type="single"> + <auto-fields-entity entity-name="JobSandbox" map-name="job" default-field-type="display"/> + </form> + <form name="JobRuntimeDataInfo" type="list" list-name="runtimeInfoList" default-table-style="basic-table hover-bar" paginate="false"> + <field name="key"><display/></field> + <field name="value"><display/></field> + </form> <form name="ListJavaThread" type="list" list-name="threads" paginate-target="threadList" separate-columns="true" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <field name="threadId" title="${uiLabelMap.WebtoolsThread}"><display description="${threadId} ${threadName}"/></field> Modified: ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml?rev=1352171&r1=1352170&r2=1352171&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml (original) +++ ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml Wed Jun 20 15:53:39 2012 @@ -70,6 +70,27 @@ under the License. </widgets> </section> </screen> + <screen name="JobDetails"> + <section> + <actions> + <set field="titleProperty" value="PageTitleJobDetails"/> + <set field="tabButtonItem" value="findJob"/> + <script location="component://webtools/webapp/webtools/WEB-INF/actions/service/JobDetails.groovy"/> + </actions> + <widgets> + <decorator-screen name="CommonServiceDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.PageTitleJobDetails}"> + <include-form name="JobDetails" location="component://webtools/widget/ServiceForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.WebtoolsRunTimeDataInfo}"> + <include-form name="JobRuntimeDataInfo" location="component://webtools/widget/ServiceForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> <screen name="ThreadList"> <section> |
| Free forum by Nabble | Edit this page |
