Skip to content

Commit

Permalink
Clean up internal docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Aug 12, 2020
1 parent ce4463b commit ef12dfb
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 117 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export interface DataPublicPluginSetup

| Property | Type | Description |
| --- | --- | --- |
| [\_\_enhance](./kibana-plugin-plugins-data-public.datapublicpluginsetup.__enhance.md) | <code>(enhancements: DataPublicPluginEnhancements) =&gt; void</code> | |
| [autocomplete](./kibana-plugin-plugins-data-public.datapublicpluginsetup.autocomplete.md) | <code>AutocompleteSetup</code> | |
| [fieldFormats](./kibana-plugin-plugins-data-public.datapublicpluginsetup.fieldformats.md) | <code>FieldFormatsSetup</code> | |
| [query](./kibana-plugin-plugins-data-public.datapublicpluginsetup.query.md) | <code>QuerySetup</code> | |
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) &gt; [getPendingCount$](./kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md)

## SearchInterceptor.getPendingCount$ property
## SearchInterceptor.getPendingCount$() method

Returns an `Observable` over the current number of pending searches. This could mean that one of the search requests is still in flight, or that it has only received partial responses.

<b>Signature:</b>

```typescript
getPendingCount$: () => Observable<number>;
getPendingCount$(): Observable<number>;
```
<b>Returns:</b>

`Observable<number>`

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,14 @@ export declare class SearchInterceptor

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [abortController](./kibana-plugin-plugins-data-public.searchinterceptor.abortcontroller.md) | | <code>AbortController</code> | <code>abortController</code> used to signal all searches to abort. |
| [application](./kibana-plugin-plugins-data-public.searchinterceptor.application.md) | | <code>CoreStart['application']</code> | |
| [deps](./kibana-plugin-plugins-data-public.searchinterceptor.deps.md) | | <code>SearchInterceptorDeps</code> | |
| [getPendingCount$](./kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md) | | <code>() =&gt; Observable&lt;number&gt;</code> | Returns an <code>Observable</code> over the current number of pending searches. This could mean that one of the search requests is still in flight, or that it has only received partial responses. |
| [hideToast](./kibana-plugin-plugins-data-public.searchinterceptor.hidetoast.md) | | <code>() =&gt; void</code> | |
| [longRunningToast](./kibana-plugin-plugins-data-public.searchinterceptor.longrunningtoast.md) | | <code>Toast</code> | The current long-running toast (if there is one). |
| [pendingCount$](./kibana-plugin-plugins-data-public.searchinterceptor.pendingcount_.md) | | <code>BehaviorSubject&lt;number&gt;</code> | Observable that emits when the number of pending requests changes. |
| [requestTimeout](./kibana-plugin-plugins-data-public.searchinterceptor.requesttimeout.md) | | <code>number &#124; undefined</code> | |
| [showToast](./kibana-plugin-plugins-data-public.searchinterceptor.showtoast.md) | | <code>() =&gt; void</code> | |
| [timeoutSubscriptions](./kibana-plugin-plugins-data-public.searchinterceptor.timeoutsubscriptions.md) | | <code>Subscription</code> | The subscriptions from scheduling the automatic timeout for each request. |

## Methods

| Method | Modifiers | Description |
| --- | --- | --- |
| [getPendingCount$()](./kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md) | | Returns an <code>Observable</code> over the current number of pending searches. This could mean that one of the search requests is still in flight, or that it has only received partial responses. |
| [runSearch(request, signal, strategy)](./kibana-plugin-plugins-data-public.searchinterceptor.runsearch.md) | | |
| [search(request, options)](./kibana-plugin-plugins-data-public.searchinterceptor.search.md) | | Searches using the given <code>search</code> method. Overrides the <code>AbortSignal</code> with one that will abort either when <code>cancelPending</code> is called, when the request times out, or when the original <code>AbortSignal</code> is aborted. Updates <code>pendingCount$</code> when the request is started/finalized. |
| [setupTimers(options)](./kibana-plugin-plugins-data-public.searchinterceptor.setuptimers.md) | | |
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

20 changes: 12 additions & 8 deletions src/plugins/data/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export type CustomFilter = Filter & {
export interface DataPublicPluginSetup {
// Warning: (ae-forgotten-export) The symbol "DataPublicPluginEnhancements" needs to be exported by the entry point index.d.ts
//
// (undocumented)
// @internal (undocumented)
__enhance: (enhancements: DataPublicPluginEnhancements) => void;
// Warning: (ae-forgotten-export) The symbol "AutocompleteSetup" needs to be exported by the entry point index.d.ts
//
Expand Down Expand Up @@ -1718,15 +1718,18 @@ export interface SearchError {
// @public (undocumented)
export class SearchInterceptor {
constructor(deps: SearchInterceptorDeps, requestTimeout?: number | undefined);
// @internal
protected abortController: AbortController;
// (undocumented)
// @internal (undocumented)
protected application: CoreStart['application'];
// (undocumented)
protected readonly deps: SearchInterceptorDeps;
getPendingCount$: () => Observable<number>;
// (undocumented)
getPendingCount$(): Observable<number>;
// @internal (undocumented)
protected hideToast: () => void;
// @internal
protected longRunningToast?: Toast;
// @internal
protected pendingCount$: BehaviorSubject<number>;
// (undocumented)
protected readonly requestTimeout?: number | undefined;
Expand All @@ -1738,8 +1741,9 @@ export class SearchInterceptor {
combinedSignal: AbortSignal;
cleanup: () => void;
};
// (undocumented)
// @internal (undocumented)
protected showToast: () => void;
// @internal
protected timeoutSubscriptions: Subscription;
}

Expand Down Expand Up @@ -1985,9 +1989,9 @@ export const UI_SETTINGS: {
// src/plugins/data/public/index.ts:393:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:396:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/query/state_sync/connect_to_query_state.ts:45:5 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/types.ts:59:5 - (ae-forgotten-export) The symbol "createFiltersFromValueClickAction" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/types.ts:60:5 - (ae-forgotten-export) The symbol "createFiltersFromRangeSelectAction" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/types.ts:68:5 - (ae-forgotten-export) The symbol "IndexPatternSelectProps" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/types.ts:62:5 - (ae-forgotten-export) The symbol "createFiltersFromValueClickAction" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/types.ts:63:5 - (ae-forgotten-export) The symbol "createFiltersFromRangeSelectAction" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/types.ts:71:5 - (ae-forgotten-export) The symbol "IndexPatternSelectProps" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)

Expand Down
17 changes: 15 additions & 2 deletions src/plugins/data/public/search/search_interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,31 @@ export interface SearchInterceptorDeps {
export class SearchInterceptor {
/**
* `abortController` used to signal all searches to abort.
* @internal
*/
protected abortController = new AbortController();

/**
* Observable that emits when the number of pending requests changes.
* @internal
*/
protected pendingCount$ = new BehaviorSubject(0);

/**
* The subscriptions from scheduling the automatic timeout for each request.
* @internal
*/
protected timeoutSubscriptions: Subscription = new Subscription();

/**
* The current long-running toast (if there is one).
* @internal
*/
protected longRunningToast?: Toast;

/**
* @internal
*/
protected application!: CoreStart['application'];

/**
Expand Down Expand Up @@ -88,9 +95,9 @@ export class SearchInterceptor {
* Returns an `Observable` over the current number of pending searches. This could mean that one
* of the search requests is still in flight, or that it has only received partial responses.
*/
public getPendingCount$ = () => {
public getPendingCount$() {
return this.pendingCount$.asObservable();
};
}

protected runSearch(
request: IEsSearchRequest,
Expand Down Expand Up @@ -174,6 +181,9 @@ export class SearchInterceptor {
};
}

/**
* @internal
*/
protected showToast = () => {
if (this.longRunningToast) return;
this.longRunningToast = this.deps.toasts.addInfo(
Expand All @@ -189,6 +199,9 @@ export class SearchInterceptor {
);
};

/**
* @internal
*/
protected hideToast = () => {
if (this.longRunningToast) {
this.deps.toasts.remove(this.longRunningToast);
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/data/public/search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ export interface SearchEnhancements {
export interface ISearchSetup {
aggs: SearchAggsSetup;
usageCollector?: SearchUsageCollector;
/**
* @internal
*/
__enhance: (enhancements: SearchEnhancements) => void;
}

Expand All @@ -74,6 +77,10 @@ export interface ISearchStart {
create: (fields?: SearchSourceFields) => Promise<ISearchSource>;
createEmpty: () => ISearchSource;
};
/**
* @deprecated
* @internal
*/
__LEGACY: ISearchStartLegacy;
}

Expand Down
3 changes: 3 additions & 0 deletions src/plugins/data/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export interface DataPublicPluginSetup {
search: ISearchSetup;
fieldFormats: FieldFormatsSetup;
query: QuerySetup;
/**
* @internal
*/
__enhance: (enhancements: DataPublicPluginEnhancements) => void;
}

Expand Down

0 comments on commit ef12dfb

Please sign in to comment.