open-consul/ui/packages/consul-ui/tests
John Cowen 299ecff703
ui: Adds @NullValue attr decorator (#9587)
There are many places in the API where we receive a property set to
`null` which can then lead to defensive code deeper in the app in order
to guard for this type of thing when usually we are expecting an array
or for the property to be undefined using omitempty on the backend.

Previously we had two places where we would deal with this in the
serializer using our 'remove-null' util (KV and Intentions).

This new decorator lets you declaritively define this type of data using
a decorator @NullValue([]) (which would replce a null value with [].

@NullValue in turn uses a more generic @replace helper, which we
currently don't need but would let you replace any value with another,
not just a null value.

An additional benefit here is that the guard/replacement is executed
lazily when we get the property instead of serializing all the values
when they come in via the API. On super large datasets, where we only
visualize part of the dataset (say in our scroll panes), this feels like
a good improvement on the previous approach.
2021-01-27 10:41:24 +00:00
..
acceptance ui: Sidebar navigation / redesign (#9553) 2021-01-26 17:40:33 +00:00
helpers ui: Topology intention saving improvements (#9513) 2021-01-19 15:40:39 +00:00
integration ui: Search/filtering 'Filtered by:' search status (#9442) 2021-01-25 18:13:54 +00:00
lib ui: Initial Intention Permission Integration and acceptance testing (#9003) 2020-10-23 17:26:06 +01:00
pages ui: Search/filtering 'Filtered by:' search status (#9442) 2021-01-25 18:13:54 +00:00
steps ui: Dev/Test environment configurable metrics (#9345) 2020-12-15 15:34:54 +00:00
unit ui: Adds @NullValue attr decorator (#9587) 2021-01-27 10:41:24 +00:00
dictionary.js ui: Initial Intention Permission Integration and acceptance testing (#9003) 2020-10-23 17:26:06 +01:00
index.html
pages.js ui: Search/filtering 'Filtered by:' search status (#9442) 2021-01-25 18:13:54 +00:00
steps.js ui: [BUGFIX] Request intention listing with ns parameter (#9432) 2021-01-04 17:22:10 +00:00
test-helper.js