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

Separate ZODB connection information into new ZODB Connections view #1178

Merged
merged 9 commits into from
Oct 26, 2023

Conversation

dataflake
Copy link
Member

This PR creates a new Control Panel tab "ZODB Connections" that contains the ZODB connection information shown at the bottom of the former "Debug" page. Debug is renamed to "Reference Counts". The goal is to make this information easier to access and read.

When Zope is running and you visit the "Debug" page several times the page can get very long and getting to the ZODB connection information is inconvenient and cumbersome.

The new "ZODB Connections" page also aims to show more useful information at a glance. It hides the full request information at first and reveals it when you click on the request URI that is shown. The request data is also formatted and sorted now.

@dataflake dataflake self-assigned this Oct 26, 2023
@dataflake
Copy link
Member Author

@drfho Any help making it more pretty is appreciated ;-)

Copy link
Contributor

@d-maurer d-maurer left a comment

Choose a reason for hiding this comment

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

I like the separation.

But something is wrong with the buttons at the bottom of DebugInfo/manage_main: any of them activates automatic refresh while only one suggests this in its name (and the "auto-refresh" makes an analysis quite difficult). Likely, the bug was there before. Nevertheless, we might want to fix it.

Now that DebugInfo has a more narrow aim, we might want to rename it, e.g. to DebugRefcounts.

The buttons at the bottom of DebugInfo/manage_main affect the refcount display. They are independent from the "cache" related links. I suggest to put the "cache" related links after the buttons (or even move them to a new tab "DebugCache").

@dataflake
Copy link
Member Author

Thanks for the feedback @d-maurer, I will look at that today or tomorrow. About renaming the DebugInfo ID, I tried to make sure no existing bookmarks etc break. I personally don't mind renaming it. I just don't know whose expectations or bookmarks that might break.

Copy link
Contributor

@drfho drfho left a comment

Choose a reason for hiding this comment

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

hi @dataflake , added some more spacing and typography styles.

ZODB_Connections

(maybe I should do that for tab "DebugInfo" as well...)

@dataflake
Copy link
Member Author

@drfho Thanks for the help! Question: I am wondering why it says "GET None" for the request URI. Is the request value for REQUEST_URI empty in your setup? Does the request value PATH_INFO contain the expected path /Control_Panel/ZODBConnections/manage_main?

@dataflake
Copy link
Member Author

@drfho Please update your sandbox, I have made a change that should make the correct request path show in your environment.

- Fix the auto refresh functionality on the Reference Count page.
@dataflake
Copy link
Member Author

But something is wrong with the buttons at the bottom of DebugInfo/manage_main: any of them activates automatic refresh while only one suggests this in its name (and the "auto-refresh" makes an analysis quite difficult). Likely, the bug was there before. Nevertheless, we might want to fix it.

Fixed.

The buttons at the bottom of DebugInfo/manage_main affect the refcount display. They are independent from the "cache" related links. I suggest to put the "cache" related links after the buttons (or even move them to a new tab "DebugCache").

I moved those cache links to the place where the rest of the cache information is found, the Database page.

@drfho
Copy link
Contributor

drfho commented Oct 26, 2023

@drfho Please update your sandbox,

@dataflake, thanks, now the requesting path is visible:

image

Note: I do not how much connections are expected; if only 4 the table need not be forced into the narrow spacing (CSS-class table.table-sm); but if the number may be much higher, table-sm is perfect.

@dataflake
Copy link
Member Author

Note: I do not how much connections are expected; if only 4 the table need not be forced into the narrow spacing (CSS-class table.table-sm); but if the number may be much higher, table-sm is perfect.

This is a matter of configuration. The default is 7 maximum connections and up to 4 are in active use so they would show on that page. The number can be increased, but I believe this is rarely done.

@d-maurer
Copy link
Contributor

d-maurer commented Oct 26, 2023 via email

@dataflake dataflake requested review from d-maurer and drfho October 26, 2023 14:04
Copy link
Contributor

@drfho drfho left a comment

Choose a reason for hiding this comment

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

LGTM

@dataflake dataflake merged commit 8fdd567 into master Oct 26, 2023
23 checks passed
@dataflake dataflake deleted the dataflake/better_zmi_debugging branch October 26, 2023 15:27
@davisagli
Copy link
Member

Nice improvement!

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.

4 participants