Skip to content

Commit

Permalink
[Monitoring] Convert Kibana-related server files that read from _sour…
Browse files Browse the repository at this point in the history
…ce to typescript (#86364)

* Identifying kibana source fields

* Fix types

* Fix types, take 2

* Should really fix it now

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
chrisronline and kibanamachine authored Dec 22, 2020
1 parent 42c1414 commit ecb4522
Show file tree
Hide file tree
Showing 8 changed files with 443 additions and 377 deletions.
80 changes: 80 additions & 0 deletions x-pack/plugins/monitoring/common/types/es.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export interface ElasticsearchSourceKibanaStats {
timestamp?: string;
kibana?: {
name?: string;
status?: string;
uuid?: string;
response_times?: {
max?: number;
};
};
os?: {
memory?: {
free_in_bytes?: number;
};
};
process?: {
uptime_in_millis?: number;
};
}

export interface ElasticsearchSource {
timestamp: string;
kibana_stats?: ElasticsearchSourceKibanaStats;
beats_stats?: {
timestamp?: string;
beat?: {
uuid?: string;
name?: string;
type?: string;
version?: string;
host?: string;
};
metrics?: {
beat?: {
memstats?: {
memory_alloc?: number;
};
info?: {
uptime?: {
ms?: number;
};
};
handles?: {
limit?: {
hard?: number;
soft?: number;
};
};
};
libbeat?: {
config?: {
reloads?: number;
};
output?: {
type?: string;
write?: {
bytes?: number;
errors?: number;
};
read?: {
errors?: number;
};
};
pipeline?: {
events?: {
total?: number;
published?: number;
dropped?: number;
};
};
};
};
};
}
4 changes: 2 additions & 2 deletions x-pack/plugins/monitoring/public/alerts/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { SetupModeContext } from '../components/setup_mode/setup_mode_context';
interface Props {
alerts: { [alertTypeId: string]: CommonAlertStatus };
showBadge: boolean;
showOnlyCount: boolean;
stateFilter: (state: AlertState) => boolean;
showOnlyCount?: boolean;
stateFilter?: (state: AlertState) => boolean;
}
export const AlertsStatus: React.FC<Props> = (props: Props) => {
const { alerts, showBadge = false, showOnlyCount = false, stateFilter = () => true } = props;
Expand Down

This file was deleted.

Loading

0 comments on commit ecb4522

Please sign in to comment.