What is the Page PlaceID for a Tab on the main Tabs?

How or can I define a custom tab to exist at the level of Projects/My Changes/Agents/Build Queue?

Nothing listed in JavaDoc appears to be the Tab section I'm looking for.


-Scott

0
3 comments

There is no such place id, but you can do the following:
- register your plugin to all pages header page place (PlaceId.ALL_PAGES_HEADER)
- add the following code to your JSP:
<script type="text/javascript">
Behaviour.addLoadEvent(function() {
      topNavPane.addTab("<tab id>", {
        caption: "<tab title>",
        url: "<tab url>"
      });
})
</script>

0

Excellent

Created a redirect.jsp

<script type="text/javascript">   topNavPane.addTab("TAB.FAQ", {     caption: "FAQ",     url: "${teamcityPluginResourcesPath}index.jsp"   }); </script>



 


And setup everything I needed on the index.jsp.

I'll setup a controller soon to do more complex stuff, intend to make a very compact dashboard that managers want, but the primary thing was having a highly visible place to get more help about team city (image based tutorials, and policies on usage).


Created the following SimplePageExtension, and added it to build-server-plugin.xml as a bean.

import javax.servlet.http.HttpServletRequest; import jetbrains.buildServer.web.openapi.CustomTab; import jetbrains.buildServer.web.openapi.PageExtension; import jetbrains.buildServer.web.openapi.PagePlaces; import jetbrains.buildServer.web.openapi.PlaceId; import jetbrains.buildServer.web.openapi.SimplePageExtension; public class FaqPage extends SimplePageExtension implements CustomTab, PageExtension { public VestaPage(PagePlaces pagePlaces) { super(pagePlaces); setIncludeUrl("redirect.jsp"); setPluginName("<company>Extension"); setPlaceId(PlaceId.ALL_PAGES_HEADER); register(); } @Override public String getTabId() { return "TAB.FAQ"; } @Override public String getTabTitle() { return "FAQ"; } public boolean isVisible() { return true; } @Override public boolean isAvailable(HttpServletRequest request) { return true; } }

0

Since ALL_PAGES_HEADER is a simple place id (not a place for custom tab) you can simplify your code by removing CustomTab interface implementation.

0

Please sign in to leave a comment.