Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: monitor data (#392)

* fix: timestamp

* fix: regions filter

authored by

Maximilian Kaske and committed by
GitHub
2c09c6f7 f7180a36

+9 -8
+2 -1
apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/_components/chart-wrapper.tsx
··· 1 - /** NOT USING THE CLIENT TO CALCULATE THE GROUPED DATA */ 1 + "use client"; 2 + 2 3 import type { Ping, Region } from "@openstatus/tinybird"; 3 4 4 5 import type { Period } from "../utils";
+2 -2
apps/web/src/components/data-table/columns.tsx
··· 11 11 12 12 export const columns: ColumnDef<Ping>[] = [ 13 13 { 14 - accessorKey: "timestamp", 14 + accessorKey: "cronTimestamp", 15 15 header: ({ column }) => ( 16 16 <DataTableColumnHeader column={column} title="Date" /> 17 17 ), 18 18 cell: ({ row }) => { 19 19 return ( 20 20 <div> 21 - {format(new Date(row.getValue("timestamp")), "LLL dd, y HH:mm")} 21 + {format(new Date(row.getValue("cronTimestamp")), "LLL dd, y HH:mm")} 22 22 </div> 23 23 ); 24 24 },
+5 -5
apps/web/src/components/data-table/data-table-toolbar.tsx
··· 6 6 import { Button } from "@openstatus/ui"; 7 7 8 8 import { codesDict } from "@/data/code-dictionary"; 9 - import { regionsDict } from "@/data/regions-dictionary"; 9 + import { flyRegionsDict } from "@/data/regions-dictionary"; 10 10 import { DataTableDateRangePicker } from "./data-table-date-ranger-picker"; 11 11 import { DataTableFacetedFilter } from "./data-table-faceted-filter"; 12 12 import { DataTableFilterInput } from "./data-table-filter-input"; ··· 40 40 <DataTableFacetedFilter 41 41 column={table.getColumn("region")} 42 42 title="Region" 43 - options={Object.keys(regionsDict).map((key) => { 44 - const typedKey = key as keyof typeof regionsDict; 43 + options={Object.keys(flyRegionsDict).map((key) => { 44 + const typedKey = key as keyof typeof flyRegionsDict; 45 45 return { 46 - label: regionsDict[typedKey].location, 47 - value: regionsDict[typedKey].code, 46 + label: flyRegionsDict[typedKey].location, 47 + value: flyRegionsDict[typedKey].code, 48 48 }; 49 49 })} 50 50 />