Skip to content

Commit

Permalink
Don't override the graph type unless requested.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse White committed May 29, 2015
1 parent b0fa259 commit cae56d2
Showing 1 changed file with 1 addition and 11 deletions.
Expand Up @@ -174,18 +174,8 @@ protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpSer
prefabGraphs.addAll(Arrays.asList(getResourceService().findPrefabGraphsForResource(resource)));
}
}

// Get default graph type from first element of graph_options
// XXX Do we care about the tests on reportType?
if (("node".equals(reportType) || "nodeSource".equals(reportType) || "domain".equals(reportType))
&& overrideGraphType == null
&& !prefabGraphs.isEmpty()) {
// Get the name of the first item. prefabGraphs is sorted.
overrideGraphType = prefabGraphs.iterator().next().getName();
LOG.debug("custom_view: setting default graph type to {}", overrideGraphType);
}
}

List<KscResultSet> resultSets = new ArrayList<KscResultSet>(report.getGraphCount());
for (Graph graph : graphCollection) {
OnmsResource resource = resourceMap.get(graph.toString());
Expand Down

0 comments on commit cae56d2

Please sign in to comment.