Skip to content

Commit

Permalink
Cleaned up not needed code
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliacech committed Nov 23, 2020
1 parent 3af9550 commit 475ad3d
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 63 deletions.
2 changes: 0 additions & 2 deletions x-pack/plugins/index_management/common/types/data_streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,3 @@ export interface DataStreamIndex {
name: string;
uuid: string;
}

export type DataStreamPrivileges<K extends string> = Record<string, { [key in K]: boolean }>;
8 changes: 1 addition & 7 deletions x-pack/plugins/index_management/common/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ export * from './mappings';

export * from './templates';

export {
DataStreamFromEs,
Health,
DataStream,
DataStreamIndex,
DataStreamPrivileges,
} from './data_streams';
export { DataStreamFromEs, Health, DataStream, DataStreamIndex } from './data_streams';

export * from './component_templates';
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ export {
export const REACT_ROOT_ID = 'indexManagementReactRoot';

export * from './ilm_url_generator';

export { DELETE_INDEX_PRIVILEGE } from './privileges';

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ import {
UIM_TEMPLATE_CLONE,
UIM_TEMPLATE_SIMULATE,
} from '../../../common/constants';
import {
TemplateDeserialized,
TemplateListItem,
DataStream,
DataStreamPrivileges,
} from '../../../common';
import { TemplateDeserialized, TemplateListItem, DataStream } from '../../../common';
import { IndexMgmtMetricsType } from '../../types';
import { TAB_SETTINGS, TAB_MAPPING, TAB_STATS } from '../constants';
import { useRequest, sendRequest } from './use_request';
Expand Down Expand Up @@ -69,23 +64,6 @@ export function useLoadDataStream(name: string) {
});
}

export function useLoadDataStreamsPrivileges<T extends string>({
names,
privileges,
}: {
names: string[];
privileges: string[];
}) {
return useRequest<DataStreamPrivileges<T>>({
path: `${API_BASE_PATH}/data_streams_privileges`,
method: 'post',
body: JSON.stringify({
names,
privileges,
}),
});
}

export async function deleteDataStreams(dataStreams: string[]) {
return sendRequest({
path: `${API_BASE_PATH}/delete_data_streams`,
Expand Down
22 changes: 0 additions & 22 deletions x-pack/plugins/index_management/server/client/elasticsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,6 @@ export const elasticsearchJsPlugin = (Client: any, config: any, components: any)
const dataManagement = Client.prototype.dataManagement.prototype;

// Data streams
dataManagement.getDataStreams = ca({
urls: [
{
fmt: '/_data_stream',
},
],
method: 'GET',
});

dataManagement.getDataStream = ca({
urls: [
{
fmt: '/_data_stream/<%=name%>',
req: {
name: {
type: 'string',
},
},
},
],
method: 'GET',
});

// We don't allow the user to create a data stream in the UI or API. We're just adding this here
// to enable the API integration tests.
Expand Down

0 comments on commit 475ad3d

Please sign in to comment.