File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
service/src/main/kotlin/app/cash/backfila/ui Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class BackfillCreateHandlerAction @Inject constructor(
49
49
formFields[BackfillCreateField .EXTRA_SLEEP_MS .fieldId]?.ifNotBlank { createRequestBuilder.extra_sleep_ms(it.toLongOrNull()) }
50
50
formFields[BackfillCreateField .BACKOFF_SCHEDULE .fieldId]?.ifNotBlank { createRequestBuilder.backoff_schedule(it) }
51
51
val customParameters = formFields.filter { it.key.startsWith(BackfillCreateField .CUSTOM_PARAMETER_PREFIX .fieldId) }
52
- .mapValues { it.value?.encodeUtf8() }
52
+ .map { it.key.removePrefix( BackfillCreateField . CUSTOM_PARAMETER_PREFIX .fieldId) to it. value?.encodeUtf8() }.toMap()
53
53
if (customParameters.isNotEmpty()) {
54
54
createRequestBuilder.parameter_map(customParameters)
55
55
}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import app.cash.backfila.ui.components.AutoReload
8
8
import app.cash.backfila.ui.components.DashboardPageLayout
9
9
import app.cash.backfila.ui.components.PageTitle
10
10
import app.cash.backfila.ui.components.ProgressBar
11
+ import app.cash.backfila.ui.pages.BackfillCreateAction.BackfillCreateField.CUSTOM_PARAMETER_PREFIX
11
12
import javax.inject.Inject
12
13
import javax.inject.Singleton
13
14
import kotlinx.html.ButtonType
@@ -319,8 +320,13 @@ class BackfillShowAction @Inject constructor(
319
320
label = " View" ,
320
321
href = " #" ,
321
322
),
323
+ ),
324
+ ) + (parameters ? : mapOf ()).map { (key, value) ->
325
+ DescriptionListRow (
326
+ label = key.removePrefix(CUSTOM_PARAMETER_PREFIX .fieldId),
327
+ description = value,
322
328
)
323
- )
329
+ }
324
330
325
331
private fun TagConsumer <* >.Card (block : TagConsumer <* >.() -> Unit ) {
326
332
div(" -mx-4 mb-8 px-4 py-8 overflow-x-auto shadow-sm ring-1 ring-gray-900/5 sm:mx-0 sm:rounded-lg sm:px-8 lg:col-span-2 lg:row-span-2 lg:row-end-2" ) {
You can’t perform that action at this time.
0 commit comments