@@ -20,10 +20,9 @@ import { ROUTES } from '@Common/Constants'
20
20
import { ResponseType , Teams } from '@Common/Types'
21
21
import { EnvironmentTypeEnum } from '@Shared/constants'
22
22
import { stringComparatorBySortOrder } from '@Shared/Helpers'
23
- import { ClusterType } from '@Shared/Services'
24
23
import { EnvListMinDTO } from '@Shared/types'
25
24
26
- import { AppsGroupedByProjectsType , ClusterDTO , EnvironmentsGroupedByClustersType } from './types'
25
+ import { AppsGroupedByProjectsType , EnvironmentsGroupedByClustersType } from './types'
27
26
28
27
export const getAppOptionsGroupedByProjects = async ( ) : Promise < AppsGroupedByProjectsType > => {
29
28
const { result } = ( await get ( ROUTES . APP_LIST_MIN ) ) as ResponseType < AppsGroupedByProjectsType >
@@ -55,23 +54,6 @@ export const getProjectOptions = async (): Promise<Pick<Teams, 'id' | 'name'>[]>
55
54
. sort ( ( a , b ) => stringComparatorBySortOrder ( a . name , b . name ) )
56
55
}
57
56
58
- export const getClusterOptions = async ( ) : Promise < ClusterType [ ] > => {
59
- const { result } = ( await get ( ROUTES . CLUSTER_LIST_MIN ) ) as ResponseType < ClusterDTO [ ] >
60
-
61
- if ( ! result ) {
62
- return [ ]
63
- }
64
-
65
- return result
66
- . map ( ( { id, cluster_name : name , isVirtualCluster, isProd } ) => ( {
67
- id,
68
- name,
69
- isVirtual : isVirtualCluster ?? false ,
70
- isProd : isProd ?? false ,
71
- } ) )
72
- . sort ( ( a , b ) => stringComparatorBySortOrder ( a . name , b . name ) )
73
- }
74
-
75
57
export const getEnvironmentOptionsGroupedByClusters = async ( ) : Promise < EnvironmentsGroupedByClustersType > => {
76
58
const { result } = ( await get ( ROUTES . ENVIRONMENT_LIST_MIN ) ) as ResponseType < EnvListMinDTO [ ] >
77
59
0 commit comments