From 055d069624bdc253eca5eb77b2cd4433931eaf51 Mon Sep 17 00:00:00 2001 From: Oleksandr Shulgin Date: Tue, 9 Mar 2021 13:24:28 +0100 Subject: [PATCH] Add a warning about missing ordering key fields for data events Internal ticket #552 Closes #134 --- client/Pages/EventTypeCreate/View.elm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/client/Pages/EventTypeCreate/View.elm b/client/Pages/EventTypeCreate/View.elm index dfbef26..6abec17 100644 --- a/client/Pages/EventTypeCreate/View.elm +++ b/client/Pages/EventTypeCreate/View.elm @@ -315,6 +315,24 @@ viewForm model setup = Help.orderingKeyFields Optional Enabled + , if getValue FieldCategory formModel.values == categories.data + && ( getValue FieldOrderingKeyFields formModel.values + |> String.trim + |> String.isEmpty ) then + div [ class "dc-msg dc-msg--error" ] + [ h3 [ class "blinking" ] [ text "Warning!" ] + , p [ class "dc-p" ] + [ text "The 'ordering key' information defines the transactional" + , text " business order that finally leads to the event creation, and" + , text " is used e.g. for analytics change data capture, i.e. keeping" + , text " transactional data in sync as source for analytics. The" + , text " information is recommended for (external) data change events" + , text " -- see " + , externalLink "API/Event Guidelines" "https://opensource.zalando.com/restful-api-guidelines/#203" + , text "." ] + ] + else + none , selectInput formModel FieldAudience OnInput