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

[TSVB] Documents the new index pattern mode #102880

Merged
merged 24 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
69bec7e
[TSVB] Document the new index pattern mode
stratoula Jun 22, 2021
c62574c
Add a callout to TSVB to advertise the new index pattern mode
stratoula Jun 22, 2021
64022b6
Merge branch 'master' into tsvb-new-mode-docs
kibanamachine Jun 28, 2021
35e3003
Conditionally render the callout, give capability to dismiss it
stratoula Jun 28, 2021
9294730
Fix i18n
stratoula Jun 28, 2021
0c9006c
Update the notification texts
stratoula Jun 29, 2021
12597d6
Merge branch 'master' into tsvb-new-mode-docs
kibanamachine Jun 30, 2021
d319695
Update notification text
stratoula Jun 30, 2021
a685a04
Change callout storage key
stratoula Jun 30, 2021
cfabff9
add UseIndexPatternModeCallout component
alexwizp Jun 30, 2021
c56de57
Merge pull request #4 from alexwizp/UseIndexPatternModeCallout
stratoula Jun 30, 2021
2567226
Update docs/user/dashboard/tsvb.asciidoc
stratoula Jun 30, 2021
61e48a8
Update docs/user/dashboard/tsvb.asciidoc
stratoula Jun 30, 2021
85c6fb9
Update docs/user/dashboard/tsvb.asciidoc
stratoula Jun 30, 2021
c9ad51b
Update docs/user/dashboard/tsvb.asciidoc
stratoula Jun 30, 2021
15e37a5
Update docs/user/dashboard/tsvb.asciidoc
stratoula Jun 30, 2021
9e0e9dd
Update docs/user/dashboard/tsvb.asciidoc
stratoula Jun 30, 2021
c5dfc2e
Update docs/user/dashboard/tsvb.asciidoc
stratoula Jun 30, 2021
ed223fd
Update docs/user/dashboard/tsvb.asciidoc
stratoula Jun 30, 2021
7081397
Final docs changes
stratoula Jun 30, 2021
08a5d3d
Remove TSVB from title
stratoula Jun 30, 2021
6e93830
Merge branch 'master' into tsvb-new-mode-docs
kibanamachine Jun 30, 2021
5b745bc
Merge branch 'master' into tsvb-new-mode-docs
kibanamachine Jun 30, 2021
e56a86e
Merge branch 'master' into tsvb-new-mode-docs
kibanamachine Jul 1, 2021
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions docs/user/dashboard/tsvb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,27 @@ The *Markdown* visualization supports Markdown with Handlebar (mustache) syntax
The math context is able to do simple and advanced calculations per series.
This function must always be the last metric in the series.

[float]
stratoula marked this conversation as resolved.
Show resolved Hide resolved
[[tsvb-index-pattern-mode]]
==== TSVB Index pattern mode
From 7.13.0, TSVB supports a new mode of creating a chart, the *index pattern mode*.
stratoula marked this conversation as resolved.
Show resolved Hide resolved
It is the default one for new visualizations but it can also be switched for the old implementations:

. Click *Panel options*, then click the gear icon on the *Index pattern* setting.
stratoula marked this conversation as resolved.
Show resolved Hide resolved
. Switch on the *Use only Kibana index patterns* switch
stratoula marked this conversation as resolved.
Show resolved Hide resolved
. Reselect the index pattern from the dropdown and the timefield
stratoula marked this conversation as resolved.
Show resolved Hide resolved

image::images/tsvb_index_pattern_selection_mode.png[Change index pattern selection mode action]

The new mode unlocks many new features such as:
stratoula marked this conversation as resolved.
Show resolved Hide resolved
* Runtime fields
* Url drilldowns
stratoula marked this conversation as resolved.
Show resolved Hide resolved
* Create filters by clicking on a timeseries chart
stratoula marked this conversation as resolved.
Show resolved Hide resolved
* Better performance
* and more features to come
stratoula marked this conversation as resolved.
Show resolved Hide resolved

