Permalink
Browse files

Small improvement to Web Tools services screen: Add service definitio…

…n location.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446885 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent f932084 commit 4867b23dd6269776a5700584fad639dc71ab1584 @adrian-crum adrian-crum committed Feb 16, 2013
View
3 framework/webtools/config/WebtoolsUiLabels.xml
@@ -1513,6 +1513,9 @@
<value xml:lang="zh">缺省实体名称</value>
<value xml:lang="zh_TW">缺省實體名稱</value>
</property>
+ <property key="WebtoolsDefinitionLocation">
+ <value xml:lang="en">Definition Location</value>
+ </property>
<property key="WebtoolsDeleteFiles">
<value xml:lang="de">Dateien nachher löschen?</value>
<value xml:lang="en">Delete Files Afterwards?</value>
View
10 framework/webtools/webapp/webtools/WEB-INF/actions/service/AvailableServices.groovy
@@ -349,10 +349,9 @@ if (selectedService) {
curServiceMap.serviceName = selectedService;
curServiceModel = curDispatchContext.getModelService(selectedService);
- curServiceMap.description = curServiceModel.description;
if (curServiceModel != null) {
-
+ curServiceMap.description = curServiceModel.description;
engineName = curServiceModel.engineName ?: "NA";
defaultEntityName = curServiceModel.defaultEntityName ?: "NA";
export = curServiceModel.export ? uiLabelMap.CommonTrue : uiLabelMap.CommonFalse;
@@ -378,6 +377,7 @@ if (selectedService) {
curServiceMap.defaultEntityName = defaultEntityName;
curServiceMap.invoke = invoke;
curServiceMap.location = location;
+ curServiceMap.definitionLocation = curServiceModel.definitionLocation.replaceFirst("file:/" + System.getProperty("ofbiz.home") + "/", "");
curServiceMap.requireNewTransaction = requireNewTransaction;
curServiceMap.export = export;
curServiceMap.exportBool = exportBool;
@@ -539,6 +539,11 @@ if (!selectedService) {
}
}
+ if (canIncludeService && constraintName.equals("definitionLocation")) {
+ fullPath = "file:/" + System.getProperty("ofbiz.home") + "/" + constraintVal;
+ canIncludeService = curServiceModel.definitionLocation.equals(fullPath);
+ }
+
if (canIncludeService && constraintName.equals("alpha")) {
canIncludeService = (serviceName[0]).equals(constraintVal);
if (constraintVal.equals("NA")) {
@@ -558,6 +563,7 @@ if (!selectedService) {
curServiceMap.defaultEntityName = defaultEntityName;
curServiceMap.invoke = invoke;
curServiceMap.location = location;
+ curServiceMap.definitionLocation = curServiceModel.definitionLocation.replaceFirst("file:/" + System.getProperty("ofbiz.home") + "/", "");
curServiceMap.requireNewTransaction = requireNewTransaction;
servicesList.add(curServiceMap);
View
9 framework/webtools/webapp/webtools/service/availableservices.ftl
@@ -67,13 +67,14 @@ under the License.
<td><a href='<@ofbizUrl>${url}?constraint=location@${selectedServiceMap.location}</@ofbizUrl>'>${selectedServiceMap.location}</a></td>
</tr>
<tr>
- <td class="label">${uiLabelMap.WebtoolsArtifactInfo}</td>
- <td><a href='<@ofbizUrl>ArtifactInfo?name=${selectedServiceMap.serviceName}&amp;type=service</@ofbizUrl>'>${uiLabelMap.WebtoolsArtifactInfo}</a></td>
+ <td class="label">${uiLabelMap.WebtoolsDefinitionLocation}</td>
+ <td><a href='<@ofbizUrl>${url}?constraint=definitionLocation@${selectedServiceMap.definitionLocation}</@ofbizUrl>'>${selectedServiceMap.definitionLocation}</a></td>
<td class="label">${uiLabelMap.WebtoolsDefaultEntityName}</td>
<td><a href='<@ofbizUrl>${url}?constraint=default_entity_name@${selectedServiceMap.defaultEntityName}</@ofbizUrl>'>${selectedServiceMap.defaultEntityName}</a></td>
</tr>
<tr>
- <td colspan="2">&nbsp;</td>
+ <td class="label">${uiLabelMap.WebtoolsArtifactInfo}</td>
+ <td><a href='<@ofbizUrl>ArtifactInfo?name=${selectedServiceMap.serviceName}&amp;type=service</@ofbizUrl>'>${uiLabelMap.WebtoolsArtifactInfo}</a></td>
<td class="label">${uiLabelMap.WebtoolsRequireNewTransaction}</td>
<td>${selectedServiceMap.requireNewTransaction}</td>
</tr>
@@ -375,6 +376,7 @@ under the License.
<td>${uiLabelMap.WebtoolsDefaultEntityName}</td>
<td>${uiLabelMap.WebtoolsInvoke}</td>
<td>${uiLabelMap.WebtoolsLocation}</td>
+ <td>${uiLabelMap.WebtoolsDefinitionLocation}</td>
</tr>
<#assign alt_row = false>
<#list servicesList as service>
@@ -384,6 +386,7 @@ under the License.
<td><a href='<@ofbizUrl>${url}?constraint=default_entity_name@${service.defaultEntityName?default(uiLabelMap.CommonNA)}</@ofbizUrl>'>${service.defaultEntityName}</a></td>
<td>${service.invoke}</td>
<td><a href='<@ofbizUrl>${url}?constraint=location@${service.location?default(uiLabelMap.CommonNA)}</@ofbizUrl>'>${service.location}</a></td>
+ <td><a href='<@ofbizUrl>${url}?constraint=definitionLocation@${service.definitionLocation}</@ofbizUrl>'>${service.definitionLocation}</a></td>
</tr>
<#assign alt_row = !alt_row>
</#list>

0 comments on commit 4867b23

Please sign in to comment.