mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 08:34:52 +00:00
feat: moved more of isLoading to isPending
This commit is contained in:
@@ -192,7 +192,7 @@ export const OverviewPage = () => {
|
||||
environments: (userAvailableEnvs || []).map(({ slug }) => slug)
|
||||
});
|
||||
|
||||
const { isLoading: isOverviewLoading, data: overview } = useGetProjectSecretsOverview(
|
||||
const { isPending: isOverviewLoading, data: overview } = useGetProjectSecretsOverview(
|
||||
{
|
||||
projectId: workspaceId,
|
||||
environments: visibleEnvs.map((env) => env.slug),
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
|
||||
|
||||
const { mutateAsync: createSecretV3 } = useCreateSecretV3();
|
||||
const { mutateAsync: createFolder } = useCreateFolder();
|
||||
const { data: projectTags, isLoading: isTagsLoading } = useGetWsTags(
|
||||
const { data: projectTags, isPending: isTagsLoading } = useGetWsTags(
|
||||
canReadTags ? workspaceId : ""
|
||||
);
|
||||
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ export const CreateSecretForm = ({
|
||||
|
||||
const { permission } = useProjectPermission();
|
||||
const canReadTags = permission.can(ProjectPermissionActions.Read, ProjectPermissionSub.Tags);
|
||||
const { data: projectTags, isLoading: isTagsLoading } = useGetWsTags(
|
||||
const { data: projectTags, isPending: isTagsLoading } = useGetWsTags(
|
||||
canReadTags ? workspaceId : ""
|
||||
);
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ export const EditDynamicSecretForm = ({
|
||||
onClose,
|
||||
secretPath
|
||||
}: Props) => {
|
||||
const { data: dynamicSecretDetails, isLoading: isDynamicSecretLoading } =
|
||||
const { data: dynamicSecretDetails, isPending: isDynamicSecretLoading } =
|
||||
useGetDynamicSecretDetails({
|
||||
projectSlug,
|
||||
environmentSlug: environment,
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ export const RotationOutputForm = ({ onSubmit, onCancel, outputSchema = {} }: Pr
|
||||
const secretPath = watch("secretPath");
|
||||
const selectedSecrets = watch("secrets");
|
||||
|
||||
const { data: secrets, isLoading: isSecretsLoading } = useGetProjectSecrets({
|
||||
const { data: secrets, isPending: isSecretsLoading } = useGetProjectSecrets({
|
||||
workspaceId,
|
||||
environment,
|
||||
secretPath
|
||||
|
||||
+2
-2
@@ -145,11 +145,11 @@ export const AwsSecretManagerConfigurePage = () => {
|
||||
});
|
||||
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
const { data: integrationAuthAwsKmsKeys, isLoading: isIntegrationAuthAwsKmsKeysLoading } =
|
||||
const { data: integrationAuthAwsKmsKeys, isPending: isIntegrationAuthAwsKmsKeysLoading } =
|
||||
useGetIntegrationAuthAwsKmsKeys({
|
||||
integrationAuthId: String(integrationAuthId),
|
||||
region: selectedAWSRegion
|
||||
|
||||
+2
-2
@@ -38,11 +38,11 @@ export const DatabricksConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
const { data: integrationAuthScopes, isLoading: isIntegrationAuthScopesLoading } =
|
||||
const { data: integrationAuthScopes, isPending: isIntegrationAuthScopesLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
+2
-2
@@ -40,10 +40,10 @@ export const FlyioConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
const { data: integrationAuthApps = [], isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps = [], isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ export const GcpSecretManagerConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ export const GithubConfigurePage = () => {
|
||||
});
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId);
|
||||
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId
|
||||
});
|
||||
|
||||
+2
-2
@@ -91,12 +91,12 @@ export const GitlabConfigurePage = () => {
|
||||
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? "",
|
||||
...(targetTeamId ? { teamId: targetTeamId } : {})
|
||||
});
|
||||
const { data: integrationAuthTeams, isLoading: isintegrationAuthTeamsLoading } =
|
||||
const { data: integrationAuthTeams, isPending: isintegrationAuthTeamsLoading } =
|
||||
useGetIntegrationAuthTeams((integrationAuthId as string) ?? "");
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ export const HashicorpVaultConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
|
||||
+2
-2
@@ -43,13 +43,13 @@ export const HasuraCloudConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
const selectedSourceEnvironment = watch("sourceEnvironment");
|
||||
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ export const HerokuConfigurePage = () => {
|
||||
});
|
||||
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
+3
-3
@@ -61,14 +61,14 @@ export const OctopusDeployConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: octopusDeploySpaces, isLoading: isLoadingOctopusDeploySpaces } =
|
||||
const { data: octopusDeploySpaces, isPending: isLoadingOctopusDeploySpaces } =
|
||||
useGetIntegrationAuthOctopusDeploySpaces((integrationAuthId as string) ?? "");
|
||||
|
||||
const currentSpace = watch("targetSpace", octopusDeploySpaces?.[0]);
|
||||
const currentScope = watch("scope");
|
||||
const sourceEnv = watch("sourceEnvironment");
|
||||
|
||||
const { data: octopusDeployResources, isLoading: isOctopusDeployResourcesLoading } =
|
||||
const { data: octopusDeployResources, isPending: isOctopusDeployResourcesLoading } =
|
||||
useGetIntegrationAuthApps(
|
||||
{
|
||||
integrationAuthId,
|
||||
@@ -82,7 +82,7 @@ export const OctopusDeployConfigurePage = () => {
|
||||
|
||||
const currentResource = watch("targetResource", octopusDeployResources?.[0]);
|
||||
|
||||
const { data: octopusDeployScopeValues, isLoading: isOctopusDeployScopeValuesLoading } =
|
||||
const { data: octopusDeployScopeValues, isPending: isOctopusDeployScopeValuesLoading } =
|
||||
useGetIntegrationAuthOctopusDeployScopeValues(
|
||||
{
|
||||
integrationAuthId,
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ export const QoveryConfigurePage = () => {
|
||||
});
|
||||
const [targetEnvironmentId, setTargetEnvironmentId] = useState("");
|
||||
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthQoveryScopes({
|
||||
integrationAuthId: (integrationAuthId as string) ?? "",
|
||||
environmentId: targetEnvironmentId,
|
||||
|
||||
+2
-2
@@ -60,10 +60,10 @@ export const RenderConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ export const RundeckConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
|
||||
+2
-2
@@ -40,10 +40,10 @@ export const TeamcityConfigurePage = () => {
|
||||
const [secretPath, setSecretPath] = useState("/");
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ export const VercelConfigurePage = () => {
|
||||
});
|
||||
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? "",
|
||||
teamId: integrationAuth?.teamId as string
|
||||
|
||||
Reference in New Issue
Block a user