Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
dhurley14 committed Jan 18, 2020
2 parents 45971da + dfb3578 commit 7b84bcb
Show file tree
Hide file tree
Showing 122 changed files with 1,191 additions and 985 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pr-project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
[
{ "label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173897 },
{ "label": "Feature:Lens", "projectName": "Lens", "columnId": 6219362 },
{ "label": "Team:Platform", "projectName": "kibana-platform", "columnId": 5514360 },
{"label": "Team:Canvas", "projectName": "canvas", "columnId": 6187580}
{ "label": "Team:Canvas", "projectName": "canvas", "columnId": 6187580 }
]
ghToken: ${{ secrets.GITHUB_TOKEN }}
10 changes: 3 additions & 7 deletions docs/canvas/canvas-share-workpad.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Want to export multiple workpads? Go to the *Canvas workpads* view, select the w
[[create-workpad-pdf]]
=== Create a PDF

Create a PDF copy of your workpad that you can save and share outside of {kib}.
If you have a license that supports the {report-features}, you can create a PDF copy of your workpad that you can save and share outside {kib}.

. If you are using a Gold or Platinum license, enable reporting in your `config/kibana.yml` file.
For more information, refer to <<reporting-getting-started, Reporting from Kibana>>.

. From your workpad, click the *Share workpad* icon in the upper left corner, then select *PDF reports*.

Expand All @@ -38,12 +38,10 @@ image::images/canvas-generate-pdf.gif[Generate PDF]
[[create-workpad-URL]]
=== Create a POST URL

Create a POST URL that you can use to automatically generate PDF reports using Watcher or a script.
If you have a license that supports the {report-features}, you can create a POST URL that you can use to automatically generate PDF reports using Watcher or a script.

For more information, refer to <<automating-report-generation, Automating report generation>>.

. If you are using a Gold or Platinum license, enable reporting in your `config/kibana.yml` file.

. From your workpad, click the *Share workpad* icon in the upper left corner, then select *PDF reports*.

. Click *Copy POST URL*.
Expand All @@ -57,8 +55,6 @@ image::images/canvas-create-URL.gif[Create POST URL]

beta[] Canvas allows you to create _shareables_, which are workpads that you download and securely share on any website. To customize the behavior of the workpad on your website, you can choose to autoplay the pages or hide the workpad toolbar.

. If you are using a Gold or Platinum license, enable reporting in your `config/kibana.yml` file.

. From your workpad, click the *Share this workpad* icon in the upper left corner, then select *Share on a website*.

. On the *Share on a website* pane, follow the instructions.
Expand Down
2 changes: 1 addition & 1 deletion docs/discover/document-data.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tailor the documents table to suit your needs.

[horizontal]
Add a field column::
Hover over the list of *Available fields* and then click *add* next to each field you want include as a column in the table.
Hover over the list of *Available fields* and then click *add* next to each field you want to include as a column in the table.
The first field you add replaces the `_source` column.
Change sort order:: By default, columns are sorted by the values in the field.
If a time field is configured for the current index pattern,
Expand Down
6 changes: 3 additions & 3 deletions docs/management/managing-licenses.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ At the end of the trial period, the platinum features operate in a
<<license-expiration,degraded mode>>. You can revert to a basic license,
extend the trial, or purchase a subscription.

TIP: If {security-features} are enabled, before you revert to a basic license or
install a gold or platinum license, you must configure Transport Layer Security
(TLS) in {es}. See {ref}/encrypting-communications.html[Encrypting communications].
TIP: If {security-features} are enabled, unless you have a trial license,
you must configure Transport Layer Security (TLS) in {es}.
See {ref}/encrypting-communications.html[Encrypting communications].
{kib} and the {ref}/start-basic.html[start basic API] provide a list of all of
the features that will no longer be supported if you revert to a basic license.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<kbn-management-app>
<div id="management-landing"></div>
<div id="management-landing" data-test-subj="management-landing"></div>
</kbn-management-app>
77 changes: 77 additions & 0 deletions src/plugins/data/public/autocomplete/autocomplete_service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { CoreSetup } from 'src/core/public';
import { QuerySuggestionsGetFn } from './providers/query_suggestion_provider';
import {
setupValueSuggestionProvider,
ValueSuggestionsGetFn,
} from './providers/value_suggestion_provider';

export class AutocompleteService {
private readonly querySuggestionProviders: Map<string, QuerySuggestionsGetFn> = new Map();
private getValueSuggestions?: ValueSuggestionsGetFn;

private addQuerySuggestionProvider = (
language: string,
provider: QuerySuggestionsGetFn
): void => {
if (language && provider) {
this.querySuggestionProviders.set(language, provider);
}
};

private getQuerySuggestions: QuerySuggestionsGetFn = args => {
const { language } = args;
const provider = this.querySuggestionProviders.get(language);

if (provider) {
return provider(args);
}
};

private hasQuerySuggestions = (language: string) => this.querySuggestionProviders.has(language);

/** @public **/
public setup(core: CoreSetup) {
this.getValueSuggestions = setupValueSuggestionProvider(core);

return {
addQuerySuggestionProvider: this.addQuerySuggestionProvider,

/** @obsolete **/
/** please use "getProvider" only from the start contract **/
getQuerySuggestions: this.getQuerySuggestions,
};
}

/** @public **/
public start() {
return {
getQuerySuggestions: this.getQuerySuggestions,
hasQuerySuggestions: this.hasQuerySuggestions,
getValueSuggestions: this.getValueSuggestions!,
};
}

/** @internal **/
public clearProviders(): void {
this.querySuggestionProviders.clear();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
* under the License.
*/

export { getSuggestionsProvider } from './value_suggestions';
export { AutocompleteService } from './autocomplete_service';
export { QuerySuggestion, QuerySuggestionType, QuerySuggestionsGetFn } from './types';
Original file line number Diff line number Diff line change
Expand Up @@ -17,56 +17,40 @@
* under the License.
*/

import { AutocompleteProviderRegister } from '.';
import { IIndexPattern, IFieldType } from '../../common';
import { IFieldType, IIndexPattern } from '../../../common/index_patterns';

export type AutocompletePublicPluginSetup = Pick<
AutocompleteProviderRegister,
'addProvider' | 'getProvider'
>;
export type AutocompletePublicPluginStart = Pick<AutocompleteProviderRegister, 'getProvider'>;
export type QuerySuggestionType = 'field' | 'value' | 'operator' | 'conjunction' | 'recentSearch';

/** @public **/
export type AutocompleteProvider = (args: {
config: {
get(configKey: string): any;
};
indexPatterns: IIndexPattern[];
boolFilter?: any;
}) => GetSuggestions;
export type QuerySuggestionsGetFn = (
args: QuerySuggestionsGetFnArgs
) => Promise<QuerySuggestion[]> | undefined;

/** @public **/
export type GetSuggestions = (args: {
interface QuerySuggestionsGetFnArgs {
language: string;
indexPatterns: IIndexPattern[];
query: string;
selectionStart: number;
selectionEnd: number;
signal?: AbortSignal;
}) => Promise<AutocompleteSuggestion[]>;

/** @public **/
export type AutocompleteSuggestionType =
| 'field'
| 'value'
| 'operator'
| 'conjunction'
| 'recentSearch';

// A union type allows us to do easy type guards in the code. For example, if I want to ensure I'm
// working with a FieldAutocompleteSuggestion, I can just do `if ('field' in suggestion)` and the
// TypeScript compiler will narrow the type to the parts of the union that have a field prop.
/** @public **/
export type AutocompleteSuggestion = BasicAutocompleteSuggestion | FieldAutocompleteSuggestion;
boolFilter?: any;
}

interface BasicAutocompleteSuggestion {
interface BasicQuerySuggestion {
type: QuerySuggestionType;
description?: string;
end: number;
start: number;
text: string;
type: AutocompleteSuggestionType;
cursorIndex?: number;
}

export type FieldAutocompleteSuggestion = BasicAutocompleteSuggestion & {
interface FieldQuerySuggestion extends BasicQuerySuggestion {
type: 'field';
field: IFieldType;
};
}

// A union type allows us to do easy type guards in the code. For example, if I want to ensure I'm
// working with a FieldAutocompleteSuggestion, I can just do `if ('field' in suggestion)` and the
// TypeScript compiler will narrow the type to the parts of the union that have a field prop.
/** @public **/
export type QuerySuggestion = BasicQuerySuggestion | FieldQuerySuggestion;
Loading

0 comments on commit 7b84bcb

Please sign in to comment.