diff --git a/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/ClusterRoleBindingsDatatable.tsx b/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/ClusterRoleBindingsDatatable.tsx index 1254fa0fa..8fb9d2e79 100644 --- a/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/ClusterRoleBindingsDatatable.tsx +++ b/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/ClusterRoleBindingsDatatable.tsx @@ -21,7 +21,7 @@ import { DefaultDatatableSettings } from '../../../datatables/DefaultDatatableSe import { ClusterRoleBinding } from './types'; import { columns } from './columns'; import { useClusterRoleBindings } from './queries/useClusterRoleBindings'; -import { useDeleteClusterRoleBindings } from './queries/useDeleteClusterRoleBindings'; +import { useDeleteClusterRoleBindingsMutation } from './queries/useDeleteClusterRoleBindingsMutation'; const storageKey = 'clusterRoleBindings'; const settingsStore = createStore(storageKey); @@ -99,7 +99,7 @@ type TableActionsProps = { function TableActions({ selectedItems }: TableActionsProps) { const environmentId = useEnvironmentId(); const deleteClusterRoleBindingsMutation = - useDeleteClusterRoleBindings(environmentId); + useDeleteClusterRoleBindingsMutation(environmentId); const router = useRouter(); async function handleRemoveClick(roles: SelectedRole[]) { diff --git a/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/queries/useDeleteClusterRoleBindings.ts b/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/queries/useDeleteClusterRoleBindingsMutation.ts similarity index 91% rename from app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/queries/useDeleteClusterRoleBindings.ts rename to app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/queries/useDeleteClusterRoleBindingsMutation.ts index 5724b4fb9..9767f90e3 100644 --- a/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/queries/useDeleteClusterRoleBindings.ts +++ b/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRoleBindingsDatatable/queries/useDeleteClusterRoleBindingsMutation.ts @@ -6,7 +6,9 @@ import { EnvironmentId } from '@/react/portainer/environments/types'; import { queryKeys } from './query-keys'; -export function useDeleteClusterRoleBindings(environmentId: EnvironmentId) { +export function useDeleteClusterRoleBindingsMutation( + environmentId: EnvironmentId +) { const queryClient = useQueryClient(); return useMutation(deleteClusterRoleBindings, { ...withInvalidate(queryClient, [queryKeys.list(environmentId)]), diff --git a/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/ClusterRolesDatatable.tsx b/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/ClusterRolesDatatable.tsx index c61c79330..1c9b7c552 100644 --- a/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/ClusterRolesDatatable.tsx +++ b/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/ClusterRolesDatatable.tsx @@ -23,7 +23,7 @@ import { RoleBinding } from '../../RolesView/RoleBindingsDatatable/types'; import { ClusterRole, ClusterRoleRowData } from './types'; import { columns } from './columns'; import { useClusterRoles } from './queries/useClusterRoles'; -import { useDeleteClusterRoles } from './queries/useDeleteClusterRoles'; +import { useDeleteClusterRolesMutation } from './queries/useDeleteClusterRolesMutation'; const storageKey = 'clusterRoles'; const settingsStore = createStore(storageKey); @@ -101,7 +101,8 @@ type TableActionsProps = { function TableActions({ selectedItems }: TableActionsProps) { const environmentId = useEnvironmentId(); - const deleteClusterRolesMutation = useDeleteClusterRoles(environmentId); + const deleteClusterRolesMutation = + useDeleteClusterRolesMutation(environmentId); const router = useRouter(); async function handleRemoveClick(roles: SelectedRole[]) { diff --git a/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/queries/useDeleteClusterRoles.ts b/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/queries/useDeleteClusterRolesMutation.ts similarity index 91% rename from app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/queries/useDeleteClusterRoles.ts rename to app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/queries/useDeleteClusterRolesMutation.ts index 3aaeb8f6c..85167e651 100644 --- a/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/queries/useDeleteClusterRoles.ts +++ b/app/react/kubernetes/more-resources/ClusterRolesView/ClusterRolesDatatable/queries/useDeleteClusterRolesMutation.ts @@ -6,7 +6,7 @@ import { EnvironmentId } from '@/react/portainer/environments/types'; import { queryKeys } from './query-keys'; -export function useDeleteClusterRoles(environmentId: EnvironmentId) { +export function useDeleteClusterRolesMutation(environmentId: EnvironmentId) { const queryClient = useQueryClient(); return useMutation(deleteClusterRoles, { onSuccess: () => diff --git a/app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/RoleBindingsDatatable.tsx b/app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/RoleBindingsDatatable.tsx index 6a70c7b68..31240ab56 100644 --- a/app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/RoleBindingsDatatable.tsx +++ b/app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/RoleBindingsDatatable.tsx @@ -26,7 +26,7 @@ import { import { RoleBinding } from './types'; import { columns } from './columns'; import { useRoleBindings } from './queries/useRoleBindings'; -import { useDeleteRoleBindings } from './queries/useDeleteRoleBindings'; +import { useDeleteRoleBindingsMutation } from './queries/useDeleteRoleBindingsMutation'; const storageKey = 'roleBindings'; interface TableSettings @@ -111,7 +111,8 @@ type TableActionsProps = { function TableActions({ selectedItems }: TableActionsProps) { const environmentId = useEnvironmentId(); - const deleteRoleBindingsMutation = useDeleteRoleBindings(environmentId); + const deleteRoleBindingsMutation = + useDeleteRoleBindingsMutation(environmentId); const router = useRouter(); async function handleRemoveClick(roles: SelectedRole[]) { diff --git a/app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/queries/useDeleteRoleBindings.ts b/app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/queries/useDeleteRoleBindingsMutation.ts similarity index 91% rename from app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/queries/useDeleteRoleBindings.ts rename to app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/queries/useDeleteRoleBindingsMutation.ts index 79c153bc5..029ee7e4b 100644 --- a/app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/queries/useDeleteRoleBindings.ts +++ b/app/react/kubernetes/more-resources/RolesView/RoleBindingsDatatable/queries/useDeleteRoleBindingsMutation.ts @@ -6,7 +6,7 @@ import { EnvironmentId } from '@/react/portainer/environments/types'; import { queryKeys } from './query-keys'; -export function useDeleteRoleBindings(environmentId: EnvironmentId) { +export function useDeleteRoleBindingsMutation(environmentId: EnvironmentId) { const queryClient = useQueryClient(); return useMutation(deleteRoleBindings, { ...withInvalidate(queryClient, [queryKeys.list(environmentId)]), diff --git a/app/react/kubernetes/more-resources/RolesView/RolesDatatable/RolesDatatable.tsx b/app/react/kubernetes/more-resources/RolesView/RolesDatatable/RolesDatatable.tsx index b24eca7f5..caa98b4c5 100644 --- a/app/react/kubernetes/more-resources/RolesView/RolesDatatable/RolesDatatable.tsx +++ b/app/react/kubernetes/more-resources/RolesView/RolesDatatable/RolesDatatable.tsx @@ -27,7 +27,7 @@ import { RoleBinding } from '../RoleBindingsDatatable/types'; import { columns } from './columns'; import { Role, RoleRowData } from './types'; import { useRoles } from './queries/useRoles'; -import { useDeleteRoles } from './queries/useDeleteRoles'; +import { useDeleteRolesMutation } from './queries/useDeleteRolesMutation'; const storageKey = 'roles'; interface TableSettings @@ -99,7 +99,7 @@ type TableActionsProps = { function TableActions({ selectedItems }: TableActionsProps) { const environmentId = useEnvironmentId(); - const deleteRolesMutation = useDeleteRoles(environmentId); + const deleteRolesMutation = useDeleteRolesMutation(environmentId); const router = useRouter(); return ( diff --git a/app/react/kubernetes/more-resources/RolesView/RolesDatatable/queries/useDeleteRoles.ts b/app/react/kubernetes/more-resources/RolesView/RolesDatatable/queries/useDeleteRolesMutation.ts similarity index 92% rename from app/react/kubernetes/more-resources/RolesView/RolesDatatable/queries/useDeleteRoles.ts rename to app/react/kubernetes/more-resources/RolesView/RolesDatatable/queries/useDeleteRolesMutation.ts index 6b4cc96fc..211ac8a16 100644 --- a/app/react/kubernetes/more-resources/RolesView/RolesDatatable/queries/useDeleteRoles.ts +++ b/app/react/kubernetes/more-resources/RolesView/RolesDatatable/queries/useDeleteRolesMutation.ts @@ -6,7 +6,7 @@ import { EnvironmentId } from '@/react/portainer/environments/types'; import { queryKeys } from './query-keys'; -export function useDeleteRoles(environmentId: EnvironmentId) { +export function useDeleteRolesMutation(environmentId: EnvironmentId) { const queryClient = useQueryClient(); return useMutation(deleteRole, { ...withInvalidate(queryClient, [queryKeys.list(environmentId)]),