feat: K8s集群导出改为导出所有命名空间资源,去掉命名空间选择
- 后端: 新增 ExportResourcesAllNS handler (GET /:clusterCode/export),遍历所有NS收集资源 - 前端: KubernetesClusters 导出弹窗去掉命名空间输入框,一键导出全部NS - API: exportResources → exportAllResources,无需传 namespace 参数
This commit is contained in:
1 parent
a54b2d86b0
commit
dd7cb6895e
4 files changed
+159
-23
No files matched your search
@@ -190,9 +190,9 @@ export const kubernetesApi = {
|
||||
syncCluster: async (clusterId: number | string) => {
|
||||
return http.post(`/kubernetes-clusters/${clusterId}/sync`);
|
||||
},
|
||||
// 🆕 批量导出资源 (Deployment+Service+Ingress+ConfigMap+Secret) // Logan.Li
|
||||
exportResources: async (clusterCode: string, namespace: string) => {
|
||||
return http.download(`/kubernetes/${clusterCode}/namespace/${namespace}/export`, `${namespace}-resources.tar.gz`);
|
||||
// 🆕 批量导出集群所有命名空间资源 // Logan.Li
|
||||
exportAllResources: async (clusterCode: string) => {
|
||||
return http.download(`/kubernetes/${clusterCode}/export`, `cluster-${clusterCode}-resources.tar.gz`);
|
||||
},
|
||||
getTopology: async (clusterId: number | string) => { // Logan.Li
|
||||
return http.get(`/kubernetes-clusters/${clusterId}/topology`);
|
||||
|
||||
Reference in new issue
Block a user