mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
chore(NA): moving @kbn/rule-data-utils to babel transpiler (#107573)
* chore(NA): moving @kbn/rule-data-utils to babel transpiler * chore(NA): update imports * chore(NA): targetted imports for apm * chore(NA): fix imports Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
7a1448aa08
commit
dfaf54082a
36 changed files with 284 additions and 101 deletions
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import type { AlertConsumers } from '@kbn/rule-data-utils/target/alerts_as_data_rbac';
|
||||
import type { AlertConsumers } from '@kbn/rule-data-utils';
|
||||
|
||||
import { IEsSearchRequest } from '../../../../../../src/plugins/data/common';
|
||||
import { ESQuery } from '../../typed_json';
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { AlertConsumers } from '@kbn/rule-data-utils/target/alerts_as_data_rbac';
|
||||
import type { AlertConsumers as AlertConsumersTyped } from '@kbn/rule-data-utils';
|
||||
// @ts-expect-error
|
||||
import { AlertConsumers as AlertConsumersNonTyped } from '@kbn/rule-data-utils/target_node/alerts_as_data_rbac';
|
||||
import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui';
|
||||
import { isEmpty } from 'lodash/fp';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
|
@ -47,6 +49,8 @@ import { ExitFullScreen } from '../../exit_full_screen';
|
|||
import { Sort } from '../body/sort';
|
||||
import { InspectButtonContainer } from '../../inspect';
|
||||
|
||||
const AlertConsumers: typeof AlertConsumersTyped = AlertConsumersNonTyped;
|
||||
|
||||
export const EVENTS_VIEWER_HEADER_HEIGHT = 90; // px
|
||||
const COMPACT_HEADER_HEIGHT = 36; // px
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import type { AlertConsumers } from '@kbn/rule-data-utils/target/alerts_as_data_rbac';
|
||||
import type { AlertConsumers } from '@kbn/rule-data-utils';
|
||||
import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui';
|
||||
import { isEmpty } from 'lodash/fp';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { AlertConsumers } from '@kbn/rule-data-utils/target/alerts_as_data_rbac';
|
||||
import type { AlertConsumers } from '@kbn/rule-data-utils';
|
||||
import deepEqual from 'fast-deep-equal';
|
||||
import { isEmpty, isString, noop } from 'lodash/fp';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
|
|
@ -8,11 +8,17 @@
|
|||
import { ALERT_RULE_CONSUMER, ALERT_RULE_TYPE_ID, SPACE_IDS } from '@kbn/rule-data-utils';
|
||||
import { map, mergeMap, catchError } from 'rxjs/operators';
|
||||
import { from } from 'rxjs';
|
||||
import {
|
||||
isValidFeatureId,
|
||||
mapConsumerToIndexName,
|
||||
|
||||
import type {
|
||||
AlertConsumers,
|
||||
} from '@kbn/rule-data-utils/target/alerts_as_data_rbac';
|
||||
mapConsumerToIndexName as mapConsumerToIndexNameTyped,
|
||||
isValidFeatureId as isValidFeatureIdTyped,
|
||||
} from '@kbn/rule-data-utils';
|
||||
import {
|
||||
mapConsumerToIndexName as mapConsumerToIndexNameNonTyped,
|
||||
isValidFeatureId as isValidFeatureIdNonTyped,
|
||||
// @ts-expect-error
|
||||
} from '@kbn/rule-data-utils/target_node/alerts_as_data_rbac';
|
||||
|
||||
import {
|
||||
AlertingAuthorizationEntity,
|
||||
|
@ -38,6 +44,9 @@ import {
|
|||
ISearchOptions,
|
||||
} from '../../../../../../src/plugins/data/common';
|
||||
|
||||
const mapConsumerToIndexName: typeof mapConsumerToIndexNameTyped = mapConsumerToIndexNameNonTyped;
|
||||
const isValidFeatureId: typeof isValidFeatureIdTyped = isValidFeatureIdNonTyped;
|
||||
|
||||
export const timelineSearchStrategyProvider = <T extends TimelineFactoryQueryTypes>(
|
||||
data: PluginStart,
|
||||
alerting: AlertingPluginStartContract
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue