mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Infra] Remove indexFields
from /api/metrics/source
endpoint (#189541)
## Summary This PR removes `indexFields` from `/api/metrics/source endpoint`  ## Testing Check all infra pages (try creating an alert, open a host as page, etc.) it should work as before
This commit is contained in:
parent
b009ea0011
commit
11446470e3
3 changed files with 0 additions and 7 deletions
|
@ -51,7 +51,6 @@ const metricsSourceConfigurationOriginRT = rt.keyof({
|
|||
export const metricsSourceStatusRT = rt.strict({
|
||||
metricIndicesExist: SourceStatusRuntimeType.props.metricIndicesExist,
|
||||
remoteClustersExist: SourceStatusRuntimeType.props.metricIndicesExist,
|
||||
indexFields: SourceStatusRuntimeType.props.indexFields,
|
||||
});
|
||||
|
||||
export type MetricsSourceStatus = rt.TypeOf<typeof metricsSourceStatusRT>;
|
||||
|
|
|
@ -144,7 +144,6 @@ export const SourceStatusRuntimeType = rt.type({
|
|||
logIndicesExist: rt.boolean,
|
||||
metricIndicesExist: rt.boolean,
|
||||
remoteClustersExist: rt.boolean,
|
||||
indexFields: rt.array(SourceStatusFieldRuntimeType),
|
||||
});
|
||||
|
||||
export interface InfraSourceStatus extends rt.TypeOf<typeof SourceStatusRuntimeType> {}
|
||||
|
|
|
@ -29,7 +29,6 @@ import { InfraPluginRequestHandlerContext } from '../../types';
|
|||
import { getInfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client';
|
||||
|
||||
const defaultStatus = {
|
||||
indexFields: [],
|
||||
metricIndicesExist: false,
|
||||
remoteClustersExist: false,
|
||||
};
|
||||
|
@ -51,9 +50,6 @@ export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) =>
|
|||
/**
|
||||
* Extract values from promises settlements
|
||||
*/
|
||||
const indexFields = isFulfilled<InfraSourceIndexField[]>(indexFieldsSettled)
|
||||
? indexFieldsSettled.value
|
||||
: defaultStatus.indexFields;
|
||||
const metricIndicesExist = isFulfilled<boolean>(metricIndicesExistSettled)
|
||||
? metricIndicesExistSettled.value
|
||||
: defaultStatus.metricIndicesExist;
|
||||
|
@ -73,7 +69,6 @@ export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) =>
|
|||
}
|
||||
|
||||
return {
|
||||
indexFields,
|
||||
metricIndicesExist,
|
||||
remoteClustersExist,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue