@Test @Transactional public void testIndex() throws Exception { final Cluster cluster1 = clusterTestTools.createCluster("My Test Cluster 1 2 3"); final Cluster cluster2 = clusterTestTools.createCluster("Some other Cluster"); mockMvc .perform(get("/configuration/cluster").with(user(adminUserDetails))) .andExpect(status().isOk()) .andExpect(content().string(containsString(cluster1.getName()))) .andExpect(content().string(containsString(cluster1.getBrokerHosts()))) .andExpect(content().string(containsString(cluster2.getName()))) .andExpect(content().string(containsString(cluster2.getBrokerHosts()))); }
@RequestMapping(path = "", method = RequestMethod.GET) public String index(final Model model) { setupBreadCrumbs(model, null, null); final Iterable<Cluster> clusterList = clusterRepository.findAllByOrderByNameAsc(); model.addAttribute("clusterList", clusterList); return "configuration/cluster/index"; }
ClusterConfigController extends BaseController { @RequestMapping(path = "", method = RequestMethod.GET) public String index(final Model model) { setupBreadCrumbs(model, null, null); final Iterable<Cluster> clusterList = clusterRepository.findAllByOrderByNameAsc(); model.addAttribute("clusterList", clusterList); return "configuration/cluster/index"; } }
ClusterConfigController extends BaseController { @RequestMapping(path = "", method = RequestMethod.GET) public String index(final Model model) { setupBreadCrumbs(model, null, null); final Iterable<Cluster> clusterList = clusterRepository.findAllByOrderByNameAsc(); model.addAttribute("clusterList", clusterList); return "configuration/cluster/index"; }  }
ClusterConfigController extends BaseController { @RequestMapping(path = "", method = RequestMethod.GET) public String index(final Model model) { setupBreadCrumbs(model, null, null); final Iterable<Cluster> clusterList = clusterRepository.findAllByOrderByNameAsc(); model.addAttribute("clusterList", clusterList); return "configuration/cluster/index"; }  @RequestMapping(path = "", method = RequestMethod.GET) String index(final Model model); @RequestMapping(path = "/create", method = RequestMethod.GET) String createClusterForm(final ClusterForm clusterForm, final Model model); @RequestMapping(path = "/edit/{id}", method = RequestMethod.GET) String editClusterForm(
        @PathVariable final Long id,
        final ClusterForm clusterForm,
        final RedirectAttributes redirectAttributes,
        final Model model); @RequestMapping(path = "/update", method = RequestMethod.POST) String clusterUpdate(
        @Valid final ClusterForm clusterForm,
        final BindingResult bindingResult,
        final RedirectAttributes redirectAttributes,
        final Model model); @RequestMapping(path = "/delete/{id}", method = RequestMethod.POST) String deleteCluster(@PathVariable final Long id, final RedirectAttributes redirectAttributes); @RequestMapping(path = "/test/{id}", method = RequestMethod.GET) String testCluster(@PathVariable final Long id, final RedirectAttributes redirectAttributes); @RequestMapping(path = "/config/{id}", method = RequestMethod.GET) String getClientConfig(
        @PathVariable final Long id,
        final RedirectAttributes redirectAttributes,
        final Model model
    ); }
ClusterConfigController extends BaseController { @RequestMapping(path = "", method = RequestMethod.GET) public String index(final Model model) { setupBreadCrumbs(model, null, null); final Iterable<Cluster> clusterList = clusterRepository.findAllByOrderByNameAsc(); model.addAttribute("clusterList", clusterList); return "configuration/cluster/index"; }  @RequestMapping(path = "", method = RequestMethod.GET) String index(final Model model); @RequestMapping(path = "/create", method = RequestMethod.GET) String createClusterForm(final ClusterForm clusterForm, final Model model); @RequestMapping(path = "/edit/{id}", method = RequestMethod.GET) String editClusterForm(
        @PathVariable final Long id,
        final ClusterForm clusterForm,
        final RedirectAttributes redirectAttributes,
        final Model model); @RequestMapping(path = "/update", method = RequestMethod.POST) String clusterUpdate(
        @Valid final ClusterForm clusterForm,
        final BindingResult bindingResult,
        final RedirectAttributes redirectAttributes,
        final Model model); @RequestMapping(path = "/delete/{id}", method = RequestMethod.POST) String deleteCluster(@PathVariable final Long id, final RedirectAttributes redirectAttributes); @RequestMapping(path = "/test/{id}", method = RequestMethod.GET) String testCluster(@PathVariable final Long id, final RedirectAttributes redirectAttributes); @RequestMapping(path = "/config/{id}", method = RequestMethod.GET) String getClientConfig(
        @PathVariable final Long id,
        final RedirectAttributes redirectAttributes,
        final Model model
    );  }