ui sketch
[teamcity/dotNetPackagesSupport.git] / nuget-server / src / jetbrains / buildServer / nuget / server / toolRegistry / tab / ServerSettingsController.java
index 19bd79baa3e0c94a678cfdf5356846400f96c20d..af6fd930b65ab2c1918c9ba68a98cb431e7c8926 100644 (file)
@@ -19,6 +19,7 @@ package jetbrains.buildServer.nuget.server.toolRegistry.tab;
 import jetbrains.buildServer.controllers.AuthorizationInterceptor;\r
 import jetbrains.buildServer.controllers.BaseController;\r
 import jetbrains.buildServer.controllers.RequestPermissionsChecker;\r
+import jetbrains.buildServer.nuget.server.toolRegistry.NuGetToolManager;\r
 import jetbrains.buildServer.serverSide.SBuildServer;\r
 import jetbrains.buildServer.serverSide.auth.AccessDeniedException;\r
 import jetbrains.buildServer.serverSide.auth.AuthorityHolder;\r
@@ -36,13 +37,18 @@ import javax.servlet.http.HttpServletResponse;
  */\r
 public class ServerSettingsController extends BaseController {\r
   private final String myPath;\r
+  private final NuGetToolManager myToolsManager;\r
+  private final PluginDescriptor myDescriptor;\r
 \r
   public ServerSettingsController(@NotNull final SBuildServer server,\r
                                   @NotNull final AuthorizationInterceptor auth,\r
                                   @NotNull final PermissionChecker checker,\r
                                   @NotNull final WebControllerManager web,\r
+                                  @NotNull final NuGetToolManager toolsManager,\r
                                   @NotNull final PluginDescriptor descriptor) {\r
     super(server);\r
+    myToolsManager = toolsManager;\r
+    myDescriptor = descriptor;\r
     myPath = descriptor.getPluginResourcesPath("tool/nuget-server-tab.html");\r
     auth.addPathBasedPermissionsChecker(myPath, new RequestPermissionsChecker() {\r
       public void checkPermissions(@NotNull AuthorityHolder authorityHolder, @NotNull HttpServletRequest request) throws AccessDeniedException {\r
@@ -59,6 +65,8 @@ public class ServerSettingsController extends BaseController {
 \r
   @Override\r
   protected ModelAndView doHandle(HttpServletRequest request, HttpServletResponse response) throws Exception {\r
-    return simpleView("Empty nuget tab content");\r
+    ModelAndView mv = new ModelAndView(myDescriptor.getPluginResourcesPath("tool/tools.jsp"));\r
+    mv.getModelMap().put("tools", new ToolsModel());\r
+    return mv;\r
   }\r
 }\r