Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes mapping issue when using :sysinfo with HA #599

Merged
merged 7 commits into from
Jun 29, 2017

Conversation

pe4cey
Copy link
Contributor

@pe4cey pe4cey commented Jun 22, 2017

Fixes #586

@oskarhane
Copy link
Member

Could you add a test that shows that this error is gone, or is this component hard to run enzyme-compat tests on?

@oskarhane oskarhane changed the title Fixes mapping issue when using :sysinfo with ha Fixes mapping issue when using :sysinfo with HA Jun 26, 2017
@pe4cey
Copy link
Contributor Author

pe4cey commented Jun 26, 2017

This is will require some refactoring I was trying to defer until later because on mount a child on the <FrameTemplate /> component requires suber

@pe4cey pe4cey force-pushed the 3.0-ha-sysinfo-fix branch from ed45a1a to 002059e Compare June 27, 2017 16:16
@pe4cey pe4cey force-pushed the 3.0-ha-sysinfo-fix branch from 002059e to 913631a Compare June 28, 2017 07:36
@pe4cey
Copy link
Contributor Author

pe4cey commented Jun 28, 2017

@oskarhane added both component tests and tests around the extracted out logic to support this fix

Copy link
Member

@oskarhane oskarhane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice and the :sysinfo seems to work well!
You broke the :queries frame in a CC environment so I'd suggest you leave out that part from this PR.

canListQueries () {
return this.props.availableProcedures.includes('dbms.listQueries')
}

getRunningQueries (suppressQuerySuccessMessage = false) {
this.props.bus.self(
(this.isCC()) ? CLUSTER_CYPHER_REQUEST : CYPHER_REQUEST,
(this.props.isACausalCluster) ? CLUSTER_CYPHER_REQUEST : CYPHER_REQUEST,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this get passed to the :queries frame?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you'd need to change the line in killQueries below as well, where a check for this.isCC() is made.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was by mistake. I didn't plan on changing anything outside of things that affect sysinfo.

}

clusterResponseHandler () {
return (res) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why return function rather than just handle the response directly?
It looks a bit unusual.

}
}
responseHandler () {
return (res) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in clusterResponseHandler.
It looks a bit unusual.

@pe4cey
Copy link
Contributor Author

pe4cey commented Jun 29, 2017

@oskarhane updated

@oskarhane
Copy link
Member

Very nice changes, lgtm.

@oskarhane oskarhane merged commit 04ad959 into neo4j:3.0 Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants