Refactored links management UI following link validation service API changes

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6024 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2007-06-19 21:30:52 +00:00
parent 01fcd8f734
commit fcacf048c0
9 changed files with 141 additions and 56 deletions

View File

@@ -1178,7 +1178,7 @@ link_validaton_report_desc=This dialog shows the results of the last link valida
initial_check=Initial check initial_check=Initial check
current_status=Current status current_status=Current status
files_links_checked=The check was completed at {0}, {1} file(s) were checked and {2} link(s) were found. files_links_checked=The check was completed at {0}, {1} file(s) were checked and {2} link(s) were found.
files_links_checked_error=The check was completed at {0} due to the error: files_links_checked_error=The check failed at {0} due to the error:
files_links_broken={0} broken link(s) were found in {1} file(s). files_links_broken={0} broken link(s) were found in {1} file(s).
files_links_still_broken={0} link(s) still broken in {1} file(s). files_links_still_broken={0} link(s) still broken in {1} file(s).
broken_links_fixed={0} broken link(s) have been fixed. broken_links_fixed={0} broken link(s) have been fixed.

View File

@@ -31,6 +31,7 @@ import javax.faces.context.FacesContext;
import org.alfresco.service.cmr.action.ActionService; import org.alfresco.service.cmr.action.ActionService;
import org.alfresco.service.cmr.avm.AVMService; import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.util.ParameterCheck;
import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.dialog.BaseDialogBean;
@@ -49,7 +50,11 @@ public class LinkValidationReportDialog extends BaseDialogBean
protected ActionService actionService; protected ActionService actionService;
private String store; private String store;
private String webapp;
private String webappPath;
private String cancelOutcome; private String cancelOutcome;
private String fromTaskDialog;
private String compareToStaging;
private static final Log logger = LogFactory.getLog(LinkValidationReportDialog.class); private static final Log logger = LogFactory.getLog(LinkValidationReportDialog.class);
@@ -61,16 +66,26 @@ public class LinkValidationReportDialog extends BaseDialogBean
{ {
super.init(parameters); super.init(parameters);
// check required params are present
this.store = parameters.get("store");
this.webapp = parameters.get("webapp");
ParameterCheck.mandatoryString("store", this.store);
ParameterCheck.mandatoryString("webapp", this.webapp);
// setup context for dialog // setup context for dialog
store = parameters.get("store"); this.webappPath = AVMUtil.buildStoreWebappPath(this.store, this.webapp);
this.compareToStaging = parameters.get("compareToStaging");
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Showing link validation report for store '" + store + "'"); logger.debug("Showing link validation report for webapp '" + webappPath + "'");
String directView = parameters.get("directView"); // use a different cancel outcome if we were launched from the task dialog
if (directView != null && directView.equals("true")) this.fromTaskDialog = parameters.get("fromTaskDialog");
if (this.fromTaskDialog != null && this.fromTaskDialog.equals("true"))
{ {
this.cancelOutcome = super.getDefaultCancelOutcome(); this.cancelOutcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
AlfrescoNavigationHandler.OUTCOME_SEPARATOR +
"myalfresco";
} }
else else
{ {
@@ -85,10 +100,13 @@ public class LinkValidationReportDialog extends BaseDialogBean
protected String finishImpl(FacesContext context, String outcome) throws Exception protected String finishImpl(FacesContext context, String outcome) throws Exception
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Re-running link validation report for store '" + store + "'"); logger.debug("Re-running link validation report for webapp '" + this.webappPath + "'");
Map<String, String> params = new HashMap<String, String>(1); Map<String, String> params = new HashMap<String, String>(1);
params.put("store", this.store); params.put("store", this.store);
params.put("webapp", this.webapp);
params.put("fromTaskDialog", this.fromTaskDialog);
params.put("compareToStaging", this.compareToStaging);
Application.getDialogManager().setupParameters(params); Application.getDialogManager().setupParameters(params);
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME + return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
@@ -126,11 +144,14 @@ public class LinkValidationReportDialog extends BaseDialogBean
public String updateStatus() public String updateStatus()
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Updating status for link validation report for store '" + store + "'"); logger.debug("Updating status for link validation report for webapp '" + this.webappPath + "'");
Map<String, String> params = new HashMap<String, String>(1); Map<String, String> params = new HashMap<String, String>(1);
params.put("store", this.store); params.put("store", this.store);
params.put("rerun", "true"); params.put("webapp", this.webapp);
params.put("fromTaskDialog", this.fromTaskDialog);
params.put("compareToStaging", this.compareToStaging);
params.put("update", "true");
Application.getDialogManager().setupParameters(params); Application.getDialogManager().setupParameters(params);
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME + return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +

View File

@@ -41,6 +41,7 @@ import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ActionService; import org.alfresco.service.cmr.action.ActionService;
import org.alfresco.service.cmr.avm.AVMService; import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.util.ParameterCheck;
import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.dialog.BaseDialogBean;
@@ -61,8 +62,12 @@ public class LinkValidationRunDialog extends BaseDialogBean
protected ActionService actionService; protected ActionService actionService;
private String store; private String store;
private NodeRef storePathRef; private String webapp;
private boolean rerun = false; private String webappPath;
private String fromTaskDialog;
private NodeRef webappPathRef;
private boolean update = false;
private boolean compareToStaging = false;
private static final Log logger = LogFactory.getLog(LinkValidationRunDialog.class); private static final Log logger = LogFactory.getLog(LinkValidationRunDialog.class);
@@ -74,39 +79,49 @@ public class LinkValidationRunDialog extends BaseDialogBean
{ {
super.init(parameters); super.init(parameters);
// TODO: determine whether the virtualisation server is running, if it's not // check required params are present
// we need to throw an exception to reflect that this.store = parameters.get("store");
this.webapp = parameters.get("webapp");
ParameterCheck.mandatoryString("store", this.store);
ParameterCheck.mandatoryString("webapp", this.webapp);
// setup context for dialog // setup context for dialog
store = parameters.get("store"); this.fromTaskDialog = parameters.get("fromTaskDialog");
this.webappPath = AVMUtil.buildStoreWebappPath(this.store, this.webapp);
this.webappPathRef = AVMNodeConverter.ToNodeRef(-1, this.webappPath);
String storePath = this.store + ":/"; this.update = false;
this.storePathRef = AVMNodeConverter.ToNodeRef(-1, storePath); String updateParam = parameters.get("update");
if (updateParam != null && updateParam.equals("true"))
this.rerun = false;
String rerunParam = parameters.get("rerun");
if (rerunParam != null && rerunParam.equals("true"))
{ {
this.rerun = true; this.update = true;
}
this.compareToStaging = false;
String compareToStagingParam = parameters.get("compareToStaging");
if (compareToStagingParam != null && compareToStagingParam.equals("true"))
{
this.compareToStaging = true;
} }
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
{ {
if (this.rerun) if (this.update)
logger.debug("Starting re-run link validation check for store '" + store + "'"); logger.debug("Starting update link validation check for webapp '" + this.webappPath + "'");
else else
logger.debug("Starting initial link validation check for store '" + store + "'"); logger.debug("Starting initial link validation check for webapp '" + this.webappPath + "'");
} }
// create context required to run and monitor the link check // create context required to run and monitor the link check
HrefValidationProgress monitor = new HrefValidationProgress(); HrefValidationProgress monitor = new HrefValidationProgress();
Map<String, Serializable> args = new HashMap<String, Serializable>(1, 1.0f); Map<String, Serializable> args = new HashMap<String, Serializable>(1, 1.0f);
args.put(LinkValidationAction.PARAM_MONITOR, monitor); args.put(LinkValidationAction.PARAM_MONITOR, monitor);
args.put(LinkValidationAction.PARAM_COMPARE_TO_STAGING, new Boolean(this.compareToStaging));
this.avmBrowseBean.setLinkValidationMonitor(monitor); this.avmBrowseBean.setLinkValidationMonitor(monitor);
// create and execute the action in the background // create and execute the action in the background
Action action = this.actionService.createAction(LinkValidationAction.NAME, args); Action action = this.actionService.createAction(LinkValidationAction.NAME, args);
this.actionService.executeAction(action, this.storePathRef, false, true); this.actionService.executeAction(action, this.webappPathRef, false, true);
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@@ -145,18 +160,21 @@ public class LinkValidationRunDialog extends BaseDialogBean
if (report.wasSuccessful()) if (report.wasSuccessful())
{ {
// setup the context required by the reporting components to display the results // setup the context required by the reporting components to display the results
if (this.rerun) if (this.update)
{ {
this.avmBrowseBean.getLinkValidationState().updateState(report); this.avmBrowseBean.getLinkValidationState().updateState(report);
} }
else else
{ {
LinkValidationState state = new LinkValidationState(this.store, report); LinkValidationState state = new LinkValidationState(report);
this.avmBrowseBean.setLinkValidationState(state); this.avmBrowseBean.setLinkValidationState(state);
} }
Map<String, String> params = new HashMap<String, String>(1); Map<String, String> params = new HashMap<String, String>(1);
params.put("store", this.store); params.put("store", this.store);
params.put("webapp", this.webapp);
params.put("fromTaskDialog", this.fromTaskDialog);
params.put("compareToStaging", Boolean.toString(this.compareToStaging));
Application.getDialogManager().setupParameters(params); Application.getDialogManager().setupParameters(params);
outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME + outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +

View File

@@ -58,8 +58,9 @@ import org.apache.commons.logging.LogFactory;
public class LinkValidationState public class LinkValidationState
{ {
private String store; private String store;
private Date initialCheckedCompletedAt; private String webapp;
private boolean checkBeenReRun = false; private boolean checkBeenReRun = false;
private Date initialCheckCompletedAt;
private int noFilesCheckedStart = -1; private int noFilesCheckedStart = -1;
private int noFilesCheckedLast = -1; private int noFilesCheckedLast = -1;
@@ -95,10 +96,10 @@ public class LinkValidationState
/** /**
* Default constructor * Default constructor
*/ */
public LinkValidationState(String store, LinkValidationReport initialReport) public LinkValidationState(LinkValidationReport initialReport)
{ {
this.store = store; this.store = initialReport.getStore();
this.initialCheckedCompletedAt = new Date(); this.webapp = initialReport.getWebapp();
processReport(initialReport, false); processReport(initialReport, false);
} }
@@ -114,12 +115,20 @@ public class LinkValidationState
return this.store; return this.store;
} }
/**
* @return The webapp within a store this validaton state represents
*/
public String getWebapp()
{
return this.webapp;
}
/** /**
* @return The date the initial check was completed * @return The date the initial check was completed
*/ */
public Date getInitialCheckCompletedAt() public Date getInitialCheckCompletedAt()
{ {
return this.initialCheckedCompletedAt; return this.initialCheckCompletedAt;
} }
/** /**
@@ -293,6 +302,14 @@ public class LinkValidationState
*/ */
public void updateState(LinkValidationReport newReport) public void updateState(LinkValidationReport newReport)
{ {
// make sure the updated report has the same store and webapp
// as the initial report
if ((newReport.getStore().equals(this.store) == false) ||
(newReport.getWebapp().equals(this.webapp) == false))
{
throw new IllegalStateException("Can not update a report from a different store or webapp!");
}
// process the new report // process the new report
processReport(newReport, true); processReport(newReport, true);
} }
@@ -302,6 +319,7 @@ public class LinkValidationState
{ {
StringBuilder buffer = new StringBuilder(super.toString()); StringBuilder buffer = new StringBuilder(super.toString());
buffer.append(" (store=").append(this.store); buffer.append(" (store=").append(this.store);
buffer.append(" webapp=").append(this.webapp);
buffer.append(" error=").append(this.cause).append(")"); buffer.append(" error=").append(this.cause).append(")");
return buffer.toString(); return buffer.toString();
} }
@@ -309,14 +327,20 @@ public class LinkValidationState
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Private Helpers // Private Helpers
public void processReport(LinkValidationReport report, boolean rerunReport) public void processReport(LinkValidationReport report, boolean updatedReport)
{ {
this.checkBeenReRun = rerunReport; this.checkBeenReRun = updatedReport;
this.cause = report.getError(); this.cause = report.getError();
// make sure there is an initial check completed date
if (this.initialCheckCompletedAt == null)
{
this.initialCheckCompletedAt = report.getCheckCompletedAt();
}
if (this.cause == null) if (this.cause == null)
{ {
if (rerunReport == false) if (updatedReport == false)
{ {
// setup initial counts // setup initial counts
this.noBrokenFilesStart = report.getNumberBrokenFiles(); this.noBrokenFilesStart = report.getNumberBrokenFiles();
@@ -336,7 +360,7 @@ public class LinkValidationState
// process the broken files and determine which ones are static files // process the broken files and determine which ones are static files
// and which ones are generated // and which ones are generated
processFiles(report.getFilesWithBrokenLinks(), rerunReport, report); processFiles(report.getFilesWithBrokenLinks(), updatedReport, report);
} }
else else
{ {
@@ -360,7 +384,7 @@ public class LinkValidationState
// process the broken files and determine which ones are static files // process the broken files and determine which ones are static files
// and which ones are generated // and which ones are generated
processFiles(report.getFilesWithBrokenLinks(), rerunReport, report); processFiles(report.getFilesWithBrokenLinks(), updatedReport, report);
// go through the list of files & forms still broken and find which ones // go through the list of files & forms still broken and find which ones
// were fixed in the last re-run of the report // were fixed in the last re-run of the report
@@ -384,7 +408,7 @@ public class LinkValidationState
} }
} }
protected void processFiles(List<String> files, boolean rerunReport, LinkValidationReport report) protected void processFiles(List<String> files, boolean updatedReport, LinkValidationReport report)
{ {
AVMService avmService = Repository.getServiceRegistry( AVMService avmService = Repository.getServiceRegistry(
FacesContext.getCurrentInstance()).getAVMService(); FacesContext.getCurrentInstance()).getAVMService();
@@ -393,7 +417,7 @@ public class LinkValidationState
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
{ {
if (rerunReport) if (updatedReport)
logger.debug("Processing files from updated report: " + report); logger.debug("Processing files from updated report: " + report);
else else
logger.debug("Processing files from initial report: " + report); logger.debug("Processing files from initial report: " + report);
@@ -442,6 +466,11 @@ public class LinkValidationState
genFiles.add(file); genFiles.add(file);
this.brokenFilesByForm.put(xmlPath, genFiles); this.brokenFilesByForm.put(xmlPath, genFiles);
} }
else
{
if (logger.isDebugEnabled())
logger.debug("Ignoring generated XML file: " + file);
}
} }
else else
{ {
@@ -456,7 +485,7 @@ public class LinkValidationState
} }
// if this is the first run of the report setup the initial lists // if this is the first run of the report setup the initial lists
if (rerunReport == false) if (updatedReport == false)
{ {
this.brokenStaticFilesStart = new ArrayList<String>(this.brokenStaticFilesLast.size()); this.brokenStaticFilesStart = new ArrayList<String>(this.brokenStaticFilesLast.size());
this.brokenStaticFilesStart.addAll(this.brokenStaticFilesLast); this.brokenStaticFilesStart.addAll(this.brokenStaticFilesLast);

View File

@@ -48,6 +48,8 @@ import org.apache.commons.logging.LogFactory;
*/ */
public class ManageVerifyBrokenLinksTaskDialog extends ManageTaskDialog public class ManageVerifyBrokenLinksTaskDialog extends ManageTaskDialog
{ {
protected String store;
protected String webapp;
protected AVMBrowseBean avmBrowseBean; protected AVMBrowseBean avmBrowseBean;
private static final Log logger = LogFactory.getLog(ManageVerifyBrokenLinksTaskDialog.class); private static final Log logger = LogFactory.getLog(ManageVerifyBrokenLinksTaskDialog.class);
@@ -77,7 +79,7 @@ public class ManageVerifyBrokenLinksTaskDialog extends ManageTaskDialog
String storeName = this.workflowPackage.getStoreRef().getIdentifier(); String storeName = this.workflowPackage.getStoreRef().getIdentifier();
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Retrieving link validation report for store '" + storeName + "'"); logger.debug("Retrieving link validation report from store '" + storeName + "'");
PropertyValue val = this.avmService.getStoreProperty(storeName, PropertyValue val = this.avmService.getStoreProperty(storeName,
SandboxConstants.PROP_LINK_VALIDATION_REPORT); SandboxConstants.PROP_LINK_VALIDATION_REPORT);
@@ -86,7 +88,14 @@ public class ManageVerifyBrokenLinksTaskDialog extends ManageTaskDialog
LinkValidationReport report = (LinkValidationReport)val.getSerializableValue(); LinkValidationReport report = (LinkValidationReport)val.getSerializableValue();
if (report != null) if (report != null)
{ {
LinkValidationState state = new LinkValidationState(storeName, report); this.store = report.getStore();
this.webapp = report.getWebapp();
if (logger.isDebugEnabled())
logger.debug("Found link validation report for webapp '" +
AVMUtil.buildStoreWebappPath(this.store, this.webapp) + "'");
LinkValidationState state = new LinkValidationState(report);
this.avmBrowseBean.setLinkValidationState(state); this.avmBrowseBean.setLinkValidationState(state);
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
@@ -110,14 +119,14 @@ public class ManageVerifyBrokenLinksTaskDialog extends ManageTaskDialog
public String viewLinkReport() public String viewLinkReport()
{ {
String storeName = this.workflowPackage.getStoreRef().getIdentifier();
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Viewing link validation report for store '" + storeName + "'"); logger.debug("Viewing link validation report for webapp '" +
AVMUtil.buildStoreWebappPath(this.store, this.webapp) + "'");
Map<String, String> params = new HashMap<String, String>(1); Map<String, String> params = new HashMap<String, String>(1);
params.put("store", storeName); params.put("store", this.store);
params.put("directView", "true"); params.put("webapp", this.webapp);
params.put("fromTaskDialog", "true");
Application.getDialogManager().setupParameters(params); Application.getDialogManager().setupParameters(params);
return "dialog:linkValidationReport"; return "dialog:linkValidationReport";

View File

@@ -64,6 +64,7 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern; import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.util.ISO8601DateFormat; import org.alfresco.util.ISO8601DateFormat;
import org.alfresco.util.NameMatcher; import org.alfresco.util.NameMatcher;
import org.alfresco.util.VirtServerUtils;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.app.servlet.DownloadContentServlet; import org.alfresco.web.app.servlet.DownloadContentServlet;
import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.BrowseBean;
@@ -75,8 +76,6 @@ import org.alfresco.web.forms.FormInstanceDataImpl;
import org.alfresco.web.forms.Rendition; import org.alfresco.web.forms.Rendition;
import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIListItem; import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.wcm.WebResources;
import org.alfresco.util.VirtServerUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@@ -97,7 +96,7 @@ public class SubmitDialog extends BaseDialogBean
private String[] workflowSelectedValue; private String[] workflowSelectedValue;
private boolean enteringExpireDate = false; private boolean enteringExpireDate = false;
private boolean startedFromWorkflow = false; private boolean startedFromWorkflow = false;
private boolean validateLinks = false; private boolean validateLinks = true;
private Date defaultExpireDate; private Date defaultExpireDate;
private Date launchDate; private Date launchDate;
@@ -196,7 +195,7 @@ public class SubmitDialog extends BaseDialogBean
this.defaultExpireDate = new Date(); this.defaultExpireDate = new Date();
this.workflowSelectedValue = null; this.workflowSelectedValue = null;
this.launchDate = null; this.launchDate = null;
this.validateLinks = false; this.validateLinks = true;
// determine if the dialog has been started from a workflow // determine if the dialog has been started from a workflow
Boolean bool = new Boolean(this.parameters.get(PARAM_STARTED_FROM_WORKFLOW)); Boolean bool = new Boolean(this.parameters.get(PARAM_STARTED_FROM_WORKFLOW));
@@ -332,7 +331,10 @@ public class SubmitDialog extends BaseDialogBean
params.put(WCMWorkflowModel.PROP_FROM_PATH, params.put(WCMWorkflowModel.PROP_FROM_PATH,
AVMUtil.buildStoreRootPath(this.avmBrowseBean.getSandbox())); AVMUtil.buildStoreRootPath(this.avmBrowseBean.getSandbox()));
params.put(WCMWorkflowModel.PROP_LAUNCH_DATE, this.launchDate); params.put(WCMWorkflowModel.PROP_LAUNCH_DATE, this.launchDate);
params.put(WCMWorkflowModel.PROP_VALIDATE_LINKS, new Boolean(this.validateLinks)); params.put(WCMWorkflowModel.PROP_VALIDATE_LINKS,
new Boolean(this.validateLinks));
params.put(WCMWorkflowModel.PROP_WEBAPP,
this.avmBrowseBean.getWebapp());
params.put(WCMWorkflowModel.ASSOC_WEBPROJECT, params.put(WCMWorkflowModel.ASSOC_WEBPROJECT,
this.avmBrowseBean.getWebsite().getNodeRef()); this.avmBrowseBean.getWebsite().getNodeRef());

View File

@@ -93,7 +93,7 @@ public class UILinkValidationSummary extends AbstractLinkValidationReportCompone
{ {
String pattern = bundle.getString("files_links_still_broken"); String pattern = bundle.getString("files_links_still_broken");
String stillBroken = MessageFormat.format(pattern, String stillBroken = MessageFormat.format(pattern,
new Object[] {linkState.getNumberBrokenFiles(), linkState.getNumberBrokenLinks()}); new Object[] {linkState.getNumberBrokenLinks(), linkState.getNumberBrokenFiles()});
pattern = bundle.getString("broken_links_fixed"); pattern = bundle.getString("broken_links_fixed");
String linksFixed = MessageFormat.format(pattern, String linksFixed = MessageFormat.format(pattern,
new Object[] {linkState.getNumberFixedLinks()}); new Object[] {linkState.getNumberFixedLinks()});
@@ -161,7 +161,7 @@ public class UILinkValidationSummary extends AbstractLinkValidationReportCompone
linkState.getInitialNumberLinksChecked()}); linkState.getInitialNumberLinksChecked()});
pattern = bundle.getString("files_links_broken"); pattern = bundle.getString("files_links_broken");
String initialBrokenSummary = MessageFormat.format(pattern, String initialBrokenSummary = MessageFormat.format(pattern,
new Object[] {linkState.getInitialNumberBrokenFiles(), linkState.getInitialNumberBrokenLinks()}); new Object[] {linkState.getInitialNumberBrokenLinks(), linkState.getInitialNumberBrokenFiles()});
out.write("<div style='margin-bottom: 6px;'>"); out.write("<div style='margin-bottom: 6px;'>");
out.write(initialCheckSummary); out.write(initialCheckSummary);

View File

@@ -375,9 +375,14 @@ public class UIUserSandboxes extends SelfRenderingComponent
out.write(")</td><td><nobr>"); out.write(")</td><td><nobr>");
// Direct actions for a sandbox... // Direct actions for a sandbox...
Map<String, String> params = new HashMap<String, String>(3);
params.put("store", mainStore);
params.put("username", username);
params.put("webapp", this.getWebapp());
params.put("compareToStaging", "true");
Utils.encodeRecursive(context, aquireAction( Utils.encodeRecursive(context, aquireAction(
context, mainStore, username, ACT_SANDBOX_CHECK_LINKS, "/images/icons/run_link_validation.gif", context, mainStore, username, ACT_SANDBOX_CHECK_LINKS, "/images/icons/run_link_validation.gif",
"#{DialogManager.setupParameters}", "dialog:runLinkValidation")); "#{DialogManager.setupParameters}", "dialog:runLinkValidation", null, params));
out.write("&nbsp;&nbsp;"); out.write("&nbsp;&nbsp;");
// Browse Sandbox // Browse Sandbox

View File

@@ -142,6 +142,7 @@
<a:actionLink id="actLinks" value="#{msg.check_links}" image="/images/icons/run_link_validation.gif" <a:actionLink id="actLinks" value="#{msg.check_links}" image="/images/icons/run_link_validation.gif"
actionListener="#{DialogManager.setupParameters}" action="dialog:runLinkValidation"> actionListener="#{DialogManager.setupParameters}" action="dialog:runLinkValidation">
<f:param name="store" value="#{AVMBrowseBean.stagingStore}" /> <f:param name="store" value="#{AVMBrowseBean.stagingStore}" />
<f:param name="webapp" value="#{AVMBrowseBean.webapp}" />
</a:actionLink> </a:actionLink>
&nbsp; &nbsp;
<a:actionLink id="actBrowse" value="#{msg.sandbox_browse}" image="/images/icons/space_small.gif" <a:actionLink id="actBrowse" value="#{msg.sandbox_browse}" image="/images/icons/space_small.gif"