Package org.koshuke.stapler.simile.timeline

Examples of org.koshuke.stapler.simile.timeline.TimelineEventList


    public Run<?, ?> getLastBuild() {
        return builds.getLastBuild();
    }

    public TimelineEventList doData(StaplerRequest req, @QueryParameter long min, @QueryParameter long max) throws IOException {
        TimelineEventList result = new TimelineEventList();
        for (Run r : builds.byTimestamp(min,max)) {
            Event e = new Event();
            e.start = r.getTime();
            e.end   = new Date(r.timestamp+r.getDuration());
            e.title = r.getFullDisplayName();
            // what to put in the description?
            // e.description = "Longish description of event "+r.getFullDisplayName();
            // e.durationEvent = true;
            e.link = req.getContextPath()+'/'+r.getUrl();
            BallColor c = r.getIconColor();
            e.color = String.format("#%06X",c.getBaseColor().darker().getRGB()&0xFFFFFF);
            e.classname = "event-"+c.noAnime().toString()+" " + (c.isAnimated()?"animated":"");
            result.add(e);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.koshuke.stapler.simile.timeline.TimelineEventList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.