Skip to content

NIFI-2795 Sys Diagnostics in Cluster UI#1042

Closed
jvwing wants to merge 3 commits intoapache:masterfrom
jvwing:NIFI-2795-cluster-ui-sysdiag-3
Closed

NIFI-2795 Sys Diagnostics in Cluster UI#1042
jvwing wants to merge 3 commits intoapache:masterfrom
jvwing:NIFI-2795-cluster-ui-sysdiag-3

Conversation

@jvwing
Copy link
Contributor

@jvwing jvwing commented Sep 21, 2016

Reworked the existing cluster UI to provide tabs containing multiple data tables. Added views for System, JVM, FlowFile Storage and Content Storage diagnostics. This is a UI-only change built on top of the existing System Diagnostics API.

Copy link
Contributor

@mcgilman mcgilman left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Just reading through the proposed changes this looks like a great addition. I've made a few comments inline.

I haven't had a chance to run the PR yet but I wanted to make sure that we have a good experience when the user has access to the controller (to be able to use the cluster table) but not access to the system details. Currently, I'm assuming that it would print that the user was unauthorized.

We should be able to check for this ahead of time and then conditionally add the tabs. I thought that we were already doing this for the 'system diagnostics' link in the summary page but apparently not.

Thoughts?

tab.grid.resizeCanvas();
}
} catch (ex) {
console.error("Failed to resize tab", tab, ex);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why this may fail? Maybe check ahead of time to prevent the exception and log message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no good reason for it to fail, I'll change this.

}]
};

var clusterTabs = [nodesTab, systemTab, jvmTab, flowFileTab, contentTab];
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to conditionally add some tabs when the user does not have access to them? Specifically, retrieving system diagnostics requires explicit access. We can add this to the CurrentUserEntity to know when the user has permissions to this (similar to the checks for canAccessController/canModifyController).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great idea, @mcgilman, I'll look into it.

@jvwing
Copy link
Contributor Author

jvwing commented Sep 23, 2016

I added server- and client-side modifications to pre-authorize the system diagnostics API call, and removed the unnecessary error handling code.

@mcgilman
Copy link
Contributor

Reviewing...

@mcgilman
Copy link
Contributor

@jvwing While reviewing I stumbled into an existing bug filtering the tables in the cluster page. I've addressed it here [1]. Hoping you could just review what I did so I could include it in your PR.

Thanks!

[1] mcgilman@45d9fc3

@jvwing
Copy link
Contributor Author

jvwing commented Sep 26, 2016

@mcgilman Your changes look good to me. I had noticed that filter behavior, but I wasn't sure how intentional it was. Your fix does allow filtering by the full address or status text as displayed, rather than just one column value, and that seems more intuitive to users.

Should I merge that commit into the PR branch?

@mcgilman
Copy link
Contributor

@jvwing I'll just squash those changes into your commit before I push. Just wanted to communicate before I do that. Thanks!

@mcgilman
Copy link
Contributor

@jvwing Just finished up testing and everything looks good. This has been merged to master. I did find another minor issue with sorting the table but I updated the sort method accordingly. Thanks!

@jvwing
Copy link
Contributor Author

jvwing commented Sep 27, 2016

Thank you, @mcgilman.

@jvwing jvwing closed this Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants