Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Add a warning about missing ordering key fields for data events #136

Merged
merged 2 commits into from
Mar 10, 2021
Merged
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
24 changes: 24 additions & 0 deletions client/Pages/EventTypeCreate/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,30 @@ 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 "\u{00A0}-- see "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

00A0 is a non-breaking space, in case someone's wondering ;)

, externalLink "API/Event Guidelines" "https://opensource.zalando.com/restful-api-guidelines/#203"
, text "."
]
]

else
none
, selectInput formModel
FieldAudience
OnInput
Expand Down