Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enterprise Search] Added an EuiEmptyState to Credentials page #2

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/canvas/canvas-share-workpad.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ When you've finished your workpad, you can share it outside of {kib}.

Create a JSON file of your workpad that you can export outside of {kib}.

Click *Share > Download as JSON*.
To begin, click *Share > Download as JSON*.

[role="screenshot"]
image::images/canvas-export-workpad.png[Export single workpad through JSON, from Share dropdown]
Expand All @@ -23,7 +23,7 @@ Want to export multiple workpads? Go to the *Canvas* home page, select the workp

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

Click *Share > PDF reports > Generate PDF*.
To begin, click *Share > PDF reports > Generate PDF*.

[role="screenshot"]
image::images/canvas-generate-pdf.gif[Image showing how to generate a PDF]
Expand All @@ -36,7 +36,7 @@ For more information, refer to <<reporting-getting-started, Reporting from Kiban

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

Click *Share > PDF reports > Copy POST URL*.
To begin, click *Share > PDF reports > Copy POST URL*.

[role="screenshot"]
image::images/canvas-create-URL.gif[Image showing how to create POST URL]
Expand Down
10 changes: 4 additions & 6 deletions docs/canvas/canvas-tutorial.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[canvas-tutorial]]
== Tutorial: Create a workpad for monitoring sales

To get up and running with Canvas, use the following tutorial where you'll create a workpad for monitoring sales at an eCommerce store.
To get up and running with Canvas, add the Sample eCommerce orders data, then use the data to create a workpad for monitoring sales at an eCommerce store.

