mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 20:42:02 +00:00
fix(ui): keep test button visible during account selection
This commit is contained in:
@@ -244,6 +244,7 @@ export function useOrgAccountSelectionFlow({
|
||||
connectionResults,
|
||||
);
|
||||
const showHeaderHelperText = !isTestingView || isApplying || isTesting;
|
||||
const isSelectionLocked = isApplying || isTesting;
|
||||
const treeDataWithConnectionState = isTestingView
|
||||
? buildTreeWithConnectionState(
|
||||
treeData,
|
||||
@@ -468,6 +469,7 @@ export function useOrgAccountSelectionFlow({
|
||||
}
|
||||
|
||||
const canRetry = hasConnectionErrors || Boolean(applyError);
|
||||
const hasSelectedAccounts = selectedCount > 0;
|
||||
|
||||
onFooterChange({
|
||||
showBack: true,
|
||||
@@ -483,11 +485,12 @@ export function useOrgAccountSelectionFlow({
|
||||
setCreatedProviderIds(launchableProviderIds);
|
||||
onSkip();
|
||||
},
|
||||
showAction: isApplying || isTesting || canRetry,
|
||||
showAction:
|
||||
isApplying || isTesting || canRetry || hasSelectedAccounts,
|
||||
actionLabel: "Test Connections",
|
||||
actionDisabled: isApplying || isTesting || !canRetry,
|
||||
actionDisabled: isApplying || isTesting || !hasSelectedAccounts,
|
||||
actionType: WIZARD_FOOTER_ACTION_TYPE.BUTTON,
|
||||
onAction: canRetry
|
||||
onAction: hasSelectedAccounts
|
||||
? () => {
|
||||
startTestingActionRef.current();
|
||||
}
|
||||
@@ -533,6 +536,7 @@ export function useOrgAccountSelectionFlow({
|
||||
hasConnectionErrors,
|
||||
isTesting,
|
||||
isTestingView,
|
||||
isSelectionLocked,
|
||||
organizationExternalId,
|
||||
selectedCount,
|
||||
selectedIdsForTree,
|
||||
|
||||
@@ -33,6 +33,7 @@ export function OrgAccountSelection({
|
||||
hasConnectionErrors,
|
||||
isTesting,
|
||||
isTestingView,
|
||||
isSelectionLocked,
|
||||
organizationExternalId,
|
||||
selectedCount,
|
||||
selectedIdsForTree,
|
||||
@@ -111,7 +112,7 @@ export function OrgAccountSelection({
|
||||
expandAll
|
||||
selectedIds={selectedIdsForTree}
|
||||
onSelectionChange={
|
||||
isTestingView ? () => {} : handleTreeSelectionChange
|
||||
isSelectionLocked ? () => {} : handleTreeSelectionChange
|
||||
}
|
||||
renderItem={(params) => (
|
||||
<OrgAccountTreeItem
|
||||
|
||||
Reference in New Issue
Block a user