Skip to content

Commit

Permalink
Fix odd rows
Browse files Browse the repository at this point in the history
  • Loading branch information
adrw committed Jan 27, 2025
1 parent a2756ac commit 52349be
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class BackfillShowAction @Inject constructor(
if (backfill.variant == "default") backfill.service_name else "${backfill.service_name} (${backfill.variant})"

val configurationRows = backfill.toConfigurationRows(id)
val leftColumnConfigurationRows = configurationRows.take(configurationRows.size / 2)
val leftColumnConfigurationRows = configurationRows.take(configurationRows.size / 2 +
// Handles odd length of rows, chooses the odd row to be in the left column
configurationRows.size % 2)
val rightColumnConfigurationRows = configurationRows.takeLast(configurationRows.size / 2)

val htmlResponseBody = dashboardPageLayout.newBuilder()
Expand Down

0 comments on commit 52349be

Please sign in to comment.