diff --git a/.backportrc.json b/.backportrc.json index f6328c251d7e2..e4b7db154d711 100644 --- a/.backportrc.json +++ b/.backportrc.json @@ -3,6 +3,7 @@ "repoName": "kibana", "targetBranchChoices": [ "main", + "8.10", "8.9", "8.8", "8.7", @@ -46,7 +47,7 @@ "backport" ], "branchLabelMapping": { - "^v8.10.0$": "main", + "^v8.11.0$": "main", "^v(\\d+).(\\d+).\\d+$": "$1.$2" }, "autoMerge": true, diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index 5da373c8d9a51..898597eabce5d 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -49,8 +49,6 @@ Review important information about the {kib} 8.x releases. [[release-notes-8.9.1]] == {kib} 8.9.1 -coming::[8.9.1] - Review the following information about the {kib} 8.9.1 release. [float] diff --git a/docs/user/ml/index.asciidoc b/docs/user/ml/index.asciidoc index e7a60df8d289e..59f7345923870 100644 --- a/docs/user/ml/index.asciidoc +++ b/docs/user/ml/index.asciidoc @@ -223,3 +223,11 @@ point type selector to filter the results by specific types of change points. [role="screenshot"] image::user/ml/images/ml-change-point-detection-selected.png[Selected change points] + + +You can attach change point charts to a dashboard or a case by using the context +menu. If the split field is selected, you can either select specific charts +(partitions) or set the maximum number of top change points to plot. It's +possible to preserve the applied time range or use the time bound from the page +date picker. You can also add or edit change point charts directly from the +**Dashboard** app. \ No newline at end of file diff --git a/packages/kbn-securitysolution-utils/src/path_validations/index.ts b/packages/kbn-securitysolution-utils/src/path_validations/index.ts index ba17757589613..ac7c17426e723 100644 --- a/packages/kbn-securitysolution-utils/src/path_validations/index.ts +++ b/packages/kbn-securitysolution-utils/src/path_validations/index.ts @@ -33,7 +33,11 @@ export type TrustedAppConditionEntryField = | 'process.hash.*' | 'process.executable.caseless' | 'process.Ext.code_signature'; -export type BlocklistConditionEntryField = 'file.hash.*' | 'file.path' | 'file.Ext.code_signature'; +export type BlocklistConditionEntryField = + | 'file.hash.*' + | 'file.path' + | 'file.Ext.code_signature' + | 'file.path.caseless'; export type AllConditionEntryFields = | TrustedAppConditionEntryField | BlocklistConditionEntryField diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index 45fdb283910b4..c3b1a27491e67 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -30,7 +30,7 @@ export const IGNORE_FILE_GLOBS = [ 'x-pack/plugins/cases/docs/**/*', 'x-pack/plugins/monitoring/public/lib/jquery_flot/**/*', 'x-pack/plugins/fleet/cypress/packages/*.zip', - 'x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/diagnostics/apm-diagnostics-*.json', + '**/apm-diagnostics-*.json', '**/.*', '**/__mocks__/**/*', 'x-pack/docs/**/*', diff --git a/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.test.tsx b/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.test.tsx index 6c1e8bc6d680e..5ec0ac57c574b 100644 --- a/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.test.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.test.tsx @@ -16,17 +16,21 @@ import { import { CoreStart } from '@kbn/core/public'; import { coreMock } from '@kbn/core/public/mocks'; import { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks'; -import { ErrorEmbeddable, IContainer, isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; +import { + ErrorEmbeddable, + IContainer, + isErrorEmbeddable, + ReferenceOrValueEmbeddable, +} from '@kbn/embeddable-plugin/public'; -import { DashboardPanelState } from '../../common'; import { ClonePanelAction } from './clone_panel_action'; import { pluginServices } from '../services/plugin_services'; import { buildMockDashboard, getSampleDashboardPanel } from '../mocks'; import { DashboardContainer } from '../dashboard_container/embeddable/dashboard_container'; let container: DashboardContainer; -let byRefOrValEmbeddable: ContactCardEmbeddable; let genericEmbeddable: ContactCardEmbeddable; +let byRefOrValEmbeddable: ContactCardEmbeddable & ReferenceOrValueEmbeddable; let coreStart: CoreStart; beforeEach(async () => { coreStart = coreMock.createStart(); @@ -58,20 +62,22 @@ beforeEach(async () => { >(CONTACT_CARD_EMBEDDABLE, { firstName: 'RefOrValEmbeddable', }); - const genericContactCardEmbeddable = await container.addNewEmbeddable< + + const nonRefOrValueContactCard = await container.addNewEmbeddable< ContactCardEmbeddableInput, ContactCardEmbeddableOutput, ContactCardEmbeddable >(CONTACT_CARD_EMBEDDABLE, { - firstName: 'NotRefOrValEmbeddable', + firstName: 'Not a refOrValEmbeddable', }); if ( isErrorEmbeddable(refOrValContactCardEmbeddable) || - isErrorEmbeddable(genericContactCardEmbeddable) + isErrorEmbeddable(nonRefOrValueContactCard) ) { throw new Error('Failed to create embeddables'); } else { + genericEmbeddable = nonRefOrValueContactCard; byRefOrValEmbeddable = embeddablePluginMock.mockRefOrValEmbeddable< ContactCardEmbeddable, ContactCardEmbeddableInput @@ -80,14 +86,14 @@ beforeEach(async () => { savedObjectId: 'testSavedObjectId', id: refOrValContactCardEmbeddable.id, }, - mockedByValueInput: { firstName: 'Kibanana', id: refOrValContactCardEmbeddable.id }, + mockedByValueInput: { firstName: 'RefOrValEmbeddable', id: refOrValContactCardEmbeddable.id }, }); - genericEmbeddable = genericContactCardEmbeddable; + jest.spyOn(byRefOrValEmbeddable, 'getInputAsValueType'); } }); test('Clone is incompatible with Error Embeddables', async () => { - const action = new ClonePanelAction(coreStart.savedObjects); + const action = new ClonePanelAction(); const errorEmbeddable = new ErrorEmbeddable('Wow what an awful error', { id: ' 404' }, container); expect(await action.isCompatible({ embeddable: errorEmbeddable })).toBe(false); }); @@ -96,134 +102,65 @@ test('Clone adds a new embeddable', async () => { const dashboard = byRefOrValEmbeddable.getRoot() as IContainer; const originalPanelCount = Object.keys(dashboard.getInput().panels).length; const originalPanelKeySet = new Set(Object.keys(dashboard.getInput().panels)); - const action = new ClonePanelAction(coreStart.savedObjects); + const action = new ClonePanelAction(); await action.execute({ embeddable: byRefOrValEmbeddable }); + expect(Object.keys(container.getInput().panels).length).toEqual(originalPanelCount + 1); const newPanelId = Object.keys(container.getInput().panels).find( (key) => !originalPanelKeySet.has(key) ); expect(newPanelId).toBeDefined(); const newPanel = container.getInput().panels[newPanelId!]; - expect(newPanel.type).toEqual('placeholder'); - // let the placeholder load - await dashboard.untilEmbeddableLoaded(newPanelId!); - await new Promise((r) => process.nextTick(r)); // Allow the current loop of the event loop to run to completion - // now wait for the full embeddable to replace it - const loadedPanel = await dashboard.untilEmbeddableLoaded(newPanelId!); - expect(loadedPanel.type).toEqual(byRefOrValEmbeddable.type); + expect(newPanel.type).toEqual(byRefOrValEmbeddable.type); }); test('Clones a RefOrVal embeddable by value', async () => { const dashboard = byRefOrValEmbeddable.getRoot() as IContainer; - const panel = dashboard.getInput().panels[byRefOrValEmbeddable.id] as DashboardPanelState; - const action = new ClonePanelAction(coreStart.savedObjects); - // @ts-ignore - const newPanel = await action.cloneEmbeddable(panel, byRefOrValEmbeddable); - expect(coreStart.savedObjects.client.get).toHaveBeenCalledTimes(0); - expect(coreStart.savedObjects.client.find).toHaveBeenCalledTimes(0); - expect(coreStart.savedObjects.client.create).toHaveBeenCalledTimes(0); - expect(newPanel.type).toEqual(byRefOrValEmbeddable.type); -}); + const originalPanelKeySet = new Set(Object.keys(dashboard.getInput().panels)); + const action = new ClonePanelAction(); + await action.execute({ embeddable: byRefOrValEmbeddable }); + const newPanelId = Object.keys(container.getInput().panels).find( + (key) => !originalPanelKeySet.has(key) + ); -test('Clones a non-RefOrVal embeddable by value if the panel does not have a savedObjectId', async () => { - const dashboard = genericEmbeddable.getRoot() as IContainer; - const panel = dashboard.getInput().panels[genericEmbeddable.id] as DashboardPanelState; - const action = new ClonePanelAction(coreStart.savedObjects); - // @ts-ignore - const newPanelWithoutId = await action.cloneEmbeddable(panel, genericEmbeddable); - expect(coreStart.savedObjects.client.get).toHaveBeenCalledTimes(0); - expect(coreStart.savedObjects.client.find).toHaveBeenCalledTimes(0); - expect(coreStart.savedObjects.client.create).toHaveBeenCalledTimes(0); - expect(newPanelWithoutId.type).toEqual(genericEmbeddable.type); -}); + const originalFirstName = ( + container.getInput().panels[byRefOrValEmbeddable.id].explicitInput as ContactCardEmbeddableInput + ).firstName; -test('Clones a non-RefOrVal embeddable by reference if the panel has a savedObjectId', async () => { - const dashboard = genericEmbeddable.getRoot() as IContainer; - const panel = dashboard.getInput().panels[genericEmbeddable.id] as DashboardPanelState; - panel.explicitInput.savedObjectId = 'holySavedObjectBatman'; - const action = new ClonePanelAction(coreStart.savedObjects); - // @ts-ignore - const newPanel = await action.cloneEmbeddable(panel, genericEmbeddable); - expect(coreStart.savedObjects.client.get).toHaveBeenCalledTimes(1); - expect(coreStart.savedObjects.client.find).toHaveBeenCalledTimes(1); - expect(coreStart.savedObjects.client.create).toHaveBeenCalledTimes(1); - expect(newPanel.type).toEqual(genericEmbeddable.type); + const newFirstName = ( + container.getInput().panels[newPanelId!].explicitInput as ContactCardEmbeddableInput + ).firstName; + + expect(byRefOrValEmbeddable.getInputAsValueType).toHaveBeenCalled(); + + expect(originalFirstName).toEqual(newFirstName); + expect(container.getInput().panels[newPanelId!].type).toEqual(byRefOrValEmbeddable.type); }); -test('Gets a unique title from the saved objects library', async () => { +test('Clones a non RefOrVal embeddable by value', async () => { const dashboard = genericEmbeddable.getRoot() as IContainer; - const panel = dashboard.getInput().panels[genericEmbeddable.id] as DashboardPanelState; - panel.explicitInput.savedObjectId = 'holySavedObjectBatman'; - coreStart.savedObjects.client.find = jest.fn().mockImplementation(({ search }) => { - if (search === '"testFirstClone"') { - return { - savedObjects: [ - { - attributes: { title: 'testFirstClone' }, - get: jest.fn().mockReturnValue('testFirstClone'), - }, - ], - total: 1, - }; - } else if (search === '"testBeforePageLimit"') { - return { - savedObjects: [ - { - attributes: { title: 'testBeforePageLimit (copy 9)' }, - get: jest.fn().mockReturnValue('testBeforePageLimit (copy 9)'), - }, - ], - total: 10, - }; - } else if (search === '"testMaxLogic"') { - return { - savedObjects: [ - { - attributes: { title: 'testMaxLogic (copy 10000)' }, - get: jest.fn().mockReturnValue('testMaxLogic (copy 10000)'), - }, - ], - total: 2, - }; - } else if (search === '"testAfterPageLimit"') { - return { total: 11 }; - } - }); - - const action = new ClonePanelAction(coreStart.savedObjects); - // @ts-ignore - expect(await action.getCloneTitle(genericEmbeddable, 'testFirstClone')).toEqual( - 'testFirstClone (copy)' - ); - // @ts-ignore - expect(await action.getCloneTitle(genericEmbeddable, 'testBeforePageLimit')).toEqual( - 'testBeforePageLimit (copy 10)' - ); - // @ts-ignore - expect(await action.getCloneTitle(genericEmbeddable, 'testBeforePageLimit (copy 9)')).toEqual( - 'testBeforePageLimit (copy 10)' - ); - // @ts-ignore - expect(await action.getCloneTitle(genericEmbeddable, 'testMaxLogic')).toEqual( - 'testMaxLogic (copy 10001)' - ); - // @ts-ignore - expect(await action.getCloneTitle(genericEmbeddable, 'testAfterPageLimit')).toEqual( - 'testAfterPageLimit (copy 11)' - ); - // @ts-ignore - expect(await action.getCloneTitle(genericEmbeddable, 'testAfterPageLimit (copy 10)')).toEqual( - 'testAfterPageLimit (copy 11)' - ); - // @ts-ignore - expect(await action.getCloneTitle(genericEmbeddable, 'testAfterPageLimit (copy 10000)')).toEqual( - 'testAfterPageLimit (copy 11)' + const originalPanelKeySet = new Set(Object.keys(dashboard.getInput().panels)); + const action = new ClonePanelAction(); + await action.execute({ embeddable: genericEmbeddable }); + const newPanelId = Object.keys(container.getInput().panels).find( + (key) => !originalPanelKeySet.has(key) ); + + const originalFirstName = ( + container.getInput().panels[genericEmbeddable.id].explicitInput as ContactCardEmbeddableInput + ).firstName; + + const newFirstName = ( + container.getInput().panels[newPanelId!].explicitInput as ContactCardEmbeddableInput + ).firstName; + + expect(originalFirstName).toEqual(newFirstName); + expect(container.getInput().panels[newPanelId!].type).toEqual(genericEmbeddable.type); }); test('Gets a unique title from the dashboard', async () => { - const dashboard = genericEmbeddable.getRoot() as DashboardContainer; - const action = new ClonePanelAction(coreStart.savedObjects); + const dashboard = byRefOrValEmbeddable.getRoot() as DashboardContainer; + const action = new ClonePanelAction(); // @ts-ignore expect(await action.getCloneTitle(byRefOrValEmbeddable, '')).toEqual(''); diff --git a/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx b/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx index cd65f3b9cff45..e028d8f387312 100644 --- a/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx +++ b/src/plugins/dashboard/public/dashboard_actions/clone_panel_action.tsx @@ -6,11 +6,8 @@ * Side Public License, v 1. */ -import _ from 'lodash'; import { v4 as uuidv4 } from 'uuid'; - -// TODO Remove this usage of the SavedObjectsStart contract. -import { SavedObjectsStart } from '@kbn/core/public'; +import { filter, map, max } from 'lodash'; import { ViewMode, @@ -18,21 +15,17 @@ import { IEmbeddable, PanelNotFoundError, EmbeddableInput, - SavedObjectEmbeddableInput, isErrorEmbeddable, isReferenceOrValueEmbeddable, } from '@kbn/embeddable-plugin/public'; import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; -import type { SavedObject } from '@kbn/saved-objects-plugin/public'; -import { - placePanelBeside, - IPanelPlacementBesideArgs, -} from '../dashboard_container/component/panel/dashboard_panel_placement'; import { type DashboardPanelState } from '../../common'; import { pluginServices } from '../services/plugin_services'; +import { createPanelState } from '../dashboard_container/component/panel'; import { dashboardClonePanelActionStrings } from './_dashboard_actions_strings'; import { DASHBOARD_CONTAINER_TYPE, type DashboardContainer } from '../dashboard_container'; +import { placePanelBeside } from '../dashboard_container/component/panel/dashboard_panel_placement'; export const ACTION_CLONE_PANEL = 'clonePanel'; @@ -47,7 +40,7 @@ export class ClonePanelAction implements Action { private toastsService; - constructor(private savedObjects: SavedObjectsStart) { + constructor() { ({ notifications: { toasts: this.toastsService }, } = pluginServices.getServices()); @@ -89,8 +82,37 @@ export class ClonePanelAction implements Action { throw new PanelNotFoundError(); } - dashboard.showPlaceholderUntil( - this.cloneEmbeddable(panelToClone, embeddable), + const clonedPanelState: PanelState = await (async () => { + const newTitle = await this.getCloneTitle(embeddable, embeddable.getTitle() || ''); + const id = uuidv4(); + if (isReferenceOrValueEmbeddable(embeddable)) { + return { + type: embeddable.type, + explicitInput: { + ...(await embeddable.getInputAsValueType()), + hidePanelTitles: panelToClone.explicitInput.hidePanelTitles, + title: newTitle, + id, + }, + }; + } + return { + type: embeddable.type, + explicitInput: { + ...panelToClone.explicitInput, + title: newTitle, + id, + }, + }; + })(); + this.toastsService.addSuccess({ + title: dashboardClonePanelActionStrings.getSuccessMessage(), + 'data-test-subj': 'addObjectToContainerSuccess', + }); + + const { otherPanels, newPanel } = createPanelState( + clonedPanelState, + dashboard.getInput().panels, placePanelBeside, { width: panelToClone.gridData.w, @@ -98,8 +120,15 @@ export class ClonePanelAction implements Action { currentPanels: dashboard.getInput().panels, placeBesideId: panelToClone.explicitInput.id, scrollToPanel: true, - } as IPanelPlacementBesideArgs + } ); + + dashboard.updateInput({ + panels: { + ...otherPanels, + [newPanel.explicitInput.id]: newPanel, + }, + }); } private async getCloneTitle(embeddable: IEmbeddable, rawTitle: string) { @@ -109,109 +138,20 @@ export class ClonePanelAction implements Action { const cloneRegex = new RegExp(`\\(${clonedTag}\\)`, 'g'); const cloneNumberRegex = new RegExp(`\\(${clonedTag} [0-9]+\\)`, 'g'); const baseTitle = rawTitle.replace(cloneNumberRegex, '').replace(cloneRegex, '').trim(); - let similarTitles: string[]; - if ( - isReferenceOrValueEmbeddable(embeddable) || - !_.has(embeddable.getExplicitInput(), 'savedObjectId') - ) { - const dashboard: DashboardContainer = embeddable.getRoot() as DashboardContainer; - similarTitles = _.filter(await dashboard.getPanelTitles(), (title: string) => { - return title.startsWith(baseTitle); - }); - } else { - const perPage = 10; - const similarSavedObjects = await this.savedObjects.client.find({ - type: embeddable.type, - perPage, - fields: ['title'], - searchFields: ['title'], - search: `"${baseTitle}"`, - }); - if (similarSavedObjects.total <= perPage) { - similarTitles = similarSavedObjects.savedObjects.map((savedObject) => { - return savedObject.get('title'); - }); - } else { - similarTitles = [baseTitle + ` (${clonedTag} ${similarSavedObjects.total - 1})`]; - } - } + const dashboard: DashboardContainer = embeddable.getRoot() as DashboardContainer; + const similarTitles = filter(await dashboard.getPanelTitles(), (title: string) => { + return title.startsWith(baseTitle); + }); - const cloneNumbers = _.map(similarTitles, (title: string) => { + const cloneNumbers = map(similarTitles, (title: string) => { if (title.match(cloneRegex)) return 0; const cloneTag = title.match(cloneNumberRegex); return cloneTag ? parseInt(cloneTag[0].replace(/[^0-9.]/g, ''), 10) : -1; }); - const similarBaseTitlesCount = _.max(cloneNumbers) || 0; + const similarBaseTitlesCount = max(cloneNumbers) || 0; return similarBaseTitlesCount < 0 ? baseTitle + ` (${clonedTag})` : baseTitle + ` (${clonedTag} ${similarBaseTitlesCount + 1})`; } - - private async addCloneToLibrary( - embeddable: IEmbeddable, - objectIdToClone: string - ): Promise { - // TODO: Remove this entire functionality. See https://github.com/elastic/kibana/issues/158632 for more info. - const savedObjectToClone = await this.savedObjects.client.get( - embeddable.type, - objectIdToClone - ); - - // Clone the saved object - const newTitle = await this.getCloneTitle(embeddable, savedObjectToClone.attributes.title); - const clonedSavedObject = await this.savedObjects.client.create( - embeddable.type, - { - ..._.cloneDeep(savedObjectToClone.attributes), - title: newTitle, - }, - { references: _.cloneDeep(savedObjectToClone.references) } - ); - return clonedSavedObject.id; - } - - private async cloneEmbeddable( - panelToClone: DashboardPanelState, - embeddable: IEmbeddable - ): Promise> { - let panelState: PanelState; - if (isReferenceOrValueEmbeddable(embeddable)) { - const newTitle = await this.getCloneTitle(embeddable, embeddable.getTitle() || ''); - panelState = { - type: embeddable.type, - explicitInput: { - ...(await embeddable.getInputAsValueType()), - id: uuidv4(), - title: newTitle, - hidePanelTitles: panelToClone.explicitInput.hidePanelTitles, - }, - version: panelToClone.version, - }; - } else { - panelState = { - type: embeddable.type, - explicitInput: { - ...panelToClone.explicitInput, - id: uuidv4(), - }, - version: panelToClone.version, - }; - - // TODO Remove the entire `addCloneToLibrary` section from here. - if (panelToClone.explicitInput.savedObjectId) { - const clonedSavedObjectId = await this.addCloneToLibrary( - embeddable, - panelToClone.explicitInput.savedObjectId - ); - (panelState.explicitInput as SavedObjectEmbeddableInput).savedObjectId = - clonedSavedObjectId; - } - } - this.toastsService.addSuccess({ - title: dashboardClonePanelActionStrings.getSuccessMessage(), - 'data-test-subj': 'addObjectToContainerSuccess', - }); - return panelState; - } } diff --git a/src/plugins/dashboard/public/dashboard_actions/index.ts b/src/plugins/dashboard/public/dashboard_actions/index.ts index 8376ee1e65171..4f0daff8c3390 100644 --- a/src/plugins/dashboard/public/dashboard_actions/index.ts +++ b/src/plugins/dashboard/public/dashboard_actions/index.ts @@ -34,7 +34,7 @@ export const buildAllDashboardActions = async ({ }: BuildAllDashboardActionsProps) => { const { uiActions, share, presentationUtil, savedObjectsTaggingOss, contentManagement } = plugins; - const clonePanelAction = new ClonePanelAction(core.savedObjects); + const clonePanelAction = new ClonePanelAction(); uiActions.registerAction(clonePanelAction); uiActions.attachAction(CONTEXT_MENU_TRIGGER, clonePanelAction.id); diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/api/index.ts b/src/plugins/dashboard/public/dashboard_container/embeddable/api/index.ts index 2a2d20cc5da14..a97d038d89d95 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/api/index.ts +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/api/index.ts @@ -9,4 +9,4 @@ export { showSettings } from './show_settings'; export { addFromLibrary } from './add_panel_from_library'; export { runSaveAs, runQuickSave, runClone } from './run_save_functions'; -export { addOrUpdateEmbeddable, replacePanel, showPlaceholderUntil } from './panel_management'; +export { addOrUpdateEmbeddable, replacePanel } from './panel_management'; diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/api/panel_management.ts b/src/plugins/dashboard/public/dashboard_container/embeddable/api/panel_management.ts index 7b02001a93c6c..848600a2767d6 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/api/panel_management.ts +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/api/panel_management.ts @@ -14,14 +14,8 @@ import { } from '@kbn/embeddable-plugin/public'; import { v4 as uuidv4 } from 'uuid'; -import { - IPanelPlacementArgs, - PanelPlacementMethod, -} from '../../component/panel/dashboard_panel_placement'; import { DashboardPanelState } from '../../../../common'; -import { createPanelState } from '../../component/panel'; import { DashboardContainer } from '../dashboard_container'; -import { PLACEHOLDER_EMBEDDABLE } from '../../../placeholder_embeddable'; export async function addOrUpdateEmbeddable< EEI extends EmbeddableInput = EmbeddableInput, @@ -89,51 +83,3 @@ export async function replacePanel( await this.updateInput({ panels }); return panelId; } - -export function showPlaceholderUntil( - this: DashboardContainer, - newStateComplete: Promise>, - placementMethod?: PanelPlacementMethod, - placementArgs?: TPlacementMethodArgs -): void { - const originalPanelState = { - type: PLACEHOLDER_EMBEDDABLE, - explicitInput: { - id: uuidv4(), - disabledActions: [ - 'ACTION_CUSTOMIZE_PANEL', - 'CUSTOM_TIME_RANGE', - 'clonePanel', - 'replacePanel', - 'togglePanel', - ], - }, - } as PanelState; - - const { otherPanels, newPanel: placeholderPanelState } = createPanelState( - originalPanelState, - this.input.panels, - placementMethod, - placementArgs - ); - - this.updateInput({ - panels: { - ...otherPanels, - [placeholderPanelState.explicitInput.id]: placeholderPanelState, - }, - }); - - // wait until the placeholder is ready, then replace it with new panel - // this is useful as sometimes panels can load faster than the placeholder one (i.e. by value embeddables) - this.untilEmbeddableLoaded(originalPanelState.explicitInput.id) - .then(() => newStateComplete) - .then(async (newPanelState: Partial) => { - const panelId = await this.replacePanel(placeholderPanelState, newPanelState); - - if (placementArgs?.scrollToPanel) { - this.setScrollToPanelId(panelId); - this.setHighlightPanelId(panelId); - } - }); -} diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx index 636634d23099f..df0e728a16d1b 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx @@ -41,7 +41,6 @@ import { runQuickSave, replacePanel, addFromLibrary, - showPlaceholderUntil, addOrUpdateEmbeddable, } from './api'; @@ -312,7 +311,6 @@ export class DashboardContainer extends Container -
- -
- , - node - ); - } - - public reload() {} -} diff --git a/src/plugins/dashboard/public/placeholder_embeddable/placeholder_embeddable_factory.ts b/src/plugins/dashboard/public/placeholder_embeddable/placeholder_embeddable_factory.ts deleted file mode 100644 index 26cdddbf17d85..0000000000000 --- a/src/plugins/dashboard/public/placeholder_embeddable/placeholder_embeddable_factory.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { i18n } from '@kbn/i18n'; - -import { - EmbeddableFactoryDefinition, - EmbeddableInput, - IContainer, -} from '@kbn/embeddable-plugin/public'; -import { PLACEHOLDER_EMBEDDABLE } from '.'; - -export class PlaceholderEmbeddableFactory implements EmbeddableFactoryDefinition { - public readonly type = PLACEHOLDER_EMBEDDABLE; - - constructor() {} - - public async isEditable() { - return false; - } - - public canCreateNew() { - return false; - } - - public async create(initialInput: EmbeddableInput, parent?: IContainer) { - const { PlaceholderEmbeddable } = await import('./placeholder_embeddable'); - return new PlaceholderEmbeddable(initialInput, parent); - } - - public getDisplayName() { - return i18n.translate('dashboard.placeholder.factory.displayName', { - defaultMessage: 'placeholder', - }); - } -} diff --git a/src/plugins/dashboard/public/placeholder_embeddable/readme.md b/src/plugins/dashboard/public/placeholder_embeddable/readme.md deleted file mode 100644 index 5bdb0569c50f6..0000000000000 --- a/src/plugins/dashboard/public/placeholder_embeddable/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -## What is this for? - -This Placeholder Embeddable is shown when a BY REFERENCE panel (a panel which is linked to a saved object) is cloned using the Dashboard Panel Clone action. - -## Why was it made? - -This was important for the first iteration of the clone feature so that something could be shown while the saved object was being duplicated, but later iterations of that feature automatically unlink panels on clone. By Value panels don't need a placeholder because they load much faster. - -## Can I delete it? - -Currently, the only embeddable type that cannot be loaded by value is the Discover Saved Search Embeddable. Without a placeholder embeddable, the dashboard wouldn't reflow at all until after the saved object clone operation is complete. - -The placeholder embeddable should be removed as soon as the Discover Saved Search Embeddable can be saved By Value. diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index b42a13f858965..a28dbe9c45ae7 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -67,7 +67,6 @@ import { SEARCH_SESSION_ID, } from './dashboard_constants'; import { DashboardMountContextProps } from './dashboard_app/types'; -import { PlaceholderEmbeddableFactory } from './placeholder_embeddable'; import type { FindDashboardsService } from './services/dashboard_content_management/types'; import { CONTENT_ID, LATEST_VERSION } from '../common/content_management'; @@ -220,9 +219,6 @@ export class DashboardPlugin dashboardContainerFactory.type, dashboardContainerFactory ); - - const placeholderFactory = new PlaceholderEmbeddableFactory(); - embeddable.registerEmbeddableFactory(placeholderFactory.type, placeholderFactory); }); this.stopUrlTracking = () => { diff --git a/src/plugins/data_views/docs/openapi/bundled.json b/src/plugins/data_views/docs/openapi/bundled.json index 09515ba8b1ad4..894e5e02f4564 100644 --- a/src/plugins/data_views/docs/openapi/bundled.json +++ b/src/plugins/data_views/docs/openapi/bundled.json @@ -462,6 +462,99 @@ } } }, + "delete": { + "summary": "Delete a runtime field from a data view.", + "operationId": "deleteRuntimeField", + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "tags": [ + "data views" + ], + "parameters": [ + { + "$ref": "#/components/parameters/field_name" + }, + { + "$ref": "#/components/parameters/view_id" + } + ], + "responses": { + "200": { + "description": "Indicates a successful call." + }, + "404": { + "description": "Object is not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/404_response" + } + } + } + } + } + }, + "post": { + "summary": "Update an existing runtime field.", + "operationId": "updateRuntimeField", + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "tags": [ + "data views" + ], + "parameters": [ + { + "$ref": "#/components/parameters/field_name" + }, + { + "$ref": "#/components/parameters/view_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_view": { + "type": "object" + }, + "fields": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "examples": { + "updateRuntimeFieldRequest": { + "$ref": "#/components/examples/update_runtime_field_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, "servers": [ { "url": "https://localhost:5601" @@ -2434,6 +2527,16 @@ } } }, + "update_runtime_field_request": { + "summary": "Update an existing runtime field on a data view.", + "value": { + "runtimeField": { + "script": { + "source": "emit(doc[\"bar\"].value)" + } + } + } + }, "get_default_data_view_response": { "summary": "The get default data view API returns the default data view identifier.", "value": { diff --git a/src/plugins/data_views/docs/openapi/bundled.yaml b/src/plugins/data_views/docs/openapi/bundled.yaml index 01f5b4eb3615c..7fa381a6a3d02 100644 --- a/src/plugins/data_views/docs/openapi/bundled.yaml +++ b/src/plugins/data_views/docs/openapi/bundled.yaml @@ -280,6 +280,62 @@ paths: application/json: schema: $ref: '#/components/schemas/404_response' + delete: + summary: Delete a runtime field from a data view. + operationId: deleteRuntimeField + description: | + This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - data views + parameters: + - $ref: '#/components/parameters/field_name' + - $ref: '#/components/parameters/view_id' + responses: + '200': + description: Indicates a successful call. + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/404_response' + post: + summary: Update an existing runtime field. + operationId: updateRuntimeField + description: | + This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - data views + parameters: + - $ref: '#/components/parameters/field_name' + - $ref: '#/components/parameters/view_id' + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data_view: + type: object + fields: + type: array + items: + type: object + examples: + updateRuntimeFieldRequest: + $ref: '#/components/examples/update_runtime_field_request' + responses: + '200': + description: Indicates a successful call. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + servers: + - url: https://localhost:5601 servers: - url: https://localhost:5601 /api/data_views/default: @@ -1832,6 +1888,12 @@ components: fieldAttrs: {} allowNoIndex: false name: Kibana Sample Data Flights + update_runtime_field_request: + summary: Update an existing runtime field on a data view. + value: + runtimeField: + script: + source: emit(doc["bar"].value) get_default_data_view_response: summary: The get default data view API returns the default data view identifier. value: diff --git a/src/plugins/data_views/docs/openapi/components/examples/update_runtime_field_request.yaml b/src/plugins/data_views/docs/openapi/components/examples/update_runtime_field_request.yaml new file mode 100644 index 0000000000000..4cc70238b5ee8 --- /dev/null +++ b/src/plugins/data_views/docs/openapi/components/examples/update_runtime_field_request.yaml @@ -0,0 +1,9 @@ +summary: Update an existing runtime field on a data view. +value: + { + "runtimeField": { + "script": { + "source": 'emit(doc["bar"].value)' + } + } +} \ No newline at end of file diff --git a/src/plugins/data_views/docs/openapi/paths/api@data_views@data_view@{viewid}@runtime_field@{fieldname}.yaml b/src/plugins/data_views/docs/openapi/paths/api@data_views@data_view@{viewid}@runtime_field@{fieldname}.yaml index 15c5659f09d4a..55f1e14dafb8a 100644 --- a/src/plugins/data_views/docs/openapi/paths/api@data_views@data_view@{viewid}@runtime_field@{fieldname}.yaml +++ b/src/plugins/data_views/docs/openapi/paths/api@data_views@data_view@{viewid}@runtime_field@{fieldname}.yaml @@ -31,5 +31,63 @@ get: application/json: schema: $ref: '../components/schemas/404_response.yaml' + +delete: + summary: Delete a runtime field from a data view. + operationId: deleteRuntimeField + description: > + This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - data views + parameters: + - $ref: '../components/parameters/field_name.yaml' + - $ref: '../components/parameters/view_id.yaml' + responses: + '200': + description: Indicates a successful call. + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '../components/schemas/404_response.yaml' + +post: + summary: Update an existing runtime field. + operationId: updateRuntimeField + description: > + This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - data views + parameters: + - $ref: '../components/parameters/field_name.yaml' + - $ref: '../components/parameters/view_id.yaml' + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data_view: + type: object + fields: + type: array + items: + type: object + examples: + updateRuntimeFieldRequest: + $ref: '../components/examples/update_runtime_field_request.yaml' + responses: + '200': + description: Indicates a successful call. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' + servers: + - url: https://localhost:5601 servers: - url: https://localhost:5601 diff --git a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.webp b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.webp index 59a90157b0111..cf0e40c769470 100644 Binary files a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.webp and b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.webp differ diff --git a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp index b07db2f4c164a..8353e897767fa 100644 Binary files a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp and b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp differ diff --git a/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts b/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts index 687372ed0a559..812052480e8b2 100644 --- a/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts +++ b/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts @@ -34,35 +34,6 @@ export const getSavedObjects = (): SavedObject[] => [ updated_at: '2021-08-05T12:23:57.577Z', version: 'WzI1LDFd', }, - { - attributes: { - description: '', - kibanaSavedObjectMeta: { - searchSourceJSON: '{"query":{"query":"","language":"kuery"},"filter":[]}', - }, - title: i18n.translate('home.sampleData.ecommerceSpec.soldProductsPerDayTitle', { - defaultMessage: '[eCommerce] Sold Products per Day', - }), - uiStateJSON: '{}', - version: 1, - visState: - '{"title":"[eCommerce] Sold Products per Day","type":"metrics","aggs":[],"params":{"time_range_mode":"entire_time_range","id":"61ca57f0-469d-11e7-af02-69e470af7417","type":"gauge","series":[{"id":"61ca57f1-469d-11e7-af02-69e470af7417","color":"#68BC00","split_mode":"everything","metrics":[{"id":"61ca57f2-469d-11e7-af02-69e470af7417","type":"count"},{"id":"fd1e1b90-e4e3-11eb-8234-cb7bfd534fce","type":"math","variables":[{"id":"00374270-e4e4-11eb-8234-cb7bfd534fce","name":"c","field":"61ca57f2-469d-11e7-af02-69e470af7417"}],"script":"params.c / (params._interval / 1000 / 60 / 60 / 24)"}],"separate_axis":0,"axis_position":"right","formatter":"0.0","chart_type":"line","line_width":1,"point_size":1,"fill":0.5,"stacked":"none","label":"Trxns / day","split_color_mode":"gradient","value_template":""}],"time_field":"order_date","interval":"1d","axis_position":"left","axis_formatter":"number","axis_scale":"normal","show_legend":1,"show_grid":1,"gauge_color_rules":[{"value":150,"id":"6da070c0-b891-11e8-b645-195edeb9de84","gauge":"rgba(104,188,0,1)","operator":"gte"},{"value":150,"id":"9b0cdbc0-b891-11e8-b645-195edeb9de84","gauge":"rgba(244,78,59,1)","operator":"lt"}],"gauge_width":"15","gauge_inner_width":"10","gauge_style":"half","filter":"","gauge_max":"300","use_kibana_indexes":true,"hide_last_value_indicator":true,"tooltip_mode":"show_all","drop_last_bucket":0,"isModelInvalid":false,"index_pattern_ref_name":"metrics_0_index_pattern"}}', - }, - id: 'b80e6540-b891-11e8-a6d9-e546fe2bba5f', - coreMigrationVersion: '8.8.0', - typeMigrationVersion: '7.14.0', - managed: false, - references: [ - { - id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', - name: 'metrics_0_index_pattern', - type: 'index-pattern', - }, - ], - type: 'visualization', - updated_at: '2021-08-05T12:23:57.577Z', - version: 'WzIyLDFd', - }, { attributes: { columns: [ @@ -176,7 +147,7 @@ export const getSavedObjects = (): SavedObject[] => [ optionsJSON: '{"useMargins":true,"syncColors":false,"syncCursor":true,"syncTooltips":false,"hidePanelTitles":false}', panelsJSON: - '[{"version":"8.8.0","type":"lens","gridData":{"x":0,"y":21,"w":24,"h":10,"i":"5"},"panelIndex":"5","embeddableConfig":{"attributes":{"title":"[eCommerce] Promotion Tracking (converted)","visualizationType":"lnsXY","type":"lens","references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-e3b3cb5c-e3b1-497f-a5d5-fddb0dabc94e"},{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-1d08a43c-8913-4692-a3e0-8d77902f6e46"},{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-9725cdbd-a9f3-479f-a349-0f11244e5239"},{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-2031d0f8-01fc-4009-b1ad-a7b7ca9266c0"},{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"xy-visualization-layer-192ad2e4-2bb7-44a9-b345-e96045fa6ccd"}],"state":{"visualization":{"legend":{"isVisible":true,"showSingleSeries":true,"position":"bottom","shouldTruncate":true,"maxLines":1},"valueLabels":"hide","fittingFunction":"None","fillOpacity":0,"yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"},"yLeftScale":"linear","yRightScale":"linear","axisTitlesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"labelsOrientation":{"x":0,"yLeft":0,"yRight":0},"gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"preferredSeriesType":"bar_stacked","layers":[{"seriesType":"line","layerType":"data","layerId":"e3b3cb5c-e3b1-497f-a5d5-fddb0dabc94e","accessors":["a69956c9-43cd-4756-a3c0-e93cb1502a0b"],"yConfig":[{"forAccessor":"a69956c9-43cd-4756-a3c0-e93cb1502a0b","color":"rgba(211,96,134,1)","axisMode":"left"}],"xAccessor":"f3cc8168-6360-4727-a410-a57f5a325091","palette":{"name":"default","type":"palette"}},{"seriesType":"line","layerType":"data","layerId":"1d08a43c-8913-4692-a3e0-8d77902f6e46","accessors":["9a3d8abd-81a5-40ae-9616-020d5a5b2ee2"],"yConfig":[{"forAccessor":"9a3d8abd-81a5-40ae-9616-020d5a5b2ee2","color":"rgba(84,179,153,1)","axisMode":"left"}],"xAccessor":"644b06ea-73a3-47b1-9b40-3035844c4621","palette":{"name":"default","type":"palette"}},{"seriesType":"line","layerType":"data","layerId":"9725cdbd-a9f3-479f-a349-0f11244e5239","accessors":["b5588228-9c46-4a4b-92ee-d140c327bca0"],"yConfig":[{"forAccessor":"b5588228-9c46-4a4b-92ee-d140c327bca0","color":"rgba(96,146,192,1)","axisMode":"left"}],"xAccessor":"6749b404-4784-4fd6-8bf6-5712e84c7310","palette":{"name":"default","type":"palette"}},{"seriesType":"line","layerType":"data","layerId":"2031d0f8-01fc-4009-b1ad-a7b7ca9266c0","accessors":["985e05c0-3a0b-4e55-84bb-1f02128388a9"],"yConfig":[{"forAccessor":"985e05c0-3a0b-4e55-84bb-1f02128388a9","color":"rgba(202,142,174,1)","axisMode":"left"}],"xAccessor":"1b199cb1-b47f-48e6-b209-74eb81b303f5","palette":{"name":"default","type":"palette"}},{"layerId":"192ad2e4-2bb7-44a9-b345-e96045fa6ccd","layerType":"annotations","ignoreGlobalFilters":true,"annotations":[{"type":"query","id":"c8c30be0-b88f-11e8-a451-f37365e9f268","label":"Event","key":{"type":"point_in_time"},"color":"#194D33","timeField":"order_date","icon":"bell","filter":{"type":"kibana_query","query":"taxful_total_price:>250","language":"lucene"},"extraFields":["taxful_total_price"]}]}]},"query":{"query":"","language":"kuery"},"filters":[],"datasourceStates":{"formBased":{"layers":{"e3b3cb5c-e3b1-497f-a5d5-fddb0dabc94e":{"columns":{"f3cc8168-6360-4727-a410-a57f5a325091":{"label":"order_date","dataType":"date","operationType":"date_histogram","sourceField":"order_date","isBucketed":true,"scale":"interval","params":{"interval":"12h","includeEmptyRows":true,"dropPartials":false}},"a69956c9-43cd-4756-a3c0-e93cb1502a0b":{"label":"Revenue Trousers","dataType":"number","operationType":"sum","sourceField":"taxful_total_price","isBucketed":false,"scale":"ratio","filter":{"query":"products.product_name:*trouser*","language":"lucene"},"params":{"format":{"id":"number"},"emptyAsNull":true},"customLabel":true}},"columnOrder":["f3cc8168-6360-4727-a410-a57f5a325091","a69956c9-43cd-4756-a3c0-e93cb1502a0b"],"incompleteColumns":{}},"1d08a43c-8913-4692-a3e0-8d77902f6e46":{"columns":{"644b06ea-73a3-47b1-9b40-3035844c4621":{"label":"order_date","dataType":"date","operationType":"date_histogram","sourceField":"order_date","isBucketed":true,"scale":"interval","params":{"interval":"12h","includeEmptyRows":true,"dropPartials":false}},"9a3d8abd-81a5-40ae-9616-020d5a5b2ee2":{"label":"Revenue Watches","dataType":"number","operationType":"sum","sourceField":"taxful_total_price","isBucketed":false,"scale":"ratio","filter":{"query":"products.product_name:*watch*","language":"lucene"},"params":{"format":{"id":"number"},"emptyAsNull":true},"customLabel":true}},"columnOrder":["644b06ea-73a3-47b1-9b40-3035844c4621","9a3d8abd-81a5-40ae-9616-020d5a5b2ee2"],"incompleteColumns":{}},"9725cdbd-a9f3-479f-a349-0f11244e5239":{"columns":{"6749b404-4784-4fd6-8bf6-5712e84c7310":{"label":"order_date","dataType":"date","operationType":"date_histogram","sourceField":"order_date","isBucketed":true,"scale":"interval","params":{"interval":"12h","includeEmptyRows":true,"dropPartials":false}},"b5588228-9c46-4a4b-92ee-d140c327bca0":{"label":"Revenue Bags","dataType":"number","operationType":"sum","sourceField":"taxful_total_price","isBucketed":false,"scale":"ratio","filter":{"query":"products.product_name:*bag*","language":"lucene"},"params":{"format":{"id":"number"},"emptyAsNull":true},"customLabel":true}},"columnOrder":["6749b404-4784-4fd6-8bf6-5712e84c7310","b5588228-9c46-4a4b-92ee-d140c327bca0"],"incompleteColumns":{}},"2031d0f8-01fc-4009-b1ad-a7b7ca9266c0":{"columns":{"1b199cb1-b47f-48e6-b209-74eb81b303f5":{"label":"order_date","dataType":"date","operationType":"date_histogram","sourceField":"order_date","isBucketed":true,"scale":"interval","params":{"interval":"12h","includeEmptyRows":true,"dropPartials":false}},"985e05c0-3a0b-4e55-84bb-1f02128388a9":{"label":"Revenue Cocktail Dresses","dataType":"number","operationType":"sum","sourceField":"taxful_total_price","isBucketed":false,"scale":"ratio","filter":{"query":"products.product_name:*cocktail dress*","language":"lucene"},"params":{"format":{"id":"number"},"emptyAsNull":true},"customLabel":true}},"columnOrder":["1b199cb1-b47f-48e6-b209-74eb81b303f5","985e05c0-3a0b-4e55-84bb-1f02128388a9"],"incompleteColumns":{}}}},"textBased":{"layers":{}}},"internalReferences":[],"adHocDataViews":{}}},"hidePanelTitles":false,"enhancements":{}},"title":"[eCommerce] Promotion Tracking"},{"version":"8.8.0","type":"visualization","gridData":{"x":36,"y":7,"w":12,"h":7,"i":"7"},"panelIndex":"7","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_7"},{"version":"8.8.0","type":"search","gridData":{"x":0,"y":54,"w":48,"h":18,"i":"10"},"panelIndex":"10","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_10"},{"version":"8.8.0","type":"map","gridData":{"x":0,"y":31,"w":24,"h":14,"i":"11"},"panelIndex":"11","embeddableConfig":{"isLayerTOCOpen":false,"hiddenLayers":[],"mapCenter":{"lat":45.88578,"lon":-15.07605,"zoom":2.11},"openTOCDetails":[],"enhancements":{}},"panelRefName":"panel_11"},{"version":"8.8.0","type":"visualization","gridData":{"x":0,"y":0,"w":24,"h":7,"i":"a71cf076-6895-491c-8878-63592e429ed5"},"panelIndex":"a71cf076-6895-491c-8878-63592e429ed5","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_a71cf076-6895-491c-8878-63592e429ed5"},{"version":"8.8.0","type":"lens","gridData":{"x":24,"y":0,"w":12,"h":7,"i":"75283285-dffd-48a7-a0c2-2235184b5282"},"panelIndex":"75283285-dffd-48a7-a0c2-2235184b5282","embeddableConfig":{"enhancements":{},"attributes":{"visualizationType":"lnsMetric","state":{"visualization":{"layerId":"c7478794-6767-4286-9d65-1c0ecd909dd8","layerType":"data","metricAccessor":"041db33b-5c9c-47f3-a5d3-ef5e255d1663"},"query":{"language":"kuery","query":""},"filters":[],"datasourceStates":{"formBased":{"layers":{"c7478794-6767-4286-9d65-1c0ecd909dd8":{"columnOrder":["041db33b-5c9c-47f3-a5d3-ef5e255d1663"],"columns":{"041db33b-5c9c-47f3-a5d3-ef5e255d1663":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Sum of revenue ($)","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price","params":{}}},"incompleteColumns":{}}}}},"internalReferences":[],"adHocDataViews":{}},"references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-c7478794-6767-4286-9d65-1c0ecd909dd8"}]},"hidePanelTitles":true},"title":"Sum of revenue"},{"version":"8.8.0","type":"lens","gridData":{"x":36,"y":0,"w":12,"h":7,"i":"58774330-b1b3-42dd-a04c-fbce9cc4d288"},"panelIndex":"58774330-b1b3-42dd-a04c-fbce9cc4d288","embeddableConfig":{"enhancements":{},"attributes":{"title":"Median spending","visualizationType":"lnsMetric","type":"lens","references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-4fb42a8e-b133-43c8-805c-a38472053938"}],"state":{"visualization":{"layerId":"4fb42a8e-b133-43c8-805c-a38472053938","layerType":"data","metricAccessor":"020bbfdf-9ef8-4802-aa9e-342d2ea0bebf"},"query":{"language":"kuery","query":""},"filters":[],"datasourceStates":{"formBased":{"layers":{"4fb42a8e-b133-43c8-805c-a38472053938":{"columnOrder":["020bbfdf-9ef8-4802-aa9e-342d2ea0bebf"],"columns":{"020bbfdf-9ef8-4802-aa9e-342d2ea0bebf":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Median spending ($)","operationType":"median","scale":"ratio","sourceField":"taxful_total_price","params":{}}},"incompleteColumns":{}}}}},"internalReferences":[],"adHocDataViews":{}}},"hidePanelTitles":true},"title":"Median spending"},{"version":"8.8.0","type":"lens","gridData":{"x":24,"y":7,"w":12,"h":7,"i":"b63ec47d-aace-4980-b928-6be8adafa5a4"},"panelIndex":"b63ec47d-aace-4980-b928-6be8adafa5a4","embeddableConfig":{"enhancements":{},"attributes":{"visualizationType":"lnsMetric","state":{"visualization":{"layerId":"667067a2-7cdf-4f0e-a9fe-eb4f4f1f2f17","layerType":"data","metricAccessor":"c52c2003-ae58-4604-bae7-52ba0fb38a01"},"query":{"language":"kuery","query":""},"filters":[],"datasourceStates":{"formBased":{"layers":{"667067a2-7cdf-4f0e-a9fe-eb4f4f1f2f17":{"columnOrder":["c52c2003-ae58-4604-bae7-52ba0fb38a01"],"columns":{"c52c2003-ae58-4604-bae7-52ba0fb38a01":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Avg. items sold","operationType":"average","params":{"format":{"id":"number","params":{"decimals":1}}},"scale":"ratio","sourceField":"total_quantity"}},"incompleteColumns":{}}}}},"internalReferences":[],"adHocDataViews":{}},"references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-667067a2-7cdf-4f0e-a9fe-eb4f4f1f2f17"}]},"hidePanelTitles":true},"title":"Avg. items sold"},{"version":"8.8.0","type":"lens","gridData":{"x":0,"y":14,"w":24,"h":7,"i":"d9495793-80ba-4a9a-b0e3-d1155ec99b09"},"panelIndex":"d9495793-80ba-4a9a-b0e3-d1155ec99b09","embeddableConfig":{"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"b6093a53-884f-42c2-9fcc-ba56cfb66c53":{"columnOrder":["15c45f89-a149-443a-a830-aa8c3a9317db","2b41b3d8-2f62-407a-a866-960f254c679d","eadae280-2da3-4d1d-a0e1-f9733f89c15b","ddc92e50-4d5c-413e-b91b-3e504889fa65","5e31e5d3-2aaa-4475-a130-3b69bf2f748a"],"columns":{"15c45f89-a149-443a-a830-aa8c3a9317db":{"dataType":"date","isBucketed":true,"label":"order_date","operationType":"date_histogram","params":{"interval":"1d","includeEmptyRows":true},"scale":"interval","sourceField":"order_date"},"2b41b3d8-2f62-407a-a866-960f254c679d":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Total items","operationType":"sum","scale":"ratio","sourceField":"products.quantity"},"5e31e5d3-2aaa-4475-a130-3b69bf2f748a":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Tx. last week","operationType":"count","scale":"ratio","sourceField":"___records___","timeShift":"1w"},"ddc92e50-4d5c-413e-b91b-3e504889fa65":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Transactions","operationType":"count","scale":"ratio","sourceField":"___records___"},"eadae280-2da3-4d1d-a0e1-f9733f89c15b":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Last week","operationType":"sum","scale":"ratio","sourceField":"products.quantity","timeShift":"1w"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":false,"yRight":true},"curveType":"LINEAR","fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["2b41b3d8-2f62-407a-a866-960f254c679d","eadae280-2da3-4d1d-a0e1-f9733f89c15b","5e31e5d3-2aaa-4475-a130-3b69bf2f748a","ddc92e50-4d5c-413e-b91b-3e504889fa65"],"layerId":"b6093a53-884f-42c2-9fcc-ba56cfb66c53","position":"top","seriesType":"line","showGridlines":false,"xAccessor":"15c45f89-a149-443a-a830-aa8c3a9317db","yConfig":[{"color":"#b6e0d5","forAccessor":"eadae280-2da3-4d1d-a0e1-f9733f89c15b"},{"color":"#edafc4","forAccessor":"5e31e5d3-2aaa-4475-a130-3b69bf2f748a"}],"layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"line","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"hide","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-b6093a53-884f-42c2-9fcc-ba56cfb66c53","type":"index-pattern"}]}},"title":"Transactions per day"},{"version":"8.8.0","type":"lens","gridData":{"x":24,"y":31,"w":24,"h":14,"i":"bda054f7-2d06-4936-b461-365d1be621fa"},"panelIndex":"bda054f7-2d06-4936-b461-365d1be621fa","embeddableConfig":{"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"0731ee8b-31c5-4be9-92d9-69ee760465d7":{"columnOrder":["7bf8f089-1542-40bd-b349-45fdfc309ac6","826b2f39-b616-40b2-a222-972fdc1d7596","cfd45c47-fc41-430c-9e7a-b71dc0c916b0","bf51c1af-443e-49f4-a21f-54c87bfc5677","bf51c1af-443e-49f4-a21f-54c87bfc5677X0","bf51c1af-443e-49f4-a21f-54c87bfc5677X1","bf51c1af-443e-49f4-a21f-54c87bfc5677X2"],"columns":{"7bf8f089-1542-40bd-b349-45fdfc309ac6":{"dataType":"date","isBucketed":true,"label":"order_date","operationType":"date_histogram","params":{"interval":"1d","includeEmptyRows":true},"scale":"interval","sourceField":"order_date"},"826b2f39-b616-40b2-a222-972fdc1d7596":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"This week","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price"},"bf51c1af-443e-49f4-a21f-54c87bfc5677":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Difference","operationType":"formula","params":{"format":{"id":"number","params":{"decimals":2}},"formula":"sum(taxful_total_price) - sum(taxful_total_price, shift=\'1w\')","isFormulaBroken":false},"references":["bf51c1af-443e-49f4-a21f-54c87bfc5677X2"],"scale":"ratio"},"bf51c1af-443e-49f4-a21f-54c87bfc5677X0":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Difference","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price"},"bf51c1af-443e-49f4-a21f-54c87bfc5677X1":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Difference","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price","timeShift":"1w"},"bf51c1af-443e-49f4-a21f-54c87bfc5677X2":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Difference","operationType":"math","params":{"tinymathAst":{"args":["bf51c1af-443e-49f4-a21f-54c87bfc5677X0","bf51c1af-443e-49f4-a21f-54c87bfc5677X1"],"location":{"max":61,"min":0},"name":"subtract","text":"sum(taxful_total_price) - sum(taxful_total_price, shift=\'1w\')","type":"function"}},"references":["bf51c1af-443e-49f4-a21f-54c87bfc5677X0","bf51c1af-443e-49f4-a21f-54c87bfc5677X1"],"scale":"ratio"},"cfd45c47-fc41-430c-9e7a-b71dc0c916b0":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"1 week ago","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price","timeShift":"1w"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"columns":[{"columnId":"7bf8f089-1542-40bd-b349-45fdfc309ac6"},{"alignment":"left","columnId":"826b2f39-b616-40b2-a222-972fdc1d7596"},{"columnId":"cfd45c47-fc41-430c-9e7a-b71dc0c916b0"},{"colorMode":"text","columnId":"bf51c1af-443e-49f4-a21f-54c87bfc5677","isTransposed":false,"palette":{"name":"custom","params":{"colorStops":[{"color":"#D36086","stop":-10000},{"color":"#209280","stop":0}],"continuity":"above","name":"custom","rangeMax":0,"rangeMin":-10000,"rangeType":"number","steps":5,"stops":[{"color":"#D36086","stop":0},{"color":"#209280","stop":2249.03125}]},"type":"palette"}}],"layerId":"0731ee8b-31c5-4be9-92d9-69ee760465d7","layerType":"data","rowHeight":"single","rowHeightLines":1}},"visualizationType":"lnsDatatable","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-0731ee8b-31c5-4be9-92d9-69ee760465d7","type":"index-pattern"}]}},"title":"Daily comparison"},{"version":"8.8.0","type":"lens","gridData":{"x":0,"y":45,"w":24,"h":9,"i":"d68e91dd-1539-48b0-9279-b43bba2054fe"},"panelIndex":"d68e91dd-1539-48b0-9279-b43bba2054fe","embeddableConfig":{"hidePanelTitles":false,"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"5ed846c2-a70b-4d9c-a244-f254bef763b8":{"columnOrder":["d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46","7ac31901-277a-46e2-8128-8d684b2c1127"],"columns":{"7ac31901-277a-46e2-8128-8d684b2c1127":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Items","operationType":"count","scale":"ratio","sourceField":"___records___"},"d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46":{"customLabel":true,"dataType":"string","isBucketed":true,"label":"Product name","operationType":"terms","params":{"missingBucket":false,"orderBy":{"columnId":"7ac31901-277a-46e2-8128-8d684b2c1127","type":"column"},"orderDirection":"desc","otherBucket":false,"size":5,"parentFormat":{"id":"terms"}},"scale":"ordinal","sourceField":"products.product_name.keyword"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":true,"yRight":true},"fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["7ac31901-277a-46e2-8128-8d684b2c1127"],"layerId":"5ed846c2-a70b-4d9c-a244-f254bef763b8","position":"top","seriesType":"bar_horizontal","showGridlines":false,"xAccessor":"d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46","layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"bar_horizontal","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"show","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-5ed846c2-a70b-4d9c-a244-f254bef763b8","type":"index-pattern"}]}},"title":"Top products this week"},{"version":"8.8.0","type":"lens","gridData":{"x":24,"y":45,"w":24,"h":9,"i":"39d96714-152f-414b-992c-ce2492fc69f3"},"panelIndex":"39d96714-152f-414b-992c-ce2492fc69f3","embeddableConfig":{"timeRange":{"from":"now-2w","to":"now-1w"},"hidePanelTitles":false,"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"5ed846c2-a70b-4d9c-a244-f254bef763b8":{"columnOrder":["d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46","7ac31901-277a-46e2-8128-8d684b2c1127"],"columns":{"7ac31901-277a-46e2-8128-8d684b2c1127":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Items","operationType":"count","scale":"ratio","sourceField":"___records___"},"d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46":{"customLabel":true,"dataType":"string","isBucketed":true,"label":"Product name","operationType":"terms","params":{"missingBucket":false,"orderBy":{"columnId":"7ac31901-277a-46e2-8128-8d684b2c1127","type":"column"},"orderDirection":"desc","otherBucket":false,"size":5,"parentFormat":{"id":"terms"}},"scale":"ordinal","sourceField":"products.product_name.keyword"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":true,"yRight":true},"fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["7ac31901-277a-46e2-8128-8d684b2c1127"],"layerId":"5ed846c2-a70b-4d9c-a244-f254bef763b8","position":"top","seriesType":"bar_horizontal","showGridlines":false,"xAccessor":"d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46","layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"bar_horizontal","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"show","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-5ed846c2-a70b-4d9c-a244-f254bef763b8","type":"index-pattern"}]}},"title":"Top products last week"},{"version":"8.8.0","type":"lens","gridData":{"x":24,"y":14,"w":24,"h":17,"i":"cd47b7cb-0ac0-43e0-b8c6-53489648bdef"},"panelIndex":"cd47b7cb-0ac0-43e0-b8c6-53489648bdef","embeddableConfig":{"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"97c63ea6-9305-4755-97d1-0f26817c6f9a":{"columnOrder":["9f61a7df-198e-4754-b34c-81ed544136ba","ebcb19af-0900-4439-949f-d8cd9bccde19","5575214b-7f21-4b6c-8bc1-34433c6a0c58"],"columns":{"5575214b-7f21-4b6c-8bc1-34433c6a0c58":{"dataType":"number","isBucketed":false,"label":"Count of records","operationType":"count","scale":"ratio","sourceField":"___records___"},"9f61a7df-198e-4754-b34c-81ed544136ba":{"dataType":"string","isBucketed":true,"label":"Top values of category.keyword","operationType":"terms","params":{"missingBucket":false,"orderBy":{"columnId":"5575214b-7f21-4b6c-8bc1-34433c6a0c58","type":"column"},"orderDirection":"desc","otherBucket":true,"size":10,"parentFormat":{"id":"terms"}},"scale":"ordinal","sourceField":"category.keyword"},"ebcb19af-0900-4439-949f-d8cd9bccde19":{"dataType":"date","isBucketed":true,"label":"order_date","operationType":"date_histogram","params":{"interval":"1d","includeEmptyRows":true},"scale":"interval","sourceField":"order_date"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":false,"yRight":true},"fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["5575214b-7f21-4b6c-8bc1-34433c6a0c58"],"layerId":"97c63ea6-9305-4755-97d1-0f26817c6f9a","position":"top","seriesType":"bar_percentage_stacked","showGridlines":false,"splitAccessor":"9f61a7df-198e-4754-b34c-81ed544136ba","xAccessor":"ebcb19af-0900-4439-949f-d8cd9bccde19","layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"bar_percentage_stacked","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"show","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-97c63ea6-9305-4755-97d1-0f26817c6f9a","type":"index-pattern"}]}},"title":"Breakdown by category"},{"version":"8.8.0","type":"lens","gridData":{"x":0,"y":7,"w":24,"h":7,"i":"bdb525ab-270b-46f1-a847-dd29be19aadb"},"panelIndex":"bdb525ab-270b-46f1-a847-dd29be19aadb","embeddableConfig":{"enhancements":{},"hidePanelTitles":false,"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"c7478794-6767-4286-9d65-1c0ecd909dd8":{"columnOrder":["8289349e-6d1b-4abf-b164-0208183d2c34","041db33b-5c9c-47f3-a5d3-ef5e255d1663","041db33b-5c9c-47f3-a5d3-ef5e255d1663X0","041db33b-5c9c-47f3-a5d3-ef5e255d1663X1"],"columns":{"041db33b-5c9c-47f3-a5d3-ef5e255d1663":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"% of target ($10k)","operationType":"formula","params":{"format":{"id":"percent","params":{"decimals":0}},"formula":"sum(taxful_total_price) / 10000 - 1","isFormulaBroken":false},"references":["041db33b-5c9c-47f3-a5d3-ef5e255d1663X1"],"scale":"ratio"},"041db33b-5c9c-47f3-a5d3-ef5e255d1663X0":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Weekly revenue","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price"},"041db33b-5c9c-47f3-a5d3-ef5e255d1663X1":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Weekly revenue","operationType":"math","params":{"tinymathAst":{"args":[{"args":["041db33b-5c9c-47f3-a5d3-ef5e255d1663X0",10000],"location":{"max":32,"min":0},"name":"divide","text":"sum(taxful_total_price) / 10000 ","type":"function"},1],"location":{"max":35,"min":0},"name":"subtract","text":"sum(taxful_total_price) / 10000 - 1","type":"function"}},"references":["041db33b-5c9c-47f3-a5d3-ef5e255d1663X0"],"scale":"ratio"},"8289349e-6d1b-4abf-b164-0208183d2c34":{"dataType":"date","isBucketed":true,"label":"order_date","operationType":"date_histogram","params":{"interval":"1d","includeEmptyRows":true},"scale":"interval","sourceField":"order_date"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":false,"yRight":true},"fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["041db33b-5c9c-47f3-a5d3-ef5e255d1663"],"layerId":"c7478794-6767-4286-9d65-1c0ecd909dd8","seriesType":"bar_stacked","xAccessor":"8289349e-6d1b-4abf-b164-0208183d2c34","layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"bar_stacked","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"hide","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-c7478794-6767-4286-9d65-1c0ecd909dd8","type":"index-pattern"}]}},"title":"% of target revenue ($10k)"}]', + '[{"version":"8.11.0","type":"lens","gridData":{"x":0,"y":21,"w":24,"h":10,"i":"5"},"panelIndex":"5","embeddableConfig":{"attributes":{"title":"[eCommerce] Promotion Tracking (converted)","visualizationType":"lnsXY","type":"lens","references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-e3b3cb5c-e3b1-497f-a5d5-fddb0dabc94e"},{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-1d08a43c-8913-4692-a3e0-8d77902f6e46"},{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-9725cdbd-a9f3-479f-a349-0f11244e5239"},{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-2031d0f8-01fc-4009-b1ad-a7b7ca9266c0"},{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"xy-visualization-layer-192ad2e4-2bb7-44a9-b345-e96045fa6ccd"}],"state":{"visualization":{"legend":{"isVisible":true,"showSingleSeries":true,"position":"bottom","shouldTruncate":true,"maxLines":1},"valueLabels":"hide","fittingFunction":"None","fillOpacity":0,"yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"},"yLeftScale":"linear","yRightScale":"linear","axisTitlesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"labelsOrientation":{"x":0,"yLeft":0,"yRight":0},"gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"preferredSeriesType":"bar_stacked","layers":[{"seriesType":"line","layerType":"data","layerId":"e3b3cb5c-e3b1-497f-a5d5-fddb0dabc94e","accessors":["a69956c9-43cd-4756-a3c0-e93cb1502a0b"],"yConfig":[{"forAccessor":"a69956c9-43cd-4756-a3c0-e93cb1502a0b","color":"rgba(211,96,134,1)","axisMode":"left"}],"xAccessor":"f3cc8168-6360-4727-a410-a57f5a325091","palette":{"name":"default","type":"palette"}},{"seriesType":"line","layerType":"data","layerId":"1d08a43c-8913-4692-a3e0-8d77902f6e46","accessors":["9a3d8abd-81a5-40ae-9616-020d5a5b2ee2"],"yConfig":[{"forAccessor":"9a3d8abd-81a5-40ae-9616-020d5a5b2ee2","color":"rgba(84,179,153,1)","axisMode":"left"}],"xAccessor":"644b06ea-73a3-47b1-9b40-3035844c4621","palette":{"name":"default","type":"palette"}},{"seriesType":"line","layerType":"data","layerId":"9725cdbd-a9f3-479f-a349-0f11244e5239","accessors":["b5588228-9c46-4a4b-92ee-d140c327bca0"],"yConfig":[{"forAccessor":"b5588228-9c46-4a4b-92ee-d140c327bca0","color":"rgba(96,146,192,1)","axisMode":"left"}],"xAccessor":"6749b404-4784-4fd6-8bf6-5712e84c7310","palette":{"name":"default","type":"palette"}},{"seriesType":"line","layerType":"data","layerId":"2031d0f8-01fc-4009-b1ad-a7b7ca9266c0","accessors":["985e05c0-3a0b-4e55-84bb-1f02128388a9"],"yConfig":[{"forAccessor":"985e05c0-3a0b-4e55-84bb-1f02128388a9","color":"rgba(202,142,174,1)","axisMode":"left"}],"xAccessor":"1b199cb1-b47f-48e6-b209-74eb81b303f5","palette":{"name":"default","type":"palette"}},{"layerId":"192ad2e4-2bb7-44a9-b345-e96045fa6ccd","layerType":"annotations","ignoreGlobalFilters":true,"annotations":[{"type":"query","id":"c8c30be0-b88f-11e8-a451-f37365e9f268","label":"Event","key":{"type":"point_in_time"},"color":"#194D33","timeField":"order_date","icon":"bell","filter":{"type":"kibana_query","query":"taxful_total_price:>250","language":"lucene"},"extraFields":["taxful_total_price"]}]}]},"query":{"query":"","language":"kuery"},"filters":[],"datasourceStates":{"formBased":{"layers":{"e3b3cb5c-e3b1-497f-a5d5-fddb0dabc94e":{"columns":{"f3cc8168-6360-4727-a410-a57f5a325091":{"label":"order_date","dataType":"date","operationType":"date_histogram","sourceField":"order_date","isBucketed":true,"scale":"interval","params":{"interval":"12h","includeEmptyRows":true,"dropPartials":false}},"a69956c9-43cd-4756-a3c0-e93cb1502a0b":{"label":"Revenue Trousers","dataType":"number","operationType":"sum","sourceField":"taxful_total_price","isBucketed":false,"scale":"ratio","filter":{"query":"products.product_name:*trouser*","language":"lucene"},"params":{"format":{"id":"number"},"emptyAsNull":true},"customLabel":true}},"columnOrder":["f3cc8168-6360-4727-a410-a57f5a325091","a69956c9-43cd-4756-a3c0-e93cb1502a0b"],"incompleteColumns":{}},"1d08a43c-8913-4692-a3e0-8d77902f6e46":{"columns":{"644b06ea-73a3-47b1-9b40-3035844c4621":{"label":"order_date","dataType":"date","operationType":"date_histogram","sourceField":"order_date","isBucketed":true,"scale":"interval","params":{"interval":"12h","includeEmptyRows":true,"dropPartials":false}},"9a3d8abd-81a5-40ae-9616-020d5a5b2ee2":{"label":"Revenue Watches","dataType":"number","operationType":"sum","sourceField":"taxful_total_price","isBucketed":false,"scale":"ratio","filter":{"query":"products.product_name:*watch*","language":"lucene"},"params":{"format":{"id":"number"},"emptyAsNull":true},"customLabel":true}},"columnOrder":["644b06ea-73a3-47b1-9b40-3035844c4621","9a3d8abd-81a5-40ae-9616-020d5a5b2ee2"],"incompleteColumns":{}},"9725cdbd-a9f3-479f-a349-0f11244e5239":{"columns":{"6749b404-4784-4fd6-8bf6-5712e84c7310":{"label":"order_date","dataType":"date","operationType":"date_histogram","sourceField":"order_date","isBucketed":true,"scale":"interval","params":{"interval":"12h","includeEmptyRows":true,"dropPartials":false}},"b5588228-9c46-4a4b-92ee-d140c327bca0":{"label":"Revenue Bags","dataType":"number","operationType":"sum","sourceField":"taxful_total_price","isBucketed":false,"scale":"ratio","filter":{"query":"products.product_name:*bag*","language":"lucene"},"params":{"format":{"id":"number"},"emptyAsNull":true},"customLabel":true}},"columnOrder":["6749b404-4784-4fd6-8bf6-5712e84c7310","b5588228-9c46-4a4b-92ee-d140c327bca0"],"incompleteColumns":{}},"2031d0f8-01fc-4009-b1ad-a7b7ca9266c0":{"columns":{"1b199cb1-b47f-48e6-b209-74eb81b303f5":{"label":"order_date","dataType":"date","operationType":"date_histogram","sourceField":"order_date","isBucketed":true,"scale":"interval","params":{"interval":"12h","includeEmptyRows":true,"dropPartials":false}},"985e05c0-3a0b-4e55-84bb-1f02128388a9":{"label":"Revenue Cocktail Dresses","dataType":"number","operationType":"sum","sourceField":"taxful_total_price","isBucketed":false,"scale":"ratio","filter":{"query":"products.product_name:*cocktail dress*","language":"lucene"},"params":{"format":{"id":"number"},"emptyAsNull":true},"customLabel":true}},"columnOrder":["1b199cb1-b47f-48e6-b209-74eb81b303f5","985e05c0-3a0b-4e55-84bb-1f02128388a9"],"incompleteColumns":{}}}},"textBased":{"layers":{}}},"internalReferences":[],"adHocDataViews":{}}},"hidePanelTitles":false,"enhancements":{}},"title":"[eCommerce] Promotion Tracking"},{"version":"8.11.0","type":"lens","gridData":{"x":36,"y":7,"w":12,"h":7,"i":"7"},"panelIndex":"7","embeddableConfig":{"attributes":{"title":"Sold Products per Day","description":"","visualizationType":"lnsMetric","type":"lens","references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-037375ae-9e23-4dd5-a4f0-5f117bb7dac1"}],"state":{"visualization":{"layerId":"037375ae-9e23-4dd5-a4f0-5f117bb7dac1","layerType":"data","metricAccessor":"c27bd77c-68e2-4d75-8fda-41c45d22f8d4","maxAccessor":"ce816876-e92d-4b1a-bbb0-ed7637fc0eea","showBar":true,"color":"#68BC00"},"query":{"query":"","language":"kuery"},"filters":[],"datasourceStates":{"formBased":{"layers":{"037375ae-9e23-4dd5-a4f0-5f117bb7dac1":{"ignoreGlobalFilters":false,"columns":{"c27bd77c-68e2-4d75-8fda-41c45d22f8d4X0":{"label":"Part of count() / (time_range() / 1000 / 60 / 60 / 24)","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","params":{"emptyAsNull":false},"customLabel":true},"c27bd77c-68e2-4d75-8fda-41c45d22f8d4X1":{"label":"Part of count() / (time_range() / 1000 / 60 / 60 / 24)","dataType":"number","operationType":"time_range","isBucketed":false,"scale":"ratio","references":[],"customLabel":true},"c27bd77c-68e2-4d75-8fda-41c45d22f8d4X2":{"label":"Part of count() / (time_range() / 1000 / 60 / 60 / 24)","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["c27bd77c-68e2-4d75-8fda-41c45d22f8d4X0",{"type":"function","name":"divide","args":[{"type":"function","name":"divide","args":[{"type":"function","name":"divide","args":[{"type":"function","name":"divide","args":["c27bd77c-68e2-4d75-8fda-41c45d22f8d4X1",1000]},60]},60]},24],"location":{"min":11,"max":45},"text":"time_range() / 1000 / 60 / 60 / 24"}],"location":{"min":0,"max":46},"text":"count() / (time_range() / 1000 / 60 / 60 / 24)"}},"references":["c27bd77c-68e2-4d75-8fda-41c45d22f8d4X0","c27bd77c-68e2-4d75-8fda-41c45d22f8d4X1"],"customLabel":true},"c27bd77c-68e2-4d75-8fda-41c45d22f8d4":{"label":"Trxns / day","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"format":{"id":"number"},"formula":"count() / (time_range() / 1000 / 60 / 60 / 24)","isFormulaBroken":false},"references":["c27bd77c-68e2-4d75-8fda-41c45d22f8d4X2"],"customLabel":true},"ce816876-e92d-4b1a-bbb0-ed7637fc0eea":{"label":"Static value: 300","dataType":"number","operationType":"static_value","isStaticValue":true,"isBucketed":false,"scale":"ratio","params":{"value":"300"},"references":[]}},"columnOrder":["c27bd77c-68e2-4d75-8fda-41c45d22f8d4X0","c27bd77c-68e2-4d75-8fda-41c45d22f8d4X1","c27bd77c-68e2-4d75-8fda-41c45d22f8d4X2","c27bd77c-68e2-4d75-8fda-41c45d22f8d4","ce816876-e92d-4b1a-bbb0-ed7637fc0eea"],"incompleteColumns":{}}}},"indexpattern":{"layers":{}},"textBased":{"layers":{}}},"internalReferences":[],"adHocDataViews":{}}},"timeRange":{"from":"now-7d","to":"now"},"enhancements":{}}},{"version":"8.11.0","type":"search","gridData":{"x":0,"y":54,"w":48,"h":18,"i":"10"},"panelIndex":"10","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_10"},{"version":"8.11.0","type":"map","gridData":{"x":0,"y":31,"w":24,"h":14,"i":"11"},"panelIndex":"11","embeddableConfig":{"isLayerTOCOpen":false,"hiddenLayers":[],"mapCenter":{"lat":45.88578,"lon":-15.07605,"zoom":2.11},"openTOCDetails":[],"enhancements":{}},"panelRefName":"panel_11"},{"version":"8.11.0","type":"visualization","gridData":{"x":0,"y":0,"w":24,"h":7,"i":"a71cf076-6895-491c-8878-63592e429ed5"},"panelIndex":"a71cf076-6895-491c-8878-63592e429ed5","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_a71cf076-6895-491c-8878-63592e429ed5"},{"version":"8.11.0","type":"lens","gridData":{"x":24,"y":0,"w":12,"h":7,"i":"75283285-dffd-48a7-a0c2-2235184b5282"},"panelIndex":"75283285-dffd-48a7-a0c2-2235184b5282","embeddableConfig":{"enhancements":{},"attributes":{"visualizationType":"lnsMetric","state":{"visualization":{"layerId":"c7478794-6767-4286-9d65-1c0ecd909dd8","layerType":"data","metricAccessor":"041db33b-5c9c-47f3-a5d3-ef5e255d1663"},"query":{"language":"kuery","query":""},"filters":[],"datasourceStates":{"formBased":{"layers":{"c7478794-6767-4286-9d65-1c0ecd909dd8":{"columnOrder":["041db33b-5c9c-47f3-a5d3-ef5e255d1663"],"columns":{"041db33b-5c9c-47f3-a5d3-ef5e255d1663":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Sum of revenue","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price","params":{}}},"incompleteColumns":{}}}}},"internalReferences":[],"adHocDataViews":{}},"references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-c7478794-6767-4286-9d65-1c0ecd909dd8"}]},"hidePanelTitles":true},"title":"Sum of revenue"},{"version":"8.11.0","type":"lens","gridData":{"x":36,"y":0,"w":12,"h":7,"i":"58774330-b1b3-42dd-a04c-fbce9cc4d288"},"panelIndex":"58774330-b1b3-42dd-a04c-fbce9cc4d288","embeddableConfig":{"enhancements":{},"attributes":{"title":"Median spending","visualizationType":"lnsMetric","type":"lens","references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-4fb42a8e-b133-43c8-805c-a38472053938"}],"state":{"visualization":{"layerId":"4fb42a8e-b133-43c8-805c-a38472053938","layerType":"data","metricAccessor":"020bbfdf-9ef8-4802-aa9e-342d2ea0bebf"},"query":{"language":"kuery","query":""},"filters":[],"datasourceStates":{"formBased":{"layers":{"4fb42a8e-b133-43c8-805c-a38472053938":{"columnOrder":["020bbfdf-9ef8-4802-aa9e-342d2ea0bebf"],"columns":{"020bbfdf-9ef8-4802-aa9e-342d2ea0bebf":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Median spending","operationType":"median","scale":"ratio","sourceField":"taxful_total_price","params":{}}},"incompleteColumns":{}}}}},"internalReferences":[],"adHocDataViews":{}}},"hidePanelTitles":true},"title":"Median spending"},{"version":"8.11.0","type":"lens","gridData":{"x":24,"y":7,"w":12,"h":7,"i":"b63ec47d-aace-4980-b928-6be8adafa5a4"},"panelIndex":"b63ec47d-aace-4980-b928-6be8adafa5a4","embeddableConfig":{"enhancements":{},"attributes":{"visualizationType":"lnsMetric","state":{"visualization":{"layerId":"667067a2-7cdf-4f0e-a9fe-eb4f4f1f2f17","layerType":"data","metricAccessor":"c52c2003-ae58-4604-bae7-52ba0fb38a01"},"query":{"language":"kuery","query":""},"filters":[],"datasourceStates":{"formBased":{"layers":{"667067a2-7cdf-4f0e-a9fe-eb4f4f1f2f17":{"columnOrder":["c52c2003-ae58-4604-bae7-52ba0fb38a01"],"columns":{"c52c2003-ae58-4604-bae7-52ba0fb38a01":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Avg. items sold","operationType":"average","params":{"format":{"id":"number","params":{"decimals":1,"compact":true}}},"scale":"ratio","sourceField":"total_quantity"}},"incompleteColumns":{}}}}},"internalReferences":[],"adHocDataViews":{}},"references":[{"type":"index-pattern","id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-667067a2-7cdf-4f0e-a9fe-eb4f4f1f2f17"}]},"hidePanelTitles":true},"title":"Avg. items sold"},{"version":"8.11.0","type":"lens","gridData":{"x":0,"y":14,"w":24,"h":7,"i":"d9495793-80ba-4a9a-b0e3-d1155ec99b09"},"panelIndex":"d9495793-80ba-4a9a-b0e3-d1155ec99b09","embeddableConfig":{"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"b6093a53-884f-42c2-9fcc-ba56cfb66c53":{"columnOrder":["15c45f89-a149-443a-a830-aa8c3a9317db","2b41b3d8-2f62-407a-a866-960f254c679d","eadae280-2da3-4d1d-a0e1-f9733f89c15b","ddc92e50-4d5c-413e-b91b-3e504889fa65","5e31e5d3-2aaa-4475-a130-3b69bf2f748a"],"columns":{"15c45f89-a149-443a-a830-aa8c3a9317db":{"dataType":"date","isBucketed":true,"label":"order_date","operationType":"date_histogram","params":{"interval":"1d","includeEmptyRows":true},"scale":"interval","sourceField":"order_date"},"2b41b3d8-2f62-407a-a866-960f254c679d":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Total items","operationType":"sum","scale":"ratio","sourceField":"products.quantity"},"5e31e5d3-2aaa-4475-a130-3b69bf2f748a":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Tx. last week","operationType":"count","scale":"ratio","sourceField":"___records___","timeShift":"1w"},"ddc92e50-4d5c-413e-b91b-3e504889fa65":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Transactions","operationType":"count","scale":"ratio","sourceField":"___records___"},"eadae280-2da3-4d1d-a0e1-f9733f89c15b":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Last week","operationType":"sum","scale":"ratio","sourceField":"products.quantity","timeShift":"1w"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":false,"yRight":true},"curveType":"LINEAR","fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["2b41b3d8-2f62-407a-a866-960f254c679d","eadae280-2da3-4d1d-a0e1-f9733f89c15b","5e31e5d3-2aaa-4475-a130-3b69bf2f748a","ddc92e50-4d5c-413e-b91b-3e504889fa65"],"layerId":"b6093a53-884f-42c2-9fcc-ba56cfb66c53","position":"top","seriesType":"line","showGridlines":false,"xAccessor":"15c45f89-a149-443a-a830-aa8c3a9317db","yConfig":[{"color":"#b6e0d5","forAccessor":"eadae280-2da3-4d1d-a0e1-f9733f89c15b"},{"color":"#edafc4","forAccessor":"5e31e5d3-2aaa-4475-a130-3b69bf2f748a"}],"layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"line","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"hide","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-b6093a53-884f-42c2-9fcc-ba56cfb66c53","type":"index-pattern"}]}},"title":"Transactions per day"},{"version":"8.11.0","type":"lens","gridData":{"x":24,"y":31,"w":24,"h":14,"i":"bda054f7-2d06-4936-b461-365d1be621fa"},"panelIndex":"bda054f7-2d06-4936-b461-365d1be621fa","embeddableConfig":{"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"0731ee8b-31c5-4be9-92d9-69ee760465d7":{"columnOrder":["7bf8f089-1542-40bd-b349-45fdfc309ac6","826b2f39-b616-40b2-a222-972fdc1d7596","cfd45c47-fc41-430c-9e7a-b71dc0c916b0","bf51c1af-443e-49f4-a21f-54c87bfc5677","bf51c1af-443e-49f4-a21f-54c87bfc5677X0","bf51c1af-443e-49f4-a21f-54c87bfc5677X1","bf51c1af-443e-49f4-a21f-54c87bfc5677X2"],"columns":{"7bf8f089-1542-40bd-b349-45fdfc309ac6":{"dataType":"date","isBucketed":true,"label":"order_date","operationType":"date_histogram","params":{"interval":"1d","includeEmptyRows":true},"scale":"interval","sourceField":"order_date"},"826b2f39-b616-40b2-a222-972fdc1d7596":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"This week","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price"},"bf51c1af-443e-49f4-a21f-54c87bfc5677":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Difference","operationType":"formula","params":{"format":{"id":"number","params":{"decimals":2}},"formula":"sum(taxful_total_price) - sum(taxful_total_price, shift=\'1w\')","isFormulaBroken":false},"references":["bf51c1af-443e-49f4-a21f-54c87bfc5677X2"],"scale":"ratio"},"bf51c1af-443e-49f4-a21f-54c87bfc5677X0":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Difference","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price"},"bf51c1af-443e-49f4-a21f-54c87bfc5677X1":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Difference","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price","timeShift":"1w"},"bf51c1af-443e-49f4-a21f-54c87bfc5677X2":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Difference","operationType":"math","params":{"tinymathAst":{"args":["bf51c1af-443e-49f4-a21f-54c87bfc5677X0","bf51c1af-443e-49f4-a21f-54c87bfc5677X1"],"location":{"max":61,"min":0},"name":"subtract","text":"sum(taxful_total_price) - sum(taxful_total_price, shift=\'1w\')","type":"function"}},"references":["bf51c1af-443e-49f4-a21f-54c87bfc5677X0","bf51c1af-443e-49f4-a21f-54c87bfc5677X1"],"scale":"ratio"},"cfd45c47-fc41-430c-9e7a-b71dc0c916b0":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"1 week ago","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price","timeShift":"1w"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"columns":[{"columnId":"7bf8f089-1542-40bd-b349-45fdfc309ac6"},{"alignment":"left","columnId":"826b2f39-b616-40b2-a222-972fdc1d7596"},{"columnId":"cfd45c47-fc41-430c-9e7a-b71dc0c916b0"},{"colorMode":"text","columnId":"bf51c1af-443e-49f4-a21f-54c87bfc5677","isTransposed":false,"palette":{"name":"custom","params":{"colorStops":[{"color":"#D36086","stop":-10000},{"color":"#209280","stop":0}],"continuity":"above","name":"custom","rangeMax":0,"rangeMin":-10000,"rangeType":"number","steps":5,"stops":[{"color":"#D36086","stop":0},{"color":"#209280","stop":2249.03125}]},"type":"palette"}}],"layerId":"0731ee8b-31c5-4be9-92d9-69ee760465d7","layerType":"data","rowHeight":"single","rowHeightLines":1}},"visualizationType":"lnsDatatable","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-0731ee8b-31c5-4be9-92d9-69ee760465d7","type":"index-pattern"}]}},"title":"Daily comparison"},{"version":"8.11.0","type":"lens","gridData":{"x":0,"y":45,"w":24,"h":9,"i":"d68e91dd-1539-48b0-9279-b43bba2054fe"},"panelIndex":"d68e91dd-1539-48b0-9279-b43bba2054fe","embeddableConfig":{"hidePanelTitles":false,"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"5ed846c2-a70b-4d9c-a244-f254bef763b8":{"columnOrder":["d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46","7ac31901-277a-46e2-8128-8d684b2c1127"],"columns":{"7ac31901-277a-46e2-8128-8d684b2c1127":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Items","operationType":"count","scale":"ratio","sourceField":"___records___"},"d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46":{"customLabel":true,"dataType":"string","isBucketed":true,"label":"Product name","operationType":"terms","params":{"missingBucket":false,"orderBy":{"columnId":"7ac31901-277a-46e2-8128-8d684b2c1127","type":"column"},"orderDirection":"desc","otherBucket":false,"size":5,"parentFormat":{"id":"terms"}},"scale":"ordinal","sourceField":"products.product_name.keyword"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":true,"yRight":true},"fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["7ac31901-277a-46e2-8128-8d684b2c1127"],"layerId":"5ed846c2-a70b-4d9c-a244-f254bef763b8","position":"top","seriesType":"bar_horizontal","showGridlines":false,"xAccessor":"d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46","layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"bar_horizontal","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"show","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-5ed846c2-a70b-4d9c-a244-f254bef763b8","type":"index-pattern"}]}},"title":"Top products this week"},{"version":"8.11.0","type":"lens","gridData":{"x":24,"y":45,"w":24,"h":9,"i":"39d96714-152f-414b-992c-ce2492fc69f3"},"panelIndex":"39d96714-152f-414b-992c-ce2492fc69f3","embeddableConfig":{"timeRange":{"from":"now-2w","to":"now-1w"},"hidePanelTitles":false,"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"5ed846c2-a70b-4d9c-a244-f254bef763b8":{"columnOrder":["d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46","7ac31901-277a-46e2-8128-8d684b2c1127"],"columns":{"7ac31901-277a-46e2-8128-8d684b2c1127":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Items","operationType":"count","scale":"ratio","sourceField":"___records___"},"d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46":{"customLabel":true,"dataType":"string","isBucketed":true,"label":"Product name","operationType":"terms","params":{"missingBucket":false,"orderBy":{"columnId":"7ac31901-277a-46e2-8128-8d684b2c1127","type":"column"},"orderDirection":"desc","otherBucket":false,"size":5,"parentFormat":{"id":"terms"}},"scale":"ordinal","sourceField":"products.product_name.keyword"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":true,"yRight":true},"fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["7ac31901-277a-46e2-8128-8d684b2c1127"],"layerId":"5ed846c2-a70b-4d9c-a244-f254bef763b8","position":"top","seriesType":"bar_horizontal","showGridlines":false,"xAccessor":"d77cdd24-dedc-48dd-9a4b-d34c6f1a6c46","layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"bar_horizontal","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"show","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-5ed846c2-a70b-4d9c-a244-f254bef763b8","type":"index-pattern"}]}},"title":"Top products last week"},{"version":"8.11.0","type":"lens","gridData":{"x":24,"y":14,"w":24,"h":17,"i":"cd47b7cb-0ac0-43e0-b8c6-53489648bdef"},"panelIndex":"cd47b7cb-0ac0-43e0-b8c6-53489648bdef","embeddableConfig":{"enhancements":{},"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"97c63ea6-9305-4755-97d1-0f26817c6f9a":{"columnOrder":["9f61a7df-198e-4754-b34c-81ed544136ba","ebcb19af-0900-4439-949f-d8cd9bccde19","5575214b-7f21-4b6c-8bc1-34433c6a0c58"],"columns":{"5575214b-7f21-4b6c-8bc1-34433c6a0c58":{"dataType":"number","isBucketed":false,"label":"Count of records","operationType":"count","scale":"ratio","sourceField":"___records___"},"9f61a7df-198e-4754-b34c-81ed544136ba":{"dataType":"string","isBucketed":true,"label":"Top values of category.keyword","operationType":"terms","params":{"missingBucket":false,"orderBy":{"columnId":"5575214b-7f21-4b6c-8bc1-34433c6a0c58","type":"column"},"orderDirection":"desc","otherBucket":true,"size":10,"parentFormat":{"id":"terms"}},"scale":"ordinal","sourceField":"category.keyword"},"ebcb19af-0900-4439-949f-d8cd9bccde19":{"dataType":"date","isBucketed":true,"label":"order_date","operationType":"date_histogram","params":{"interval":"1d","includeEmptyRows":true},"scale":"interval","sourceField":"order_date"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":false,"yRight":true},"fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["5575214b-7f21-4b6c-8bc1-34433c6a0c58"],"layerId":"97c63ea6-9305-4755-97d1-0f26817c6f9a","position":"top","seriesType":"bar_percentage_stacked","showGridlines":false,"splitAccessor":"9f61a7df-198e-4754-b34c-81ed544136ba","xAccessor":"ebcb19af-0900-4439-949f-d8cd9bccde19","layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"bar_percentage_stacked","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"show","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-97c63ea6-9305-4755-97d1-0f26817c6f9a","type":"index-pattern"}]}},"title":"Breakdown by category"},{"version":"8.11.0","type":"lens","gridData":{"x":0,"y":7,"w":24,"h":7,"i":"bdb525ab-270b-46f1-a847-dd29be19aadb"},"panelIndex":"bdb525ab-270b-46f1-a847-dd29be19aadb","embeddableConfig":{"enhancements":{},"hidePanelTitles":false,"attributes":{"state":{"datasourceStates":{"formBased":{"layers":{"c7478794-6767-4286-9d65-1c0ecd909dd8":{"columnOrder":["8289349e-6d1b-4abf-b164-0208183d2c34","041db33b-5c9c-47f3-a5d3-ef5e255d1663","041db33b-5c9c-47f3-a5d3-ef5e255d1663X0","041db33b-5c9c-47f3-a5d3-ef5e255d1663X1"],"columns":{"041db33b-5c9c-47f3-a5d3-ef5e255d1663":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"% of target ($10k)","operationType":"formula","params":{"format":{"id":"percent","params":{"decimals":0}},"formula":"sum(taxful_total_price) / 10000 - 1","isFormulaBroken":false},"references":["041db33b-5c9c-47f3-a5d3-ef5e255d1663X1"],"scale":"ratio"},"041db33b-5c9c-47f3-a5d3-ef5e255d1663X0":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Weekly revenue","operationType":"sum","scale":"ratio","sourceField":"taxful_total_price"},"041db33b-5c9c-47f3-a5d3-ef5e255d1663X1":{"customLabel":true,"dataType":"number","isBucketed":false,"label":"Part of Weekly revenue","operationType":"math","params":{"tinymathAst":{"args":[{"args":["041db33b-5c9c-47f3-a5d3-ef5e255d1663X0",10000],"location":{"max":32,"min":0},"name":"divide","text":"sum(taxful_total_price) / 10000 ","type":"function"},1],"location":{"max":35,"min":0},"name":"subtract","text":"sum(taxful_total_price) / 10000 - 1","type":"function"}},"references":["041db33b-5c9c-47f3-a5d3-ef5e255d1663X0"],"scale":"ratio"},"8289349e-6d1b-4abf-b164-0208183d2c34":{"dataType":"date","isBucketed":true,"label":"order_date","operationType":"date_histogram","params":{"interval":"1d","includeEmptyRows":true},"scale":"interval","sourceField":"order_date"}},"incompleteColumns":{}}}}},"filters":[],"query":{"language":"kuery","query":""},"visualization":{"axisTitlesVisibilitySettings":{"x":false,"yLeft":false,"yRight":true},"fittingFunction":"None","gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"layers":[{"accessors":["041db33b-5c9c-47f3-a5d3-ef5e255d1663"],"layerId":"c7478794-6767-4286-9d65-1c0ecd909dd8","seriesType":"bar_stacked","xAccessor":"8289349e-6d1b-4abf-b164-0208183d2c34","layerType":"data"}],"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"preferredSeriesType":"bar_stacked","tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"valueLabels":"hide","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"}}},"visualizationType":"lnsXY","references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"indexpattern-datasource-layer-c7478794-6767-4286-9d65-1c0ecd909dd8","type":"index-pattern"}]}},"title":"% of target revenue ($10k)"}]', timeFrom: 'now-7d', title: '[eCommerce] Revenue Dashboard', timeTo: 'now', @@ -209,9 +180,9 @@ export const getSavedObjects = (): SavedObject[] => [ name: '5:xy-visualization-layer-192ad2e4-2bb7-44a9-b345-e96045fa6ccd', }, { - name: '7:panel_7', - type: 'visualization', - id: 'b80e6540-b891-11e8-a6d9-e546fe2bba5f', + type: 'index-pattern', + id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', + name: '7:indexpattern-datasource-layer-037375ae-9e23-4dd5-a4f0-5f117bb7dac1', }, { name: '10:panel_10', diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/_404.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/_404.cy.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/_404.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/_404.cy.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/deep_links.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/deep_links.cy.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/deep_links.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/deep_links.cy.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/dependencies.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/dependencies.cy.ts similarity index 95% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/dependencies.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/dependencies.cy.ts index 2ef3ae42b1aac..3200ba846fc76 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/dependencies.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/dependencies.cy.ts @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { synthtrace } from '../../../synthtrace'; -import { opbeans } from '../../fixtures/synthtrace/opbeans'; -import { checkA11y } from '../../support/commands'; +import { synthtrace } from '../../synthtrace'; +import { opbeans } from '../fixtures/synthtrace/opbeans'; +import { checkA11y } from '../support/commands'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/dependency_operation/dependency_operation.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/dependency_operation/dependency_operation.cy.ts similarity index 91% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/dependency_operation/dependency_operation.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/dependency_operation/dependency_operation.cy.ts index 095cc5d23bbcc..587bddc278b9d 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/dependency_operation/dependency_operation.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/dependency_operation/dependency_operation.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/diagnostics/apm-diagnostics-8.8.0-1687436214804.json b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/diagnostics/apm-diagnostics-8.8.0-1687436214804.json similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/diagnostics/apm-diagnostics-8.8.0-1687436214804.json rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/diagnostics/apm-diagnostics-8.8.0-1687436214804.json diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/diagnostics/diagnostics.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/diagnostics/diagnostics.cy.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/diagnostics/diagnostics.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/diagnostics/diagnostics.cy.ts index 938e6dd67c16f..10b977d7917e8 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/diagnostics/diagnostics.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/diagnostics/diagnostics.cy.ts @@ -158,7 +158,7 @@ describe('Diagnostics', () => { function importBundle() { cy.visitKibana('/app/apm/diagnostics/import-export'); cy.get('#file-picker').selectFile( - './cypress/e2e/power_user/diagnostics/apm-diagnostics-8.8.0-1687436214804.json' + './cypress/e2e/diagnostics/apm-diagnostics-8.8.0-1687436214804.json' ); } diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/errors/error_details.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/errors/error_details.cy.ts similarity index 97% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/errors/error_details.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/errors/error_details.cy.ts index c09547abcf7c8..9a34bc65ea509 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/errors/error_details.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/errors/error_details.cy.ts @@ -7,8 +7,8 @@ import { getErrorGroupingKey } from '@kbn/apm-synthtrace-client/src/lib/apm/instance'; import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { checkA11y } from '../../../support/commands'; +import { synthtrace } from '../../../synthtrace'; +import { checkA11y } from '../../support/commands'; import { generateData } from './generate_data'; const start = '2021-10-10T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/errors/errors_page.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/errors/errors_page.cy.ts similarity index 97% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/errors/errors_page.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/errors/errors_page.cy.ts index a64dc157d4037..c95d2da00ffcb 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/errors/errors_page.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/errors/errors_page.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { checkA11y } from '../../../support/commands'; +import { synthtrace } from '../../../synthtrace'; +import { checkA11y } from '../../support/commands'; import { generateData, generateErrors } from './generate_data'; const start = '2021-10-10T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/errors/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/errors/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/errors/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/errors/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/feature_flag/comparison.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/feature_flag/comparison.cy.ts similarity index 96% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/feature_flag/comparison.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/feature_flag/comparison.cy.ts index 7d40105db192e..87fd051bbb1b1 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/feature_flag/comparison.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/feature_flag/comparison.cy.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/home.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/home.cy.ts similarity index 94% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/home.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/home.cy.ts index e0c4a3aedd2b3..924753606ffa0 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/home.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/home.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; -import { synthtrace } from '../../../synthtrace'; -import { opbeans } from '../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../synthtrace'; +import { opbeans } from '../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/infrastructure/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/infrastructure/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/infrastructure/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/infrastructure/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/infrastructure/infrastructure_page.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/infrastructure/infrastructure_page.cy.ts similarity index 95% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/infrastructure/infrastructure_page.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/infrastructure/infrastructure_page.cy.ts index 439b95a796b71..246c62a218317 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/infrastructure/infrastructure_page.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/infrastructure/infrastructure_page.cy.ts @@ -5,8 +5,8 @@ * 2.0. */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { checkA11y } from '../../../support/commands'; +import { synthtrace } from '../../../synthtrace'; +import { checkA11y } from '../../support/commands'; import { generateData } from './generate_data'; const start = '2021-10-10T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/integration_settings/integration_policy.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/integration_settings/integration_policy.cy.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/integration_settings/integration_policy.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/integration_settings/integration_policy.cy.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/mobile/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/mobile/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/mobile_transaction_details.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/mobile/mobile_transaction_details.cy.ts similarity index 95% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/mobile_transaction_details.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/mobile/mobile_transaction_details.cy.ts index 98d6ce665338b..1de2e768753c6 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/mobile_transaction_details.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/mobile/mobile_transaction_details.cy.ts @@ -6,7 +6,7 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; import { generateMobileData } from './generate_data'; const start = '2021-10-10T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/mobile_transactions.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/mobile/mobile_transactions.cy.ts similarity index 97% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/mobile_transactions.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/mobile/mobile_transactions.cy.ts index 85cf055507f3b..4d300b4b659dd 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/mobile/mobile_transactions.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/mobile/mobile_transactions.cy.ts @@ -6,7 +6,7 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; import { generateMobileData } from './generate_data'; const start = '2021-10-10T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/navigation.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/navigation.cy.ts similarity index 95% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/navigation.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/navigation.cy.ts index 0b060bcafdbf2..d1baefed136ae 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/navigation.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/navigation.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; -import { synthtrace } from '../../../synthtrace'; -import { opbeans } from '../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../synthtrace'; +import { opbeans } from '../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/no_data_screen.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/no_data_screen.cy.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/no_data_screen.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/no_data_screen.cy.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/onboarding/onboarding.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/onboarding/onboarding.cy.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/onboarding/onboarding.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/onboarding/onboarding.cy.ts index e7298607de8e6..f5371ac983708 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/onboarding/onboarding.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/onboarding/onboarding.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ import { apm, timerange } from '@kbn/apm-synthtrace-client'; -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; const start = Date.now() - 1000; const end = Date.now(); diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/rules/error_count.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/rules/error_count.cy.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/rules/error_count.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/rules/error_count.cy.ts index a9ba45b4ad319..1a5d5b9bb1652 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/rules/error_count.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/rules/error_count.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; import { generateData } from './generate_data'; function deleteAllRules() { diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/rules/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/rules/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/rules/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/rules/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_groups/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_groups/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_groups/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_groups/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_groups/service_groups.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_groups/service_groups.cy.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_groups/service_groups.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_groups/service_groups.cy.ts index a83766389a1f2..bc7e7d331cceb 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_groups/service_groups.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_groups/service_groups.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; import { generateData } from './generate_data'; const start = Date.now() - 1000; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/header_filters/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/header_filters/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/header_filters/header_filters.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/header_filters.cy.ts similarity index 96% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/header_filters/header_filters.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/header_filters.cy.ts index 8e30f2784eb34..2582638dc5c69 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/header_filters/header_filters.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/header_filters.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ import url from 'url'; -import { synthtrace } from '../../../../../synthtrace'; +import { synthtrace } from '../../../../synthtrace'; import { generateData } from './generate_data'; const start = '2021-10-10T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/service_inventory.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/service_inventory.cy.ts similarity index 96% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/service_inventory.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/service_inventory.cy.ts index 032409ec56d40..889724f664f9b 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_inventory/service_inventory.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/service_inventory.cy.ts @@ -6,9 +6,9 @@ */ import moment from 'moment'; import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; -import { checkA11y } from '../../../support/commands'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; +import { checkA11y } from '../../support/commands'; import { generateMultipleServicesData } from './generate_data'; const timeRange = { diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_map/service_map.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_map/service_map.cy.ts similarity index 93% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_map/service_map.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_map/service_map.cy.ts index 1ff28bfb46cbf..2471617e7b1f4 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_map/service_map.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_map/service_map.cy.ts @@ -5,8 +5,8 @@ * 2.0. */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/alerts_table.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/alerts_table.cy.ts similarity index 90% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/alerts_table.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/alerts_table.cy.ts index 6a5cd12bc7842..0bce81a620a51 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/alerts_table.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/alerts_table.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/aws_lambda/aws_lambda.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/aws_lambda/aws_lambda.cy.ts similarity index 96% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/aws_lambda/aws_lambda.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/aws_lambda/aws_lambda.cy.ts index a70620ee18f82..1453983b23a50 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/aws_lambda/aws_lambda.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/aws_lambda/aws_lambda.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ import url from 'url'; -import { synthtrace } from '../../../../../synthtrace'; +import { synthtrace } from '../../../../synthtrace'; import { generateData } from './generate_data'; const start = '2021-10-10T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/aws_lambda/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/aws_lambda/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/aws_lambda/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/aws_lambda/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/azure_functions/azure_functions.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/azure_functions/azure_functions.cy.ts similarity index 96% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/azure_functions/azure_functions.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/azure_functions/azure_functions.cy.ts index 8193ff5bb947a..73ccdfefb9a2c 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/azure_functions/azure_functions.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/azure_functions/azure_functions.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ import url from 'url'; -import { synthtrace } from '../../../../../synthtrace'; +import { synthtrace } from '../../../../synthtrace'; import { generateData } from './generate_data'; const start = '2021-10-10T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/azure_functions/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/azure_functions/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/azure_functions/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/azure_functions/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/errors_table.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/errors_table.cy.ts similarity index 94% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/errors_table.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/errors_table.cy.ts index 2970aa3887e95..87e9b3fe41b53 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/errors_table.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/errors_table.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/generate_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/generate_data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/generate_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/generate_data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/generate_mobile.data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/generate_mobile.data.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/generate_mobile.data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/generate_mobile.data.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/header_filters.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/header_filters.cy.ts similarity index 97% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/header_filters.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/header_filters.cy.ts index 05fe508092ff4..0bc56193e3dd9 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/header_filters.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/header_filters.cy.ts @@ -5,8 +5,8 @@ * 2.0. */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/instances_table.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/instances_table.cy.ts similarity index 97% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/instances_table.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/instances_table.cy.ts index bda4e78f56c48..8e1dda2b69e5f 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/instances_table.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/instances_table.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/mobile_overview_with_most_used_charts.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/mobile_overview_with_most_used_charts.cy.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/mobile_overview_with_most_used_charts.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/mobile_overview_with_most_used_charts.cy.ts index 6a05a9f0fcb1f..ca9137fd1f573 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/mobile_overview_with_most_used_charts.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/mobile_overview_with_most_used_charts.cy.ts @@ -6,7 +6,7 @@ */ import url from 'url'; import moment from 'moment/moment'; -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; import { generateMobileData } from './generate_mobile.data'; const start = Date.now() - 1000; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/service_and_mobile_overview.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/service_and_mobile_overview.cy.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/service_and_mobile_overview.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/service_and_mobile_overview.cy.ts index fec0dbbe36686..382dc0cc51240 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/service_overview/service_and_mobile_overview.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/service_and_mobile_overview.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; import { generateData } from './generate_data'; const start = Date.now() - 1000; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/service_overview.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/service_overview.cy.ts similarity index 97% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/service_overview.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/service_overview.cy.ts index 8173e94557b29..35184a59880d7 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/service_overview.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/service_overview.cy.ts @@ -7,9 +7,9 @@ import moment from 'moment'; import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; -import { checkA11y } from '../../../support/commands'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; +import { checkA11y } from '../../support/commands'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/time_comparison.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/time_comparison.cy.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/time_comparison.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/time_comparison.cy.ts index f62813a871e70..c3824036283cf 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/service_overview/time_comparison.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_overview/time_comparison.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; import moment from 'moment'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/settings/agent_configurations.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/settings/agent_configurations.cy.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/settings/agent_configurations.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/settings/agent_configurations.cy.ts index c5342dc251459..f60bdf19b0071 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/settings/agent_configurations.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/settings/agent_configurations.cy.ts @@ -6,7 +6,7 @@ */ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; const timeRange = { rangeFrom: '2021-10-10T00:00:00.000Z', diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/settings/custom_links.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/settings/custom_links.cy.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/settings/custom_links.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/settings/custom_links.cy.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/storage_explorer/storage_explorer.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts similarity index 97% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/storage_explorer/storage_explorer.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts index 4894147002a78..5abd41ba5fe0c 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/storage_explorer/storage_explorer.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts @@ -6,9 +6,9 @@ */ import moment from 'moment'; import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; -import { checkA11y } from '../../../support/commands'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; +import { checkA11y } from '../../support/commands'; const timeRange = { rangeFrom: '2021-10-10T00:00:00.000Z', diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/trace_explorer/trace_explorer.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/trace_explorer/trace_explorer.cy.ts similarity index 90% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/trace_explorer/trace_explorer.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/trace_explorer/trace_explorer.cy.ts index 3dad4bba27d88..7130bdfd0d339 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/trace_explorer/trace_explorer.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/trace_explorer/trace_explorer.cy.ts @@ -6,8 +6,8 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/generate_span_links_data.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/generate_span_links_data.ts similarity index 98% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/generate_span_links_data.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/generate_span_links_data.ts index c9d52c0968089..4558f98fcd421 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/generate_span_links_data.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/generate_span_links_data.ts @@ -5,8 +5,8 @@ * 2.0. */ import { apm, timerange } from '@kbn/apm-synthtrace-client'; -import { SpanLink } from '../../../../../typings/es_schemas/raw/fields/span_links'; -import { synthtrace } from '../../../../synthtrace'; +import { SpanLink } from '../../../../typings/es_schemas/raw/fields/span_links'; +import { synthtrace } from '../../../synthtrace'; function getProducerInternalOnly() { const producerInternalOnlyInstance = apm diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/span_links.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/span_links.cy.ts similarity index 99% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/span_links.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/span_links.cy.ts index 0ec3c16e8658b..ec199c618989b 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/span_links.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/span_links.cy.ts @@ -6,7 +6,7 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; +import { synthtrace } from '../../../synthtrace'; import { generateSpanLinksData } from './generate_span_links_data'; const start = '2022-01-01T00:00:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/transaction_details.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/transaction_details.cy.ts similarity index 95% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/transaction_details.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/transaction_details.cy.ts index 6886fc582f631..4c6a928697fb0 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transaction_details/transaction_details.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/transaction_details.cy.ts @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { APIReturnType } from '../../../../../public/services/rest/create_call_apm_api'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; +import type { APIReturnType } from '../../../../public/services/rest/create_call_apm_api'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transactions_overview/transactions_overview.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/transactions_overview/transactions_overview.cy.ts similarity index 91% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transactions_overview/transactions_overview.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/transactions_overview/transactions_overview.cy.ts index 2e7e0d336cd5d..dcabd8ee53090 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/transactions_overview/transactions_overview.cy.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/transactions_overview/transactions_overview.cy.ts @@ -6,9 +6,9 @@ */ import url from 'url'; -import { synthtrace } from '../../../../synthtrace'; -import { opbeans } from '../../../fixtures/synthtrace/opbeans'; -import { checkA11y } from '../../../support/commands'; +import { synthtrace } from '../../../synthtrace'; +import { opbeans } from '../../fixtures/synthtrace/opbeans'; +import { checkA11y } from '../../support/commands'; const start = '2021-10-10T00:00:00.000Z'; const end = '2021-10-10T00:15:00.000Z'; diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/tutorial/tutorial.cy.ts b/x-pack/plugins/apm/ftr_e2e/cypress/e2e/tutorial/tutorial.cy.ts similarity index 100% rename from x-pack/plugins/apm/ftr_e2e/cypress/e2e/read_only_user/tutorial/tutorial.cy.ts rename to x-pack/plugins/apm/ftr_e2e/cypress/e2e/tutorial/tutorial.cy.ts diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/tasks/es_archiver.ts b/x-pack/plugins/apm/ftr_e2e/cypress/tasks/es_archiver.ts deleted file mode 100644 index 2d9b530ed76a9..0000000000000 --- a/x-pack/plugins/apm/ftr_e2e/cypress/tasks/es_archiver.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import path from 'path'; -import { execSync } from 'child_process'; - -const ES_ARCHIVE_DIR = path.resolve( - __dirname, - '../../cypress/fixtures/es_archiver' -); - -// Otherwise execSync would inject NODE_TLS_REJECT_UNAUTHORIZED=0 and node would abort if used over https -const NODE_TLS_REJECT_UNAUTHORIZED = '1'; - -export const esArchiverLoad = (archiveName: string) => { - const archivePath = path.join(ES_ARCHIVE_DIR, archiveName); - execSync( - `node ../../../../scripts/es_archiver load "${archivePath}" --config ../../../test/functional/config.base.js`, - { env: { ...process.env, NODE_TLS_REJECT_UNAUTHORIZED }, stdio: 'inherit' } - ); -}; - -export const esArchiverUnload = (archiveName: string) => { - const archivePath = path.join(ES_ARCHIVE_DIR, archiveName); - execSync( - `node ../../../../scripts/es_archiver unload "${archivePath}" --config ../../../test/functional/config.base.js`, - { env: { ...process.env, NODE_TLS_REJECT_UNAUTHORIZED }, stdio: 'inherit' } - ); -}; - -export const esArchiverResetKibana = () => { - execSync( - `node ../../../../scripts/es_archiver empty-kibana-index --config ../../../test/functional/config.base.js`, - { env: { ...process.env, NODE_TLS_REJECT_UNAUTHORIZED }, stdio: 'inherit' } - ); -}; diff --git a/x-pack/plugins/security_solution/public/management/cypress/fixtures/artifacts_page.ts b/x-pack/plugins/security_solution/public/management/cypress/fixtures/artifacts_page.ts index 77490b84d0773..e6c3c941482a9 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/fixtures/artifacts_page.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/fixtures/artifacts_page.ts @@ -358,7 +358,7 @@ export const getArtifactsListTestsData = (): ArtifactsFixtureType[] => [ }, { type: 'click', - selector: 'blocklist-form-file.path', + selector: 'blocklist-form-file.path.caseless', }, { type: 'click', @@ -379,7 +379,7 @@ export const getArtifactsListTestsData = (): ArtifactsFixtureType[] => [ { selector: 'blocklistPage-card-criteriaConditions', value: - 'OSIS WindowsAND file.pathis one of\nc:\\randomFolder\\randomFile.exe\nc:\\randomFolder\\randomFile2.exe', + 'OSIS WindowsAND file.path.caselessis one of\nc:\\randomFolder\\randomFile.exe\nc:\\randomFolder\\randomFile2.exe', }, { selector: 'blocklistPage-card-header-title', diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/translations.ts b/x-pack/plugins/security_solution/public/management/pages/blocklist/translations.ts index c084c9443ba5d..60e87de41bf21 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/translations.ts @@ -76,6 +76,12 @@ export const CONDITION_FIELD_TITLE: { [K in BlocklistConditionEntryField]: strin 'file.path': i18n.translate('xpack.securitySolution.blocklist.entry.field.path', { defaultMessage: 'Path', }), + 'file.path.caseless': i18n.translate( + 'xpack.securitySolution.blocklist.entry.field.path.caseless', + { + defaultMessage: 'Path', + } + ), 'file.Ext.code_signature': i18n.translate( 'xpack.securitySolution.blocklist.entry.field.signature', { defaultMessage: 'Signature' } @@ -89,6 +95,12 @@ export const CONDITION_FIELD_DESCRIPTION: { [K in BlocklistConditionEntryField]: 'file.path': i18n.translate('xpack.securitySolution.blocklist.entry.field.description.path', { defaultMessage: 'The full path of the application', }), + 'file.path.caseless': i18n.translate( + 'xpack.securitySolution.blocklist.entry.field.description.path.caseless', + { + defaultMessage: 'The full path of the application (case insenstive)', + } + ), 'file.Ext.code_signature': i18n.translate( 'xpack.securitySolution.blocklist.entry.field.description.signature', { defaultMessage: 'The signer of the application' } diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx index 5ca42ce213448..e07dc6f2d081b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx @@ -225,6 +225,38 @@ describe('blocklist form', () => { userEvent.click(screen.getByRole('option', { name: /path/i })); const expected = createOnChangeArgs({ item: createItem({ + entries: [createEntry('file.path.caseless', [])], + }), + }); + expect(onChangeSpy).toHaveBeenCalledWith(expected); + }); + + it('should correctly create `file.path.caseless` when Mac OS is selected', async () => { + render(createProps({ item: createItem({ os_types: [OperatingSystem.MAC] }) })); + expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Mac'); + + userEvent.click(screen.getByTestId('blocklist-form-field-select')); + await waitForEuiPopoverOpen(); + userEvent.click(screen.getByRole('option', { name: /path/i })); + const expected = createOnChangeArgs({ + item: createItem({ + os_types: [OperatingSystem.MAC], + entries: [createEntry('file.path.caseless', [])], + }), + }); + expect(onChangeSpy).toHaveBeenCalledWith(expected); + }); + + it('should correctly create `file.path` when Linux is selected', async () => { + render(createProps({ item: createItem({ os_types: [OperatingSystem.LINUX] }) })); + expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Linux'); + + userEvent.click(screen.getByTestId('blocklist-form-field-select')); + await waitForEuiPopoverOpen(); + userEvent.click(screen.getByRole('option', { name: /path/i })); + const expected = createOnChangeArgs({ + item: createItem({ + os_types: [OperatingSystem.LINUX], entries: [createEntry('file.path', [])], }), }); diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx index 612bfdb1b2761..f819a55690563 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx @@ -178,14 +178,31 @@ export const BlockListForm = memo( ); const fieldOptions: Array> = useMemo(() => { - const selectableFields: Array> = ( - ['file.hash.*', 'file.path'] as BlocklistConditionEntryField[] - ).map((field) => ({ - value: field, - inputDisplay: CONDITION_FIELD_TITLE[field], - dropdownDisplay: getDropdownDisplay(field), - 'data-test-subj': getTestId(field), - })); + const selectableFields: Array> = []; + + selectableFields.push({ + value: 'file.hash.*', + inputDisplay: CONDITION_FIELD_TITLE['file.hash.*'], + dropdownDisplay: getDropdownDisplay('file.hash.*'), + 'data-test-subj': getTestId('file.hash.*'), + }); + + if (selectedOs === OperatingSystem.LINUX) { + selectableFields.push({ + value: 'file.path', + inputDisplay: CONDITION_FIELD_TITLE['file.path'], + dropdownDisplay: getDropdownDisplay('file.path'), + 'data-test-subj': getTestId('file.path'), + }); + } else { + selectableFields.push({ + value: 'file.path.caseless', + inputDisplay: CONDITION_FIELD_TITLE['file.path.caseless'], + dropdownDisplay: getDropdownDisplay('file.path.caseless'), + 'data-test-subj': getTestId('file.path.caseless'), + }); + } + if (selectedOs === OperatingSystem.WINDOWS) { selectableFields.push({ value: 'file.Ext.code_signature', diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/blocklist_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/blocklist_validator.ts index 0a7c29bb67c2b..3841c6f0e9b67 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/blocklist_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/blocklist_validator.ts @@ -21,12 +21,16 @@ import { isValidHash } from '../../../../common/endpoint/service/artifacts/valid import { EndpointArtifactExceptionValidationError } from './errors'; const allowedHashes: Readonly = ['file.hash.md5', 'file.hash.sha1', 'file.hash.sha256']; +const allowedFilePaths: Readonly = ['file.path', 'file.path.caseless']; const FileHashField = schema.oneOf( allowedHashes.map((hash) => schema.literal(hash)) as [Type] ); -const FilePath = schema.literal('file.path'); +const FilePath = schema.oneOf( + allowedFilePaths.map((path) => schema.literal(path)) as [Type] +); + const FileCodeSigner = schema.literal('file.Ext.code_signature'); const ConditionEntryTypeSchema = schema.literal('match_any'); diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 9bef8ead17f65..22ee2086a1a33 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -1225,7 +1225,6 @@ "dashboard.panel.title.clonedTag": "copier", "dashboard.panel.unableToMigratePanelDataForSixOneZeroErrorMessage": "Impossible de migrer les données du panneau pour une rétro-compatibilité \"6.1.0\". Le panneau ne contient pas les champs de colonne et/ou de ligne attendus.", "dashboard.panel.unlinkFromLibrary": "Dissocier de la bibliothèque", - "dashboard.placeholder.factory.displayName": "paramètre fictif", "dashboard.resetChangesConfirmModal.confirmButtonLabel": "Réinitialiser le tableau de bord", "dashboard.resetChangesConfirmModal.resetChangesDescription": "Ce tableau de bord va revenir à son dernier état d'enregistrement. Vous risquez de perdre les modifications apportées aux filtres et aux requêtes.", "dashboard.resetChangesConfirmModal.resetChangesTitle": "Réinitialiser le tableau de bord ?", @@ -3509,7 +3508,6 @@ "home.sampleData.customIntegrationsTitle": "Exemple de données", "home.sampleData.ecommerceSpec.ordersTitle": "[e-commerce] Commandes", "home.sampleData.ecommerceSpec.salesCountMapTitle": "[e-commerce] Carte du nombre de ventes", - "home.sampleData.ecommerceSpec.soldProductsPerDayTitle": "[e-commerce] Produits vendus par jour", "home.sampleData.ecommerceSpecDescription": "Exemple de données, visualisations et tableaux de bord pour le suivi des commandes d’e-commerce.", "home.sampleData.ecommerceSpecTitle": "Exemple de commandes d’e-commerce", "home.sampleData.flightsSpec.airportConnectionsTitle": "[Vols] Connexions aéroportuaires (passage au-dessus d'un aéroport)", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index b22c36e25a649..84c71c20e176d 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -1239,7 +1239,6 @@ "dashboard.panel.title.clonedTag": "コピー", "dashboard.panel.unableToMigratePanelDataForSixOneZeroErrorMessage": "「6.1.0」のダッシュボードの互換性のため、パネルデータを移行できませんでした。パネルには想定された列または行フィールドがありません", "dashboard.panel.unlinkFromLibrary": "ライブラリからのリンクを解除", - "dashboard.placeholder.factory.displayName": "プレースホルダー", "dashboard.resetChangesConfirmModal.confirmButtonLabel": "ダッシュボードをリセット", "dashboard.resetChangesConfirmModal.resetChangesDescription": "このダッシュボードは最後に保存された状態に戻ります。 フィルターとクエリの変更が失われる場合があります。", "dashboard.resetChangesConfirmModal.resetChangesTitle": "ダッシュボードをリセットしますか?", @@ -3524,7 +3523,6 @@ "home.sampleData.customIntegrationsTitle": "サンプルデータ", "home.sampleData.ecommerceSpec.ordersTitle": "[e コマース] 注文", "home.sampleData.ecommerceSpec.salesCountMapTitle": "[eコマース] 売上カウントマップ", - "home.sampleData.ecommerceSpec.soldProductsPerDayTitle": "[e コマース] 1 日の販売製品", "home.sampleData.ecommerceSpecDescription": "e コマースの注文をトラッキングするサンプルデータ、ビジュアライゼーション、ダッシュボードです。", "home.sampleData.ecommerceSpecTitle": "サンプル e コマース注文", "home.sampleData.flightsSpec.airportConnectionsTitle": "[フライト] 空港乗り継ぎ(空港にカーソルを合わせてください)", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 89dec8049136f..c15e2f639c597 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -1239,7 +1239,6 @@ "dashboard.panel.title.clonedTag": "副本", "dashboard.panel.unableToMigratePanelDataForSixOneZeroErrorMessage": "无法迁移用于“6.1.0”向后兼容的面板数据,面板不包含所需的列和/或行字段", "dashboard.panel.unlinkFromLibrary": "取消与库的链接", - "dashboard.placeholder.factory.displayName": "占位符", "dashboard.resetChangesConfirmModal.confirmButtonLabel": "重置仪表板", "dashboard.resetChangesConfirmModal.resetChangesDescription": "此仪表板将返回到其最后保存的状态。 您可能会丢失对筛选和查询的更改。", "dashboard.resetChangesConfirmModal.resetChangesTitle": "重置仪表板?", @@ -3523,7 +3522,6 @@ "home.sampleData.customIntegrationsTitle": "样例数据", "home.sampleData.ecommerceSpec.ordersTitle": "[电子商务] 订单", "home.sampleData.ecommerceSpec.salesCountMapTitle": "[电子商务] 销售计数地图", - "home.sampleData.ecommerceSpec.soldProductsPerDayTitle": "[电子商务] 每天已售产品", "home.sampleData.ecommerceSpecDescription": "用于追踪电子商务订单的样例数据、可视化和仪表板。", "home.sampleData.ecommerceSpecTitle": "样例电子商务订单", "home.sampleData.flightsSpec.airportConnectionsTitle": "[航班] 机场航线(将鼠标悬停在机场上)", diff --git a/x-pack/test/functional/apps/lens/group4/tsdb.ts b/x-pack/test/functional/apps/lens/group4/tsdb.ts index 16d1298eab440..edbef46dc1f08 100644 --- a/x-pack/test/functional/apps/lens/group4/tsdb.ts +++ b/x-pack/test/functional/apps/lens/group4/tsdb.ts @@ -311,8 +311,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.info(`Indexed ${res.items.length} test data docs.`); }; - // Failing ES promotion: https://github.com/elastic/kibana/issues/163970 - describe.skip('lens tsdb', function () { + describe('lens tsdb', function () { const tsdbIndex = 'kibana_sample_data_logstsdb'; const tsdbDataView = tsdbIndex; const tsdbEsArchive = 'test/functional/fixtures/es_archiver/kibana_sample_data_logs_tsdb'; @@ -623,21 +622,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { { index: 'regular_index', create: true, removeTSDBFields: true }, ], }, - { - name: 'Dataview with an additional downsampled TSDB stream', - indexes: [ - { index: initialIndex }, - { index: 'tsdb_index_2', create: true, tsdb: true, downsample: true }, - ], - }, - { - name: 'Dataview with additional regular index and a downsampled TSDB stream', - indexes: [ - { index: initialIndex }, - { index: 'regular_index', create: true, removeTSDBFields: true }, - { index: 'tsdb_index_2', create: true, tsdb: true, downsample: true }, - ], - }, + // { + // name: 'Dataview with an additional downsampled TSDB stream', + // indexes: [ + // { index: initialIndex }, + // { index: 'tsdb_index_2', create: true, tsdb: true, downsample: true }, + // ], + // }, + // { + // name: 'Dataview with additional regular index and a downsampled TSDB stream', + // indexes: [ + // { index: initialIndex }, + // { index: 'regular_index', create: true, removeTSDBFields: true }, + // { index: 'tsdb_index_2', create: true, tsdb: true, downsample: true }, + // ], + // }, { name: 'Dataview with an additional TSDB stream', indexes: [{ index: initialIndex }, { index: 'tsdb_index_2', create: true, tsdb: true }], diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/value_lists/value_lists.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/value_lists/value_lists.cy.ts index 60b0b02d79726..697ccadbdbc7f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/value_lists/value_lists.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/value_lists/value_lists.cy.ts @@ -17,33 +17,35 @@ import { selectValueListsFile, uploadValueList, selectValueListType, - deleteAllValueListsFromUI, closeValueListsModal, importValueList, deleteValueListsFile, exportValueList, waitForListsIndex, + deleteValueLists, } from '../../../tasks/lists'; import { VALUE_LISTS_TABLE, VALUE_LISTS_ROW, VALUE_LISTS_MODAL_ACTIVATOR, } from '../../../screens/lists'; +import { refreshIndex } from '../../../tasks/api_calls/elasticsearch'; + +const TEXT_LIST_FILE_NAME = 'value_list.txt'; +const IPS_LIST_FILE_NAME = 'ip_list.txt'; +const CIDRS_LIST_FILE_NAME = 'cidr_list.txt'; describe('value lists', () => { describe('management modal', { tags: [tag.ESS, tag.SERVERLESS] }, () => { beforeEach(() => { login(); + deleteValueLists([TEXT_LIST_FILE_NAME, IPS_LIST_FILE_NAME, CIDRS_LIST_FILE_NAME]); createListsIndex(); visitWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL); waitForListsIndex(); waitForValueListsModalToBeLoaded(); }); - afterEach(() => { - deleteAllValueListsFromUI(); - }); - it('can open and close the modal', () => { openValueListsModal(); closeValueListsModal(); @@ -55,57 +57,53 @@ describe('value lists', () => { }); it('creates a "keyword" list from an uploaded file', () => { - const listName = 'value_list.txt'; selectValueListType('keyword'); - selectValueListsFile(listName); + selectValueListsFile(TEXT_LIST_FILE_NAME); uploadValueList(); cy.get(VALUE_LISTS_TABLE) .find(VALUE_LISTS_ROW) .should(($row) => { - expect($row.text()).to.contain(listName); + expect($row.text()).to.contain(TEXT_LIST_FILE_NAME); expect($row.text()).to.contain('Keywords'); }); }); it('creates a "text" list from an uploaded file', () => { - const listName = 'value_list.txt'; selectValueListType('text'); - selectValueListsFile(listName); + selectValueListsFile(TEXT_LIST_FILE_NAME); uploadValueList(); cy.get(VALUE_LISTS_TABLE) .find(VALUE_LISTS_ROW) .should(($row) => { - expect($row.text()).to.contain(listName); + expect($row.text()).to.contain(TEXT_LIST_FILE_NAME); expect($row.text()).to.contain('Text'); }); }); it('creates a "ip" list from an uploaded file', () => { - const listName = 'ip_list.txt'; selectValueListType('ip'); - selectValueListsFile(listName); + selectValueListsFile(IPS_LIST_FILE_NAME); uploadValueList(); cy.get(VALUE_LISTS_TABLE) .find(VALUE_LISTS_ROW) .should(($row) => { - expect($row.text()).to.contain(listName); + expect($row.text()).to.contain(IPS_LIST_FILE_NAME); expect($row.text()).to.contain('IP addresses'); }); }); it('creates a "ip_range" list from an uploaded file', () => { - const listName = 'cidr_list.txt'; selectValueListType('ip_range'); - selectValueListsFile(listName); + selectValueListsFile(CIDRS_LIST_FILE_NAME); uploadValueList(); cy.get(VALUE_LISTS_TABLE) .find(VALUE_LISTS_ROW) .should(($row) => { - expect($row.text()).to.contain(listName); + expect($row.text()).to.contain(CIDRS_LIST_FILE_NAME); expect($row.text()).to.contain('IP ranges'); }); }); @@ -113,63 +111,68 @@ describe('value lists', () => { describe('delete list types', () => { it('deletes a "keyword" list from an uploaded file', () => { - const listName = 'value_list.txt'; - importValueList(listName, 'keyword'); + importValueList(TEXT_LIST_FILE_NAME, 'keyword'); openValueListsModal(); - deleteValueListsFile(listName); + deleteValueListsFile(TEXT_LIST_FILE_NAME); cy.get(VALUE_LISTS_TABLE) .find(VALUE_LISTS_ROW) .should(($row) => { - expect($row.text()).not.to.contain(listName); + expect($row.text()).not.to.contain(TEXT_LIST_FILE_NAME); }); }); it('deletes a "text" list from an uploaded file', () => { - const listName = 'value_list.txt'; - importValueList(listName, 'text'); + importValueList(TEXT_LIST_FILE_NAME, 'text'); openValueListsModal(); - deleteValueListsFile(listName); + deleteValueListsFile(TEXT_LIST_FILE_NAME); cy.get(VALUE_LISTS_TABLE) .find(VALUE_LISTS_ROW) .should(($row) => { - expect($row.text()).not.to.contain(listName); + expect($row.text()).not.to.contain(TEXT_LIST_FILE_NAME); }); }); it('deletes a "ip" from an uploaded file', () => { - const listName = 'ip_list.txt'; - importValueList(listName, 'ip'); + importValueList(IPS_LIST_FILE_NAME, 'ip'); openValueListsModal(); - deleteValueListsFile(listName); + deleteValueListsFile(IPS_LIST_FILE_NAME); cy.get(VALUE_LISTS_TABLE) .find(VALUE_LISTS_ROW) .should(($row) => { - expect($row.text()).not.to.contain(listName); + expect($row.text()).not.to.contain(IPS_LIST_FILE_NAME); }); }); it('deletes a "ip_range" from an uploaded file', () => { - const listName = 'cidr_list.txt'; - importValueList(listName, 'ip_range', ['192.168.100.0']); + importValueList(CIDRS_LIST_FILE_NAME, 'ip_range', ['192.168.100.0']); openValueListsModal(); - deleteValueListsFile(listName); + deleteValueListsFile(CIDRS_LIST_FILE_NAME); cy.get(VALUE_LISTS_TABLE) .find(VALUE_LISTS_ROW) .should(($row) => { - expect($row.text()).not.to.contain(listName); + expect($row.text()).not.to.contain(CIDRS_LIST_FILE_NAME); }); }); }); describe('export list types', () => { it('exports a "keyword" list from an uploaded file', () => { - const listName = 'value_list.txt'; - cy.intercept('POST', `/api/lists/items/_export?list_id=${listName}`).as('exportList'); - importValueList('value_list.txt', 'keyword'); + cy.intercept('POST', `/api/lists/items/_export?list_id=${TEXT_LIST_FILE_NAME}`).as( + 'exportList' + ); + importValueList(TEXT_LIST_FILE_NAME, 'keyword'); + + // Importing value lists includes bulk creation of list items with refresh=wait_for + // While it should wait for data update and return after that it's not always a case with bulk operations. + // Sometimes list items are empty making this test flaky. + // To fix it refresh used list items index (for the default space) + refreshIndex('.items-default'); + openValueListsModal(); exportValueList(); + cy.wait('@exportList').then(({ response }) => { - cy.fixture(listName).then((list: string) => { + cy.fixture(TEXT_LIST_FILE_NAME).then((list: string) => { const [lineOne, lineTwo] = list.split('\n'); expect(response?.body).to.contain(lineOne); expect(response?.body).to.contain(lineTwo); @@ -178,13 +181,22 @@ describe('value lists', () => { }); it('exports a "text" list from an uploaded file', () => { - const listName = 'value_list.txt'; - cy.intercept('POST', `/api/lists/items/_export?list_id=${listName}`).as('exportList'); - importValueList(listName, 'text'); + cy.intercept('POST', `/api/lists/items/_export?list_id=${TEXT_LIST_FILE_NAME}`).as( + 'exportList' + ); + importValueList(TEXT_LIST_FILE_NAME, 'text'); + + // Importing value lists includes bulk creation of list items with refresh=wait_for + // While it should wait for data update and return after that it's not always a case with bulk operations. + // Sometimes list items are empty making this test flaky. + // To fix it refresh used list items index (for the default space) + refreshIndex('.items-default'); + openValueListsModal(); exportValueList(); + cy.wait('@exportList').then(({ response }) => { - cy.fixture(listName).then((list: string) => { + cy.fixture(TEXT_LIST_FILE_NAME).then((list: string) => { const [lineOne, lineTwo] = list.split('\n'); expect(response?.body).to.contain(lineOne); expect(response?.body).to.contain(lineTwo); @@ -193,13 +205,21 @@ describe('value lists', () => { }); it('exports a "ip" list from an uploaded file', () => { - const listName = 'ip_list.txt'; - cy.intercept('POST', `/api/lists/items/_export?list_id=${listName}`).as('exportList'); - importValueList(listName, 'ip'); + cy.intercept('POST', `/api/lists/items/_export?list_id=${IPS_LIST_FILE_NAME}`).as( + 'exportList' + ); + importValueList(IPS_LIST_FILE_NAME, 'ip'); + + // Importing value lists includes bulk creation of list items with refresh=wait_for + // While it should wait for data update and return after that it's not always a case with bulk operations. + // Sometimes list items are empty making this test flaky. + // To fix it refresh used list items index (for the default space) + refreshIndex('.items-default'); + openValueListsModal(); exportValueList(); cy.wait('@exportList').then(({ response }) => { - cy.fixture(listName).then((list: string) => { + cy.fixture(IPS_LIST_FILE_NAME).then((list: string) => { const [lineOne, lineTwo] = list.split('\n'); expect(response?.body).to.contain(lineOne); expect(response?.body).to.contain(lineTwo); @@ -208,13 +228,21 @@ describe('value lists', () => { }); it('exports a "ip_range" list from an uploaded file', () => { - const listName = 'cidr_list.txt'; - cy.intercept('POST', `/api/lists/items/_export?list_id=${listName}`).as('exportList'); - importValueList(listName, 'ip_range', ['192.168.100.0']); + cy.intercept('POST', `/api/lists/items/_export?list_id=${CIDRS_LIST_FILE_NAME}`).as( + 'exportList' + ); + importValueList(CIDRS_LIST_FILE_NAME, 'ip_range', ['192.168.100.0']); + + // Importing value lists includes bulk creation of list items with refresh=wait_for + // While it should wait for data update and return after that it's not always a case with bulk operations. + // Sometimes list items are empty making this test flaky. + // To fix it refresh used list items index (for the default space) + refreshIndex('.items-default'); + openValueListsModal(); exportValueList(); cy.wait('@exportList').then(({ response }) => { - cy.fixture(listName).then((list: string) => { + cy.fixture(CIDRS_LIST_FILE_NAME).then((list: string) => { const [lineOne] = list.split('\n'); expect(response?.body).to.contain(lineOne); }); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/lists.ts b/x-pack/test/security_solution_cypress/cypress/tasks/lists.ts index d160f4c2deb42..e9dd3d882b429 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/lists.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/lists.ts @@ -10,7 +10,6 @@ import { VALUE_LIST_CLOSE_BUTTON, VALUE_LIST_DELETE_BUTTON, VALUE_LIST_EXPORT_BUTTON, - VALUE_LIST_FILES, VALUE_LIST_FILE_PICKER, VALUE_LIST_FILE_UPLOAD_BUTTON, VALUE_LIST_TYPE_SELECTOR, @@ -73,9 +72,14 @@ export const exportValueList = (): Cypress.Chainable> => { /** * Given an array of value lists this will delete them all using Cypress Request and the lists REST API + * + * If a list doesn't exist it ignores the error. + * * Ref: https://www.elastic.co/guide/en/security/current/lists-api-delete-container.html */ -const deleteValueLists = (lists: string[]): Array>> => { +export const deleteValueLists = ( + lists: string[] +): Array>> => { return lists.map((list) => deleteValueList(list)); }; @@ -88,6 +92,7 @@ const deleteValueList = (list: string): Cypress.Chainable { return cy.fixture(file).then((data) => uploadListItemData(file, type, data)); }; - -/** - * If you are on the value lists from the UI, this will loop over all the HTML elements - * that have action-delete-value-list-${list_name} and delete all of those value lists - * using Cypress Request and the lists REST API. - * If the UI does not contain any value based lists this will not fail. If the UI does - * contain value based lists but the backend does not return a success on DELETE then this - * will cause errors. - * Ref: https://www.elastic.co/guide/en/security/current/lists-api-delete-container.html - */ -export const deleteAllValueListsFromUI = (): Array< - Cypress.Chainable> -> => { - const lists = Cypress.$(VALUE_LIST_FILES) - .toArray() - .reduce((accum, $el) => { - const attribute = $el.getAttribute('data-test-subj'); - if (attribute != null) { - const list = attribute.substr('data-test-subj-value-list'.length); - return [...accum, list]; - } else { - return accum; - } - }, []); - return deleteValueLists(lists); -}; diff --git a/x-pack/test/security_solution_endpoint/apps/integrations/mocks.ts b/x-pack/test/security_solution_endpoint/apps/integrations/mocks.ts index d8cdbf5a6f6b6..1d5ab43c28a32 100644 --- a/x-pack/test/security_solution_endpoint/apps/integrations/mocks.ts +++ b/x-pack/test/security_solution_endpoint/apps/integrations/mocks.ts @@ -423,7 +423,7 @@ export const getArtifactsListTestsData = () => [ { selector: 'blocklistPage-card-criteriaConditions', value: - 'OSIS Windows\nAND file.pathIS ONE OF\nc:\\randomFolder\\randomFile.exe\nc:\\randomFolder\\randomFile2.exe', + 'OSIS Windows\nAND file.path.caselessIS ONE OF\nc:\\randomFolder\\randomFile.exe\nc:\\randomFolder\\randomFile2.exe', }, { selector: 'blocklistPage-card-header-title', @@ -499,7 +499,7 @@ export const getArtifactsListTestsData = () => [ { field: 'file.path', operator: 'included', - type: 'exact_cased_any', + type: 'exact_caseless_any', value: ['c:\\randomFolder\\randomFile.exe', ' c:\\randomFolder\\randomFile2.exe'], }, ],