mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
7536: Encoded all outputted strings to avoid cross-site scripting issues Fixed potential issue where same id for a div could be used multiple times on one page 7537: Ensured no passwords are logged when deployment debug is turned on 7538: Fixed ordering of deployment attempts in 'more reports' panel 7539: Allocated test server is now released when a user sandbox is deleted 7540: Merged V2.1 to V2.2 7411: This makes issuers compatible with clustering without a huge performance drop 7547: AWC-1711 (contribution) - simple workflow actions are not displayed if the user does not have write permission 7548: Fixed IE scrolling issue when editing deployment server config 7551: Changed the way scrolling is done to support IE6 (for deployment server config editing) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8414 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
50
.classpath
50
.classpath
@@ -1,25 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="source/java"/>
|
||||
<classpathentry kind="src" path="config"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path="/Repository"/>
|
||||
<classpathentry kind="src" path="/Core"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Remote API"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/commons/commons-httpclient-3.0.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/commons/commons-jxpath-1.2.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/3rd Party"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/xercesImpl-2.8.0.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Jndi-Client"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/bsf-2.4.0.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/fop/xmlgraphics-commons-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/fop/fop-0.94.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/fop/avalon-framework-4.2.0.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/MBean"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/chiba-1.3.0.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/json.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/fop/batik-all-1.6.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Web-Framework"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Alfresco JLAN"/>
|
||||
<classpathentry kind="output" path="build/classes"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="source/java"/>
|
||||
<classpathentry kind="src" path="config"/>
|
||||
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path="/Repository"/>
|
||||
<classpathentry kind="src" path="/Core"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Remote API"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/commons/commons-httpclient-3.0.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/commons/commons-jxpath-1.2.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/3rd Party"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/xercesImpl-2.8.0.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Jndi-Client"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/bsf-2.4.0.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/fop/xmlgraphics-commons-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/fop/fop-0.94.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/fop/avalon-framework-4.2.0.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/MBean"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/chiba-1.3.0.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/json.jar"/>
|
||||
<classpathentry kind="lib" path="/3rd Party/lib/fop/batik-all-1.6.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Web-Framework"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Alfresco JLAN"/>
|
||||
<classpathentry kind="output" path="build/classes"/>
|
||||
</classpath>
|
||||
|
@@ -208,6 +208,9 @@
|
||||
|
||||
<!-- 'Approve' workflow step for document -->
|
||||
<action id="approve_doc">
|
||||
<permissions>
|
||||
<permission allow="true">WriteProperties</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
<label>#{actionContext["app:approveStep"]}</label>
|
||||
<image>/images/icons/approve.gif</image>
|
||||
@@ -220,6 +223,9 @@
|
||||
|
||||
<!-- 'Reject' workflow step for document -->
|
||||
<action id="reject_doc">
|
||||
<permissions>
|
||||
<permission allow="true">WriteProperties</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.RejectDocEvaluator</evaluator>
|
||||
<label>#{actionContext["app:rejectStep"]}</label>
|
||||
<image>/images/icons/reject.gif</image>
|
||||
@@ -232,6 +238,9 @@
|
||||
|
||||
<!-- 'Approve' workflow step for document details page -->
|
||||
<action id="approve_doc_details">
|
||||
<permissions>
|
||||
<permission allow="true">WriteProperties</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
<label>#{actionContext.properties["app:approveStep"]}</label>
|
||||
<image>/images/icons/approve.gif</image>
|
||||
@@ -244,6 +253,9 @@
|
||||
|
||||
<!-- 'Reject' workflow step for document details page-->
|
||||
<action id="reject_doc_details">
|
||||
<permissions>
|
||||
<permission allow="true">WriteProperties</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.RejectDocEvaluator</evaluator>
|
||||
<label>#{actionContext.properties["app:rejectStep"]}</label>
|
||||
<image>/images/icons/reject.gif</image>
|
||||
@@ -256,6 +268,9 @@
|
||||
|
||||
<!-- 'Approve' workflow step for space -->
|
||||
<action id="approve_space">
|
||||
<permissions>
|
||||
<permission allow="true">WriteProperties</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
<label>#{actionContext["app:approveStep"]}</label>
|
||||
<image>/images/icons/approve.gif</image>
|
||||
@@ -268,6 +283,9 @@
|
||||
|
||||
<!-- 'Reject' workflow step for space -->
|
||||
<action id="reject_space">
|
||||
<permissions>
|
||||
<permission allow="true">WriteProperties</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.RejectDocEvaluator</evaluator>
|
||||
<label>#{actionContext["app:rejectStep"]}</label>
|
||||
<image>/images/icons/reject.gif</image>
|
||||
@@ -280,6 +298,9 @@
|
||||
|
||||
<!-- 'Approve' workflow step for space details page -->
|
||||
<action id="approve_space_details">
|
||||
<permissions>
|
||||
<permission allow="true">WriteProperties</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
<label>#{actionContext.properties["app:approveStep"]}</label>
|
||||
<image>/images/icons/approve.gif</image>
|
||||
@@ -292,6 +313,9 @@
|
||||
|
||||
<!-- 'Reject' workflow step for space details page-->
|
||||
<action id="reject_space_details">
|
||||
<permissions>
|
||||
<permission allow="true">WriteProperties</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.RejectDocEvaluator</evaluator>
|
||||
<label>#{actionContext.properties["app:rejectStep"]}</label>
|
||||
<image>/images/icons/reject.gif</image>
|
||||
|
@@ -94,7 +94,6 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
|
||||
// wizard step names (that are referenced)
|
||||
private static final String STEP_DETAILS = "details";
|
||||
private static final String STEP_FORMS = "forms";
|
||||
private static final String STEP_DEPLOYMENT = "deployment";
|
||||
|
||||
private static final String MATCH_DEFAULT = ".*";
|
||||
@@ -439,7 +438,14 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
repoProps);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Saved deploymentserver node using repo props: " + repoProps);
|
||||
{
|
||||
// overwrite the password property before logging
|
||||
Map<QName, Serializable> tempProps = new HashMap<QName, Serializable>(repoProps.size());
|
||||
tempProps.putAll(repoProps);
|
||||
tempProps.put(WCMAppModel.PROP_DEPLOYSERVERPASSWORD, "*****");
|
||||
|
||||
logger.debug("Saved deploymentserver node using repo props: " + tempProps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -117,6 +117,8 @@ public class DeleteSandboxDialog extends BaseDialogBean
|
||||
if (username != null)
|
||||
{
|
||||
Node website = this.avmBrowseBean.getWebsite();
|
||||
String storeRoot = (String)website.getProperties().get(WCMAppModel.PROP_AVMSTORE);
|
||||
String mainStore = AVMUtil.buildUserMainStoreName(storeRoot, username);
|
||||
|
||||
// remove the store reference from the website folder meta-data
|
||||
List<ChildAssociationRef> userInfoRefs = this.getNodeService().getChildAssocs(
|
||||
@@ -126,14 +128,11 @@ public class DeleteSandboxDialog extends BaseDialogBean
|
||||
{
|
||||
NodeRef userInfoRef = ref.getChildRef();
|
||||
String user = (String)getNodeService().getProperty(userInfoRef, WCMAppModel.PROP_WEBUSERNAME);
|
||||
String role = (String)getNodeService().getProperty(userInfoRef, WCMAppModel.PROP_WEBUSERROLE);
|
||||
|
||||
if (username.equals(user))
|
||||
{
|
||||
// found the sandbox to remove
|
||||
String storeRoot = (String)website.getProperties().get(WCMAppModel.PROP_AVMSTORE);
|
||||
String sandbox = AVMUtil.buildUserMainStoreName(storeRoot, username);
|
||||
String path = AVMUtil.buildStoreWebappPath(sandbox, this.avmBrowseBean.getWebapp());
|
||||
String path = AVMUtil.buildStoreWebappPath(mainStore, this.avmBrowseBean.getWebapp());
|
||||
|
||||
// Notify virtualisation server about removing this sandbox.
|
||||
//
|
||||
@@ -158,15 +157,15 @@ public class DeleteSandboxDialog extends BaseDialogBean
|
||||
// layer attached.
|
||||
|
||||
// purge the user main sandbox store from the system
|
||||
this.getAvmService().purgeStore(sandbox);
|
||||
this.getAvmService().purgeStore(mainStore);
|
||||
// remove any locks this user may have
|
||||
this.getAvmLockingService().removeStoreLocks(sandbox);
|
||||
this.getAvmLockingService().removeStoreLocks(mainStore);
|
||||
|
||||
// purge the user preview sandbox store from the system
|
||||
sandbox = AVMUtil.buildUserPreviewStoreName(storeRoot, username);
|
||||
this.getAvmService().purgeStore(sandbox);
|
||||
String previewStore = AVMUtil.buildUserPreviewStoreName(storeRoot, username);
|
||||
this.getAvmService().purgeStore(previewStore);
|
||||
// remove any locks this user may have
|
||||
this.getAvmLockingService().removeStoreLocks(sandbox);
|
||||
this.getAvmLockingService().removeStoreLocks(previewStore);
|
||||
|
||||
// remove the association to this web project user meta-data
|
||||
this.getNodeService().removeChild(website.getNodeRef(), ref.getChildRef());
|
||||
@@ -174,6 +173,16 @@ public class DeleteSandboxDialog extends BaseDialogBean
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if the sandbox is allocated to a test server release it
|
||||
NodeRef testServer = DeploymentUtil.findAllocatedTestServer(mainStore);
|
||||
if (testServer != null)
|
||||
{
|
||||
getNodeService().setProperty(testServer, WCMAppModel.PROP_DEPLOYSERVERALLOCATEDTO, null);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Released test server from user sandbox: " + mainStore);
|
||||
}
|
||||
}
|
||||
|
||||
return outcome;
|
||||
|
@@ -30,6 +30,7 @@ import org.alfresco.service.cmr.avm.deploy.DeploymentCallback;
|
||||
import org.alfresco.service.cmr.avm.deploy.DeploymentEvent;
|
||||
import org.alfresco.service.cmr.avm.deploy.DeploymentEvent.Type;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -134,7 +135,7 @@ public class DeploymentMonitor implements DeploymentCallback, Serializable
|
||||
StringBuilder buffer = new StringBuilder("<target-server id=\"");
|
||||
buffer.append(this.getId());
|
||||
buffer.append("\" name=\"");
|
||||
buffer.append(this.targetServerName);
|
||||
buffer.append(Utils.encode(this.targetServerName));
|
||||
buffer.append("\" server=\"");
|
||||
buffer.append(this.targetServer);
|
||||
buffer.append("\" attempt=\"");
|
||||
@@ -145,13 +146,13 @@ public class DeploymentMonitor implements DeploymentCallback, Serializable
|
||||
if (this.url != null)
|
||||
{
|
||||
buffer.append(" url=\"");
|
||||
buffer.append(this.url);
|
||||
buffer.append(Utils.encode(this.url));
|
||||
buffer.append("\"");
|
||||
}
|
||||
if (this.reason != null)
|
||||
{
|
||||
buffer.append(" reason=\"");
|
||||
buffer.append(this.reason);
|
||||
buffer.append(Utils.encode(this.reason));
|
||||
buffer.append("\"");
|
||||
}
|
||||
if (this.finished)
|
||||
|
@@ -82,7 +82,17 @@ public final class DeploymentServerConfig implements Serializable
|
||||
buffer.append(" (id=").append(this.id);
|
||||
buffer.append(" serverRef=").append(this.serverRef);
|
||||
buffer.append(" deployType=").append(this.deployType);
|
||||
buffer.append(" props=").append(this.props).append(")");
|
||||
|
||||
// copy the properties map and overwrite the password (if password is present)
|
||||
Map<String, Object> tempProps = new HashMap<String, Object>(this.props.size());
|
||||
tempProps.putAll(this.props);
|
||||
if (tempProps.containsKey(PROP_PASSWORD))
|
||||
{
|
||||
tempProps.put(PROP_PASSWORD, "*****");
|
||||
}
|
||||
|
||||
buffer.append(" props=").append(tempProps).append(")");
|
||||
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
|
@@ -45,6 +45,7 @@ import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.wcm.AVMUtil;
|
||||
import org.alfresco.web.bean.wcm.DeploymentMonitor;
|
||||
import org.alfresco.web.bean.wcm.DeploymentUtil;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -505,8 +506,6 @@ public class UIDeployWebsite extends UIInput
|
||||
|
||||
renderPanelStart(out, contextPath);
|
||||
|
||||
//out.write("<div class='deployPanelNoControl'></div>");
|
||||
|
||||
renderPanelMiddle(out, contextPath, nodeService, server, false);
|
||||
|
||||
String url = (String)nodeService.getProperty(server, WCMAppModel.PROP_DEPLOYSERVERURL);
|
||||
@@ -515,7 +514,7 @@ public class UIDeployWebsite extends UIInput
|
||||
out.write("<div class='deployServersUrl'><a target='new' href='");
|
||||
out.write(url);
|
||||
out.write("'>");
|
||||
out.write(url);
|
||||
out.write(Utils.encode(url));
|
||||
out.write("</a></div>");
|
||||
}
|
||||
|
||||
@@ -603,7 +602,7 @@ public class UIDeployWebsite extends UIInput
|
||||
out.write(contextPath);
|
||||
out.write("/images/parts/deploy_panel_bg.gif); background-repeat: repeat-x; width: 100%;'>");
|
||||
out.write("<div class='deployPanelServerName'>");
|
||||
out.write(serverName);
|
||||
out.write(Utils.encode(serverName));
|
||||
out.write("</div>");
|
||||
}
|
||||
|
||||
|
@@ -26,6 +26,7 @@ package org.alfresco.web.ui.wcm.component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -54,6 +55,8 @@ import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.wcm.DeploymentUtil;
|
||||
import org.alfresco.web.data.IDataContainer;
|
||||
import org.alfresco.web.data.QuickSort;
|
||||
import org.alfresco.web.ui.common.ComponentConstants;
|
||||
import org.alfresco.web.ui.common.PanelGenerator;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
@@ -328,6 +331,8 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write(bundle.getString(MSG_SNAPSHOT));
|
||||
out.write("</th></tr>");
|
||||
|
||||
// create a list of DeploymentAttempt objects to be ordered
|
||||
List<DeploymentAttempt> orderedAttempts = new ArrayList<DeploymentAttempt>(deployAttempts.size());
|
||||
for (NodeRef attempt : deployAttempts)
|
||||
{
|
||||
Map<QName, Serializable> props = nodeService.getProperties(attempt);
|
||||
@@ -345,22 +350,30 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
buffer.append(", ");
|
||||
}
|
||||
|
||||
buffer.append(server);
|
||||
buffer.append(Utils.encode(server));
|
||||
}
|
||||
}
|
||||
|
||||
// format the date using the default pattern
|
||||
String attemptDate = Utils.getDateTimeFormat(context).format(attemptTime);
|
||||
|
||||
orderedAttempts.add(new DeploymentAttempt(attempt, attemptId,
|
||||
attemptTime, buffer.toString(), version));
|
||||
}
|
||||
|
||||
// sort the list of deployment attempts
|
||||
QuickSort sorter = new QuickSort(orderedAttempts, "date", false,
|
||||
IDataContainer.SORT_CASEINSENSITIVE);
|
||||
sorter.sort();
|
||||
|
||||
for (DeploymentAttempt attempt : orderedAttempts)
|
||||
{
|
||||
out.write("<tr><td><nobr>");
|
||||
Utils.encodeRecursive(context,
|
||||
aquireViewAttemptAction(context, attemptId, attempt, attemptDate));
|
||||
aquireViewAttemptAction(context, attempt));
|
||||
out.write("</nobr></td><td>");
|
||||
out.write(buffer.toString());
|
||||
out.write(attempt.getServers());
|
||||
out.write("</td><td>");
|
||||
if (version != null)
|
||||
if (attempt.getVersion() != null)
|
||||
{
|
||||
out.write(version.toString());
|
||||
out.write(attempt.getVersion().toString());
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
}
|
||||
@@ -463,6 +476,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
|
||||
// extract the information we need to display
|
||||
Map<QName, Serializable> serverProps = nodeService.getProperties(deploymentReport);
|
||||
Long serverId = (Long)serverProps.get(ContentModel.PROP_NODE_DBID);
|
||||
String server = (String)serverProps.get(WCMAppModel.PROP_DEPLOYSERVER);
|
||||
boolean showServerAddress = true;
|
||||
String serverName = (String)serverProps.get(WCMAppModel.PROP_DEPLOYSERVERNAMEUSED);
|
||||
@@ -535,7 +549,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write(deployType);
|
||||
out.write(".gif' /></td><td>");
|
||||
out.write("<div class='mainHeading'>");
|
||||
out.write(serverName);
|
||||
out.write(Utils.encode(serverName));
|
||||
out.write("</div><div style='margin-top: 3px; margin-bottom: 6px;'><img src='");
|
||||
out.write(context.getExternalContext().getRequestContextPath());
|
||||
out.write("/images/icons/deploy_");
|
||||
@@ -563,7 +577,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write("<div style='margin-top: 3px;'>");
|
||||
out.write(Application.getMessage(context, "reason"));
|
||||
out.write(": ");
|
||||
out.write(failReason);
|
||||
out.write(Utils.encode(failReason));
|
||||
out.write("</div>");
|
||||
}
|
||||
|
||||
@@ -572,7 +586,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write("<div style='margin-top: 3px;'>");
|
||||
out.write(Application.getMessage(context, "deploy_server"));
|
||||
out.write(": ");
|
||||
out.write(server);
|
||||
out.write(Utils.encode(server));
|
||||
out.write("</div>");
|
||||
}
|
||||
|
||||
@@ -597,7 +611,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write("<div style='margin-top: 3px;'>");
|
||||
out.write(Application.getMessage(context, "deployed_by"));
|
||||
out.write(": ");
|
||||
out.write(creator);
|
||||
out.write(Utils.encode(creator));
|
||||
out.write("</div>");
|
||||
|
||||
if (username != null)
|
||||
@@ -605,7 +619,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write("<div style='margin-top: 3px;'>");
|
||||
out.write(Application.getMessage(context, "deploy_server_username"));
|
||||
out.write(": ");
|
||||
out.write(username);
|
||||
out.write(Utils.encode(username));
|
||||
out.write("</div>");
|
||||
}
|
||||
|
||||
@@ -614,7 +628,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write("<div style='margin-top: 3px;'>");
|
||||
out.write(Application.getMessage(context, "deploy_server_source_path"));
|
||||
out.write(": ");
|
||||
out.write(source);
|
||||
out.write(Utils.encode(source));
|
||||
out.write("</div>");
|
||||
}
|
||||
|
||||
@@ -623,7 +637,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write("<div style='margin-top: 3px;'>");
|
||||
out.write(Application.getMessage(context, "deploy_server_excludes"));
|
||||
out.write(": ");
|
||||
out.write(excludes);
|
||||
out.write(Utils.encode(excludes));
|
||||
out.write("</div>");
|
||||
}
|
||||
|
||||
@@ -632,7 +646,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write("<div style='margin-top: 3px;'>");
|
||||
out.write(Application.getMessage(context, "deploy_server_target_name"));
|
||||
out.write(": ");
|
||||
out.write(target);
|
||||
out.write(Utils.encode(target));
|
||||
out.write("</div>");
|
||||
}
|
||||
|
||||
@@ -643,7 +657,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write(": <a target='new' href='");
|
||||
out.write(url);
|
||||
out.write("'>");
|
||||
out.write(url);
|
||||
out.write(Utils.encode(url));
|
||||
out.write("</a></div>");
|
||||
}
|
||||
|
||||
@@ -652,14 +666,14 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
out.write("<div style='margin-top: 6px;'><img src='");
|
||||
out.write(context.getExternalContext().getRequestContextPath());
|
||||
out.write("/images/icons/collapsed.gif' style='vertical-align: -1px; cursor: pointer;' class='collapsed' onclick=\"Alfresco.toggleDeploymentDetails(this, '");
|
||||
out.write(server.replace(':', '_').replace('\\', '_'));
|
||||
out.write(serverId.toString());
|
||||
out.write("');\" /> ");
|
||||
out.write(Application.getMessage(context, "details"));
|
||||
out.write("</div>\n");
|
||||
out.write("<div id='");
|
||||
out.write(server.replace(':', '_').replace('\\', '_'));
|
||||
out.write(serverId.toString());
|
||||
out.write("-deployment-details' style='display: none; border: 1px dotted #eee; margin-left: 14px; margin-top: 4px; padding:3px;'>");
|
||||
out.write(content);
|
||||
out.write(Utils.encode(content));
|
||||
out.write("</div>");
|
||||
}
|
||||
out.write("\n<div style='padding-top:6px;'></div>\n");
|
||||
@@ -671,11 +685,10 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected UIActionLink aquireViewAttemptAction(FacesContext context,
|
||||
String attemptId, NodeRef attemptRef, String attemptDate)
|
||||
protected UIActionLink aquireViewAttemptAction(FacesContext context, DeploymentAttempt attempt)
|
||||
{
|
||||
UIActionLink action = null;
|
||||
String actionId = "va_" + attemptId;
|
||||
String actionId = "va_" + attempt.getId();
|
||||
|
||||
// try find the action as a child of this component
|
||||
for (UIComponent component : (List<UIComponent>)getChildren())
|
||||
@@ -693,7 +706,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
javax.faces.application.Application facesApp = context.getApplication();
|
||||
action = (UIActionLink)facesApp.createComponent(UIActions.COMPONENT_ACTIONLINK);
|
||||
action.setId(actionId);
|
||||
action.setValue(attemptDate);
|
||||
action.setValue(attempt.getDateAsString());
|
||||
action.setTooltip(Application.getMessage(context, MSG_SELECT_ATTEMPT));
|
||||
action.setShowLink(true);
|
||||
action.setActionListener(facesApp.createMethodBinding(
|
||||
@@ -703,14 +716,14 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
UIParameter param1 = (UIParameter)facesApp.createComponent(ComponentConstants.JAVAX_FACES_PARAMETER);
|
||||
param1.setId(actionId + "_1");
|
||||
param1.setName("attemptRef");
|
||||
param1.setValue(attemptRef.toString());
|
||||
param1.setValue(attempt.getNodeRef().toString());
|
||||
action.getChildren().add(param1);
|
||||
|
||||
// add attemptDate param
|
||||
UIParameter param2 = (UIParameter)facesApp.createComponent(ComponentConstants.JAVAX_FACES_PARAMETER);
|
||||
param2.setId(actionId + "_2");
|
||||
param2.setName("attemptDate");
|
||||
param2.setValue(attemptDate);
|
||||
param2.setValue(attempt.getDateAsString());
|
||||
action.getChildren().add(param2);
|
||||
|
||||
this.getChildren().add(action);
|
||||
@@ -718,4 +731,54 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
private class DeploymentAttempt
|
||||
{
|
||||
private NodeRef nodeRef;
|
||||
private String id;
|
||||
private Date date;
|
||||
private String servers;
|
||||
private Integer version;
|
||||
|
||||
public DeploymentAttempt(NodeRef nodeRef, String id, Date date,
|
||||
String servers, Integer version)
|
||||
{
|
||||
this.nodeRef = nodeRef;
|
||||
this.id = id;
|
||||
this.date = date;
|
||||
this.servers = servers;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public NodeRef getNodeRef()
|
||||
{
|
||||
return this.nodeRef;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public String getServers()
|
||||
{
|
||||
return this.servers;
|
||||
}
|
||||
|
||||
public Integer getVersion()
|
||||
{
|
||||
return this.version;
|
||||
}
|
||||
|
||||
public Date getDate()
|
||||
{
|
||||
return this.date;
|
||||
}
|
||||
|
||||
public String getDateAsString()
|
||||
{
|
||||
// format the date using the default pattern
|
||||
return Utils.getDateTimeFormat(FacesContext.getCurrentInstance()).format(this.date);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -193,9 +193,9 @@ public class UIDeploymentServers extends UIInput
|
||||
out.write("YAHOO.util.Event.on(window, \"load\", Alfresco.checkDeployConfigPage);");
|
||||
if (currentServer != null)
|
||||
{
|
||||
out.write("Alfresco.scrollToEditServer('");
|
||||
out.write("var SCROLL_TO_SERVER_CONFIG_ID = '");
|
||||
out.write(currentServer.getId());
|
||||
out.write("');\n");
|
||||
out.write("';\n");
|
||||
}
|
||||
out.write("</script>\n");
|
||||
|
||||
@@ -334,7 +334,7 @@ public class UIDeploymentServers extends UIInput
|
||||
out.write(server.getDeployType());
|
||||
out.write(".gif");
|
||||
out.write("' /></td><td width='100%'><span class='deployPanelServerName'>");
|
||||
out.write(serverName);
|
||||
out.write(Utils.encode(serverName));
|
||||
out.write("</span></td><td><div class='deployConfigServerActions'>");
|
||||
Utils.encodeRecursive(context, aquireEditServerAction(context, server.getId()));
|
||||
Utils.encodeRecursive(context, aquireDeleteServerAction(context, server.getId()));
|
||||
@@ -347,7 +347,7 @@ public class UIDeploymentServers extends UIInput
|
||||
out.write(":</td><td>");
|
||||
if (server.getProperties().get(DeploymentServerConfig.PROP_HOST) != null)
|
||||
{
|
||||
out.write((String)server.getProperties().get(DeploymentServerConfig.PROP_HOST));
|
||||
out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_HOST)));
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
|
||||
@@ -382,7 +382,7 @@ public class UIDeploymentServers extends UIInput
|
||||
out.write(":</td><td>");
|
||||
if (server.getProperties().get(DeploymentServerConfig.PROP_URL) != null)
|
||||
{
|
||||
out.write((String)server.getProperties().get(DeploymentServerConfig.PROP_URL));
|
||||
out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_URL)));
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
|
||||
@@ -391,7 +391,7 @@ public class UIDeploymentServers extends UIInput
|
||||
out.write(":</td><td>");
|
||||
if (server.getProperties().get(DeploymentServerConfig.PROP_USER) != null)
|
||||
{
|
||||
out.write((String)server.getProperties().get(DeploymentServerConfig.PROP_USER));
|
||||
out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_USER)));
|
||||
}
|
||||
out.write("</td></tr></table></td>");
|
||||
out.write("<td valign='top'><table cellpadding='3' cellspacing='0' class='deployConfigServerDetailsRightCol'>");
|
||||
@@ -401,7 +401,7 @@ public class UIDeploymentServers extends UIInput
|
||||
out.write(":</nobr></td><td>");
|
||||
if (server.getProperties().get(DeploymentServerConfig.PROP_SOURCE_PATH) != null)
|
||||
{
|
||||
out.write((String)server.getProperties().get(DeploymentServerConfig.PROP_SOURCE_PATH));
|
||||
out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_SOURCE_PATH)));
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
|
||||
@@ -410,7 +410,7 @@ public class UIDeploymentServers extends UIInput
|
||||
out.write(":</nobr></td><td>");
|
||||
if (server.getProperties().get(DeploymentServerConfig.PROP_EXCLUDES) != null)
|
||||
{
|
||||
out.write((String)server.getProperties().get(DeploymentServerConfig.PROP_EXCLUDES));
|
||||
out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_EXCLUDES)));
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
|
||||
@@ -421,7 +421,7 @@ public class UIDeploymentServers extends UIInput
|
||||
out.write(":</nobr></td><td>");
|
||||
if (server.getProperties().get(DeploymentServerConfig.PROP_TARGET_NAME) != null)
|
||||
{
|
||||
out.write((String)server.getProperties().get(DeploymentServerConfig.PROP_TARGET_NAME));
|
||||
out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_TARGET_NAME)));
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
}
|
||||
|
@@ -106,6 +106,12 @@ Alfresco.checkDeployConfigPage = function()
|
||||
button.onclick = function() {deployActionButtonPressed = true; clear_wizard();}
|
||||
document.getElementById('wizard:wizard-body:deployServerHost').focus();
|
||||
}
|
||||
|
||||
// if a scroll to id has been set, scroll there
|
||||
if (window.SCROLL_TO_SERVER_CONFIG_ID)
|
||||
{
|
||||
Alfresco.scrollToEditServer(SCROLL_TO_SERVER_CONFIG_ID);
|
||||
}
|
||||
}
|
||||
|
||||
Alfresco.checkDeployConfigButtonState = function()
|
||||
|
Reference in New Issue
Block a user