mirror of https://github.com/status-im/consul.git
25f989753b
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. |
||
---|---|---|
.. | ||
packages/consul-ui | ||
.gitignore | ||
GNUmakefile | ||
README.md | ||
package.json | ||
vercel.json | ||
yarn.lock |
README.md
Consul UI Monorepo
This monorepo contains multiple projects, the UI for Consul and addons and packages used by the UI.
This top-level repository provides limited common tasks, such as installation and commit assistance. However, most tasks must be executed from within a subproject, e.g. running or testing.
Table of Contents generated with DocToc
Prerequisites
You will need the following things properly installed on your computer.
- Git
- Node.js
- Yarn installed globally
- Google Chrome
- Firefox
Installation
git clone https://github.com/hashicorp/consul.git
this repositorycd ui
yarn
Yarn Commands
List of available project commands. yarn run <command-name>
Command | Description |
---|---|
doc:toc | Re-builds the ToC for this README. |
compliance:licenses | Checks that all dependencies have OSS-compatible licenses. |
Contributing
Building ToC
To autogenerate a ToC (table of contents) for this README,
run yarn doc:toc
. Please update the ToC whenever editing the structure
of README.