Skip to content

Open-source status page, incident response and uptime monitoring

fix: monitor data (#392)

Maximilian Kaske2c09c6f7e243
diff --git a/apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/_components/chart-wrapper.tsx b/apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/_components/chart-wrapper.tsx
index e8d8f3323..8c1953417 100644
--- a/apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/_components/chart-wrapper.tsx
+++ b/apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/_components/chart-wrapper.tsx
@@ -1,4 +1,5 @@
-/** NOT USING THE CLIENT TO CALCULATE THE GROUPED DATA */
+"use client";
+
import type { Ping, Region } from "@openstatus/tinybird";
import type { Period } from "../utils";
diff --git a/apps/web/src/components/data-table/columns.tsx b/apps/web/src/components/data-table/columns.tsx
index aa92fb825..9a1141953 100644
--- a/apps/web/src/components/data-table/columns.tsx
+++ b/apps/web/src/components/data-table/columns.tsx
@@ -11,14 +11,14 @@ import { DataTableStatusBadge } from "./data-table-status-badge";
export const columns: ColumnDef<Ping>[] = [
{
- accessorKey: "timestamp",
+ accessorKey: "cronTimestamp",
header: ({ column }) => (
<DataTableColumnHeader column={column} title="Date" />
),
cell: ({ row }) => {
return (
<div>
- {format(new Date(row.getValue("timestamp")), "LLL dd, y HH:mm")}
+ {format(new Date(row.getValue("cronTimestamp")), "LLL dd, y HH:mm")}
</div>
);
},
diff --git a/apps/web/src/components/data-table/data-table-toolbar.tsx b/apps/web/src/components/data-table/data-table-toolbar.tsx
index 4db87b35b..8adfe414f 100644
--- a/apps/web/src/components/data-table/data-table-toolbar.tsx
+++ b/apps/web/src/components/data-table/data-table-toolbar.tsx
@@ -6,7 +6,7 @@ import { X } from "lucide-react";
import { Button } from "@openstatus/ui";
import { codesDict } from "@/data/code-dictionary";
-import { regionsDict } from "@/data/regions-dictionary";
+import { flyRegionsDict } from "@/data/regions-dictionary";
import { DataTableDateRangePicker } from "./data-table-date-ranger-picker";
import { DataTableFacetedFilter } from "./data-table-faceted-filter";
import { DataTableFilterInput } from "./data-table-filter-input";
@@ -40,11 +40,11 @@ export function DataTableToolbar<TData>({
<DataTableFacetedFilter
column={table.getColumn("region")}
title="Region"
- options={Object.keys(regionsDict).map((key) => {
- const typedKey = key as keyof typeof regionsDict;
+ options={Object.keys(flyRegionsDict).map((key) => {
+ const typedKey = key as keyof typeof flyRegionsDict;
return {
- label: regionsDict[typedKey].location,
- value: regionsDict[typedKey].code,
+ label: flyRegionsDict[typedKey].location,
+ value: flyRegionsDict[typedKey].code,
};
})}
/>