Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
first baby steps towards a file/wiki based camel viewer/editor re #228 …
…we can at least show a little tree of the routes in the XML file so far
- Loading branch information
Showing
7 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div ng-controller="Wiki.CamelController"> | ||
<div class="row-fluid"> | ||
<div id="tree-container" class="span3"> | ||
<ul id="tree-ctrl" class="nav"> | ||
<li> | ||
<a data-toggle="collapse" data-target="#camelxml"> | ||
<span>Camel Tree</span> | ||
</a> | ||
</li> | ||
</ul> | ||
<div id="camelxml" class="in collapse"></div> | ||
</div> | ||
|
||
<div class="span9"> | ||
<!-- | ||
<ng-include src="'app/jmx/html/subLevelTabs.html'"></ng-include> | ||
<div id="properties" ng-view></div> | ||
--> | ||
</div> | ||
</div> | ||
</div> |
Empty file.
23 changes: 23 additions & 0 deletions
23
hawtio-web/src/main/webapp/app/wiki/html/layoutCamelTree.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="row-fluid"> | ||
<div id="tree-container" class="span3"> | ||
<ul id="tree-ctrl" class="nav"> | ||
<li> | ||
<a data-toggle="collapse" data-target="#cameltree"> | ||
<span>Camel Tree</span> | ||
</a> | ||
</li> | ||
</ul> | ||
<div id="cameltree" class="in collapse" ng-controller="Camel.TreeController"></div> | ||
</div> | ||
|
||
<div class="span9"> | ||
<ng-include src="'app/jmx/html/subLevelTabs.html'"></ng-include> | ||
<div id="properties" ng-view></div> | ||
</div> | ||
<div id="alert-area" class="span9"></div> | ||
<!-- | ||
<div class="span8 scrollable"> | ||
<div id="properties" class="scrollable" ng-view></div> | ||
</div> | ||
--> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module Wiki { | ||
|
||
export function CamelController($scope, $location, $routeParams, workspace:Workspace, wikiRepository:GitWikiRepository) { | ||
$scope.pageId = Wiki.pageId($routeParams, $location); | ||
|
||
$scope.$watch('workspace.tree', function () { | ||
if (!$scope.git && Git.getGitMBean(workspace)) { | ||
// lets do this asynchronously to avoid Error: $digest already in progress | ||
//console.log("Reloading the view as we now seem to have a git mbean!"); | ||
setTimeout(updateView, 50); | ||
} | ||
}); | ||
|
||
$scope.$on("$routeChangeSuccess", function (event, current, previous) { | ||
// lets do this asynchronously to avoid Error: $digest already in progress | ||
setTimeout(updateView, 50); | ||
}); | ||
|
||
updateView(); | ||
|
||
function onResults(response) { | ||
var text = response.text; | ||
if (text) { | ||
var tree = Camel.loadCamelTree(text); | ||
if (tree) { | ||
tree.key = $scope.pageId + "_camelContext"; | ||
|
||
var treeElement = $("#camelxml"); | ||
Jmx.enableTree($scope, $location, workspace, treeElement, [tree]); | ||
} | ||
} | ||
Core.$apply($scope); | ||
} | ||
|
||
function updateView() { | ||
$scope.git = wikiRepository.getPage($scope.pageId, $scope.objectId, onResults); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters