From dc256f76eb152a063b798b4bef252ee964faea3a Mon Sep 17 00:00:00 2001 From: sylenien Date: Tue, 20 Sep 2022 16:35:36 +0200 Subject: [PATCH] change(ui): fixes --- .../components/DashboardWidgetGrid/AddPredefinedMetric.tsx | 2 +- frontend/app/mstore/types/dashboard.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/Dashboard/components/DashboardWidgetGrid/AddPredefinedMetric.tsx b/frontend/app/components/Dashboard/components/DashboardWidgetGrid/AddPredefinedMetric.tsx index a0fdbcc3b..77fbd6f20 100644 --- a/frontend/app/components/Dashboard/components/DashboardWidgetGrid/AddPredefinedMetric.tsx +++ b/frontend/app/components/Dashboard/components/DashboardWidgetGrid/AddPredefinedMetric.tsx @@ -82,7 +82,7 @@ function AddPredefinedMetric({ history, siteId, title, description }: IProps) { -
Showing the data from past 7 days.
+
Past 7 Days
diff --git a/frontend/app/mstore/types/dashboard.ts b/frontend/app/mstore/types/dashboard.ts index 125aff468..3376ecd38 100644 --- a/frontend/app/mstore/types/dashboard.ts +++ b/frontend/app/mstore/types/dashboard.ts @@ -48,7 +48,8 @@ export default class Dashboard { this.description = json.description this.isPublic = json.isPublic this.createdAt = DateTime.fromMillis(new Date(json.createdAt).getTime()) - if (json.widgets) { + const haveSmallWidgets = (json.widgets as any[]).includes((i: any) => i.config.col === 1) + if (json.widgets && haveSmallWidgets) { // legacy const dashboardFix = '__openreplay__dashboard__fix' + json.dashboardId const isFixed = localStorage.getItem(dashboardFix)