There have been requests to modify the 4D Server administration dialog, with some customers wanting to remove information and others wanting to add customized information. This AdminWindow component shows you how to do just that. You can use it “as is” or modify it to fit your needs.
In a previous blog post, we showed you how to build a web-based administration window. However, if you’re interested in a purely customized interface with 4D code, then this blog post (along with the related HDI) will show you how!
The component removes the graphics from the first screen and enhances it with system information. It also contains two additional pages:
- DB Measures – an overview of currently locked records
- Locked Records – an overview of the query operations
You can use the header to sort the list box by the count of operations or the total time used for them. You may want to use this dialog to find a missing index or to optimize queries. The Real Time Monitor page enhances the built-in monitor. It’s always displayed with peak time (operations needing more than half a second). In addition to currently running operations, it also shows the previous slowest operations. Recording only when a page is opened, without history.
The images below show the difference between the component’s default interface and the classic 4D Server Administration window.
Component default interface:
4D Server Administration window:
The source code for this component is available on Github. To test it, simply call the Monitor_Start method in the On Startup database method. This way, you’ll see the customized dialog once your database is opened.
Feel free to modify the component based on your own needs. Remove, hide, or modify pages and content as you wish. Add your own content, such as your own process list, your own status variables, your own licensing information, etc. Notice that the code is designed to be used on the client computer (it fetches the information from the server automatically).
Compatibility note: This example is made using 4D v17 R5 and a project database.