Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Jun 18, 2020
1 parent ebb663e commit abc6ffd
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions x-pack/plugins/observability/public/typings/data_handler/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

interface Percentage {
pct: number;
color?: string;
}
interface Bytes {
bytes: number;
color?: string;
}
interface Numeral {
numeral: number;
}

interface Color {
value: number;
color?: string;
}

Expand All @@ -37,35 +36,33 @@ interface FetchDataResponse {
}

interface LogsFetchDataResponse extends FetchDataResponse {
stats: {
[logName: string]: Numeral;
};
stats: Record<string, Numeral>;
}

interface MetricsFetchDataResponse extends FetchDataResponse {
stats: {
hots: Numeral & Color;
cpu: Percentage & Color;
memory: Percentage & Color;
disk: Percentage & Color;
inboundTraffic: Bytes & Color;
outboundTraffic: Bytes & Color;
hots: Numeral;
cpu: Percentage;
memory: Percentage;
disk: Percentage;
inboundTraffic: Bytes;
outboundTraffic: Bytes;
};
}

interface UptimeFetchDataResponse extends FetchDataResponse {
stats: {
monitors: Numeral & Color;
up: Numeral & Color;
down: Numeral & Color;
monitors: Numeral;
up: Numeral;
down: Numeral;
};
}

interface ApmFetchDataResponse extends FetchDataResponse {
stats: {
services: Numeral & Color;
transactions: Numeral & Color;
errorRate?: Percentage & Color;
services: Numeral;
transactions: Numeral;
errorRate?: Percentage;
};
}

Expand Down

0 comments on commit abc6ffd

Please sign in to comment.