diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.tsx index 69ee1c3647860..92162014307d8 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.tsx @@ -379,7 +379,6 @@ export function EnrollRdsDatabase() { setWantAutoDiscover(b => !b)} - isDisabled={tableData.items.length === 0} discoveryGroupName={discoveryGroupName} setDiscoveryGroupName={setDiscoveryGroupName} clusterPublicUrl={ctx.storeUser.state.cluster.publicURL} @@ -443,13 +442,11 @@ function getRdsEngineIdentifier(engine: DatabaseEngine): RdsEngineIdentifier { function ToggleSection({ wantAutoDiscover, toggleWantAutoDiscover, - isDisabled, discoveryGroupName, setDiscoveryGroupName, clusterPublicUrl, }: { wantAutoDiscover: boolean; - isDisabled: boolean; toggleWantAutoDiscover(): void; discoveryGroupName: string; setDiscoveryGroupName(n: string): void; @@ -457,11 +454,7 @@ function ToggleSection({ }) { return ( - + Auto-enroll all databases for selected region diff --git a/web/packages/teleport/src/Integrations/Enroll/common.tsx b/web/packages/teleport/src/Integrations/Enroll/common.tsx index 32d0fe1db7a15..f505638ca434e 100644 --- a/web/packages/teleport/src/Integrations/Enroll/common.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/common.tsx @@ -34,7 +34,7 @@ export const IntegrationTile = styled(Flex)` cursor: pointer; ${props => { - const pointerEvents = props.disabled || props.$exists ? 'none' : null; + const pointerEvents = props.disabled || props.$exists ? 'none' : 'auto'; if (props.$exists) { return { pointerEvents }; } diff --git a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/ServerSideSupportedList.tsx b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/ServerSideSupportedList.tsx index d4306fe44194d..fc1f99b0af958 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/ServerSideSupportedList.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/ServerSideSupportedList.tsx @@ -106,6 +106,9 @@ export function ServerSideSupportedList(props: CommonListProps) { } const table = useMemo(() => { + // If there is a fetchStatus, a fetching is going on. + // Show the loading indicator instead of trying to process previous data. + const resources = fetchStatus === 'loading' ? [] : fetchedData.agents; const listProps: ServerSideListProps = { fetchStatus, customSort: { @@ -120,21 +123,17 @@ export function ServerSideSupportedList(props: CommonListProps) { switch (props.selectedResourceKind) { case 'role': - return ( - - ); + return ; case 'node': - return ; + return ; case 'windows_desktop': - return ( - - ); + return ; default: console.error( `[ServerSideSupportedList.tsx] table not defined for resource kind ${props.selectedResourceKind}` ); } - }, [props.attempt, fetchedData, fetchStatus, props.selectedResources]); + }, [fetchedData, fetchStatus, props.selectedResources]); return (