Просмотр исходного кода

Added api call to cluster detail info

jnfrati 5 лет назад
Родитель
Сommit
bf3ba95901
1 измененных файлов с 11 добавлено и 0 удалено
  1. 11 0
      dashboard/src/shared/api.tsx

+ 11 - 0
dashboard/src/shared/api.tsx

@@ -389,6 +389,16 @@ const getClusters = baseApi<{}, { id: number }>("GET", (pathParams) => {
   return `/api/projects/${pathParams.id}/clusters`;
 });
 
+const getCluster = baseApi<
+  {},
+  {
+    project_id: number;
+    cluster_id: number;
+  }
+>("GET", (pathParams) => {
+  return `/api/projects/${pathParams.project_id}/clusters/${pathParams.cluster_id}`
+});
+
 const getGitRepoList = baseApi<
   {},
   {
@@ -846,6 +856,7 @@ export default {
   getChartControllers,
   getClusterIntegrations,
   getClusters,
+  getCluster,
   getConfigMap,
   getGitRepoList,
   getGitRepos,