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

[Exploratory view] use percentages in distribution chart #103080

Merged
merged 23 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from 20 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
3 changes: 3 additions & 0 deletions x-pack/plugins/lens/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ export type {
CounterRateIndexPatternColumn,
DerivativeIndexPatternColumn,
MovingAverageIndexPatternColumn,
FormulaIndexPatternColumn,
MathIndexPatternColumn,
OverallSumIndexPatternColumn,
} from './indexpattern_datasource/types';
export type { LensEmbeddableInput } from './editor_frame_service/embeddable';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export {
export { CountIndexPatternColumn } from './count';
export { LastValueIndexPatternColumn } from './last_value';
export { RangeIndexPatternColumn } from './ranges';
export { FormulaIndexPatternColumn, MathIndexPatternColumn } from './formula';

// List of all operation definitions registered to this data source.
// If you want to implement a new operation, add the definition to this array and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ export {
OverallMinIndexPatternColumn,
OverallMaxIndexPatternColumn,
OverallAverageIndexPatternColumn,
FormulaIndexPatternColumn,
MathIndexPatternColumn,
} from './definitions';
3 changes: 3 additions & 0 deletions x-pack/plugins/lens/public/indexpattern_datasource/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export {
CounterRateIndexPatternColumn,
DerivativeIndexPatternColumn,
MovingAverageIndexPatternColumn,
FormulaIndexPatternColumn,
MathIndexPatternColumn,
OverallSumIndexPatternColumn,
} from './operations';

export type DraggedField = DragDropIdentifier & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* 2.0.
*/

import { ConfigProps, DataSeries } from '../../types';
import { ConfigProps, SeriesConfig } from '../../types';
import { FieldLabels } from '../constants';
import { buildPhraseFilter } from '../utils';
import { TRANSACTION_DURATION } from '../constants/elasticsearch_fieldnames';

export function getServiceLatencyLensConfig({ indexPattern }: ConfigProps): DataSeries {
export function getServiceLatencyLensConfig({ indexPattern }: ConfigProps): SeriesConfig {
return {
reportType: 'kpi-over-time',
defaultSeriesType: 'line',
Expand All @@ -26,19 +26,19 @@ export function getServiceLatencyLensConfig({ indexPattern }: ConfigProps): Data
},
],
hasOperationType: true,
defaultFilters: [
filterFields: [
'user_agent.name',
'user_agent.os.name',
'client.geo.country_name',
'user_agent.device.name',
],
breakdowns: [
breakdownFields: [
'user_agent.name',
'user_agent.os.name',
'client.geo.country_name',
'user_agent.device.name',
],
filters: buildPhraseFilter('transaction.type', 'request', indexPattern),
baseFilters: buildPhraseFilter('transaction.type', 'request', indexPattern),
labels: { ...FieldLabels, [TRANSACTION_DURATION]: 'Latency' },
reportDefinitions: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
export const DEFAULT_TIME = { from: 'now-1h', to: 'now' };

export const RECORDS_FIELD = 'Records';
export const RECORDS_PERCENTAGE_FIELD = 'RecordsPercentage';

export const FieldLabels: Record<string, string> = {
'user_agent.name': BROWSER_FAMILY_LABEL,
Expand Down
Loading