mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-21 07:27:58 +00:00
merge main
This commit is contained in:
+3
-3
@@ -18,7 +18,7 @@ import {
|
||||
Tooltip,
|
||||
Tr
|
||||
} from "@app/components/v2";
|
||||
import { useWorkspace } from "@app/context";
|
||||
import { useProject } from "@app/context";
|
||||
import { useToggle } from "@app/hooks";
|
||||
import {
|
||||
SecretScanningScanStatus,
|
||||
@@ -41,7 +41,7 @@ export const SecretScanningScanRow = ({ scan }: Props) => {
|
||||
resolvedFindings,
|
||||
type
|
||||
} = scan;
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { currentProject } = useProject();
|
||||
const totalFindings = resolvedFindings + unresolvedFindings;
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -97,7 +97,7 @@ export const SecretScanningScanRow = ({ scan }: Props) => {
|
||||
navigate({
|
||||
to: "/projects/secret-scanning/$projectId/findings",
|
||||
params: {
|
||||
projectId: currentWorkspace.id
|
||||
projectId: currentProject.id
|
||||
},
|
||||
search: {
|
||||
search: `scanId:${id}`
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||
import { CreateSecretScanningDataSourceModal } from "@app/components/secret-scanning";
|
||||
import { Button, Spinner } from "@app/components/v2";
|
||||
import { ProjectPermissionSub, useSubscription, useWorkspace } from "@app/context";
|
||||
import { ProjectPermissionSub, useProject, useSubscription } from "@app/context";
|
||||
import { ProjectPermissionSecretScanningDataSourceActions } from "@app/context/ProjectPermissionContext/types";
|
||||
import { usePopUp } from "@app/hooks";
|
||||
import { useListSecretScanningDataSources } from "@app/hooks/api/secretScanningV2";
|
||||
@@ -20,10 +20,10 @@ export const SecretScanningDataSourcesSection = () => {
|
||||
|
||||
const { subscription } = useSubscription();
|
||||
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { currentProject } = useProject();
|
||||
|
||||
const { data: dataSources = [], isPending: isDataSourcesPending } =
|
||||
useListSecretScanningDataSources(currentWorkspace.id, {
|
||||
useListSecretScanningDataSources(currentProject.id, {
|
||||
refetchInterval: 30000,
|
||||
enabled: subscription.secretScanning
|
||||
});
|
||||
|
||||
+3
-3
@@ -2,16 +2,16 @@ import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-sv
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
|
||||
import { ContentLoader } from "@app/components/v2";
|
||||
import { useWorkspace } from "@app/context";
|
||||
import { useProject } from "@app/context";
|
||||
import { useListSecretScanningFindings } from "@app/hooks/api/secretScanningV2";
|
||||
|
||||
import { SecretScanningFindingsTable } from "./SecretScanningFindingsTable";
|
||||
|
||||
export const SecretScanningFindingsSection = () => {
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { currentProject } = useProject();
|
||||
|
||||
const { data: findings = [], isPending: isFindingsPending } = useListSecretScanningFindings(
|
||||
currentWorkspace.id,
|
||||
currentProject.id,
|
||||
{
|
||||
refetchInterval: 30000
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,16 +1,16 @@
|
||||
import { faBan } from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
import { AccessRestrictedBanner, ContentLoader, EmptyState } from "@app/components/v2";
|
||||
import { useSubscription, useWorkspace } from "@app/context";
|
||||
import { useProject, useSubscription } from "@app/context";
|
||||
import { useGetSecretScanningConfig } from "@app/hooks/api/secretScanningV2";
|
||||
|
||||
import { SecretScanningConfigForm } from "./SecretScanningConfigForm";
|
||||
|
||||
export const ProjectScanningConfigTab = () => {
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { currentProject } = useProject();
|
||||
const { subscription } = useSubscription();
|
||||
const { data: config, isPending: isConfigPending } = useGetSecretScanningConfig(
|
||||
currentWorkspace.id,
|
||||
currentProject.id,
|
||||
{ enabled: subscription.secretScanning }
|
||||
);
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
import { BreadcrumbTypes } from "@app/components/v2";
|
||||
import { workspaceKeys } from "@app/hooks/api";
|
||||
import { projectKeys } from "@app/hooks/api";
|
||||
import { fetchProjectById } from "@app/hooks/api/projects/queries";
|
||||
import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
|
||||
import { fetchWorkspaceById } from "@app/hooks/api/workspace/queries";
|
||||
import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
|
||||
import { SecretScanningLayout } from "@app/layouts/SecretScanningLayout";
|
||||
|
||||
@@ -13,15 +13,15 @@ export const Route = createFileRoute(
|
||||
component: SecretScanningLayout,
|
||||
beforeLoad: async ({ params, context }) => {
|
||||
const project = await context.queryClient.ensureQueryData({
|
||||
queryKey: workspaceKeys.getWorkspaceById(params.projectId),
|
||||
queryFn: () => fetchWorkspaceById(params.projectId)
|
||||
queryKey: projectKeys.getProjectById(params.projectId),
|
||||
queryFn: () => fetchProjectById(params.projectId)
|
||||
});
|
||||
|
||||
await context.queryClient.ensureQueryData({
|
||||
queryKey: roleQueryKeys.getUserProjectPermissions({
|
||||
workspaceId: params.projectId
|
||||
projectId: params.projectId
|
||||
}),
|
||||
queryFn: () => fetchUserProjectPermissions({ workspaceId: params.projectId })
|
||||
queryFn: () => fetchUserProjectPermissions({ projectId: params.projectId })
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user