|
118 | 118 | import org.labkey.api.util.ExceptionUtil; |
119 | 119 | import org.labkey.api.util.FileType; |
120 | 120 | import org.labkey.api.util.FileUtil; |
| 121 | +import org.labkey.api.util.HtmlString; |
121 | 122 | import org.labkey.api.util.NetworkDrive; |
122 | 123 | import org.labkey.api.util.PageFlowUtil; |
123 | 124 | import org.labkey.api.util.Pair; |
@@ -218,14 +219,17 @@ public SequenceAnalysisController() |
218 | 219 | public class FastqcReportAction extends SimpleViewAction<FastqcForm> |
219 | 220 | { |
220 | 221 | @Override |
221 | | - public ModelAndView getView(FastqcForm form, BindException errors) throws Exception |
| 222 | + public void validate(FastqcForm form, BindException errors) |
222 | 223 | { |
223 | | - if (form.getFilenames() == null && form.getDataIds() == null) |
| 224 | + if (form.getReadsets() == null && form.getFilenames() == null && form.getDataIds() == null && form.getAnalysisIds() == null) |
224 | 225 | { |
225 | 226 | errors.reject(ERROR_MSG, "Must provide a filename or Exp data Ids"); |
226 | | - return null; |
227 | 227 | } |
| 228 | + } |
228 | 229 |
|
| 230 | + @Override |
| 231 | + public ModelAndView getView(FastqcForm form, BindException errors) throws Exception |
| 232 | + { |
229 | 233 | //resolve files |
230 | 234 | List<File> files = new ArrayList<>(); |
231 | 235 | Map<File, String> labels = new HashMap<>(); |
@@ -315,7 +319,7 @@ public ModelAndView getView(FastqcForm form, BindException errors) throws Except |
315 | 319 | try |
316 | 320 | { |
317 | 321 | String html = runner.execute(files, labels); |
318 | | - return new HtmlView("FastQC Report", html); |
| 322 | + return new HtmlView("FastQC Report", HtmlString.unsafe(html)); |
319 | 323 | } |
320 | 324 | catch (FileNotFoundException e) |
321 | 325 | { |
|
0 commit comments