Skip to content

Commit 809f472

Browse files
lionel95200xabullet33
authored andcommitted
feat(database): add refresh button on network private
ref: #DATATR-2550 Signed-off-by: Lionel Bueno <[email protected]>
1 parent f4fe626 commit 809f472

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

packages/manager/apps/pci-databases-analytics/src/components/order/cluster-options/NetworkOptions.components.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { UseQueryResult } from '@tanstack/react-query';
3-
import { HelpCircle, Network as NetworkIcon } from 'lucide-react';
3+
import { HelpCircle, Network as NetworkIcon, RefreshCw } from 'lucide-react';
44
import { Trans, useTranslation } from 'react-i18next';
55
import { useParams } from 'react-router-dom';
66
import {
@@ -19,6 +19,7 @@ import {
1919
Popover,
2020
PopoverContent,
2121
PopoverTrigger,
22+
Button,
2223
} from '@datatr-ux/uxlib';
2324
import { Network, NetworkTypeEnum, Subnet } from '@/types/cloud/network';
2425
import { NetworkOptionValue } from '@/types/orderFunnel';
@@ -174,7 +175,20 @@ const NetworkOptions = React.forwardRef<HTMLInputElement, NetworkOptionsProps>(
174175
return (
175176
<>
176177
<div>
177-
<Label>{t('networkInputLabel')}</Label>
178+
<div className="flex items-center gap-2 mb-1">
179+
<Label>{t('networkInputLabel')}</Label>
180+
<Button
181+
variant="primary"
182+
size="sm"
183+
onClick={() => {
184+
networkQuery.refetch();
185+
subnetQuery.refetch();
186+
}}
187+
className="h-6 w-6 p-0"
188+
>
189+
<RefreshCw className="h-4 w-4" />
190+
</Button>
191+
</div>
178192
{renderNetworkSelect()}
179193
</div>
180194
{networkQuery.isFetching ||

0 commit comments

Comments
 (0)