package jetbrains.buildServer.profile; import jetbrains.buildServer.diagnostic.web.DiagnosticTab; import jetbrains.buildServer.web.openapi.PagePlaces; import jetbrains.buildServer.web.openapi.PlaceId; import jetbrains.buildServer.web.openapi.PluginDescriptor; import jetbrains.buildServer.web.openapi.SimplePageExtension; import org.jetbrains.annotations.NotNull; import javax.servlet.http.HttpServletRequest; import java.util.Map; public class ProfilerTab extends DiagnosticTab { private final Profiler myProfiler; public ProfilerTab(@NotNull final PagePlaces places, @NotNull final PluginDescriptor descriptor, @NotNull final Profiler profiler) { super(places, "serverProfiling", "Server Profiling"); myProfiler = profiler; setIncludeUrl(descriptor.getPluginResourcesPath("profControls.jsp")); register(); } public void fillModel(@NotNull final Map model, @NotNull final HttpServletRequest request) { super.fillModel(model, request); model.put("currentMode", myProfiler.getMode().name()); } }