@@ -3,11 +3,9 @@ import { useTranslation } from 'react-i18next';
33import { useNavigate , useParams } from 'react-router-dom' ;
44import { debounce } from 'lodash' ;
55import { ExpandableSection , Tabs } from '@cloudscape-design/components' ;
6- import { ButtonProps } from '@cloudscape-design/components/button' ;
76import Wizard from '@cloudscape-design/components/wizard' ;
87
98import {
10- Alert ,
119 Box ,
1210 Button ,
1311 ButtonWithConfirmation ,
@@ -24,7 +22,7 @@ import {
2422import { HotspotIds } from 'layouts/AppLayout/TutorialPanel/constants' ;
2523
2624import { useBreadcrumbs , useNotifications } from 'hooks' ;
27- import { goToUrl , riseRouterException } from 'libs' ;
25+ import { riseRouterException } from 'libs' ;
2826import { copyToClipboard } from 'libs' ;
2927import { ROUTES } from 'routes' ;
3028import { useGetProjectQuery , useUpdateProjectMembersMutation , useUpdateProjectMutation } from 'services/project' ;
@@ -37,7 +35,6 @@ import { useDeleteProject } from 'pages/Project/hooks/useDeleteProject';
3735import { ProjectMembers } from 'pages/Project/Members' ;
3836import { getProjectRoleByUserName } from 'pages/Project/utils' ;
3937
40- import { useCheckingForFleetsInProjects } from '../../../../hooks/useCheckingForFleetsInProjectsOfMember' ;
4138import { useBackendsTable } from '../../Backends/hooks' ;
4239import { BackendsTable } from '../../Backends/Table' ;
4340import { GatewaysTable } from '../../Gateways' ;
@@ -63,10 +60,6 @@ export const ProjectSettings: React.FC = () => {
6360 const { deleteProject, isDeleting } = useDeleteProject ( ) ;
6461 const { data : currentUser } = useGetUserDataQuery ( { } ) ;
6562
66- const projectNames = useMemo ( ( ) => [ paramProjectName ] , [ paramProjectName ] ) ;
67-
68- const projectHavingFleetMap = useCheckingForFleetsInProjects ( { projectNames } ) ;
69-
7063 const { data, isLoading, error } = useGetProjectQuery ( { name : paramProjectName } ) ;
7164
7265 const { data : runsData } = useGetRunsQuery ( {
@@ -187,13 +180,6 @@ export const ProjectSettings: React.FC = () => {
187180
188181 const [ activeStepIndex , setActiveStepIndex ] = React . useState ( 0 ) ;
189182
190- const projectDontHasFleet = ! projectHavingFleetMap ?. [ paramProjectName ] ;
191-
192- const onCreateAFleet : ButtonProps [ 'onClick' ] = ( event ) => {
193- event . preventDefault ( ) ;
194- goToUrl ( 'https://dstack.ai/docs/quickstart/#create-a-fleet' , true ) ;
195- } ;
196-
197183 if ( isLoadingPage )
198184 return (
199185 < Container >
@@ -205,22 +191,6 @@ export const ProjectSettings: React.FC = () => {
205191 < >
206192 { data && backendsData && gatewaysData && (
207193 < SpaceBetween size = "l" >
208- { projectDontHasFleet && (
209- < div className = { styles . alertBox } >
210- < Alert
211- header = { t ( 'fleets.no_alert.title' ) }
212- type = "info"
213- action = {
214- < Button iconName = "external" formAction = "none" onClick = { onCreateAFleet } >
215- { t ( 'fleets.no_alert.button_title' ) }
216- </ Button >
217- }
218- >
219- The project < code > { paramProjectName } </ code > has no fleets. Create one before submitting a run.
220- </ Alert >
221- </ div >
222- ) }
223-
224194 { isProjectMember && (
225195 < ExpandableSection
226196 variant = "container"
0 commit comments