Skip to content

Commit

Permalink
changing series to key/value
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Jun 23, 2020
1 parent f735e4c commit 738aed0
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,31 @@ interface Series {
label: string;
coordinates: Coordinates[];
color?: string;
key?: string;
}

interface FetchDataResponse {
title: string;
appLink: string;
series: Series[];
}

interface LogsFetchDataResponse extends FetchDataResponse {
stats: Record<string, Numeral>;
series: Record<string, Series>;
}

interface MetricsFetchDataResponse extends FetchDataResponse {
stats: {
hots: Numeral;
hosts: Numeral;
cpu: Percentage;
memory: Percentage;
disk: Percentage;
inboundTraffic: Bytes;
outboundTraffic: Bytes;
};
series: {
inboundTraffic: Series;
outboundTraffic: Series;
};
}

interface UptimeFetchDataResponse extends FetchDataResponse {
Expand All @@ -56,13 +59,19 @@ interface UptimeFetchDataResponse extends FetchDataResponse {
up: Numeral;
down: Numeral;
};
series: {
up: Series;
down: Series;
};
}

interface ApmFetchDataResponse extends FetchDataResponse {
stats: {
services: Numeral;
transactions: Numeral;
errorRate?: Percentage;
};
series: {
transactions: Series;
};
}

Expand Down

0 comments on commit 738aed0

Please sign in to comment.