Skip to content

Commit b4b985e

Browse files
author
Liza K
committed
Delete reload action from management
1 parent e75f2f8 commit b4b985e

5 files changed

Lines changed: 1 addition & 70 deletions

File tree

x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/get_action.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ import { SearchSessionsMgmtAPI } from '../../lib/api';
1111
import { UISession } from '../../types';
1212
import { DeleteButton } from './delete_button';
1313
import { ExtendButton } from './extend_button';
14-
import { ReloadButton } from './reload_button';
1514
import { ACTION, OnActionComplete } from './types';
1615

1716
export const getAction = (
1817
api: SearchSessionsMgmtAPI,
1918
actionType: string,
20-
{ id, name, expires, reloadUrl }: UISession,
19+
{ id, name, expires }: UISession,
2120
onActionComplete: OnActionComplete
2221
): IClickActionDescriptor | null => {
2322
switch (actionType) {
@@ -28,13 +27,6 @@ export const getAction = (
2827
label: <DeleteButton api={api} id={id} name={name} onActionComplete={onActionComplete} />,
2928
};
3029

31-
case ACTION.RELOAD:
32-
return {
33-
iconType: 'refresh',
34-
textColor: 'default',
35-
label: <ReloadButton api={api} reloadUrl={reloadUrl} />,
36-
};
37-
3830
case ACTION.EXTEND:
3931
return {
4032
iconType: extendSessionIcon,

x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/reload_button.tsx

Lines changed: 0 additions & 32 deletions
This file was deleted.

x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/actions/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ export type OnActionComplete = () => void;
99
export enum ACTION {
1010
EXTEND = 'extend',
1111
DELETE = 'delete',
12-
RELOAD = 'reload',
1312
}

x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.test.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ describe('Search Sessions Management API', () => {
6060
Array [
6161
Object {
6262
"actions": Array [
63-
"reload",
6463
"extend",
6564
"delete",
6665
],
@@ -166,32 +165,6 @@ describe('Search Sessions Management API', () => {
166165
});
167166
});
168167

169-
describe('reload', () => {
170-
beforeEach(() => {
171-
sessionsClient.find = jest.fn().mockImplementation(async () => {
172-
return {
173-
saved_objects: [
174-
{
175-
id: 'hello-pizza-123',
176-
attributes: { name: 'Veggie', appId: 'pizza', status: SearchSessionStatus.COMPLETE },
177-
},
178-
],
179-
} as SavedObjectsFindResponse;
180-
});
181-
});
182-
183-
test('send cancel calls the cancel endpoint with a session ID', async () => {
184-
const api = new SearchSessionsMgmtAPI(sessionsClient, mockConfig, {
185-
urls: mockUrls,
186-
notifications: mockCoreStart.notifications,
187-
application: mockCoreStart.application,
188-
});
189-
await api.reloadSearchSession('www.myurl.com');
190-
191-
expect(mockCoreStart.application.navigateToUrl).toHaveBeenCalledWith('www.myurl.com');
192-
});
193-
});
194-
195168
describe('extend', () => {
196169
beforeEach(() => {
197170
sessionsClient.find = jest.fn().mockImplementation(async () => {

x-pack/plugins/data_enhanced/public/search/sessions_mgmt/lib/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ type UrlGeneratorsStart = SharePluginStart['urlGenerators'];
2121

2222
function getActions(status: SearchSessionStatus) {
2323
const actions: ACTION[] = [];
24-
actions.push(ACTION.RELOAD);
2524
if (status === SearchSessionStatus.IN_PROGRESS || status === SearchSessionStatus.COMPLETE) {
2625
actions.push(ACTION.EXTEND);
2726
actions.push(ACTION.DELETE);

0 commit comments

Comments
 (0)