hawtio / hawtio-jmx Goto Github PK
View Code? Open in Web Editor NEWJMX, JVM and tree plugins for hawtio 2.x
License: Apache License 2.0
JMX, JVM and tree plugins for hawtio 2.x
License: Apache License 2.0
The layout of this dialog could use some work, might just be a matter of switching it to the form2 plugin. Also perhaps using hawtio-editor instead of the textarea for any json that shows up would be good.
@tadayosi @akieling I wonder whether we should depend on hawtio-oauth directly in hawtio-jmx as it is used in hawtio v2 and hawtio-online. If that is the case, then we may consider removing ConnectOptions.token
which is redundant.
That follows #47 up. Actually in the OpenShift console, the user stays in the same window and in hawtio-online the token is passed in the URL hash. So we may use the session store instead of the local store. We still need ConnectOptions.token
if we want to open a new window.
I would tend to think end-users may want to have multiple windows opened. So that leaves us with the following options:
ConnectOptions.token
stored in the session storeFrom a diagnostics perspective, I think it'd be better to have the class histogram table sorted by the 'Bytes' column instead of the class name.
The interrogation of the jolokiaUrl is incorrect. If the url returns a 403 or 401, on the jquery.$ajax() call, around line 607.....the code is incorrect for jquery 2.1.*. Currently the code probably only works if jolokiaUrl is in the query params.
The doc here: http://api.jquery.com/jquery.ajax/, indicates the 2nd parameter is probably the only way to discriminate for the .always()
method.
Possibly the clearest approach will be to chain these together:
$.ajax({})
.done(fn)
.error(fn)
On the login dialog, the password field ng-change
binds to checkCredentials()
. This means for every character entered, a request is sent to the target Jolokia instance. If a long password is entered, this results in many requests being sent in a potentially very short period of time.
Maybe it's best to just call checkCredentials
when the login button is clicked.
When connecting to a remote endpoint that requires username/password authentication, show a full login page instead of the currently shown dialog box.
The Jolokia URL shown in Attribute dialog is something like this:
http://localhost:2772/undefined/read/org.apache.activemq:type=Broker,brokerName=amq-broker,destinationType=Queue,destinationName=TEST/Name
On the other hand, the Copy Jolokia URL
menu in Operations tab generates the URL correctly:
http://localhost:2772/proxy/http/localhost/8181/hawtio/jolokia/exec/org.apache.activemq:type=Broker,brokerName=amq-broker,destinationType=Queue,destinationName=TEST/browse()
Let's port these to hawtio-jmx. See also hawtio/hawtio#2097.
Maybe some responsibility falls on hawtio-core or other components, in that case please split the issue as you see fit (if the request seems sensible).
I would like to include some regression tests, preferrably in typescript. Could someone experienced with front end set it up, or advise on how to best do it?
Cheers!
With the intent of reducing the number of Hawtio projects, move the code from this project to hawtio-integration.
Git commit b766d97cf61ac1392a69b3457ee939ea8e54f5b6 from v1 to fix an issue in the dashboards
I've been testing some functionality over in the hawtio-integration project, and I expected to see some error messages being displayed when Jolokia returns an error response. However, this never happens.
I think the syntax defining the success / error callbacks is wrong in each of the JolokiaService methods. E.g we have:
return this.$q((resolve, reject) => {
this.jolokia.request(
{ type: 'read', mbean: mbean, attribute: attribute },
{ success: response => resolve(response.value) },
{ error: response => {
log.error(`JolokiaService.getAttribute('${mbean}', '${attribute}') failed. Error: ${response.error}`);
reject(response.error);
}
});
});
The success and error callbacks are within separate objects. I think they should be part of the same object, else the error option will get ignored.
Have some fixes in progress and plan to submit a PR shortly.
Improve Diagnostics UI using PatternFly and Angular PatternFly.
A few things to improve:
Create a jolokia folder and move parts of jolokiaService.ts to separate files.
After my work on RBAC support, now the JMX tree is not visible immediately after reloading the page. Moving tabs around you can still see the JMX tree showing up.
The JMX operation page could use a bit of layout work. Perhaps some descriptive text for starters explaining what the page does, maybe improve the list layout of the operations, etc.
Also the buttons that do stuff (execute, reset etc) for the form should maybe go underneath the form. And the "Back" button could maybe just be a list icon.
When installing hawtio-jmx using Bower, the following message is printed:
bower hawtio-jmx#~2.0.50 invalid-meta The "main" field has to contain only 1 file per filetype; found multiple .js files: ["dist/dangle.js","dist/dagre.js","dist/jolokia.js","dist/cubism.v1.js","dist/jolokia-simple.js","dist/jolokia-cubism.js","dist/hawtio-jmx.js"]
Bower expects only one main JavaScript file. A solution would be concatenating the files into one.
In order to be able to use the new header X-Authorization
header in a CORS request it must be white listed by a preflight CORS request as described here. I wonder, why Authorization
works because this is also not a simple header and hence must be white listed, too.
@cmoulliard ran into this issue first:
Refer to code here:
the code:
hawtio-jmx.js, line 826:
delete window.opener["passUserDetails"];
Needs a null guard when user is auto-logged out by server. It is not always the case that window.opener is non-null: https://developer.mozilla.org/en-US/docs/Web/API/Window/opener
Not sure if this is the appropriate project to log this issue or not, because the CSS interfering may be elsewhere (like hawtio/openshift-jvm)
Modal style is malformed:
happens during unauthorized requests..
Versions affected:
origin v1.5.0+031cbe4
repro chrome 58.0.3029.110
Repro steps:
1.) Open up two tabs via "Open Java Console" on a pod that exposes a jolokia port
2.) In first tab, log out
3.) Reload 2nd tab to get pod request authorization to fail
It causes 404
error (or something else) when hawtio is deployed on other than the root context (e.g. /hawtio
).
We used to have this for 1.x, probably just wasn't brought over.
I think we should prevent users from adding connections with duplicate names. It can have some weird side affects given that the name is used as the con
URL parameter when you connect to a JVM.
Allow jolokiaParams
service to be overridden by $provide()
delegation, giving consumer the chance
to install their own ajaxError()
handler to jolokia
Use the pfTableView with an integrated toolbar.
https://www.patternfly.org/angular-patternfly/#/api/patternfly.table.component:pfTableView%20-%20with%20Toolbar
Move the instructions shown in the Remote page to a popover.
The popover can be shown when the user clicks on a question mark icon located after the page title.
The workspace
resource from hawtio-jmx is being injected in the hawtio-ui tree component with the intention of being notified about node selections. The correct way for hawtio-jmx to be notified about node selections is via the onSelect
callback.
This tag has no closing tag
https://github.com/hawtio/hawtio-jmx/blob/master/index.html#L7
I assume it should just be <meta ... />
And it would be the same fix in the other hawtio modules?
@gashcrumb - would that be right?
Use the pfTableView with an integrated toolbar.
https://www.patternfly.org/angular-patternfly/#/api/patternfly.table.component:pfTableView%20-%20with%20Toolbar
[15:19:00] davsclaus: hmm, now that I think about it, the jolokia preference page would probably be best suited to be in hawtio-jmx if you fancy porting that over
[15:19:19] the one that lets you tweak the jolokia settings
Attribute dialog already has the Copy value to clipboard
button. I'd like to have Copy Jolokia URL to clipboard
button in the dialog as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.