1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

feat(1-3267): fix type, uncomment conversion

This commit is contained in:
Thomas Heartman 2025-01-24 14:30:57 +01:00
parent 26f7eb0ca4
commit d087749e5b
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -65,16 +65,14 @@ export type SegmentedSchema = {
apiData: [ apiData: [
{ {
apiPath: string; apiPath: string;
dataPoints: { dataPoints: Array<{
// other options: period? time? interval? for? // other options: period? time? interval? for?
when: string; // in API: string formatted as full date or YYYY-MM, depending on monthly/daily when: string; // in API: string formatted as full date or YYYY-MM, depending on monthly/daily
trafficTypes: [ trafficTypes: Array<{
{ group: string; // we could do 'successful-requests', but that might constrain us in the future
group: string; // we could do 'successful-requests', but that might constrain us in the future count: number; // natural number
count: number; // natural number }>;
}, }>;
];
}[];
}, },
]; ];
}; };
@ -94,8 +92,7 @@ export type InstanceTrafficMetricsResponse2 = {
export const useInstanceTrafficMetrics2 = ( export const useInstanceTrafficMetrics2 = (
selection: ChartDataSelection, selection: ChartDataSelection,
): InstanceTrafficMetricsResponse2 => { ): InstanceTrafficMetricsResponse2 => {
// const { from, to } = fromSelection(selection); const { from, to } = fromSelection(selection);
// console.log('would use these from and to dates', from, to);
const apiPath = const apiPath =
selection.format === 'daily' selection.format === 'daily'