Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Backfill Show to use full width tables #411

Merged
merged 5 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class BackfillCreateHandlerAction @Inject constructor(
formFields[BackfillCreateField.EXTRA_SLEEP_MS.fieldId]?.ifNotBlank { createRequestBuilder.extra_sleep_ms(it.toLongOrNull()) }
formFields[BackfillCreateField.BACKOFF_SCHEDULE.fieldId]?.ifNotBlank { createRequestBuilder.backoff_schedule(it) }
val customParameters = formFields.filter { it.key.startsWith(BackfillCreateField.CUSTOM_PARAMETER_PREFIX.fieldId) }
.mapValues { it.value?.encodeUtf8() }
.map { it.key.removePrefix(BackfillCreateField.CUSTOM_PARAMETER_PREFIX.fieldId) to it.value?.encodeUtf8() }.toMap()
if (customParameters.isNotEmpty()) {
createRequestBuilder.parameter_map(customParameters)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ class BackfillShowButtonHandlerAction @Inject constructor(

companion object {
const val PATH = "/api/backfill/{id}/update"
fun path(id: String) = PATH.replace("{id}", id)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import app.cash.backfila.ui.actions.ServiceDataHelper
import app.cash.backfila.ui.components.AlertError
import app.cash.backfila.ui.components.DashboardPageLayout
import app.cash.backfila.ui.components.PageTitle
import javax.inject.Inject
import javax.inject.Singleton
import kotlinx.html.ButtonType
import kotlinx.html.InputType
import kotlinx.html.button
Expand All @@ -29,8 +31,6 @@ import misk.web.ResponseBody
import misk.web.ResponseContentType
import misk.web.actions.WebAction
import misk.web.mediatype.MediaTypes
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class BackfillCreateAction @Inject constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class BackfillCreateServiceIndexAction @Inject constructor(
val newPath = BackfillCreateAction.path(
service = service,
variantOrBackfillNameOrId = variantOrBlank.orEmpty(),
backfillNameOrId = ""
backfillNameOrId = "",
)
return Response(
body = "go to $newPath".toResponseBody(),
Expand Down Expand Up @@ -95,7 +95,7 @@ class BackfillCreateServiceIndexAction @Inject constructor(
href = BackfillCreateAction.path(
service = service,
variantOrBackfillNameOrId = variantOrBackfillNameOrId,
backfillNameOrId = if (variantOrBackfillNameOrId == it.name) "" else it.name
backfillNameOrId = if (variantOrBackfillNameOrId == it.name) "" else it.name,
)

this@ul.li("registration col-span-1 divide-y divide-gray-200 rounded-lg bg-white shadow") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import kotlinx.html.button
import kotlinx.html.div
import kotlinx.html.h3
import kotlinx.html.li
import kotlinx.html.p
import kotlinx.html.role
import kotlinx.html.span
import kotlinx.html.ul
Expand Down
Loading
Loading