From 50ee2221bce9e561a19c3ddb098a1a82f3c09a78 Mon Sep 17 00:00:00 2001 From: Liza K Date: Sun, 7 Feb 2021 17:10:04 +0200 Subject: [PATCH 1/7] added an info flyout to session management --- .../components/actions/get_action.tsx | 11 +- .../components/actions/info_button.tsx | 159 ++++++++++++++++++ .../sessions_mgmt/components/actions/types.ts | 1 + .../public/search/sessions_mgmt/lib/api.ts | 3 + .../public/search/sessions_mgmt/types.ts | 2 + 5 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx index edc5037f1dbec..d3ac0df31bdfd 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx @@ -12,15 +12,24 @@ import { SearchSessionsMgmtAPI } from '../../lib/api'; import { UISession } from '../../types'; import { DeleteButton } from './delete_button'; import { ExtendButton } from './extend_button'; +import { InfoButton } from './info_button'; import { ACTION, OnActionComplete } from './types'; export const getAction = ( api: SearchSessionsMgmtAPI, actionType: string, - { id, name, expires }: UISession, + uiSession: UISession, onActionComplete: OnActionComplete ): IClickActionDescriptor | null => { + const { id, name, expires } = uiSession; switch (actionType) { + case ACTION.INFO: + return { + iconType: 'iInCircle', + textColor: 'default', + label: , + }; + case ACTION.DELETE: return { iconType: 'crossInACircleFilled', diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx new file mode 100644 index 0000000000000..a1dee45084a7d --- /dev/null +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx @@ -0,0 +1,159 @@ +/* + * 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 { + EuiDescriptionList, + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutHeader, + EuiPortal, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import moment from 'moment'; +import React, { Component, Fragment } from 'react'; +import { Filter, Query, TimeRange } from 'src/plugins/data/public'; +import { UISession } from '../../types'; +import { TableText } from '../'; + +interface Props { + searchSession: UISession; +} + +interface State { + isLoading: boolean; + isFlyoutVisible: boolean; + calloutTitle: string; + error: Error | null; +} + +export class InfoButton extends Component { + constructor(props: Props) { + super(props); + + this.state = { + isLoading: false, + isFlyoutVisible: false, + calloutTitle: 'Search Session Info', + error: null, + }; + + this.closeFlyout = this.closeFlyout.bind(this); + this.showFlyout = this.showFlyout.bind(this); + } + + public renderInfo() { + const { error: err } = this.state; + if (err) { + return err.message; + } + + const { created, id, initialState, restoreState } = this.props.searchSession; + + const sessionInfo = [ + { + title: 'Search Session Id', + description: id, + }, + { + title: 'Created at', + description: moment(created).toLocaleString(), + }, + ]; + + if (initialState.timeRange) { + const initialTimerange = initialState.timeRange as TimeRange; + sessionInfo.push({ + title: 'Initial time range', + description: `${initialTimerange.from} - ${initialTimerange.to}`, + }); + } + + if (restoreState.timeRange) { + const restoreTimerange = restoreState.timeRange as TimeRange; + sessionInfo.push({ + title: 'Actual time range', + description: `${restoreTimerange.from} - ${restoreTimerange.to}`, + }); + } + + if (restoreState.query) { + const query = restoreState.query as Query; + sessionInfo.push({ + title: 'Query', + description: query.query ? `${query.query} (${query.language})` : 'N/A', + }); + } + + if (restoreState.filters) { + const filters = restoreState.filters as Filter[]; + sessionInfo.push({ + title: 'Filters', + description: filters && filters.length ? JSON.stringify(filters) : 'N/A', + }); + } + + return ( + + + + + ); + } + + public render() { + let flyout; + + if (this.state.isFlyoutVisible) { + flyout = ( + + + + +

{this.state.calloutTitle}

+
+
+ + {this.renderInfo()} + +
+
+ ); + } + + return ( + + + + + {flyout} + + ); + } + + private closeFlyout = () => { + this.setState({ + isFlyoutVisible: false, + }); + }; + + private showFlyout = () => { + this.setState({ isFlyoutVisible: true }); + }; +} diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts index 5f82f16adcbb6..2515887a6927c 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts @@ -8,6 +8,7 @@ export type OnActionComplete = () => void; export enum ACTION { + INFO = 'info', EXTEND = 'extend', DELETE = 'delete', } diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts index 264556f91cc37..8c4d72b1051e6 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts @@ -21,6 +21,7 @@ type UrlGeneratorsStart = SharePluginStart['urlGenerators']; function getActions(status: SearchSessionStatus) { const actions: ACTION[] = []; + actions.push(ACTION.INFO); if (status === SearchSessionStatus.IN_PROGRESS || status === SearchSessionStatus.COMPLETE) { actions.push(ACTION.EXTEND); actions.push(ACTION.DELETE); @@ -78,6 +79,8 @@ const mapToUISession = (urls: UrlGeneratorsStart, config: SessionsConfigSchema) actions, restoreUrl, reloadUrl, + initialState, + restoreState, }; }; diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/types.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/types.ts index d9aea4ddae93e..e7b48f319a8a8 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/types.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/types.ts @@ -32,4 +32,6 @@ export interface UISession { actions?: ACTION[]; reloadUrl: string; restoreUrl: string; + initialState: Record; + restoreState: Record; } From 9afe5f3b2d6434629759e53d12e18f2d59babdcb Mon Sep 17 00:00:00 2001 From: Liza K Date: Sun, 7 Feb 2021 17:15:56 +0200 Subject: [PATCH 2/7] better filter serialization --- .../search/sessions_mgmt/components/actions/info_button.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx index a1dee45084a7d..67b9e986a6d6a 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx @@ -93,9 +93,10 @@ export class InfoButton extends Component { if (restoreState.filters) { const filters = restoreState.filters as Filter[]; + const filterText = filters.map((filter) => JSON.stringify(filter.query)).join('\n'); sessionInfo.push({ title: 'Filters', - description: filters && filters.length ? JSON.stringify(filters) : 'N/A', + description: filters && filters.length ? filterText : 'N/A', }); } From 91a79e07b9826e7a87edd75827e43a9d56bce695 Mon Sep 17 00:00:00 2001 From: Liza K Date: Sun, 7 Feb 2021 20:38:35 +0200 Subject: [PATCH 3/7] Fix jest tests --- .../public/search/sessions_mgmt/components/status.test.tsx | 2 ++ .../public/search/sessions_mgmt/lib/get_columns.test.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/status.test.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/status.test.tsx index 3d92f349fd2d6..f1d4f2ab379a0 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/status.test.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/status.test.tsx @@ -31,6 +31,8 @@ describe('Background Search Session management status labels', () => { status: SearchSessionStatus.IN_PROGRESS, created: '2020-12-02T00:19:32Z', expires: '2020-12-07T00:19:32Z', + initialState: {}, + restoreState: {}, }; }); diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.test.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.test.tsx index 2aab35e34a2d0..fc0a8849006d3 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.test.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/get_columns.test.tsx @@ -66,6 +66,8 @@ describe('Search Sessions Management table column factory', () => { status: SearchSessionStatus.IN_PROGRESS, created: '2020-12-02T00:19:32Z', expires: '2020-12-07T00:19:32Z', + initialState: {}, + restoreState: {}, }; }); From e29c76b8ed836927ba8959577fe2de5c81042cbf Mon Sep 17 00:00:00 2001 From: Liza K Date: Mon, 8 Feb 2021 09:36:46 +0200 Subject: [PATCH 4/7] jest --- .../public/search/sessions_mgmt/lib/api.test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts index 86acbcdb53001..50210212ed2f4 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts @@ -46,7 +46,13 @@ describe('Search Sessions Management API', () => { saved_objects: [ { id: 'hello-pizza-123', - attributes: { name: 'Veggie', appId: 'pizza', status: 'complete' }, + attributes: { + name: 'Veggie', + appId: 'pizza', + status: 'complete', + initialState: {}, + restoreState: {}, + }, }, ], } as SavedObjectsFindResponse; @@ -61,6 +67,7 @@ describe('Search Sessions Management API', () => { Array [ Object { "actions": Array [ + "info", "extend", "delete", ], @@ -68,8 +75,10 @@ describe('Search Sessions Management API', () => { "created": undefined, "expires": undefined, "id": "hello-pizza-123", + "initialState": Object {}, "name": "Veggie", "reloadUrl": "hello-cool-undefined-url", + "restoreState": Object {}, "restoreUrl": "hello-cool-undefined-url", "status": "complete", }, From 2cc28150857090c28cc68d516c6c22f3040a8bf4 Mon Sep 17 00:00:00 2001 From: Liza K Date: Mon, 8 Feb 2021 20:27:37 +0200 Subject: [PATCH 5/7] display the originalState as a json object --- .../components/actions/info_button.scss | 6 ++ .../components/actions/info_button.tsx | 91 +++++++------------ 2 files changed, 39 insertions(+), 58 deletions(-) create mode 100644 x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.scss diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.scss b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.scss new file mode 100644 index 0000000000000..a43bb65927ed4 --- /dev/null +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.scss @@ -0,0 +1,6 @@ +.searchSessionsFlyout .euiFlyoutBody__overflowContent { + height: 100%; + > div { + height: 100%; + } +} \ No newline at end of file diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx index 67b9e986a6d6a..429e39430aa5f 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx @@ -7,6 +7,7 @@ import { EuiDescriptionList, + EuiFlexItem, EuiFlyout, EuiFlyoutBody, EuiFlyoutHeader, @@ -16,11 +17,11 @@ import { EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import moment from 'moment'; import React, { Component, Fragment } from 'react'; -import { Filter, Query, TimeRange } from 'src/plugins/data/public'; import { UISession } from '../../types'; import { TableText } from '../'; +import { CodeEditor } from '../../../../../../../../src/plugins/kibana_react/public'; +import './info_button.scss'; interface Props { searchSession: UISession; @@ -30,7 +31,6 @@ interface State { isLoading: boolean; isFlyoutVisible: boolean; calloutTitle: string; - error: Error | null; } export class InfoButton extends Component { @@ -41,7 +41,6 @@ export class InfoButton extends Component { isLoading: false, isFlyoutVisible: false, calloutTitle: 'Search Session Info', - error: null, }; this.closeFlyout = this.closeFlyout.bind(this); @@ -49,61 +48,25 @@ export class InfoButton extends Component { } public renderInfo() { - const { error: err } = this.state; - if (err) { - return err.message; - } - - const { created, id, initialState, restoreState } = this.props.searchSession; - - const sessionInfo = [ - { - title: 'Search Session Id', - description: id, - }, - { - title: 'Created at', - description: moment(created).toLocaleString(), - }, - ]; - - if (initialState.timeRange) { - const initialTimerange = initialState.timeRange as TimeRange; - sessionInfo.push({ - title: 'Initial time range', - description: `${initialTimerange.from} - ${initialTimerange.to}`, - }); - } - - if (restoreState.timeRange) { - const restoreTimerange = restoreState.timeRange as TimeRange; - sessionInfo.push({ - title: 'Actual time range', - description: `${restoreTimerange.from} - ${restoreTimerange.to}`, - }); - } - - if (restoreState.query) { - const query = restoreState.query as Query; - sessionInfo.push({ - title: 'Query', - description: query.query ? `${query.query} (${query.language})` : 'N/A', - }); - } - - if (restoreState.filters) { - const filters = restoreState.filters as Filter[]; - const filterText = filters.map((filter) => JSON.stringify(filter.query)).join('\n'); - sessionInfo.push({ - title: 'Filters', - description: filters && filters.length ? filterText : 'N/A', - }); - } - return ( - - + {}} + options={{ + readOnly: true, + lineNumbers: 'off', + fontSize: 12, + minimap: { + enabled: false, + }, + scrollBeyondLastLine: false, + wordWrap: 'on', + wrappingIndent: 'indent', + automaticLayout: true, + }} + /> ); } @@ -120,6 +83,7 @@ export class InfoButton extends Component { size="s" aria-labelledby="flyoutTitle" data-test-subj="searchSessionsFlyout" + className="searchSessionsFlyout" > @@ -127,7 +91,18 @@ export class InfoButton extends Component { - {this.renderInfo()} + + +

+ +

+
+ + {this.renderInfo()} +
From 8485f3e8b5f78d3ea6d40df8f7396464956138c8 Mon Sep 17 00:00:00 2001 From: Liza K Date: Mon, 8 Feb 2021 21:19:39 +0200 Subject: [PATCH 6/7] code review --- .../search/sessions_mgmt/components/actions/get_action.tsx | 2 +- .../search/sessions_mgmt/components/actions/info_button.tsx | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx index d3ac0df31bdfd..c5bf14a1e863b 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx @@ -25,7 +25,7 @@ export const getAction = ( switch (actionType) { case ACTION.INFO: return { - iconType: 'iInCircle', + iconType: 'document', textColor: 'default', label: , }; diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx index 429e39430aa5f..a4cc5129dbb6c 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx @@ -6,8 +6,6 @@ */ import { - EuiDescriptionList, - EuiFlexItem, EuiFlyout, EuiFlyoutBody, EuiFlyoutHeader, From 668f5dd87b675c201476b60c06cb7f88d407cf1c Mon Sep 17 00:00:00 2001 From: Liza K Date: Wed, 10 Feb 2021 13:17:16 +0200 Subject: [PATCH 7/7] Text improvements --- .../components/actions/extend_button.tsx | 2 +- .../components/actions/get_action.tsx | 6 ++--- .../{info_button.scss => inspect_button.scss} | 0 .../{info_button.tsx => inspect_button.tsx} | 25 ++++++++++--------- .../sessions_mgmt/components/actions/types.ts | 2 +- .../search/sessions_mgmt/lib/api.test.ts | 2 +- .../public/search/sessions_mgmt/lib/api.ts | 2 +- 7 files changed, 20 insertions(+), 19 deletions(-) rename x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/{info_button.scss => inspect_button.scss} (100%) rename x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/{info_button.tsx => inspect_button.tsx} (83%) diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/extend_button.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/extend_button.tsx index 06459db154f4a..381c44b1bf7be 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/extend_button.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/extend_button.tsx @@ -38,7 +38,7 @@ const ExtendConfirm = ({ defaultMessage: 'Extend search session expiration', }); const confirm = i18n.translate('xpack.data.mgmt.searchSessions.extendModal.extendButton', { - defaultMessage: 'Extend', + defaultMessage: 'Extend expiration', }); const extend = i18n.translate('xpack.data.mgmt.searchSessions.extendModal.dontExtendButton', { defaultMessage: 'Cancel', diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx index c5bf14a1e863b..1a2b2cfb4ecec 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx @@ -12,7 +12,7 @@ import { SearchSessionsMgmtAPI } from '../../lib/api'; import { UISession } from '../../types'; import { DeleteButton } from './delete_button'; import { ExtendButton } from './extend_button'; -import { InfoButton } from './info_button'; +import { InspectButton } from './inspect_button'; import { ACTION, OnActionComplete } from './types'; export const getAction = ( @@ -23,11 +23,11 @@ export const getAction = ( ): IClickActionDescriptor | null => { const { id, name, expires } = uiSession; switch (actionType) { - case ACTION.INFO: + case ACTION.INSPECT: return { iconType: 'document', textColor: 'default', - label: , + label: , }; case ACTION.DELETE: diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.scss b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/inspect_button.scss similarity index 100% rename from x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.scss rename to x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/inspect_button.scss diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/inspect_button.tsx similarity index 83% rename from x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx rename to x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/inspect_button.tsx index a4cc5129dbb6c..86dca64909b55 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/info_button.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/inspect_button.tsx @@ -17,28 +17,24 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import React, { Component, Fragment } from 'react'; import { UISession } from '../../types'; -import { TableText } from '../'; +import { TableText } from '..'; import { CodeEditor } from '../../../../../../../../src/plugins/kibana_react/public'; -import './info_button.scss'; +import './inspect_button.scss'; interface Props { searchSession: UISession; } interface State { - isLoading: boolean; isFlyoutVisible: boolean; - calloutTitle: string; } -export class InfoButton extends Component { +export class InspectButton extends Component { constructor(props: Props) { super(props); this.state = { - isLoading: false, isFlyoutVisible: false, - calloutTitle: 'Search Session Info', }; this.closeFlyout = this.closeFlyout.bind(this); @@ -85,7 +81,12 @@ export class InfoButton extends Component { > -

{this.state.calloutTitle}

+

+ +

@@ -94,7 +95,7 @@ export class InfoButton extends Component {

@@ -111,9 +112,9 @@ export class InfoButton extends Component { {flyout} diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts index 2515887a6927c..c94b6aa8495c7 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts @@ -8,7 +8,7 @@ export type OnActionComplete = () => void; export enum ACTION { - INFO = 'info', + INSPECT = 'inspect', EXTEND = 'extend', DELETE = 'delete', } diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts index 47f8cad558ee6..10b2ac3ec1d4c 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts @@ -67,7 +67,7 @@ describe('Search Sessions Management API', () => { Array [ Object { "actions": Array [ - "info", + "inspect", "extend", "delete", ], diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts index 1e44ca11ce575..39da58cb76918 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts @@ -21,7 +21,7 @@ type UrlGeneratorsStart = SharePluginStart['urlGenerators']; function getActions(status: SearchSessionStatus) { const actions: ACTION[] = []; - actions.push(ACTION.INFO); + actions.push(ACTION.INSPECT); if (status === SearchSessionStatus.IN_PROGRESS || status === SearchSessionStatus.COMPLETE) { actions.push(ACTION.EXTEND); actions.push(ACTION.DELETE);