Skip to content

Commit 3ea445d

Browse files
committed
feat: add new service for fetching raw cluster list
1 parent 8b4d0b0 commit 3ea445d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Common/Constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export const ROUTES = {
117117
ATTRIBUTES_UPDATE: 'attributes/update',
118118
APP_LIST_MIN: 'app/min',
119119
CLUSTER_LIST_MIN: 'cluster/autocomplete',
120+
CLUSTER_LIST_RAW: 'k8s/capacity/cluster/list/raw',
120121
PLUGIN_GLOBAL_LIST_DETAIL_V2: 'plugin/global/list/detail/v2',
121122
PLUGIN_GLOBAL_LIST_V2: 'plugin/global/list/v2',
122123
PLUGIN_GLOBAL_LIST_TAGS: 'plugin/global/list/tags',

src/Pages/ResourceBrowser/service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { post } from '@Common/Api'
1+
import { get, post } from '@Common/Api'
22
import { ROUTES } from '@Common/Constants'
33
import { ResponseType } from '@Common/Types'
44
import {
@@ -7,6 +7,7 @@ import {
77
K8sResourceDetailType,
88
K8sResourceListPayloadType,
99
} from './ResourceBrowser.Types'
10+
import { ClusterDetail } from './types'
1011

1112
export const getK8sResourceList = (
1213
resourceListPayload: K8sResourceListPayloadType,
@@ -19,3 +20,5 @@ export const getK8sResourceList = (
1920
export const createNewResource = (
2021
resourceListPayload: CreateResourcePayload,
2122
): Promise<ResponseType<CreateResourceDTO[]>> => post(ROUTES.K8S_RESOURCE_CREATE, resourceListPayload)
23+
24+
export const getClusterListRaw = () => get<ClusterDetail[]>(ROUTES.CLUSTER_LIST_RAW)

0 commit comments

Comments
 (0)