[float]
=== Before you begin
Expand Down Expand Up @@ -114,18 +114,16 @@ image::images/canvas-timefilter-element.png[Image showing Canvas workpad with fi

To see how the data changes, set the time filter to *Last 7 days*. As you change the time filter options, the elements automatically update.

Your workpad is now complete!
Your workpad is complete!

[float]
=== Next steps
=== What's next?
Now that you know the Canvas basics, you're ready to explore on your own.

Here are some things to try:

* Play with the {kibana-ref}/add-sample-data.html[sample Canvas workpads].

* Build presentations of your own live data with <<create-workpads,workpads>>.

* Learn more about <<add-canvas-elements,elements>> &mdash; the building blocks of your workpad.
* Build presentations of your own data with <<create-workpads,workpads>>.

* Deep dive into the {kibana-ref}/canvas-function-reference.html[expression language and functions] that drive Canvas.
Binary file modified docs/canvas/images/canvas-autoplay-interval.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/canvas/images/canvas-gs-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/canvas/images/canvas-refresh-interval.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/canvas/images/canvas-zoom-controls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 16 additions & 21 deletions docs/user/canvas.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ With Canvas, you can:

* Focus the data you want to display with filters.

To begin, open the menu, then go to *Canvas*.

[role="screenshot"]
image::images/canvas-gs-example.png[Getting started example]

Expand All @@ -26,27 +28,24 @@ For a quick overview of Canvas, watch link:https://www.youtube.com/watch?v=ZqvF_
[[create-workpads]]
== Create workpads

A _workpad_ provides you with a space where you can build presentations of your live data.
A _workpad_ provides you with a space where you can build presentations of your live data. With Canvas,
you can create a workpad from scratch, start with a preconfigured workpad, import an existing workpad, or use a sample data workpad.

[float]
[[start-with-a-blank-workpad]]
=== Start with a blank workpad

To use the background colors, images, and data of your choice, start with a blank workpad.

. Open the menu, then go to *Canvas*.

. On the *Canvas workpads* view, click *Create workpad*.
. On the *Canvas workpads* page, click *Create workpad*.

. Add a *Name* to your workpad.
. Specify the *Workpad settings*.

. In the *Width* and *Height* fields, specify the size.
.. Add a *Name* to your workpad.

. Select the layout.
+
For example, click *720p* for a traditional presentation layout.
.. In the *Width* and *Height* fields, specify the size, or select one of default layouts.

. Click the *Background color* picker, then select the background color for your workpad.
.. Click the *Background* color picker, then select the color for your workpad.
+
[role="screenshot"]
image::images/canvas-background-color-picker.png[Canvas color picker]
Expand All @@ -57,9 +56,7 @@ image::images/canvas-background-color-picker.png[Canvas color picker]

If you're unsure about where to start, you can use one of the preconfigured templates that come with Canvas.

. Open the menu, then go to *Canvas*.

. On the *Canvas workpads* view, select *Templates*.
. On the *Canvas workpads* page, select *Templates*.

. Click the preconfigured template that you want to use.

Expand All @@ -69,17 +66,15 @@ If you're unsure about where to start, you can use one of the preconfigured temp
[[import-existing-workpads]]
=== Import existing workpads

When you want to use a workpad that someone else has already started, import the JSON file into Canvas.

. Open the menu, then go to *Canvas*.
When you want to use a workpad that someone else has already started, import the JSON file.

. On the *Canvas workpads* view, click and drag the file to the *Import workpad JSON file* field.
To begin, drag the file to the *Import workpad JSON file* field on the *Canvas workpads* page.

[float]
[[use-sample-data-workpads]]
=== Use sample data workpads

Each of the sample data sets comes with a Canvas workpad that you can use for your own workpad inspiration.
Each of the {kib} sample data sets comes with a workpad that you can use for your own workpad inspiration.

. Add a {kibana-ref}/add-sample-data.html[sample data set].

Expand Down Expand Up @@ -123,12 +118,12 @@ To save a group of elements, press and hold Shift, select the elements you want
Elements are saved in *Add element > My elements*.

[float]
[[add-existing-visuualizations]]
=== Add existing visualizations
[[add-saved-objects]]
=== Add saved objects

Add <<managing-saved-objects,saved objects>> to your workpad, such as maps and visualizations.

. Click *Add element > Add from Visualize Library*.
. Click *Add element > Add from {kib}*.

. Select the saved object you want to add.
+
Expand Down
14 changes: 7 additions & 7 deletions docs/user/dashboard/vega-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,17 @@ Override it by providing a different `stroke`, `fill`, or `color` (Vega-Lite) va
[[vega-queries]]
==== Writing {es} queries in Vega

experimental[] {kib} extends the Vega https://vega.github.io/vega/docs/data/[data] elements
with support for direct {es} queries specified as a `url`.
{kib} extends the Vega https://vega.github.io/vega/docs/data/[data] elements
with support for direct {es} queries specified as `url`.

Because of this, {kib} is **unable to support dynamically loaded data**,
{kib} is **unable to support dynamically loaded data**,
which would otherwise work in Vega. All data is fetched before it's passed to
the Vega renderer.

To define an {es} query in Vega, set the `url` to an object. {kib} will parse
To define an {es} query in Vega, set the `url` to an object. {kib} parses
the object looking for special tokens that allow your query to integrate with {kib}.
These tokens are:

Tokens include the following:

* `%context%: true`: Set at the top level, and replaces the `query` section with filters from dashboard
* `%timefield%: <name>`: Set at the top level, integrates the query with the dashboard time filter
Expand All @@ -87,8 +88,7 @@ These tokens are:
* `"%dashboard_context-filter_clause%"`: String replaced by an object containing filters
* `"%dashboard_context-must_not_clause%"`: String replaced by an object containing filters

Putting this together, an example query that counts the number of documents in
a specific index:
For example, the following query counts the number of documents in a specific index:

[source,yaml]
----
Expand Down
1 change: 1 addition & 0 deletions src/plugins/vis_type_timeseries/common/vis_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export const seriesItems = schema.object({
hide_in_legend: numberIntegerOptional,
hidden: schema.maybe(schema.boolean()),
id: stringRequired,
ignore_global_filter: numberOptional,
label: stringOptionalNullable,
line_width: numberOptionalOrEmptyString,
metrics: schema.arrayOf(metricsItems),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ import {
EuiSpacer,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { getDefaultQueryLanguage } from './lib/get_default_query_language';
import { QueryBarWrapper } from './query_bar_wrapper';
import { SeriesConfigQueryBarWithIgnoreGlobalFilter } from './series_config_query_bar_with_ignore_global_filter';

export const SeriesConfig = (props) => {
const defaults = { offset_time: '', value_template: '' };
Expand All @@ -56,28 +55,12 @@ export const SeriesConfig = (props) => {

<EuiHorizontalRule margin="s" />

<EuiFormRow
id={htmlId('series_filter')}
label={
<FormattedMessage
id="visTypeTimeseries.seriesConfig.filterLabel"
defaultMessage="Filter"
/>
}
fullWidth
>
<QueryBarWrapper
query={{
language:
model.filter && model.filter.language
? model.filter.language
: getDefaultQueryLanguage(),
query: model.filter && model.filter.query ? model.filter.query : '',
}}
onChange={(filter) => props.onChange({ filter })}
indexPatterns={[seriesIndexPattern]}
/>
</EuiFormRow>
<SeriesConfigQueryBarWithIgnoreGlobalFilter
model={model}
onChange={props.onChange}
panel={props.panel}
indexPatternForQuery={seriesIndexPattern}
/>

<EuiHorizontalRule margin="s" />

Expand Down Expand Up @@ -162,6 +145,7 @@ export const SeriesConfig = (props) => {

SeriesConfig.propTypes = {
fields: PropTypes.object,
panel: PropTypes.object,
model: PropTypes.object,
onChange: PropTypes.func,
indexPatternForQuery: PropTypes.string,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*
* 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 PropTypes from 'prop-types';
import React from 'react';
import { htmlIdGenerator, EuiFlexItem, EuiFormRow, EuiToolTip, EuiFlexGroup } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { YesNo } from './yes_no';
import { getDefaultQueryLanguage } from './lib/get_default_query_language';
import { QueryBarWrapper } from './query_bar_wrapper';

export function SeriesConfigQueryBarWithIgnoreGlobalFilter({
panel,
model,
onChange,
indexPatternForQuery,
}) {
const htmlId = htmlIdGenerator();
const yesNoOption = (
<YesNo
disabled={Boolean(panel.ignore_global_filter)}
value={model.ignore_global_filter}
name="ignore_global_filter"
onChange={onChange}
/>
);
return (
<EuiFlexGroup margin="s">
<EuiFlexItem grow={true}>
<EuiFormRow
id={htmlId('filterInput')}
label={
<FormattedMessage
id="visTypeTimeseries.seriesConfig.filterLabel"
defaultMessage="Filter"
/>
}
fullWidth
>
<QueryBarWrapper
query={{
language:
model.filter && model.filter.language
? model.filter.language
: getDefaultQueryLanguage(),
query: model.filter && model.filter.query ? model.filter.query : '',
}}
onChange={(filter) => onChange({ filter })}
indexPatterns={[indexPatternForQuery]}
/>
</EuiFormRow>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFormRow
id={htmlId('seriesIgnoreGlobalFilter')}
label={
<FormattedMessage
id="visTypeTimeseries.seriesConfig.ignoreGlobalFilterLabel"
defaultMessage="Ignore global filter?"
/>
}
fullWidth
>
{panel.ignore_global_filter ? (
<EuiToolTip
content={
<FormattedMessage
id="visTypeTimeseries.seriesConfig.ignoreGlobalFilterDisabledTooltip"
defaultMessage="This is disabled because the global filters are being ignored in the panel options."
/>
}
>
{yesNoOption}
</EuiToolTip>
) : (
yesNoOption
)}
</EuiFormRow>
</EuiFlexItem>
</EuiFlexGroup>
);
}

SeriesConfigQueryBarWithIgnoreGlobalFilter.propTypes = {
onChange: PropTypes.func,
model: PropTypes.object,
panel: PropTypes.object,
indexPatternForQuery: PropTypes.string,
};
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function GaugeSeriesUi(props) {
seriesBody = (
<SeriesConfig
fields={props.fields}
panel={panel}
model={props.model}
onChange={props.onChange}
indexPatternForQuery={props.indexPatternForQuery}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function MarkdownSeriesUi(props) {
seriesBody = (
<SeriesConfig
fields={props.fields}
panel={panel}
model={props.model}
onChange={props.onChange}
indexPatternForQuery={props.indexPatternForQuery}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function MetricSeriesUi(props) {
} else {
seriesBody = (
<SeriesConfig
panel={panel}
fields={props.fields}
model={props.model}
onChange={props.onChange}
Expand Down
Loading