mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
fix: correct name order -> traffic usage data -> traffic data usage (#9156)
Correcting a slight oversight from when we created the new methods. This brings the name in line with the other store methods.
This commit is contained in:
parent
85ae6f3b95
commit
ab3531dd51
@ -92,7 +92,7 @@ export class FakeTrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
return Object.values(data);
|
return Object.values(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDailyTrafficUsageDataForPeriod(
|
async getDailyTrafficDataUsageForPeriod(
|
||||||
from: Date,
|
from: Date,
|
||||||
to: Date,
|
to: Date,
|
||||||
): Promise<IStatTrafficUsage[]> {
|
): Promise<IStatTrafficUsage[]> {
|
||||||
@ -101,7 +101,7 @@ export class FakeTrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMonthlyTrafficUsageDataForPeriod(
|
async getMonthlyTrafficDataUsageForPeriod(
|
||||||
from: Date,
|
from: Date,
|
||||||
to: Date,
|
to: Date,
|
||||||
): Promise<IStatMonthlyTrafficUsage[]> {
|
): Promise<IStatMonthlyTrafficUsage[]> {
|
||||||
|
@ -27,11 +27,11 @@ export interface ITrafficDataUsageStore
|
|||||||
getTrafficDataForMonthRange(
|
getTrafficDataForMonthRange(
|
||||||
monthsBack: number,
|
monthsBack: number,
|
||||||
): Promise<IStatMonthlyTrafficUsage[]>;
|
): Promise<IStatMonthlyTrafficUsage[]>;
|
||||||
getDailyTrafficUsageDataForPeriod(
|
getDailyTrafficDataUsageForPeriod(
|
||||||
from: Date,
|
from: Date,
|
||||||
to: Date,
|
to: Date,
|
||||||
): Promise<IStatTrafficUsage[]>;
|
): Promise<IStatTrafficUsage[]>;
|
||||||
getMonthlyTrafficUsageDataForPeriod(
|
getMonthlyTrafficDataUsageForPeriod(
|
||||||
from: Date,
|
from: Date,
|
||||||
to: Date,
|
to: Date,
|
||||||
): Promise<IStatMonthlyTrafficUsage[]>;
|
): Promise<IStatMonthlyTrafficUsage[]>;
|
||||||
|
@ -96,7 +96,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDailyTrafficUsageDataForPeriod(
|
async getDailyTrafficDataUsageForPeriod(
|
||||||
from: Date,
|
from: Date,
|
||||||
to: Date,
|
to: Date,
|
||||||
): Promise<IStatTrafficUsage[]> {
|
): Promise<IStatTrafficUsage[]> {
|
||||||
@ -107,7 +107,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
return rows.map(mapRow);
|
return rows.map(mapRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMonthlyTrafficUsageDataForPeriod(
|
async getMonthlyTrafficDataUsageForPeriod(
|
||||||
from: Date,
|
from: Date,
|
||||||
to: Date,
|
to: Date,
|
||||||
): Promise<IStatMonthlyTrafficUsage[]> {
|
): Promise<IStatMonthlyTrafficUsage[]> {
|
||||||
@ -143,7 +143,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
period: string,
|
period: string,
|
||||||
): Promise<IStatTrafficUsage[]> {
|
): Promise<IStatTrafficUsage[]> {
|
||||||
const month = new Date(period);
|
const month = new Date(period);
|
||||||
return this.getDailyTrafficUsageDataForPeriod(
|
return this.getDailyTrafficDataUsageForPeriod(
|
||||||
startOfMonth(month),
|
startOfMonth(month),
|
||||||
endOfMonth(month),
|
endOfMonth(month),
|
||||||
);
|
);
|
||||||
@ -155,6 +155,6 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
): Promise<IStatMonthlyTrafficUsage[]> {
|
): Promise<IStatMonthlyTrafficUsage[]> {
|
||||||
const to = endOfMonth(new Date());
|
const to = endOfMonth(new Date());
|
||||||
const from = startOfMonth(subMonths(to, monthsBack));
|
const from = startOfMonth(subMonths(to, monthsBack));
|
||||||
return this.getMonthlyTrafficUsageDataForPeriod(from, to);
|
return this.getMonthlyTrafficDataUsageForPeriod(from, to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user