mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Exploratory view] Update constant from lens (#124257)
This commit is contained in:
parent
2c9f8a956c
commit
2781a855e4
10 changed files with 28 additions and 15 deletions
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
|
@ -141,10 +141,11 @@
|
|||
/x-pack/test/functional/es_archives/uptime @elastic/uptime
|
||||
/x-pack/test/functional/services/uptime @elastic/uptime
|
||||
/x-pack/test/api_integration/apis/uptime @elastic/uptime
|
||||
/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/uptime
|
||||
|
||||
# Client Side Monitoring / Uptime (lives in APM directories but owned by Uptime)
|
||||
/x-pack/plugins/apm/public/application/uxApp.tsx @elastic/uptime
|
||||
/x-pack/plugins/apm/public/components/app/RumDashboard @elastic/uptime
|
||||
/x-pack/plugins/apm/public/components/app/rum_dashboard @elastic/uptime
|
||||
/x-pack/plugins/apm/server/lib/rum_client @elastic/uptime
|
||||
/x-pack/plugins/apm/server/routes/rum_client.ts @elastic/uptime
|
||||
/x-pack/plugins/apm/server/projections/rum_page_load_transactions.ts @elastic/uptime
|
||||
|
|
|
@ -9,6 +9,7 @@ import React from 'react';
|
|||
import { EuiHeaderLinks, EuiHeaderLink, EuiToolTip } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import {
|
||||
RECORDS_FIELD,
|
||||
createExploratoryViewUrl,
|
||||
HeaderMenuPortal,
|
||||
} from '../../../../../../observability/public';
|
||||
|
@ -52,7 +53,7 @@ export function UXActionMenu({
|
|||
reportDefinitions: {
|
||||
[SERVICE_NAME]: serviceName ? [serviceName] : [],
|
||||
},
|
||||
selectedMetricField: 'Records',
|
||||
selectedMetricField: RECORDS_FIELD,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
"data",
|
||||
"dataViews",
|
||||
"kibanaReact",
|
||||
"kibanaUtils"
|
||||
"kibanaUtils",
|
||||
"lens"
|
||||
],
|
||||
"extraPublicDirs": [
|
||||
"common"
|
||||
|
|
|
@ -63,10 +63,11 @@ import {
|
|||
SYNTHETICS_STEP_DURATION,
|
||||
SYNTHETICS_STEP_NAME,
|
||||
} from './field_names/synthetics';
|
||||
import { DOCUMENT_FIELD_NAME } from '../../../../../../../lens/common/constants';
|
||||
|
||||
export const DEFAULT_TIME = { from: 'now-1h', to: 'now' };
|
||||
|
||||
export const RECORDS_FIELD = 'Records';
|
||||
export const RECORDS_FIELD = DOCUMENT_FIELD_NAME;
|
||||
export const RECORDS_PERCENTAGE_FIELD = 'RecordsPercentage';
|
||||
|
||||
export const FieldLabels: Record<string, string> = {
|
||||
|
|
|
@ -394,7 +394,7 @@ describe('Lens Attribute', () => {
|
|||
label: 'Part of count() / overall_sum(count())',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
'y-axis-column-layer0X1': {
|
||||
customLabel: true,
|
||||
|
@ -408,7 +408,7 @@ describe('Lens Attribute', () => {
|
|||
label: 'Part of count() / overall_sum(count())',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
'y-axis-column-layer0X2': {
|
||||
customLabel: true,
|
||||
|
@ -609,7 +609,7 @@ describe('Lens Attribute', () => {
|
|||
label: 'Part of count() / overall_sum(count())',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
'y-axis-column-layer0X1': {
|
||||
customLabel: true,
|
||||
|
@ -623,7 +623,7 @@ describe('Lens Attribute', () => {
|
|||
label: 'Part of count() / overall_sum(count())',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
'y-axis-column-layer0X2': {
|
||||
customLabel: true,
|
||||
|
|
|
@ -12,6 +12,7 @@ import {
|
|||
FormulaIndexPatternColumn,
|
||||
OverallSumIndexPatternColumn,
|
||||
} from '../../../../../../../lens/public';
|
||||
import { RECORDS_FIELD } from '../constants';
|
||||
|
||||
export function getDistributionInPercentageColumn({
|
||||
label,
|
||||
|
@ -50,7 +51,7 @@ export function getDistributionInPercentageColumn({
|
|||
operationType: 'count',
|
||||
isBucketed: false,
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
customLabel: true,
|
||||
filter: { query: columnFilter ?? '', language: 'kuery' },
|
||||
};
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { RECORDS_FIELD } from '../constants';
|
||||
|
||||
export const sampleAttribute = {
|
||||
description: '',
|
||||
references: [
|
||||
|
@ -88,7 +90,7 @@ export const sampleAttribute = {
|
|||
label: 'Part of count() / overall_sum(count())',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
'y-axis-column-layer0X1': {
|
||||
customLabel: true,
|
||||
|
@ -102,7 +104,7 @@ export const sampleAttribute = {
|
|||
label: 'Part of count() / overall_sum(count())',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
'y-axis-column-layer0X2': {
|
||||
customLabel: true,
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { RECORDS_FIELD } from '../constants';
|
||||
|
||||
export const sampleAttributeCoreWebVital = {
|
||||
description: '',
|
||||
references: [
|
||||
|
@ -59,7 +61,7 @@ export const sampleAttributeCoreWebVital = {
|
|||
label: 'Average',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
'y-axis-column-2': {
|
||||
dataType: 'number',
|
||||
|
@ -71,7 +73,7 @@ export const sampleAttributeCoreWebVital = {
|
|||
label: 'Poor',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
'y-axis-column-layer0': {
|
||||
dataType: 'number',
|
||||
|
@ -84,7 +86,7 @@ export const sampleAttributeCoreWebVital = {
|
|||
label: 'Good',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
},
|
||||
incompleteColumns: {},
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { RECORDS_FIELD } from '../constants';
|
||||
|
||||
export const sampleAttributeKpi = {
|
||||
description: '',
|
||||
references: [
|
||||
|
@ -46,7 +48,7 @@ export const sampleAttributeKpi = {
|
|||
label: 'Page views',
|
||||
operationType: 'count',
|
||||
scale: 'ratio',
|
||||
sourceField: 'Records',
|
||||
sourceField: RECORDS_FIELD,
|
||||
},
|
||||
},
|
||||
incompleteColumns: {},
|
||||
|
|
|
@ -102,5 +102,7 @@ export type { SeriesConfig, ConfigProps } from './components/shared/exploratory_
|
|||
export {
|
||||
ReportTypes,
|
||||
REPORT_METRIC_FIELD,
|
||||
RECORDS_PERCENTAGE_FIELD,
|
||||
RECORDS_FIELD,
|
||||
} from './components/shared/exploratory_view/configurations/constants';
|
||||
export { ExploratoryViewContextProvider } from './components/shared/exploratory_view/contexts/exploratory_view_config';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue