Refactor PrometheusProviders (#2707)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-05-27 09:50:18 -04:00
1 parent 88edeeef43
commit 652319ac89
13 files changed
+666 -336

No files matched your search

+10
View File
@@ -46,6 +46,12 @@ export interface IMetricsResult {
values: [number, string][];
}
export interface MetricProviderInfo {
name: string;
id: string;
isConfigurable: boolean;
}
export interface IMetricsReqParams {
start?: number | string; // timestamp in seconds or valid date-string
end?: number | string;
@@ -75,6 +81,10 @@ export const metricsApi = {
}
});
},
async getMetricProviders(): Promise<MetricProviderInfo[]> {
return apiBase.get("/metrics/providers");
}
};
export function normalizeMetrics(metrics: IMetrics, frames = 60): IMetrics {