Skip to content

Commit

Permalink
let camel tracing use the new detail pager so folks can step through …
Browse files Browse the repository at this point in the history
…message traces with the video player controls; while looking at the headers/body in a more natural way
  • Loading branch information
jstrachan committed May 1, 2013
1 parent 51517e4 commit 8f932e2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hawtio-web/src/main/webapp/app/camel/js/browse.ts
Expand Up @@ -13,6 +13,8 @@ module Camel {
loadData();
});


// TODO can we share these 2 methods from activemq browse / camel browse / came trace?
$scope.openMessageDialog = (message) => {
var idx = Core.pathGet(message, ["rowIndex"]);
$scope.selectRowIndex(idx);
Expand Down
25 changes: 25 additions & 0 deletions hawtio-web/src/main/webapp/app/camel/js/trace.ts
Expand Up @@ -10,6 +10,7 @@ module Camel {
$scope.gridOptions = Camel.createBrowseGridOptions();
$scope.gridOptions.selectWithCheckboxOnly = false;
$scope.gridOptions.showSelectionCheckbox = false;
$scope.gridOptions.afterSelectionChange = onSelectionChanged;
$scope.gridOptions.columnDefs.push({
field: 'toNode',
displayName: 'To Node'
Expand All @@ -30,6 +31,30 @@ module Camel {
reloadTracingFlag();
});

// TODO can we share these 2 methods from activemq browse / camel browse / came trace?
$scope.openMessageDialog = (message) => {
var idx = Core.pathGet(message, ["rowIndex"]);
$scope.selectRowIndex(idx);
if ($scope.row) {
$scope.messageDialog.open();
}
};

$scope.selectRowIndex = (idx) => {
$scope.rowIndex = idx;
var selected = $scope.gridOptions.selectedItems;
selected.splice(0, selected.length);
if (idx >= 0 && idx < $scope.messages.length) {
$scope.row = $scope.messages[idx];
if ($scope.row) {
selected.push($scope.row);
}
} else {
$scope.row = null;
}
onSelectionChanged();
};


function reloadTracingFlag() {
$scope.tracing = false;
Expand Down

0 comments on commit 8f932e2

Please sign in to comment.