Skip to content

Commit 1970fcf

Browse files
[Monitoring] Convert Kibana-related server files that read from _source to typescript (#86364)
* Identifying kibana source fields * Fix types * Fix types, take 2 * Should really fix it now Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # x-pack/plugins/monitoring/public/components/kibana/instances/instances.js
1 parent 0cffe7a commit 1970fcf

8 files changed

Lines changed: 443 additions & 367 deletions

File tree

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export interface ElasticsearchSourceKibanaStats {
8+
timestamp?: string;
9+
kibana?: {
10+
name?: string;
11+
status?: string;
12+
uuid?: string;
13+
response_times?: {
14+
max?: number;
15+
};
16+
};
17+
os?: {
18+
memory?: {
19+
free_in_bytes?: number;
20+
};
21+
};
22+
process?: {
23+
uptime_in_millis?: number;
24+
};
25+
}
26+
27+
export interface ElasticsearchSource {
28+
timestamp: string;
29+
kibana_stats?: ElasticsearchSourceKibanaStats;
30+
beats_stats?: {
31+
timestamp?: string;
32+
beat?: {
33+
uuid?: string;
34+
name?: string;
35+
type?: string;
36+
version?: string;
37+
host?: string;
38+
};
39+
metrics?: {
40+
beat?: {
41+
memstats?: {
42+
memory_alloc?: number;
43+
};
44+
info?: {
45+
uptime?: {
46+
ms?: number;
47+
};
48+
};
49+
handles?: {
50+
limit?: {
51+
hard?: number;
52+
soft?: number;
53+
};
54+
};
55+
};
56+
libbeat?: {
57+
config?: {
58+
reloads?: number;
59+
};
60+
output?: {
61+
type?: string;
62+
write?: {
63+
bytes?: number;
64+
errors?: number;
65+
};
66+
read?: {
67+
errors?: number;
68+
};
69+
};
70+
pipeline?: {
71+
events?: {
72+
total?: number;
73+
published?: number;
74+
dropped?: number;
75+
};
76+
};
77+
};
78+
};
79+
};
80+
}

x-pack/plugins/monitoring/public/alerts/status.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { SetupModeContext } from '../components/setup_mode/setup_mode_context';
1616
interface Props {
1717
alerts: { [alertTypeId: string]: CommonAlertStatus };
1818
showBadge: boolean;
19-
showOnlyCount: boolean;
20-
stateFilter: (state: AlertState) => boolean;
19+
showOnlyCount?: boolean;
20+
stateFilter?: (state: AlertState) => boolean;
2121
}
2222
export const AlertsStatus: React.FC<Props> = (props: Props) => {
2323
const { alerts, showBadge = false, showOnlyCount = false, stateFilter = () => true } = props;

x-pack/plugins/monitoring/public/components/kibana/instances/instances.js

Lines changed: 0 additions & 284 deletions
This file was deleted.

0 commit comments

Comments
 (0)