Skip to content

Commit

Permalink
remove scanid props, rename component name
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-deepfence committed Oct 30, 2023
1 parent 49bda06 commit 23c4215
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { SecretsIcon } from '@/components/sideNavigation/icons/Secrets';
import { VulnerabilityIcon } from '@/components/sideNavigation/icons/Vulnerability';
import { TruncatedText } from '@/components/TruncatedText';
import { NodeDetailsStackedModal } from '@/features/topology/components/NodeDetailsStackedModal';
import { SearchableCloudAccount } from '@/features/topology/data-components/tables/SearchableCloudAccount';
import { SearchableCloudAccountForHost } from '@/features/topology/data-components/tables/SearchableCloudAccountForHost';
import { queries } from '@/queries';
import {
ComplianceScanNodeTypeEnum,
Expand Down Expand Up @@ -467,8 +467,7 @@ function Filters() {
});
}}
/>
<SearchableCloudAccount
scanId={''}
<SearchableCloudAccountForHost
defaultSelectedAccounts={searchParams.getAll('cloudAccounts')}
onChange={(values) => {
setSearchParams((prev) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type SearchableCloudAccountProps = {
triggerVariant?: 'select' | 'button';
helperText?: string;
color?: 'error' | 'default';
scanId: string;
};

const PAGE_SIZE = 15;
Expand All @@ -23,7 +22,6 @@ const SearchableCloudAccountId = ({
triggerVariant,
helperText,
color,
scanId,
}: SearchableCloudAccountProps) => {
const [searchText, setSearchText] = useState('');

Expand All @@ -45,7 +43,6 @@ const SearchableCloudAccountId = ({
size: PAGE_SIZE,
searchText,
fieldName: 'cloud_account_id',
scanId: scanId,
}),
keepPreviousData: true,
getNextPageParam: (lastPage, allPages) => {
Expand Down Expand Up @@ -116,7 +113,7 @@ const SearchableCloudAccountId = ({
);
};

export const SearchableCloudAccount = (props: SearchableCloudAccountProps) => {
export const SearchableCloudAccountForHost = (props: SearchableCloudAccountProps) => {
const { triggerVariant } = props;
const isSelectVariantType = useMemo(() => {
return triggerVariant === 'select';
Expand Down
2 changes: 1 addition & 1 deletion deepfence_frontend/apps/dashboard/src/queries/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const commonQueries = createQueryKeys('common', {
};
},
searchHostFilters: (filters: {
scanId: string;
scanId?: string;
fieldName: string;
searchText: string;
size: number;
Expand Down

0 comments on commit 23c4215

Please sign in to comment.