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

[Observability] Exploratory View initial skeleton #94426

Merged
merged 86 commits into from
Apr 5, 2021
Merged
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
9e7c169
wip
shahzad31 Mar 7, 2021
12c028f
Merge branch 'master' into exploratry-view
shahzad31 Mar 8, 2021
b089a87
Save progress
shahzad31 Mar 10, 2021
501a166
Merge branch 'master' into exploratry-view
shahzad31 Mar 10, 2021
3ed7c82
breakpoint
shahzad31 Mar 11, 2021
c303383
Merge branch 'master' into exploratry-view
shahzad31 Mar 11, 2021
73b2c41
more views
shahzad31 Mar 15, 2021
9166efc
add def col
shahzad31 Mar 15, 2021
3783b5f
Merge branch 'master' into exploratry-view
shahzad31 Mar 15, 2021
04316ab
update
shahzad31 Mar 15, 2021
9677edd
Merge branch 'master' into exploratry-view
shahzad31 Mar 15, 2021
e715ace
wip
shahzad31 Mar 15, 2021
5d3605f
Merge branch 'master' into exploratry-view
shahzad31 Mar 15, 2021
3d824be
wip
shahzad31 Mar 16, 2021
1db17ad
Merge branch 'master' into exploratry-view
shahzad31 Mar 16, 2021
306fa3f
wip
shahzad31 Mar 17, 2021
e2f281f
Merge branch 'master' into exploratry-view
shahzad31 Mar 17, 2021
700cdd7
fix more stuff
shahzad31 Mar 18, 2021
ee82e77
Merge branch 'master' into exploratry-view
shahzad31 Mar 19, 2021
1d5a7c8
update
shahzad31 Mar 21, 2021
91bcf95
Merge branch 'master' into exploratry-view
shahzad31 Mar 22, 2021
2ec3924
update filters
shahzad31 Mar 22, 2021
4f8f118
update
shahzad31 Mar 22, 2021
b2fbc2b
wip
shahzad31 Mar 23, 2021
e5c1e59
update
shahzad31 Mar 23, 2021
c14a2e5
update asset
shahzad31 Mar 24, 2021
165a540
update
shahzad31 Mar 24, 2021
e3b3eb5
update eslint
shahzad31 Mar 24, 2021
4b8aab4
Merge branch 'master' into exploratry-view
shahzad31 Mar 24, 2021
84c2abe
udate
shahzad31 Mar 24, 2021
75b87e1
wip
shahzad31 Mar 24, 2021
533698a
update plugin start/setup
shahzad31 Mar 24, 2021
f60a7f5
Merge branch 'master' into exploratry-view
shahzad31 Mar 24, 2021
805f062
update
shahzad31 Mar 24, 2021
8952b21
Merge branch 'master' into update-obsv-plugin-setup
shahzad31 Mar 24, 2021
68282c6
fix types
shahzad31 Mar 24, 2021
9886ef6
Merge branch 'master' into update-obsv-plugin-setup
shahzad31 Mar 25, 2021
a2121eb
update types
shahzad31 Mar 25, 2021
4b87ef9
Merge branch 'master' into exploratry-view
shahzad31 Mar 25, 2021
ad9574f
Merge branch 'master' into exploratry-view
shahzad31 Mar 25, 2021
52cbefa
fix type
shahzad31 Mar 25, 2021
a6dcd15
fix types
shahzad31 Mar 25, 2021
7af9e25
fix types
shahzad31 Mar 25, 2021
6c1a330
fix types
shahzad31 Mar 25, 2021
89d87e0
Merge branch 'master' into exploratry-view
shahzad31 Mar 25, 2021
a85d735
Merge branch 'master' into exploratry-view
shahzad31 Mar 25, 2021
3c670f2
fix test
shahzad31 Mar 25, 2021
d26f306
update test
shahzad31 Mar 25, 2021
ec98c08
Merge branch 'update-obsv-plugin-setup' into exploratry-view
shahzad31 Mar 25, 2021
43887f1
update types
shahzad31 Mar 26, 2021
967888a
fix types
shahzad31 Mar 26, 2021
8e5109f
Merge branch 'master' into exploratry-view
shahzad31 Mar 26, 2021
9acecc1
fix issue
shahzad31 Mar 26, 2021
082eaf4
Merge branch 'master' into exploratry-view
shahzad31 Mar 26, 2021
211716b
fix types
shahzad31 Mar 26, 2021
635be8e
test
shahzad31 Mar 26, 2021
50e100f
Merge branch 'master' into exploratry-view
shahzad31 Mar 26, 2021
dbb98c7
update tests
shahzad31 Mar 29, 2021
68d8243
added ests
shahzad31 Mar 29, 2021
1f4a516
update
shahzad31 Mar 29, 2021
31b60b6
Merge branch 'master' into exploratry-view
shahzad31 Mar 30, 2021
0557ad3
update
shahzad31 Mar 30, 2021
c512b3d
Merge branch 'master' into exploratry-view
shahzad31 Mar 30, 2021
e4ce7bd
update labels
shahzad31 Mar 30, 2021
1b57eff
Merge branch 'master' into exploratry-view
shahzad31 Mar 30, 2021
17120a6
Merge branch 'master' into exploratry-view
shahzad31 Mar 30, 2021
1710e5d
PR feedback
shahzad31 Mar 31, 2021
f162f96
update
shahzad31 Mar 31, 2021
c43e925
add loading state
shahzad31 Mar 31, 2021
adfefa3
fix types
shahzad31 Mar 31, 2021
e004a7a
fix types
shahzad31 Mar 31, 2021
01a1559
update test
shahzad31 Mar 31, 2021
5406e75
Merge branch 'master' into exploratry-view
shahzad31 Mar 31, 2021
2b5229b
update test
shahzad31 Mar 31, 2021
f894f18
update constants
shahzad31 Mar 31, 2021
7050460
fix type
shahzad31 Mar 31, 2021
06f305b
Merge branch 'master' into exploratry-view
kibanamachine Apr 1, 2021
62070d4
Merge branch 'master' into exploratry-view
shahzad31 Apr 1, 2021
9090e64
update mock
shahzad31 Apr 1, 2021
3e29da3
Merge branch 'exploratry-view' of https://github.com/shahzad31/kibana…
shahzad31 Apr 1, 2021
25c45e0
update test file
shahzad31 Apr 1, 2021
c18c829
debug tests
shahzad31 Apr 1, 2021
99d3596
Merge branch 'master' into exploratry-view
shahzad31 Apr 2, 2021
679a4a8
Merge branch 'master' into exploratry-view
shahzad31 Apr 3, 2021
9c86621
Merge branch 'master' into exploratry-view
shahzad31 Apr 5, 2021
7e5cf29
update plugin setup
shahzad31 Apr 5, 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
Prev Previous commit
Next Next commit
update labels
shahzad31 committed Mar 30, 2021

