Skip to content

Refactored ServersView class into several classes#6344

Open
dlmarion wants to merge 2 commits intoapache:mainfrom
dlmarion:6341-refactor-servers-view
Open

Refactored ServersView class into several classes#6344
dlmarion wants to merge 2 commits intoapache:mainfrom
dlmarion:6341-refactor-servers-view

Conversation

@dlmarion
Copy link
Copy Markdown
Contributor

This change refactors the ServersView class into
several classes to make it easier to read and
understand. The ColumnFactory interface and
implementations, and the Status class, were moved
into their own files. The ServersView object
was renamed to TableData as it represents a
generic DTO object that is comprised of a
list of columns and the corresponding metric
data for those columns. The logic for creating
the TableData objects was moved into the new
TableDataFactory class.

Closes #6341

This change refactors the ServersView class into
several classes to make it easier to read and
understand. The ColumnFactory interface and
implementations, and the Status class, were moved
into their own files. The ServersView object
was renamed to TableData as it represents a
generic DTO object that is comprised of a
list of columns and the corresponding metric
data for those columns. The logic for creating
the TableData objects was moved into the new
TableDataFactory class.

Closes apache#6341
@dlmarion dlmarion added this to the 4.0.0 milestone Apr 28, 2026
@dlmarion dlmarion self-assigned this Apr 28, 2026
boolean hasMetricData = hasMetricData(metricResponse);
Map<String,List<FMetric>> serverMetrics =
hasMetricData ? metricValuesByName(metricResponse) : Map.of();
hasMetricData ? TableDataFactory.metricValuesByName(metricResponse) : Map.of();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like TableDataFactory. could be dropped.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, that was left over from some refactoring. Removed in 8326bf1

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.

Rename ServersView object in Monitor

2 participants