hudson.model.DirectoryBrowserSupport Java Examples

The following examples show how to use hudson.model.DirectoryBrowserSupport. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CukedoctorBuildAction.java    From cucumber-living-documentation-plugin with MIT License 6 votes vote down vote up
public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {

        File docsPath = getDocsPath();

        if (docsPath.getName().endsWith("all.html")) {
            createAllDocsPage(docsPath);
            DirectoryBrowserSupport dbs = new DirectoryBrowserSupport(this, new FilePath(getDocsPath()), getTitle(), getUrlName(),
                false);

            dbs.generateResponse(req, rsp, this);
        } else if (docsPath.getName().endsWith("html")) {
            rsp.sendRedirect2(req.getContextPath()+"/"+build.getUrl() + BASE_URL + "/docsHtml");
        } else {
            rsp.sendRedirect2(req.getContextPath()+"/"+build.getUrl() +BASE_URL + "/docsPdf");
        }

    }
 
Example #2
Source File: AuditLogRootAction.java    From audit-log-plugin with MIT License 4 votes vote down vote up
public DirectoryBrowserSupport doDynamic() {
    Jenkins.get().checkPermission(Jenkins.ADMINISTER);
    FilePath fp = Jenkins.get().getRootPath().child("logs").child("html");
    return new DirectoryBrowserSupport(this, fp,"Audit Logs","notepad.png",true);
}
 
Example #3
Source File: LocalObjectPath.java    From jobcacher-plugin with MIT License 4 votes vote down vote up
@Override
public HttpResponse browse(StaplerRequest request, StaplerResponse response, Job job, String name) {
    return new DirectoryBrowserSupport(job, file, "Cache of " + name, "folder.png", true);
}