Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
allow onSuccess(null) to be a way of using sync invocations while sti…
…ll configuring json / POST for jolokia calls
  • Loading branch information
jstrachan committed Apr 17, 2013
1 parent 144a2ba commit 4583726
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hawtio-web/src/main/webapp/app/core/js/helpers.ts
Expand Up @@ -120,9 +120,14 @@ function closeHandle($scope, jolokia) {
}
}

/**
* Pass in null for the success function to switch to sync mode
*/
function onSuccess(fn, options = {}) {
options['mimeType'] = 'application/json';
options['success'] = fn;
if (angular.isDefined(fn)) {
options['success'] = fn;
}
if (!options['method']) {
options['method'] = "POST";
}
Expand Down

0 comments on commit 4583726

Please sign in to comment.