mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-24 20:06:55 +01:00
Provides store method for retrieving traffic usage data based on period parameter, and UI + ui hook with the new chart for displaying traffic usage data spread out over selectable month.  In this PR we copied and adapted a plugin written by DX for highlighting a column in the chart:  There are some minor improvements planned which will come in a separate PR, reversing the order in legend and tooltip so the colors go from light to dark, and adding a month -sum below the legend ## Discussion points - Should any of this be extracted as a separate reusable component? --------- Co-authored-by: Nuno Góis <github@nunogois.com>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import type {
|
|
IStatTrafficUsageKey,
|
|
IStatTrafficUsage,
|
|
} from './traffic-data-usage-store-type';
|
|
import type { ITrafficDataUsageStore } from '../../types';
|
|
|
|
export class FakeTrafficDataUsageStore implements ITrafficDataUsageStore {
|
|
get(key: IStatTrafficUsageKey): Promise<IStatTrafficUsage> {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
getAll(query?: Object | undefined): Promise<IStatTrafficUsage[]> {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
exists(key: IStatTrafficUsageKey): Promise<boolean> {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
delete(key: IStatTrafficUsageKey): Promise<void> {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
deleteAll(): Promise<void> {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
destroy(): void {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
upsert(trafficDataUsage: IStatTrafficUsage): Promise<void> {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
getTrafficDataUsageForPeriod(period: string): Promise<IStatTrafficUsage[]> {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
}
|