Conversation
|
I think there are a lot of things to consider here. I like the idea of trying to make things more general and reusable but it also adds complexity
There may be some middle ground here that allows us to share commonalities between server pages but im not sure what that is yet |
|
A middle ground might be to keep the curent per-page DTO but extract a small shared server identity/common-fields object (server type, resource group, address, last contact) then each page can use that shared data to create its own explicit row DTO. On the front end, we could do something similar where we keep the columns explicitly defined but reuse small helpers for the common columns. That gives us real reuse where the overlap exists without making the table shape harder to reason about |
True. I initially had the column mapping information in the Metric.java class, but figured someone might object to Monitor related code being there. It doesn't matter to me where it lives.
One of the issues I was trying to solve with this PR is that the current pages are mainly a translation of the pages from 2.1 and 4.0 added many more metrics that we can't visualize during the development cycle to determine which columns should be included in the tables.
I don't have an issue with the current DTO approach, except that it's currently limiting what is being shown in the table. If we added all of the metrics to the current DTOs so that we could determine which columns to include, that would be another approach. Additionally, I'll add that currently the changes in this PR only affect the Scan Server page, but I think it could be a general way to present the metrics for all of the server pages under the Servers menu in the NavBar. There are a couple of problems with the current approach:
This approach allows us to display all of the metrics during development so that we can determine which ones make sense (I noticed immediately that the tablet recovery metrics don't make sense for scan servers). The Monitor calls |
I think some overlap could be removed by pushing the description and type into
Can we just do a pattern of performing a per-table transform/filter before rending the table contents? Will that be enough to make local page-specific or table-specific choices and still be able to reuse the generic code for rending the table from the transformed contents? |
Not having to modify the DataTables JS code if we add/remove a column is definitely a convenience in this approach, but we still have to make the decision to include the new metric in the subset of those shown on the page somewhere. In this approach, it's in
I don't think we actually want most of those to be shown. During development, while we are deciding what is useful to show, it's definitely convenient to see more with less work, but as we work to finalize things, we really should be focused on presentation of the useful things, and avoid turning the monitor into a big tabular display of metrics (a proper metrics collection service should provide that kind of thing instead, whereas the monitor should be focused system deployment status, i.e. "which deployed system components are running and what are they doing right now?").
Is that |
The Monitor is currently the only thing using that endpoint. The Monitor fetching the metrics from the server processes via this method is what is going to enable us to evenutally remove the ManagerMonitorInfo and related code from the Manager. |
|
I'm thinking there are at least 3 ways we could structure things generally
To me frontend defined seems best. Others opinions or ideas would help |
Replaced ScanServerView with a generic ServersView object
which contains the column definitions and the data for each
server.