Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes #293; though we still need better auto-reloading of the Camel t…
…ree on JMX changes; looking at that...
  • Loading branch information
jstrachan committed Apr 26, 2013
1 parent 0ae568a commit 1b2f074
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
11 changes: 9 additions & 2 deletions hawtio-web/src/main/webapp/app/core/js/helpers.ts
Expand Up @@ -134,12 +134,19 @@ function onSuccess(fn, options = {}) {
if (!options['error']) {
options['error'] = function (response) {
//alert("Jolokia request failed: " + response.error);
console.log("Jolokia request failed: " + response.error);
var stacktrace = response.stacktrace;
if (stacktrace) {
console.log(stacktrace);
if (!options['silent']) {
notification("error", "Operation failed due to: " + stacktrace);
if (stacktrace.indexOf("javax.management.InstanceNotFoundException") >= 0 ||
stacktrace.indexOf(" java.lang.IllegalArgumentException: No operation") >= 0) {
// ignore these errors as they can happen on timing issues
// such as its been removed
// or if we run against older containers
} else {
notification("error", "Operation failed due to: " + stacktrace);
console.log("Jolokia request failed: " + response.error);
}
}
}
};
Expand Down
10 changes: 10 additions & 0 deletions hawtio-web/src/main/webapp/app/core/js/workspace.ts
Expand Up @@ -444,6 +444,16 @@ class Workspace {
}
}

public selectParentNode() {
var selection = this.selection;
if (selection) {
var parent = selection.parent;
if (parent) {
this.updateSelectionNode(parent);
}
}
}

/**
* Returns the view configuration key for the kind of selection
* for example based on the domain and the node type
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/jmx/js/attributes.ts
Expand Up @@ -112,7 +112,7 @@ module Jmx {
operationComplete();
}
};
jolokia.request(queries, onSuccess(callback));
jolokia.request(queries, onSuccess(callback, {error: callback}));
}
};

Expand Down

0 comments on commit 1b2f074

Please sign in to comment.