From b558313ccb5f1005d08504a064009ebb16df9e28 Mon Sep 17 00:00:00 2001 From: Devin Villarosa <102188207+devinvillarosa@users.noreply.github.com> Date: Fri, 3 Jan 2025 09:24:11 -0800 Subject: [PATCH] [UI v2] chore: Moves RQ data to @/api (#16592) --- .../{hooks => api/automations}/automations.test.ts | 0 ui-v2/src/{hooks => api/automations}/automations.ts | 0 ui-v2/src/api/automations/index.ts | 8 ++++++++ .../global-concurrency-limits.test.ts | 0 .../global-concurrency-limits.ts | 0 ui-v2/src/api/global-concurrency-limits/index.ts | 8 ++++++++ ui-v2/src/api/task-run-concurrency-limits/index.ts | 11 +++++++++++ .../task-run-concurrency-limits.test.tsx | 0 .../task-run-concurrency-limits.ts | 0 ...lobal-concurrency-limits-create-or-edit-dialog.tsx | 2 +- ...se-create-or-edit-global-concurrency-limit-form.ts | 2 +- .../actions-cell.tsx | 2 +- .../active-cell.tsx | 4 ++-- .../global-concurrency-limits-data-table.tsx | 2 +- .../global-concurrency-limits-delete-dialog.tsx | 8 ++++---- .../global-conccurency-limits-dialog.tsx | 2 +- .../global-concurrency-limits-view/index.tsx | 2 +- .../task-run-concurrency-limit-details.tsx | 2 +- .../task-run-concurrency-limit-header.tsx | 2 +- .../task-run-concurrency-limit-page/index.tsx | 2 +- .../task-run-concurrency-limit-dialog.tsx | 2 +- .../task-run-concurrency-limits-create-dialog.tsx | 2 +- .../active-task-runs-cell.tsx | 2 +- .../tag-cell.tsx | 2 +- .../task-run-concurrency-limits-data-table.tsx | 2 +- .../task-run-concurrency-limits-delete-dialog.tsx | 8 ++++---- .../task-run-concurrency-limits-reset-dialog.tsx | 8 ++++---- .../task-run-concurrency-limits-view/index.tsx | 2 +- .../task-run-concurrency-limit-dialog.tsx | 2 +- ui-v2/src/routes/automations/automation.$id.ts | 2 +- ui-v2/src/routes/automations/index.ts | 2 +- .../concurrency-limits/concurrency-limit.$id.tsx | 2 +- ui-v2/src/routes/concurrency-limits/index.tsx | 4 ++-- 33 files changed, 62 insertions(+), 35 deletions(-) rename ui-v2/src/{hooks => api/automations}/automations.test.ts (100%) rename ui-v2/src/{hooks => api/automations}/automations.ts (100%) create mode 100644 ui-v2/src/api/automations/index.ts rename ui-v2/src/{hooks => api/global-concurrency-limits}/global-concurrency-limits.test.ts (100%) rename ui-v2/src/{hooks => api/global-concurrency-limits}/global-concurrency-limits.ts (100%) create mode 100644 ui-v2/src/api/global-concurrency-limits/index.ts create mode 100644 ui-v2/src/api/task-run-concurrency-limits/index.ts rename ui-v2/src/{hooks => api/task-run-concurrency-limits}/task-run-concurrency-limits.test.tsx (100%) rename ui-v2/src/{hooks => api/task-run-concurrency-limits}/task-run-concurrency-limits.ts (100%) diff --git a/ui-v2/src/hooks/automations.test.ts b/ui-v2/src/api/automations/automations.test.ts similarity index 100% rename from ui-v2/src/hooks/automations.test.ts rename to ui-v2/src/api/automations/automations.test.ts diff --git a/ui-v2/src/hooks/automations.ts b/ui-v2/src/api/automations/automations.ts similarity index 100% rename from ui-v2/src/hooks/automations.ts rename to ui-v2/src/api/automations/automations.ts diff --git a/ui-v2/src/api/automations/index.ts b/ui-v2/src/api/automations/index.ts new file mode 100644 index 000000000000..170f958ab2f0 --- /dev/null +++ b/ui-v2/src/api/automations/index.ts @@ -0,0 +1,8 @@ +export { + type Automation, + buildGetAutomationQuery, + buildListAutomationsQuery, + useCreateAutomation, + useDeleteAutomation, + useUpdateAutomation, +} from "./automations"; diff --git a/ui-v2/src/hooks/global-concurrency-limits.test.ts b/ui-v2/src/api/global-concurrency-limits/global-concurrency-limits.test.ts similarity index 100% rename from ui-v2/src/hooks/global-concurrency-limits.test.ts rename to ui-v2/src/api/global-concurrency-limits/global-concurrency-limits.test.ts diff --git a/ui-v2/src/hooks/global-concurrency-limits.ts b/ui-v2/src/api/global-concurrency-limits/global-concurrency-limits.ts similarity index 100% rename from ui-v2/src/hooks/global-concurrency-limits.ts rename to ui-v2/src/api/global-concurrency-limits/global-concurrency-limits.ts diff --git a/ui-v2/src/api/global-concurrency-limits/index.ts b/ui-v2/src/api/global-concurrency-limits/index.ts new file mode 100644 index 000000000000..6e80804d24ad --- /dev/null +++ b/ui-v2/src/api/global-concurrency-limits/index.ts @@ -0,0 +1,8 @@ +export { + type GlobalConcurrencyLimit, + buildListGlobalConcurrencyLimitsQuery, + useCreateGlobalConcurrencyLimit, + useDeleteGlobalConcurrencyLimit, + useListGlobalConcurrencyLimits, + useUpdateGlobalConcurrencyLimit, +} from "./global-concurrency-limits"; diff --git a/ui-v2/src/api/task-run-concurrency-limits/index.ts b/ui-v2/src/api/task-run-concurrency-limits/index.ts new file mode 100644 index 000000000000..3dee0e118b04 --- /dev/null +++ b/ui-v2/src/api/task-run-concurrency-limits/index.ts @@ -0,0 +1,11 @@ +export { + type TaskRunConcurrencyLimit, + buildDetailTaskRunConcurrencyLimitsQuery, + buildConcurrenyLimitDetailsActiveRunsQuery, + buildListTaskRunConcurrencyLimitsQuery, + useCreateTaskRunConcurrencyLimit, + useDeleteTaskRunConcurrencyLimit, + useGetTaskRunConcurrencyLimit, + useListTaskRunConcurrencyLimits, + useResetTaskRunConcurrencyLimitTag, +} from "./task-run-concurrency-limits"; diff --git a/ui-v2/src/hooks/task-run-concurrency-limits.test.tsx b/ui-v2/src/api/task-run-concurrency-limits/task-run-concurrency-limits.test.tsx similarity index 100% rename from ui-v2/src/hooks/task-run-concurrency-limits.test.tsx rename to ui-v2/src/api/task-run-concurrency-limits/task-run-concurrency-limits.test.tsx diff --git a/ui-v2/src/hooks/task-run-concurrency-limits.ts b/ui-v2/src/api/task-run-concurrency-limits/task-run-concurrency-limits.ts similarity index 100% rename from ui-v2/src/hooks/task-run-concurrency-limits.ts rename to ui-v2/src/api/task-run-concurrency-limits/task-run-concurrency-limits.ts diff --git a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/global-concurrency-limits-create-or-edit-dialog.tsx b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/global-concurrency-limits-create-or-edit-dialog.tsx index 077de7c055d1..8e62690cde05 100644 --- a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/global-concurrency-limits-create-or-edit-dialog.tsx +++ b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/global-concurrency-limits-create-or-edit-dialog.tsx @@ -1,3 +1,4 @@ +import type { GlobalConcurrencyLimit } from "@/api/global-concurrency-limits"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -17,7 +18,6 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Switch } from "@/components/ui/switch"; -import type { GlobalConcurrencyLimit } from "@/hooks/global-concurrency-limits"; import { useCreateOrEditGlobalConcurrencyLimitForm } from "./use-create-or-edit-global-concurrency-limit-form"; diff --git a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/use-create-or-edit-global-concurrency-limit-form.ts b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/use-create-or-edit-global-concurrency-limit-form.ts index 317d3d2ff74b..183bc22fd708 100644 --- a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/use-create-or-edit-global-concurrency-limit-form.ts +++ b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/use-create-or-edit-global-concurrency-limit-form.ts @@ -2,7 +2,7 @@ import { type GlobalConcurrencyLimit, useCreateGlobalConcurrencyLimit, useUpdateGlobalConcurrencyLimit, -} from "@/hooks/global-concurrency-limits"; +} from "@/api/global-concurrency-limits"; import { useToast } from "@/hooks/use-toast"; import { zodResolver } from "@hookform/resolvers/zod"; import { useEffect } from "react"; diff --git a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/actions-cell.tsx b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/actions-cell.tsx index b0af33450c5f..fde090e390d3 100644 --- a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/actions-cell.tsx +++ b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/actions-cell.tsx @@ -1,3 +1,4 @@ +import type { GlobalConcurrencyLimit } from "@/api/global-concurrency-limits"; import { Button } from "@/components/ui/button"; import { DropdownMenu, @@ -7,7 +8,6 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Icon } from "@/components/ui/icons"; -import type { GlobalConcurrencyLimit } from "@/hooks/global-concurrency-limits"; import { useToast } from "@/hooks/use-toast"; import type { CellContext } from "@tanstack/react-table"; diff --git a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/active-cell.tsx b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/active-cell.tsx index 4e837bd2a6f8..c48cd360adcc 100644 --- a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/active-cell.tsx +++ b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/active-cell.tsx @@ -1,11 +1,11 @@ import { useToast } from "@/hooks/use-toast"; import type { CellContext } from "@tanstack/react-table"; -import { Switch } from "@/components/ui/switch"; import { type GlobalConcurrencyLimit, useUpdateGlobalConcurrencyLimit, -} from "@/hooks/global-concurrency-limits"; +} from "@/api/global-concurrency-limits"; +import { Switch } from "@/components/ui/switch"; export const ActiveCell = ( props: CellContext, diff --git a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/global-concurrency-limits-data-table.tsx b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/global-concurrency-limits-data-table.tsx index b32d5a50b017..567bfefd3be9 100644 --- a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/global-concurrency-limits-data-table.tsx +++ b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/global-concurrency-limits-data-table.tsx @@ -1,5 +1,5 @@ +import type { GlobalConcurrencyLimit } from "@/api/global-concurrency-limits"; import { DataTable } from "@/components/ui/data-table"; -import type { GlobalConcurrencyLimit } from "@/hooks/global-concurrency-limits"; import { getRouteApi } from "@tanstack/react-router"; import { createColumnHelper, diff --git a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog/global-concurrency-limits-delete-dialog.tsx b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog/global-concurrency-limits-delete-dialog.tsx index c9199d1fe8c3..2ea5a5f02310 100644 --- a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog/global-concurrency-limits-delete-dialog.tsx +++ b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog/global-concurrency-limits-delete-dialog.tsx @@ -1,3 +1,7 @@ +import { + type GlobalConcurrencyLimit, + useDeleteGlobalConcurrencyLimit, +} from "@/api/global-concurrency-limits"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -8,10 +12,6 @@ import { DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; -import { - type GlobalConcurrencyLimit, - useDeleteGlobalConcurrencyLimit, -} from "@/hooks/global-concurrency-limits"; import { useToast } from "@/hooks/use-toast"; type GlobalConcurrencyLimitsDeleteDialogProps = { diff --git a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/global-conccurency-limits-dialog.tsx b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/global-conccurency-limits-dialog.tsx index e997a06a1235..f87881141567 100644 --- a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/global-conccurency-limits-dialog.tsx +++ b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/global-conccurency-limits-dialog.tsx @@ -1,4 +1,4 @@ -import type { GlobalConcurrencyLimit } from "@/hooks/global-concurrency-limits"; +import type { GlobalConcurrencyLimit } from "@/api/global-concurrency-limits"; import { GlobalConcurrencyLimitsCreateOrEditDialog } from "@/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog"; import { GlobalConcurrencyLimitsDeleteDialog } from "@/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog"; diff --git a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/index.tsx b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/index.tsx index e57ca793e16f..d07dea8597af 100644 --- a/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/index.tsx +++ b/ui-v2/src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/index.tsx @@ -1,7 +1,7 @@ import { type GlobalConcurrencyLimit, useListGlobalConcurrencyLimits, -} from "@/hooks/global-concurrency-limits"; +} from "@/api/global-concurrency-limits"; import { useState } from "react"; import { GlobalConcurrencyLimitsDataTable } from "@/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table"; diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-details/task-run-concurrency-limit-details.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-details/task-run-concurrency-limit-details.tsx index 21a0f46659f5..51f89efc19a4 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-details/task-run-concurrency-limit-details.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-details/task-run-concurrency-limit-details.tsx @@ -1,6 +1,6 @@ import { cn } from "@/lib/utils"; -import type { TaskRunConcurrencyLimit } from "@/hooks/task-run-concurrency-limits"; +import type { TaskRunConcurrencyLimit } from "@/api/task-run-concurrency-limits"; import { format, parseISO } from "date-fns"; import React from "react"; diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-header/task-run-concurrency-limit-header.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-header/task-run-concurrency-limit-header.tsx index 6876d4e49553..56886766216b 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-header/task-run-concurrency-limit-header.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-header/task-run-concurrency-limit-header.tsx @@ -1,5 +1,5 @@ +import type { TaskRunConcurrencyLimit } from "@/api/task-run-concurrency-limits"; import { TaskRunConcurrencyLimitsActionsMenu } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-actions-menu"; -import type { TaskRunConcurrencyLimit } from "@/hooks/task-run-concurrency-limits"; import { NavHeader } from "./nav-header"; diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page/index.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page/index.tsx index 019962dd854d..b3e30dfa4b7d 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page/index.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page/index.tsx @@ -1,5 +1,5 @@ +import { buildConcurrenyLimitDetailsActiveRunsQuery } from "@/api/task-run-concurrency-limits"; import { TaskRunConcurrencyLimitHeader } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-header"; -import { buildConcurrenyLimitDetailsActiveRunsQuery } from "@/hooks/task-run-concurrency-limits"; import { useState } from "react"; import { TaskRunConcurrencyLimitActiveTaskRuns } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-active-task-runs"; diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page/task-run-concurrency-limit-dialog.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page/task-run-concurrency-limit-dialog.tsx index 2b79205d9261..021c7ccf3fe2 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page/task-run-concurrency-limit-dialog.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page/task-run-concurrency-limit-dialog.tsx @@ -1,6 +1,6 @@ +import type { TaskRunConcurrencyLimit } from "@/api/task-run-concurrency-limits"; import { TaskRunConcurrencyLimitsDeleteDialog } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog"; import { TaskRunConcurrencyLimitsResetDialog } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog"; -import type { TaskRunConcurrencyLimit } from "@/hooks/task-run-concurrency-limits"; import { getRouteApi } from "@tanstack/react-router"; export type Dialogs = null | "delete" | "reset"; diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog/task-run-concurrency-limits-create-dialog.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog/task-run-concurrency-limits-create-dialog.tsx index 7d0b477777fe..46ea57d8f1f9 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog/task-run-concurrency-limits-create-dialog.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog/task-run-concurrency-limits-create-dialog.tsx @@ -1,3 +1,4 @@ +import { useCreateTaskRunConcurrencyLimit } from "@/api/task-run-concurrency-limits"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -16,7 +17,6 @@ import { FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; -import { useCreateTaskRunConcurrencyLimit } from "@/hooks/task-run-concurrency-limits"; import { useToast } from "@/hooks/use-toast"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/active-task-runs-cell.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/active-task-runs-cell.tsx index 7b1f00d4bf5f..eea276838333 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/active-task-runs-cell.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/active-task-runs-cell.tsx @@ -1,4 +1,4 @@ -import type { TaskRunConcurrencyLimit } from "@/hooks/task-run-concurrency-limits"; +import type { TaskRunConcurrencyLimit } from "@/api/task-run-concurrency-limits"; import type { CellContext } from "@tanstack/react-table"; type ActiveTaskRunCellsProps = CellContext< diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/tag-cell.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/tag-cell.tsx index d5bd20509aec..c6a957a156ae 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/tag-cell.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/tag-cell.tsx @@ -1,4 +1,4 @@ -import type { TaskRunConcurrencyLimit } from "@/hooks/task-run-concurrency-limits"; +import type { TaskRunConcurrencyLimit } from "@/api/task-run-concurrency-limits"; import { Link } from "@tanstack/react-router"; import type { CellContext } from "@tanstack/react-table"; diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/task-run-concurrency-limits-data-table.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/task-run-concurrency-limits-data-table.tsx index 2a2e0c1d7141..61598dd4e739 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/task-run-concurrency-limits-data-table.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/task-run-concurrency-limits-data-table.tsx @@ -1,7 +1,7 @@ +import type { TaskRunConcurrencyLimit } from "@/api/task-run-concurrency-limits"; import { TaskRunConcurrencyLimitsActionsMenu } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-actions-menu"; import { DataTable } from "@/components/ui/data-table"; import { SearchInput } from "@/components/ui/input"; -import type { TaskRunConcurrencyLimit } from "@/hooks/task-run-concurrency-limits"; import { getRouteApi } from "@tanstack/react-router"; import { createColumnHelper, diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog/task-run-concurrency-limits-delete-dialog.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog/task-run-concurrency-limits-delete-dialog.tsx index 855428198447..283adc46dadc 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog/task-run-concurrency-limits-delete-dialog.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog/task-run-concurrency-limits-delete-dialog.tsx @@ -1,3 +1,7 @@ +import { + type TaskRunConcurrencyLimit, + useDeleteTaskRunConcurrencyLimit, +} from "@/api/task-run-concurrency-limits"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -8,10 +12,6 @@ import { DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; -import { - type TaskRunConcurrencyLimit, - useDeleteTaskRunConcurrencyLimit, -} from "@/hooks/task-run-concurrency-limits"; import { useToast } from "@/hooks/use-toast"; type TaskRunConcurrencyLimitsDeleteDialogProps = { diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog/task-run-concurrency-limits-reset-dialog.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog/task-run-concurrency-limits-reset-dialog.tsx index fb731c9ab3fd..b8e64c5d82dc 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog/task-run-concurrency-limits-reset-dialog.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog/task-run-concurrency-limits-reset-dialog.tsx @@ -1,3 +1,7 @@ +import { + type TaskRunConcurrencyLimit, + useResetTaskRunConcurrencyLimitTag, +} from "@/api/task-run-concurrency-limits"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -8,10 +12,6 @@ import { DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; -import { - type TaskRunConcurrencyLimit, - useResetTaskRunConcurrencyLimitTag, -} from "@/hooks/task-run-concurrency-limits"; import { useToast } from "@/hooks/use-toast"; type TaskRunConcurrencyLimitsResetDialogProps = { diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/index.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/index.tsx index 33705d30c3f9..40378211aae2 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/index.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/index.tsx @@ -1,7 +1,7 @@ import { type TaskRunConcurrencyLimit, useListTaskRunConcurrencyLimits, -} from "@/hooks/task-run-concurrency-limits"; +} from "@/api/task-run-concurrency-limits"; import { useState } from "react"; import { TaskRunConcurrencyLimitsDataTable } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table"; diff --git a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/task-run-concurrency-limit-dialog.tsx b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/task-run-concurrency-limit-dialog.tsx index e7a808c58c6f..caff11e43a1c 100644 --- a/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/task-run-concurrency-limit-dialog.tsx +++ b/ui-v2/src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/task-run-concurrency-limit-dialog.tsx @@ -1,7 +1,7 @@ +import type { TaskRunConcurrencyLimit } from "@/api/task-run-concurrency-limits"; import { TaskRunConcurrencyLimitsCreateDialog } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog"; import { TaskRunConcurrencyLimitsDeleteDialog } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog"; import { TaskRunConcurrencyLimitsResetDialog } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog"; -import type { TaskRunConcurrencyLimit } from "@/hooks/task-run-concurrency-limits"; export type DialogState = | { dialog: null | "create"; data: undefined } diff --git a/ui-v2/src/routes/automations/automation.$id.ts b/ui-v2/src/routes/automations/automation.$id.ts index 5a2061b6f909..f1286e4bcbf7 100644 --- a/ui-v2/src/routes/automations/automation.$id.ts +++ b/ui-v2/src/routes/automations/automation.$id.ts @@ -1,6 +1,6 @@ import { createFileRoute } from "@tanstack/react-router"; -import { buildGetAutomationQuery } from "@/hooks/automations"; +import { buildGetAutomationQuery } from "@/api/automations"; export const Route = createFileRoute("/automations/automation/$id")({ component: RouteComponent, diff --git a/ui-v2/src/routes/automations/index.ts b/ui-v2/src/routes/automations/index.ts index c7a02d901a31..53ad499aec45 100644 --- a/ui-v2/src/routes/automations/index.ts +++ b/ui-v2/src/routes/automations/index.ts @@ -1,4 +1,4 @@ -import { buildListAutomationsQuery } from "@/hooks/automations"; +import { buildListAutomationsQuery } from "@/api/automations"; import { createFileRoute } from "@tanstack/react-router"; // nb: Currently there is no filtering or search params used on this page diff --git a/ui-v2/src/routes/concurrency-limits/concurrency-limit.$id.tsx b/ui-v2/src/routes/concurrency-limits/concurrency-limit.$id.tsx index 7dcc21b3e069..19b4fe13d8c9 100644 --- a/ui-v2/src/routes/concurrency-limits/concurrency-limit.$id.tsx +++ b/ui-v2/src/routes/concurrency-limits/concurrency-limit.$id.tsx @@ -1,5 +1,5 @@ +import { buildConcurrenyLimitDetailsActiveRunsQuery } from "@/api/task-run-concurrency-limits"; import { TaskRunConcurrencyLimitPage } from "@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limit-page"; -import { buildConcurrenyLimitDetailsActiveRunsQuery } from "@/hooks/task-run-concurrency-limits"; import { createFileRoute } from "@tanstack/react-router"; import { zodValidator } from "@tanstack/zod-adapter"; import { z } from "zod"; diff --git a/ui-v2/src/routes/concurrency-limits/index.tsx b/ui-v2/src/routes/concurrency-limits/index.tsx index 0946a99e8e85..4a29e12fdfde 100644 --- a/ui-v2/src/routes/concurrency-limits/index.tsx +++ b/ui-v2/src/routes/concurrency-limits/index.tsx @@ -1,6 +1,6 @@ +import { buildListGlobalConcurrencyLimitsQuery } from "@/api/global-concurrency-limits"; +import { buildListTaskRunConcurrencyLimitsQuery } from "@/api/task-run-concurrency-limits"; import { ConcurrencyLimitsPage } from "@/components/concurrency/concurrency-limits-page"; -import { buildListGlobalConcurrencyLimitsQuery } from "@/hooks/global-concurrency-limits"; -import { buildListTaskRunConcurrencyLimitsQuery } from "@/hooks/task-run-concurrency-limits"; import { createFileRoute } from "@tanstack/react-router"; import { zodValidator } from "@tanstack/zod-adapter"; import { z } from "zod";