The old mode, which the users can create a TSVB chart by applying an es index string, is considered as deprecated and is going to be removed in the future.
stratoula marked this conversation as resolved.
Show resolved Hide resolved

[float]
[[tsvb-faq]]
==== Frequently asked questions
Expand Down
1 change: 1 addition & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export class DocLinksService {
lensPanels: `${KIBANA_DOCS}lens.html`,
maps: `${ELASTIC_WEBSITE_URL}maps`,
vega: `${KIBANA_DOCS}vega.html`,
tsvbIndexPatternMode: `${KIBANA_DOCS}tsvb.html#tsvb-index-pattern-mode`,
},
observability: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/index.html`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import uuid from 'uuid/v4';
import { share } from 'rxjs/operators';
import { isEqual, isEmpty, debounce } from 'lodash';
import { EventEmitter } from 'events';

import { EuiCallOut, EuiLink, EuiButton, EuiFlexGroup } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import type { IUiSettingsClient } from 'kibana/public';
import {
Vis,
Expand Down Expand Up @@ -55,6 +56,7 @@ interface TimeseriesEditorState {
extractedIndexPatterns: IndexPatternValue[];
model: TimeseriesVisParams;
visFields?: VisFields;
hideCallout: boolean;
}

export class VisEditor extends Component<TimeseriesEditorProps, TimeseriesEditorState> {
Expand All @@ -70,6 +72,9 @@ export class VisEditor extends Component<TimeseriesEditorProps, TimeseriesEditor
autoApply: true,
dirty: false,
defaultIndex: null,
hideCallout:
this.props.vis.params.use_kibana_indexes ||
Boolean(this.localStorage.get('CALLOUT_HIDDEN')),
model: {
// we should set default value for 'time_range_mode' in model so that when user save visualization
// we set right mode in savedObject
Expand Down Expand Up @@ -163,8 +168,16 @@ export class VisEditor extends Component<TimeseriesEditorProps, TimeseriesEditor
this.visDataSubject.next(visData);
};

dismissNotice = () => {
this.localStorage.set('CALLOUT_HIDDEN', true);
stratoula marked this conversation as resolved.
Show resolved Hide resolved
this.setState({
hideCallout: true,
});
};

render() {
const { model, visFields } = this.state;
const { model, visFields, hideCallout } = this.state;
const indexPatternModeLink = getCoreStart().docLinks.links.visualize.tsvbIndexPatternMode;

if (!visFields) {
// wait for fields initialization
Expand All @@ -182,6 +195,48 @@ export class VisEditor extends Component<TimeseriesEditorProps, TimeseriesEditor
>
<DefaultIndexPatternContext.Provider value={this.state.defaultIndex}>
<div className="tvbEditor" data-test-subj="tvbVisEditor">
{!hideCallout && (
<EuiCallOut
stratoula marked this conversation as resolved.
Show resolved Hide resolved
title={
<FormattedMessage
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.notificationTitle"
defaultMessage="New: Index pattern mode"
/>
}
iconType="cheer"
size="s"
>
<p>
<FormattedMessage
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.notificationMessage"
defaultMessage="Introduced on 7.13.0, TSVB supports a new mode of creating charts, the index pattern mode. Check it out {indexPatternModeLink}."
values={{
indexPatternModeLink: (
<EuiLink href={indexPatternModeLink} target="_blank" external>
<FormattedMessage
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.link"
defaultMessage="here."
/>
</EuiLink>
),
}}
/>
</p>
<EuiFlexGroup gutterSize="none">
<EuiButton
size="s"
onClick={() => {
this.dismissNotice();
}}
>
<FormattedMessage
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.dismissNoticeButtonText"
defaultMessage="Dismiss message"
/>
</EuiButton>
</EuiFlexGroup>
</EuiCallOut>
)}
<div className="tvbEditor--hideForReporting">
<VisPicker currentVisType={model.type} onChange={this.handleChange} />
</div>
Expand Down