mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Ingest] EMT-146: agent status impl preparation (#62557)
[Ingest] EMT-146: very light refactor a precursor for endpoint status change
This commit is contained in:
parent
dfa083dc60
commit
29abe5b81b
6 changed files with 13 additions and 19 deletions
|
@ -9,9 +9,9 @@ import { PluginSetupContract as FeaturesPluginSetupContract } from '../../featur
|
|||
import { createConfig$, EndpointConfigType } from './config';
|
||||
import { EndpointAppContext } from './types';
|
||||
|
||||
import { registerEndpointRoutes } from './routes/metadata';
|
||||
import { registerAlertRoutes } from './routes/alerts';
|
||||
import { registerResolverRoutes } from './routes/resolver';
|
||||
import { registerEndpointRoutes } from './routes/metadata';
|
||||
|
||||
export type EndpointPluginStart = void;
|
||||
export type EndpointPluginSetup = void;
|
||||
|
|
|
@ -9,7 +9,7 @@ import { AlertEvent, EndpointAppConstants } from '../../../../common/types';
|
|||
import { EndpointAppContext } from '../../../types';
|
||||
import { AlertDetailsRequestParams } from '../types';
|
||||
import { AlertDetailsPagination } from './lib';
|
||||
import { getHostData } from '../../../routes/metadata';
|
||||
import { getHostData } from '../../metadata';
|
||||
|
||||
export const alertDetailsHandlerWrapper = function(
|
||||
endpointAppContext: EndpointAppContext
|
||||
|
|
|
@ -8,12 +8,9 @@ import { IRouter, RequestHandlerContext } from 'kibana/server';
|
|||
import { SearchResponse } from 'elasticsearch';
|
||||
import { schema } from '@kbn/config-schema';
|
||||
|
||||
import {
|
||||
kibanaRequestToMetadataListESQuery,
|
||||
getESQueryHostMetadataByID,
|
||||
} from '../services/endpoint/metadata_query_builders';
|
||||
import { HostMetadata, HostResultList } from '../../common/types';
|
||||
import { EndpointAppContext } from '../types';
|
||||
import { HostMetadata, HostResultList } from '../../../common/types';
|
||||
import { EndpointAppContext } from '../../types';
|
||||
import { getESQueryHostMetadataByID, kibanaRequestToMetadataListESQuery } from './query_builders';
|
||||
|
||||
interface HitSource {
|
||||
_source: HostMetadata;
|
|
@ -17,12 +17,12 @@ import {
|
|||
httpServerMock,
|
||||
httpServiceMock,
|
||||
loggingServiceMock,
|
||||
} from '../../../../../src/core/server/mocks';
|
||||
import { HostMetadata, HostResultList } from '../../common/types';
|
||||
} from '../../../../../../src/core/server/mocks';
|
||||
import { HostMetadata, HostResultList } from '../../../common/types';
|
||||
import { SearchResponse } from 'elasticsearch';
|
||||
import { registerEndpointRoutes } from './metadata';
|
||||
import { EndpointConfigSchema } from '../config';
|
||||
import * as data from '../test_data/all_metadata_data.json';
|
||||
import { EndpointConfigSchema } from '../../config';
|
||||
import * as data from '../../test_data/all_metadata_data.json';
|
||||
import { registerEndpointRoutes } from './index';
|
||||
|
||||
describe('test endpoint route', () => {
|
||||
let routerMock: jest.Mocked<IRouter>;
|
|
@ -5,10 +5,7 @@
|
|||
*/
|
||||
import { httpServerMock, loggingServiceMock } from '../../../../../../src/core/server/mocks';
|
||||
import { EndpointConfigSchema } from '../../config';
|
||||
import {
|
||||
kibanaRequestToMetadataListESQuery,
|
||||
getESQueryHostMetadataByID,
|
||||
} from './metadata_query_builders';
|
||||
import { kibanaRequestToMetadataListESQuery, getESQueryHostMetadataByID } from './query_builders';
|
||||
import { EndpointAppConstants } from '../../../common/types';
|
||||
|
||||
describe('query builder', () => {
|
|
@ -4,9 +4,9 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
import { KibanaRequest } from 'kibana/server';
|
||||
import { EndpointAppConstants } from '../../../common/types';
|
||||
import { EndpointAppContext } from '../../types';
|
||||
import { esKuery } from '../../../../../../src/plugins/data/server';
|
||||
import { EndpointAppContext } from '../../types';
|
||||
import { EndpointAppConstants } from '../../../common/types';
|
||||
|
||||
export const kibanaRequestToMetadataListESQuery = async (
|
||||
request: KibanaRequest<any, any, any>,
|
Loading…
Add table
Add a link
Reference in a new issue