update docs for hasData service (#134899)

* update docs for hasData service

* fix typo

* change wording from primitive to managed
This commit is contained in:
Shivindera Singh 2022-06-22 18:35:02 +02:00 committed by GitHub
parent 9c1202f16a
commit bcc17e178b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View file

@ -27,3 +27,10 @@ Users can create data views via [Data view management](https://www.elastic.co/gu
Additionally, they can be created through the data view API. Additionally, they can be created through the data view API.
Data views also allow formatters and custom labels to be defined for fields. Data views also allow formatters and custom labels to be defined for fields.
### Services
**hasData:** A standardized way to check the empty state for indices and data views.
- `hasESData: () => Promise<boolean>; // Check to see if ES data exists`
- `hasDataView: () => Promise<boolean>; // Check to see if any data view exists (managed or user created)`
- `hasUserDataView: () => Promise<boolean>; // Check to see if user created data views exists`

View file

@ -84,3 +84,11 @@ await data.indexPatterns.delete(dataViewId);
### Data view HTTP API ### Data view HTTP API
Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/data-views-api.html) Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/data-views-api.html)
### Services
#### **hasData:** A standardized way to check the empty state for indices and data views.
- `hasESData: () => Promise<boolean>; // Check to see if ES data exists`
- `hasDataView: () => Promise<boolean>; // Check to see if any data view exists (managed or user created)`
- `hasUserDataView: () => Promise<boolean>; // Check to see if user created data views exists`

View file

@ -20,5 +20,5 @@ and field lists across the various Kibana apps. Its typically used in conjunctio
**hasData:** A standardized way to check the empty state for indices and data views. **hasData:** A standardized way to check the empty state for indices and data views.
- `hasESData: () => Promise<boolean>; // Check to see if ES data exists` - `hasESData: () => Promise<boolean>; // Check to see if ES data exists`
- `hasDataView: () => Promise<boolean>; // Check to see if any data view exists (primitive or user created)` - `hasDataView: () => Promise<boolean>; // Check to see if any data view exists (managed or user created)`
- `hasUserDataView: () => Promise; // Check to see if user created data views exists` - `hasUserDataView: () => Promise<boolean>; // Check to see if user created data views exists`