Skip to content

Commit

Permalink
pass the current value of the entry text box into the completion func…
Browse files Browse the repository at this point in the history
…tion - and avoid bugette if we don't find any endpoint completions
  • Loading branch information
jstrachan committed Jul 10, 2013
1 parent 5d58cb7 commit 5b93642
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Expand Up @@ -115,7 +115,7 @@
<ng-pluralize count="gridOptions.selectedItems.length"
when="{'1': 'message', 'other': '{} messages'}"></ng-pluralize>
to: <input type="text" ng-model="queueName" placeholder="Queue name"
typeahead="title for title in queueNames() | filter:$viewValue" typeahead-editable='true'></p>
typeahead="title for title in queueNames($viewValue) | filter:$viewValue" typeahead-editable='true'></p>
<p>
You cannot undo this operation.<br>
Though after the move you can always move the
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/activemq/js/browse.ts
Expand Up @@ -156,7 +156,7 @@ module ActiveMQ {
}
};

$scope.queueNames = () => {
$scope.queueNames = (completionText) => {
var queuesFolder = getSelectionQueuesFolder(workspace);
return (queuesFolder) ? queuesFolder.children.map(n => n.title) : [];
};
Expand Down
7 changes: 2 additions & 5 deletions hawtio-web/src/main/webapp/app/camel/js/endpointChooser.ts
Expand Up @@ -222,17 +222,14 @@ module Camel {
});

$scope.endpointCompletions = (completionText) => {
var answer = [];
var answer = null;
var mbean = findCamelContextMBean();
var componentName = $scope.selectedComponentName;
var endpointParameters = {};
console.log("component " + $scope.selectedComponentName + " endpointPath " + $scope.endpointPath + " completion text: " + completionText);
// TODO bit of a hack here - for scope issues sometimes the endpointPath is defined in a child scope!
//var completionText = $scope.endpointPath || $scope.$$childHead.endpointPath || "";
if (mbean && componentName && completionText) {
answer = $scope.jolokia.execute(mbean, 'completeEndpointPath', componentName, endpointParameters, completionText, onSuccess(null, silentOptions));
}
return answer;
return answer || [];
};

$scope.loadEndpointNames = () => {
Expand Down

0 comments on commit 5b93642

Please sign in to comment.