public Response makeResponse(FitNesseContext context, Request request) { this.context = context; WikiPage root = context.root; WikiPage page = root.getPageCrawler().getPage(PathParser.parse(request.getResource())); SuiteFilter filter = TestResponder.createSuiteFilter(request, page.getPageCrawler().getFullPath().toString()); SuiteContentsFinder suiteTestFinder = new SuiteContentsFinder(page, filter, root); List<WikiPage> pagelist = suiteTestFinder.makePageList(); SuiteOverviewTree treeview = new SuiteOverviewTree(pagelist); treeview.findLatestResults(context.getTestHistoryDirectory()); treeview.countResults(); WikiPagePath path = PathParser.parse(request.getResource()); SimpleResponse response = makeResponse(treeview, path, request); return response; }
private SimpleResponse makeResponse( SuiteOverviewTree treeview, WikiPagePath path, Request request) { SimpleResponse response = new SimpleResponse(); HtmlPage page = context.pageFactory.newPage(); page.setTitle("Suite Overview"); page.setPageTitle(new PageTitle("Suite Overview", path)); page.put("treeRoot", treeview.getTreeRoot()); page.put("viewLocation", request.getResource()); page.setMainTemplate("suiteOverview"); response.setContent(page.html()); return response; }