Package org.apache.sirona.reporting.web.plugin.api

Examples of org.apache.sirona.reporting.web.plugin.api.Template


    @Regex("/([^/]*)")
    public Template dump(final String name) {
        final Thread thread = findThread(new String(Base64.decodeBase64(name)));
        if (thread == null) {
            return new Template("templates/threads/thread.vm", new MapBuilder<String, Object>().set("state", "Not found").build(), false);
        }

        return new Template(
            "templates/threads/thread.vm",
                new MapBuilder<String, Object>().set("state", thread.getState().name()).set("dump", StringEscapeUtils.escapeHtml4(dump(thread))).build(),
                false);
    }
View Full Code Here


public class GaugeEndpoints {
    private static final String UTF8 = "UTF-8";

    @Regex
    public Template home() {
        return new Template("gauge/home.vm").set("gauges", sortNames(Repository.INSTANCE.gauges()));
    }
View Full Code Here

        return new Template("gauge/home.vm").set("gauges", sortNames(Repository.INSTANCE.gauges()));
    }

    @Regex("/([^/]*)")
    public Template detail(final String role) {
        return new Template("gauge/detail.vm")
            .set("gauge", decode(role))
            .set("gauge64", role);
    }
View Full Code Here

        this.server = ManagementFactory.getPlatformMBeanServer();
    }

    @Regex("")
    public Template home() throws IOException {
        return new Template("jmx/main.vm", new MapBuilder<String, Object>().set("jmxTree", buildJmxTree()).build());
    }
View Full Code Here

    @Regex("/([^/]*)")
    public Template mbean(final String objectNameBase64) {
        try {
            final ObjectName name = new ObjectName(new String(Base64.decodeBase64(objectNameBase64)));
            final MBeanInfo info = server.getMBeanInfo(name);
            return new Template("templates/jmx/mbean.vm",
                new MapBuilder<String, Object>()
                    .set("objectname", name.toString())
                    .set("objectnameHash", Base64.encodeBase64URLSafeString(name.toString().getBytes()))
                    .set("classname", info.getClassName())
                    .set("description", value(info.getDescription()))
View Full Code Here

            }
        } else {
            counters.put("", generateLine(counter, timeUnit, format));
        }

        return new Template("report/counter.vm",
            new MapBuilder<String, Object>()
                .set("headers", HTMLFormat.ATTRIBUTES_ORDERED_LIST)
                .set("counter", counter)
                .set("counters", counters)
                .build());
View Full Code Here

                statusesByApp.put(segments[0], statusesOfTheApp);
            }
            statusesOfTheApp.put(segments[1], entry.getValue());
        }

        return new Template("status/home.vm")
                    .set("helper", StatusHelper.class)
                    .set("apps", statusesByApp);
    }
View Full Code Here

                    .set("apps", statusesByApp);
    }

    @Regex("/([^/]*)")
    public Template detail(final String node) {
        return new Template("status/detail.vm")
            .set("helper", StatusHelper.class)
            .set("node", Repository.INSTANCE.statuses().get(node))
            .set("name", node);
    }
View Full Code Here

import org.apache.sirona.web.session.SessionGauge;

public class WebEndpoints {
    @Regex
    public Template home() {
        return new Template("web/web.vm");
    }
View Full Code Here

            params.put("maxMemory", memory.getHeapMemoryUsage().getMax());
            params.put( "initMemory", memory.getHeapMemoryUsage().getInit() );
            params.put("maxNonHeapMemory", memory.getNonHeapMemoryUsage().getMax());
            params.put("initNonHeapMemory", memory.getNonHeapMemoryUsage().getInit());
        }
        return new Template("jvm/jvm.vm", params);
    }
View Full Code Here

TOP

Related Classes of org.apache.sirona.reporting.web.plugin.api.Template

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.