mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
chore(ao): remove eslint disable when possible (#164478)
This commit is contained in:
parent
b270602601
commit
631d9c2bd6
6 changed files with 14 additions and 15 deletions
|
@ -14,8 +14,7 @@ import { metricsExplorerMetricRT } from './metrics_explorer';
|
||||||
import { TimeUnitChar } from '../utils/formatters/duration';
|
import { TimeUnitChar } from '../utils/formatters/duration';
|
||||||
import { SNAPSHOT_CUSTOM_AGGREGATIONS } from './constants';
|
import { SNAPSHOT_CUSTOM_AGGREGATIONS } from './constants';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
type DeepPartialArray<T> = Array<DeepPartial<T>>;
|
||||||
interface DeepPartialArray<T> extends Array<DeepPartial<T>> {}
|
|
||||||
|
|
||||||
type DeepPartialObject<T> = { [P in keyof T]+?: DeepPartial<T[P]> };
|
type DeepPartialObject<T> = { [P in keyof T]+?: DeepPartial<T[P]> };
|
||||||
export type DeepPartial<T> = T extends any[]
|
export type DeepPartial<T> = T extends any[]
|
||||||
|
|
|
@ -21,8 +21,10 @@ interface Params {
|
||||||
sloIds?: SloId[];
|
sloIds?: SloId[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
export interface SloRule extends Record<string, unknown> {
|
||||||
export type SloRule = { sloId: string; name: string };
|
sloId: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface RuleApiResponse {
|
interface RuleApiResponse {
|
||||||
page: number;
|
page: number;
|
||||||
|
|
|
@ -12,16 +12,15 @@ import type { RuleStatus } from '@kbn/triggers-actions-ui-plugin/public';
|
||||||
import { rulesLocatorID } from '../../common';
|
import { rulesLocatorID } from '../../common';
|
||||||
import { RULES_PATH } from '../../common/locators/paths';
|
import { RULES_PATH } from '../../common/locators/paths';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
export interface RulesParams extends SerializableRecord {
|
||||||
export type RulesParams = {
|
|
||||||
lastResponse?: string[];
|
lastResponse?: string[];
|
||||||
params?: Record<string, string | number>;
|
params?: Record<string, string | number>;
|
||||||
search?: string;
|
search?: string;
|
||||||
status?: RuleStatus[];
|
status?: RuleStatus[];
|
||||||
type?: string[];
|
type?: string[];
|
||||||
};
|
}
|
||||||
|
|
||||||
export interface RulesLocatorParams extends RulesParams, SerializableRecord {}
|
export type RulesLocatorParams = RulesParams;
|
||||||
|
|
||||||
export class RulesLocatorDefinition implements LocatorDefinition<RulesLocatorParams> {
|
export class RulesLocatorDefinition implements LocatorDefinition<RulesLocatorParams> {
|
||||||
public readonly id = rulesLocatorID;
|
public readonly id = rulesLocatorID;
|
||||||
|
|
|
@ -10,10 +10,9 @@ import type { LocatorDefinition } from '@kbn/share-plugin/public';
|
||||||
import { sloDetailsLocatorID } from '../../common';
|
import { sloDetailsLocatorID } from '../../common';
|
||||||
import { SLOS_PATH } from '../../common/locators/paths';
|
import { SLOS_PATH } from '../../common/locators/paths';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
export interface SloDetailsParams {
|
||||||
export type SloDetailsParams = {
|
|
||||||
sloId?: string;
|
sloId?: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
export interface SloDetailsLocatorParams extends SloDetailsParams, SerializableRecord {}
|
export interface SloDetailsLocatorParams extends SloDetailsParams, SerializableRecord {}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ interface AlertTestInstance {
|
||||||
state: any;
|
state: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
let persistAlertInstances = false; // eslint-disable-line prefer-const
|
const persistAlertInstances = false;
|
||||||
|
|
||||||
type TestRuleState = Record<string, unknown> & {
|
type TestRuleState = Record<string, unknown> & {
|
||||||
aRuleStateKey: string;
|
aRuleStateKey: string;
|
||||||
|
|
|
@ -50,14 +50,14 @@ export type MetricThresholdRuleTypeState = RuleTypeState & {
|
||||||
groupBy?: string | string[];
|
groupBy?: string | string[];
|
||||||
};
|
};
|
||||||
export type MetricThresholdAlertState = AlertState; // no specific instance state used
|
export type MetricThresholdAlertState = AlertState; // no specific instance state used
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
||||||
export type MetricThresholdAlertContext = {
|
export interface MetricThresholdAlertContext extends Record<string, unknown> {
|
||||||
alertDetailsUrl: string;
|
alertDetailsUrl: string;
|
||||||
groupings?: object;
|
groupings?: object;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
timestamp: string; // ISO string
|
timestamp: string; // ISO string
|
||||||
value?: Array<number | null> | null;
|
value?: Array<number | null> | null;
|
||||||
};
|
}
|
||||||
|
|
||||||
export const FIRED_ACTIONS_ID = 'threshold.fired';
|
export const FIRED_ACTIONS_ID = 'threshold.fired';
|
||||||
export const NO_DATA_ACTIONS_ID = 'threshold.nodata';
|
export const NO_DATA_ACTIONS_ID = 'threshold.nodata';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue