mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Backports the following commits to 6.7: - [Infra UI] Adapt settings ui to saved object version type change (#30082) (#29622) Caused by backport of #29906 to `6.x`.
This commit is contained in:
parent
6f976229b9
commit
6c82b88508
3 changed files with 74 additions and 6 deletions
|
@ -19,7 +19,7 @@ export interface InfraSource {
|
|||
/** The id of the source */
|
||||
id: string;
|
||||
/** The version number the source configuration was last persisted with */
|
||||
version?: number | null;
|
||||
version?: string | null;
|
||||
/** The timestamp the source configuration was last persisted at */
|
||||
updatedAt?: number | null;
|
||||
/** The raw configuration of the source */
|
||||
|
@ -34,6 +34,8 @@ export interface InfraSource {
|
|||
logEntriesBetween: InfraLogEntryInterval;
|
||||
/** A consecutive span of summary buckets within an interval */
|
||||
logSummaryBetween: InfraLogSummaryInterval;
|
||||
|
||||
logItem: InfraLogItem;
|
||||
/** A hierarchy of hosts, pods, containers, services or arbitrary groups */
|
||||
map?: InfraResponse | null;
|
||||
|
||||
|
@ -179,6 +181,22 @@ export interface InfraLogSummaryBucket {
|
|||
entriesCount: number;
|
||||
}
|
||||
|
||||
export interface InfraLogItem {
|
||||
/** The ID of the document */
|
||||
id: string;
|
||||
/** The index where the document was found */
|
||||
index: string;
|
||||
/** An array of flattened fields and values */
|
||||
fields: InfraLogItemField[];
|
||||
}
|
||||
|
||||
export interface InfraLogItemField {
|
||||
/** The flattened field name */
|
||||
field: string;
|
||||
/** The value for the Field as a string */
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface InfraResponse {
|
||||
nodes: InfraNode[];
|
||||
}
|
||||
|
@ -199,6 +217,10 @@ export interface InfraNodeMetric {
|
|||
name: InfraMetricType;
|
||||
|
||||
value: number;
|
||||
|
||||
avg: number;
|
||||
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface InfraMetricData {
|
||||
|
@ -397,6 +419,9 @@ export interface LogSummaryBetweenInfraSourceArgs {
|
|||
/** The query to filter the log entries by */
|
||||
filterQuery?: string | null;
|
||||
}
|
||||
export interface LogItemInfraSourceArgs {
|
||||
id: string;
|
||||
}
|
||||
export interface MapInfraSourceArgs {
|
||||
timerange: InfraTimerangeInput;
|
||||
|
||||
|
@ -458,6 +483,7 @@ export enum InfraPathType {
|
|||
hosts = 'hosts',
|
||||
pods = 'pods',
|
||||
containers = 'containers',
|
||||
custom = 'custom',
|
||||
}
|
||||
|
||||
export enum InfraMetricType {
|
||||
|
@ -523,6 +549,45 @@ export type InfraLogMessageSegment = InfraLogMessageFieldSegment | InfraLogMessa
|
|||
// Documents
|
||||
// ====================================================
|
||||
|
||||
export namespace FlyoutItemQuery {
|
||||
export type Variables = {
|
||||
sourceId: string;
|
||||
itemId: string;
|
||||
};
|
||||
|
||||
export type Query = {
|
||||
__typename?: 'Query';
|
||||
|
||||
source: Source;
|
||||
};
|
||||
|
||||
export type Source = {
|
||||
__typename?: 'InfraSource';
|
||||
|
||||
id: string;
|
||||
|
||||
logItem: LogItem;
|
||||
};
|
||||
|
||||
export type LogItem = {
|
||||
__typename?: 'InfraLogItem';
|
||||
|
||||
id: string;
|
||||
|
||||
index: string;
|
||||
|
||||
fields: Fields[];
|
||||
};
|
||||
|
||||
export type Fields = {
|
||||
__typename?: 'InfraLogItemField';
|
||||
|
||||
field: string;
|
||||
|
||||
value: string;
|
||||
};
|
||||
}
|
||||
|
||||
export namespace MetadataQuery {
|
||||
export type Variables = {
|
||||
sourceId: string;
|
||||
|
@ -660,6 +725,10 @@ export namespace WaffleNodesQuery {
|
|||
name: InfraMetricType;
|
||||
|
||||
value: number;
|
||||
|
||||
avg: number;
|
||||
|
||||
max: number;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -847,7 +916,7 @@ export namespace SourceFields {
|
|||
|
||||
id: string;
|
||||
|
||||
version?: number | null;
|
||||
version?: string | null;
|
||||
|
||||
updatedAt?: number | null;
|
||||
|
||||
|
|
|
@ -89,8 +89,7 @@ const createContainerProps = memoizeLast((sourceId: string, apolloClient: Apollo
|
|||
undefined,
|
||||
getDerivedIndexPattern: () => getDerivedIndexPattern,
|
||||
getVersion: () => state => (state && state.source && state.source.version) || undefined,
|
||||
getExists: () => state =>
|
||||
(state && state.source && typeof state.source.version === 'number') || false,
|
||||
getExists: () => state => (state && state.source && !!state.source.version) || false,
|
||||
});
|
||||
|
||||
const effects = inferEffectMap<State>()({
|
||||
|
@ -219,7 +218,7 @@ interface WithSourceProps {
|
|||
metricIndicesExist?: boolean;
|
||||
sourceId: string;
|
||||
update: (changes: UpdateSourceInput[]) => Promise<any>;
|
||||
version?: number;
|
||||
version?: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
|
|
|
@ -916,7 +916,7 @@ export namespace SourceFields {
|
|||
|
||||
id: string;
|
||||
|
||||
version?: number | null;
|
||||
version?: string | null;
|
||||
|
||||
updatedAt?: number | null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue