Browse Source

Move hystrix templates to /hystrix/*

pull/6/head
Dave Syer 10 years ago
parent
commit
88db9976c6
  1. 9
      spring-cloud-netflix-hystrix-dashboard/src/main/java/org/springframework/cloud/netflix/hystrix/dashboard/HystrixDashboardController.java
  2. 0
      spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/hystrix/index.ftl
  3. 0
      spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/hystrix/monitor.ftl

9
spring-cloud-netflix-hystrix-dashboard/src/main/java/org/springframework/cloud/netflix/hystrix/dashboard/HystrixDashboardController.java

@ -17,6 +17,7 @@ package org.springframework.cloud.netflix.hystrix.dashboard; @@ -17,6 +17,7 @@ package org.springframework.cloud.netflix.hystrix.dashboard;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.request.WebRequest;
@ -30,14 +31,14 @@ public class HystrixDashboardController { @@ -30,14 +31,14 @@ public class HystrixDashboardController {
@RequestMapping("/hystrix")
public String home(Model model, WebRequest request) {
model.addAttribute("basePath", extractPath(request));
return "index";
return "hystrix/index";
}
@RequestMapping("/hystrix/monitor")
public String monitor(Model model, WebRequest request) {
@RequestMapping("/hystrix/{path}")
public String monitor(@PathVariable String path, Model model, WebRequest request) {
model.addAttribute("basePath", extractPath(request));
model.addAttribute("contextPath", request.getContextPath());
return "monitor";
return "hystrix/" + path;
}
private String extractPath(WebRequest request) {

0
spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/index.ftl → spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/hystrix/index.ftl

0
spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/monitor.ftl → spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/hystrix/monitor.ftl

Loading…
Cancel
Save