feat: expand advanced widget experiences
This commit is contained in:
1 parent
55226842f9
commit
65a7e84bea
137 files changed
+3684
-850
No files matched your search
@@ -5,6 +5,23 @@ import type {
|
||||
SpeedtestTrackerStats,
|
||||
} from "@homarr/integrations/types";
|
||||
|
||||
export interface SpeedtestDashboardSource {
|
||||
integrationId: string;
|
||||
integrationName: string;
|
||||
dashboard: SpeedtestTrackerDashboardData;
|
||||
}
|
||||
|
||||
export const getAvailableSpeedtestDashboards = (
|
||||
results: readonly {
|
||||
integrationId: string;
|
||||
integrationName: string;
|
||||
dashboard: SpeedtestTrackerDashboardData | null;
|
||||
}[],
|
||||
): SpeedtestDashboardSource[] =>
|
||||
results.flatMap(({ integrationId, integrationName, dashboard }) =>
|
||||
dashboard === null ? [] : [{ integrationId, integrationName, dashboard }],
|
||||
);
|
||||
|
||||
export const mergeStats = (
|
||||
statsA: SpeedtestTrackerDashboardData["stats"],
|
||||
statsB: SpeedtestTrackerDashboardData["stats"],
|
||||
|
||||
Reference in new issue
Block a user