Skip to content

Commit

Permalink
#789: Fixed Camel source view to include routeId so we can update the…
Browse files Browse the repository at this point in the history
… correct route if pressing save.
  • Loading branch information
davsclaus committed Nov 28, 2013
1 parent 6b21e8c commit ccf0d33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion hawtio-web/src/main/webapp/app/camel/js/source.ts
Expand Up @@ -21,11 +21,17 @@ module Camel {
function getSource(routeXmlNode) {
function removeCrappyHeaders(idx, e) {
var answer = e.getAttribute("customId");
e.removeAttribute("customId");
if (e.nodeName === 'route') {
// always keep id on <route> element
answer = "true";
}
if (!answer || answer !== "true") {
e.removeAttribute("id");
}
// just always remove customId, _cid, and group
e.removeAttribute("customId");
e.removeAttribute("_cid");
e.removeAttribute("group");
}
var copy = $(routeXmlNode).clone();
copy.each(removeCrappyHeaders);
Expand Down
4 changes: 2 additions & 2 deletions hawtio-web/src/test/resources/applicationContext.xml
Expand Up @@ -134,12 +134,12 @@
</otherwise>
</choice>
</onException>
<route id="route1">
<route>
<from uri="timer://purgeTimer?period=900000"/>
<log loggingLevel="INFO" logName="test" message="testPing..."/>
<to uri="direct:e"/>
</route>
<route id="route2">
<route>
<from uri="direct:b"/>
<log loggingLevel="INFO" logName="test" message="direct:b"/>
</route>
Expand Down

0 comments on commit ccf0d33

Please sign in to comment.