diff --git a/x-pack/plugins/observability_solution/infra/common/constants.ts b/x-pack/plugins/observability_solution/infra/common/constants.ts index 2d7ba5e066e45..f871b7a6707ca 100644 --- a/x-pack/plugins/observability_solution/infra/common/constants.ts +++ b/x-pack/plugins/observability_solution/infra/common/constants.ts @@ -16,7 +16,7 @@ export const METRICS_FEATURE_ID = AlertConsumers.INFRASTRUCTURE; export const INFRA_ALERT_FEATURE_ID = AlertConsumers.INFRASTRUCTURE; export const LOGS_FEATURE_ID = AlertConsumers.LOGS; -export const INFRA_ALERT_FEATUREIDS: ValidFeatureId[] = [ +export const INFRA_ALERT_FEATURE_IDS: ValidFeatureId[] = [ AlertConsumers.INFRASTRUCTURE, AlertConsumers.OBSERVABILITY, AlertConsumers.LOGS, diff --git a/x-pack/plugins/observability_solution/infra/public/components/shared/alerts/constants.ts b/x-pack/plugins/observability_solution/infra/public/components/shared/alerts/constants.ts index 7ceca89ad88a1..77471dc8c51ac 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/shared/alerts/constants.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/shared/alerts/constants.ts @@ -14,8 +14,7 @@ import { } from '@kbn/rule-data-utils'; import type { Filter } from '@kbn/es-query'; import type { AlertStatus } from '@kbn/observability-plugin/common/typings'; - -import { INFRA_ALERT_FEATUREIDS } from '../../../../common/constants'; +import { INFRA_ALERT_FEATURE_IDS } from '../../../../common/constants'; export const ALERT_STATUS_ALL = 'all'; @@ -88,4 +87,4 @@ export const ALERTS_PATH = '/app/observability/alerts'; export const ALERTS_PER_PAGE = 10; export const ALERTS_TABLE_ID = 'xpack.infra.hosts.alerts.table'; -export const infraAlertFeatureIds = INFRA_ALERT_FEATUREIDS; +export const infraAlertFeatureIds = INFRA_ALERT_FEATURE_IDS; diff --git a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts index 8be097077004b..c884b08ebaebf 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts @@ -8,7 +8,7 @@ import { isEmpty } from 'lodash'; import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; import type { KibanaRequest } from '@kbn/core/server'; -import { INFRA_ALERT_FEATUREIDS } from '../../../common/constants'; +import { INFRA_ALERT_FEATURE_IDS } from '../../../common/constants'; import type { InfraBackendLibs } from '../infra_types'; type RequiredParams = ESSearchRequest & { @@ -27,7 +27,7 @@ export async function getInfraAlertsClient({ }) { const [, { ruleRegistry }] = await libs.getStartServices(); const alertsClient = await ruleRegistry.getRacClientWithRequest(request); - const infraAlertsIndices = await alertsClient.getAuthorizedAlertsIndices(INFRA_ALERT_FEATUREIDS); + const infraAlertsIndices = await alertsClient.getAuthorizedAlertsIndices(INFRA_ALERT_FEATURE_IDS); if (!infraAlertsIndices || isEmpty(infraAlertsIndices)) { throw Error('No alert indices exist for "infrastructure"'); diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts index 8167da76b5da1..d36ff06f35cf0 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts @@ -12,7 +12,7 @@ import { ALERT_STATUS_ACTIVE, ALERT_UUID, } from '@kbn/rule-data-utils'; -import { HOST_NAME_FIELD, INFRA_ALERT_FEATUREIDS } from '../../../../../common/constants'; +import { HOST_NAME_FIELD, INFRA_ALERT_FEATURE_IDS } from '../../../../../common/constants'; import { GetHostParameters } from '../types'; export async function getHostsAlertsCount({ @@ -40,7 +40,7 @@ export async function getHostsAlertsCount({ query: { bool: { filter: [ - ...termsQuery(ALERT_RULE_PRODUCER, ...INFRA_ALERT_FEATUREIDS), + ...termsQuery(ALERT_RULE_PRODUCER, ...INFRA_ALERT_FEATURE_IDS), ...termQuery(ALERT_STATUS, ALERT_STATUS_ACTIVE), ...termsQuery(HOST_NAME_FIELD, ...hostNames), ...rangeQuery,