Search in sources :

Example 1 with PipelineNotFoundException

use of com.thoughtworks.go.config.PipelineNotFoundException in project gocd by gocd.

the class PipelineHistoryController method list.

@RequestMapping(value = "/tab/pipeline/history", method = RequestMethod.GET)
public ModelAndView list(@RequestParam("pipelineName") String pipelineName) throws Exception {
    Map model = new HashMap();
    try {
        PipelineConfig pipelineConfig = goConfigService.pipelineConfigNamed(new CaseInsensitiveString(pipelineName));
        model.put("pipelineName", pipelineConfig.name());
        model.put("l", localizer);
        model.put("isEditableViaUI", goConfigService.isPipelineEditable(pipelineName));
        return new ModelAndView("pipeline/pipeline_history", model);
    } catch (PipelineNotFoundException e) {
        model.put("errorMessage", e.getMessage());
        return new ModelAndView("exceptions_page", model);
    }
}
Also used : PipelineConfig(com.thoughtworks.go.config.PipelineConfig) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) ModelAndView(org.springframework.web.servlet.ModelAndView) PipelineNotFoundException(com.thoughtworks.go.config.PipelineNotFoundException) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)1 PipelineConfig (com.thoughtworks.go.config.PipelineConfig)1 PipelineNotFoundException (com.thoughtworks.go.config.PipelineNotFoundException)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1