Verified

This commit was signed with the committer’s verified signature.
pvlugter Peter Vlugter
commit e4ce7bd12df605d25bc3a0fe53db431376604607
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
*/

import React from 'react';
import { i18n } from '@kbn/i18n';
import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
import { TypedLensByValueInput } from '../../../../../../lens/public';
import { useKibana } from '../../../../../../../../src/plugins/kibana_react/public';
@@ -29,7 +30,12 @@ export function ExploratoryViewHeader({ seriesId, lensAttributes }: Props) {
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem>
<EuiText>
<h2>{DataViewLabels[series.reportType] ?? 'Exploratory view'}</h2>
<h2>
{DataViewLabels[series.reportType] ??
i18n.translate('xpack.observability.expView.heading.label', {
defaultMessage: 'Exploratory view',
})}
</h2>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
@@ -47,7 +53,9 @@ export function ExploratoryViewHeader({ seriesId, lensAttributes }: Props) {
}
}}
>
Open in Lens
{i18n.translate('xpack.observability.expView.heading.openInLens', {
defaultMessage: 'Open in Lens',
})}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@

import React, { useState } from 'react';

import { i18n } from '@kbn/i18n';
import { EuiButton, EuiBasicTable, EuiSpacer, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import styled from 'styled-components';
import { AppDataType, ReportViewTypeId, ReportViewTypes, SeriesUrl } from '../types';
@@ -64,33 +65,43 @@ export function SeriesBuilder() {

const columns = [
{
name: 'DataType',
name: i18n.translate('xpack.observability.expView.seriesBuilder.dataType', {
defaultMessage: 'Data Type',
}),
width: '20%',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't all add up to 100%. Are they meant to wrap?

render: (val: string) => <DataTypesCol />,
},
{
name: 'Report',
name: i18n.translate('xpack.observability.expView.seriesBuilder.report', {
defaultMessage: 'Report',
}),
width: '20%',
render: (val: string) => (
<ReportTypesCol reportTypes={dataType ? ReportTypes[dataType] : []} />
),
},
{
name: 'Definition',
name: i18n.translate('xpack.observability.expView.seriesBuilder.definition', {
defaultMessage: 'Definition',
}),
width: '30%',
render: (val: string) =>
reportType && indexPattern ? (
<ReportDefinitionCol dataViewSeries={getDataViewSeries()} />
) : null,
},
{
name: 'Filters',
name: i18n.translate('xpack.observability.expView.seriesBuilder.filters', {
defaultMessage: 'Filters',
}),
width: '25%',
render: (val: string) =>
reportType && indexPattern ? <ReportFilters dataViewSeries={getDataViewSeries()} /> : null,
},
{
name: 'Breakdowns',
name: i18n.translate('xpack.observability.expView.seriesBuilder.breakdown', {
defaultMessage: 'Breakdowns',
}),
width: '25%',
field: 'id',
render: (val: string) =>
@@ -138,19 +149,23 @@ export function SeriesBuilder() {
<EuiFlexGroup justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiButton fill iconType="plus" color="primary" onClick={addSeries}>
Add
{i18n.translate('xpack.observability.expView.seriesBuilder.add', {
defaultMessage: 'Add',
})}
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
iconType="cross"
color="danger"
color="text"
onClick={() => {
removeSeries(NEW_SERIES_KEY);
setIsFlyoutVisible(false);
}}
>
Cancel
{i18n.translate('xpack.observability.expView.seriesBuilder.cancel', {
defaultMessage: 'Cancel',
})}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
@@ -169,7 +184,9 @@ export function SeriesBuilder() {
onClick={() => setIsFlyoutVisible((prevState) => !prevState)}
disabled={allSeriesIds.length > 0}
>
{'Add series'}
{i18n.translate('xpack.observability.expView.seriesBuilder.addSeries', {
defaultMessage: 'Add series',
})}
</EuiButton>
<EuiSpacer />
</>
Original file line number Diff line number Diff line change
@@ -40,7 +40,9 @@ export function SeriesChartTypes({
onChange={onChange}
value={seriesType}
excludeChartTypes={['bar_percentage_stacked']}
label={'Chart type'}
label={i18n.translate('xpack.observability.expView.chartTypes.label', {
defaultMessage: 'Chart type',
})}
/>
);
}
Original file line number Diff line number Diff line change
@@ -6,26 +6,35 @@
*/

import React, { useState } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiButton, EuiButtonGroup, EuiPopover } from '@elastic/eui';
import { useUrlStorage } from '../../hooks/use_url_strorage';
import { OperationType } from '../../../../../../../lens/public';

const toggleButtons = [
{
id: `avg`,
label: 'Average',
label: i18n.translate('xpack.observability.expView.metricsSelect.average', {
defaultMessage: 'Average',
}),
},
{
id: `median`,
label: 'Median',
label: i18n.translate('xpack.observability.expView.metricsSelect.median', {
defaultMessage: 'Median',
}),
},
{
id: `95th`,
label: '95th Percentile',
label: i18n.translate('xpack.observability.expView.metricsSelect.9thPercentile', {
defaultMessage: '95th Percentile',
}),
},
{
id: `99th`,
label: '99th Percentile',
label: i18n.translate('xpack.observability.expView.metricsSelect.99thPercentile', {
defaultMessage: '99th Percentile',
}),
},
];

Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import React, { useState, Fragment } from 'react';
import {
EuiButton,
@@ -58,7 +59,9 @@ export function SeriesFilter({ series, isNew, seriesId, defaultFilters = [] }: P
isDisabled={disabled}
size="s"
>
Add filter
{i18n.translate('xpack.observability.expView.seriesEditor.addFilter', {
defaultMessage: 'Add filter',
})}
</EuiButtonEmpty>
);

@@ -125,7 +128,9 @@ export function SeriesFilter({ series, isNew, seriesId, defaultFilters = [] }: P
isDisabled={disabled}
size="s"
>
Clear filters
{i18n.translate('xpack.observability.expView.seriesEditor.clearFilter', {
defaultMessage: 'Clear filters',
})}
</EuiButtonEmpty>
</EuiFlexItem>
)}
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
*/

import React from 'react';
import { i18n } from '@kbn/i18n';
import { EuiBasicTable, EuiIcon, EuiSpacer, EuiText } from '@elastic/eui';
import { SeriesFilter } from './columns/series_filter';
import { ActionsCol } from './columns/actions_col';
@@ -23,7 +24,9 @@ export function SeriesEditor() {

const columns = [
{
name: 'Name',
name: i18n.translate('xpack.observability.expView.seriesEditor.name', {
defaultMessage: 'Name',
}),
field: 'id',
width: '15%',
render: (val: string) => (
@@ -36,15 +39,19 @@ export function SeriesEditor() {
...(firstSeriesId !== NEW_SERIES_KEY
? [
{
name: 'Filter',
name: i18n.translate('xpack.observability.expView.seriesEditor.filters', {
defaultMessage: 'Filters',
}),
field: 'defaultFilters',
width: '25%',
render: (defaultFilters: string[], series: DataSeries) => (
<SeriesFilter defaultFilters={defaultFilters} seriesId={series.id} series={series} />
),
},
{
name: 'Breakdowns',
name: i18n.translate('xpack.observability.expView.seriesEditor.breakdowns', {
defaultMessage: 'Breakdowns',
}),
field: 'breakdowns',
width: '15%',
render: (val: string[], item: DataSeries) => (
@@ -61,7 +68,13 @@ export function SeriesEditor() {
]
: []),
{
name: <div>Time</div>,
name: (
<div>
{i18n.translate('xpack.observability.expView.seriesEditor.time', {
defaultMessage: 'Time',
})}
</div>
),
width: '20%',
field: 'id',
align: 'right' as const,
@@ -71,7 +84,9 @@ export function SeriesEditor() {
...(firstSeriesId !== NEW_SERIES_KEY
? [
{
name: 'Actions',
name: i18n.translate('xpack.observability.expView.seriesEditor.actions', {
defaultMessage: 'Actions',
}),
align: 'center' as const,
width: '5%',
field: 'id',
@@ -108,7 +123,9 @@ export function SeriesEditor() {
rowHeader="firstName"
columns={columns}
rowProps={() => (firstSeriesId === NEW_SERIES_KEY ? {} : { height: 100 })}
noItemsMessage={'No series found, please add a series.'}
noItemsMessage={i18n.translate('xpack.observability.expView.seriesEditor.notFound', {
defaultMessage: 'No series found, please add a series.',
})}
cellProps={{
style: {
verticalAlign: 'top',
2 changes: 1 addition & 1 deletion x-pack/plugins/observability/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ export class Plugin
plugins: ObservabilityPublicPluginsSetup
) {
const category = DEFAULT_APP_CATEGORIES.observability;
const euiIconType = 'logo-observability';
const euiIconType = 'logoObservability';
const mount = async (params: AppMountParameters<unknown>) => {
// Load application bundle
const { renderApp } = await import('./application');