Skip to content

SED-4661 add-new-grid-layout-to-cross-execution-views - #674

Open
david-stephan wants to merge 6 commits into
masterfrom
SED-4661-add-new-grid-layout-to-cross-execution-views
Open

SED-4661 add-new-grid-layout-to-cross-execution-views#674
david-stephan wants to merge 6 commits into
masterfrom
SED-4661-add-new-grid-layout-to-cross-execution-views

Conversation

@david-stephan

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces support for distinguishing report layouts by type (SingleExecution vs. CrossExecution). It updates the layout accessor, plugin, and services to filter and configure layouts based on this new property, and adds a migration task to backfill legacy documents. The review feedback highlights two important improvements: first, collecting documents to a list in the migration task before updating them to avoid cursor instability during streaming; and second, adding defensive null checks for the report type in the accessor to prevent potential NullPointerExceptions.

@david-stephan
david-stephan marked this pull request as ready for review July 24, 2026 12:16
@david-stephan
david-stephan requested a review from cl-exense July 24, 2026 12:16

@cl-exense cl-exense left a comment

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.

Approving, two really minor ("FYI") comments that don't necessitate any action.

WebApplicationConfigurationManager configurationManager = context.require(WebApplicationConfigurationManager.class);
configurationManager.registerHook(s -> Map.of(DEFAULT_LAYOUT_ID_CONFIG_KEY, defaultLayoutId));
configurationManager.registerHook(s -> {
Map<String, String> config = new HashMap<>();

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.

Minor, no need to change: you could also have used Map.of(K1,V1,K2,V2) I guess.

public List<ReportLayout> getAllReportLayouts() {
return reportLayoutAccessor.getAccessibleReportLayoutsDefinitions(getSession().getUser().getUsername());
public List<ReportLayout> getAllReportLayouts(@QueryParam("reportType") ReportLayout.ReportLayoutType reportType) {
ReportLayout.ReportLayoutType effectiveReportType = reportType != null ? reportType : ReportLayout.ReportLayoutType.SingleExecution;

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.

Alternative:

public List<ReportLayout> getAllReportLayouts(@DefaultValue("SingleExecution") @QueryParam("reportType") ReportLayout.ReportLayoutType reportType) {

If the DefaultValue annotation could directly take the correct type this would be a no-brainer. However it can only take magic string values (which I don't like), so I'll let you choose. Both options are perfectly fine with me.

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