This is an automated email from the ASF dual-hosted git repository.

nicholasjiang pushed a commit to branch branch-0.1
in repository https://gitbox.apache.org/repos/asf/paimon-webui.git

commit 5d725e169ce9d4de3ebaf35b5f922a5426d16f7a
Author: s7monk <[email protected]>
AuthorDate: Wed Jul 10 19:18:12 2024 +0800

    [Improvement] The query module obtains the cluster name through 
deploymentMode (#482)
---
 paimon-web-ui/src/api/models/cluster/index.ts               | 13 ++++++++++++-
 .../components/query/components/debugger/index.tsx          |  5 +++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/paimon-web-ui/src/api/models/cluster/index.ts 
b/paimon-web-ui/src/api/models/cluster/index.ts
index c6445196..880380e4 100644
--- a/paimon-web-ui/src/api/models/cluster/index.ts
+++ b/paimon-web-ui/src/api/models/cluster/index.ts
@@ -30,7 +30,18 @@ export function getClusterList() {
 }
 
 /**
- * # List Cluster by ClusterType
+ * # List Cluster by Deployment Mode
+ */
+export function getClusterListByDeploymentMode(deploymentMode: string, 
pageNum: number, pageSize: number) {
+  return httpRequest.get('/cluster/list', {
+    deploymentMode,
+    pageNum,
+    pageSize,
+  })
+}
+
+/**
+ * # List Cluster by Type
  */
 export function getClusterListByType(type: string, pageNum: number, pageSize: 
number) {
   return httpRequest.get('/cluster/list', {
diff --git 
a/paimon-web-ui/src/views/playground/components/query/components/debugger/index.tsx
 
b/paimon-web-ui/src/views/playground/components/query/components/debugger/index.tsx
index 8d8da56f..3a5e5794 100644
--- 
a/paimon-web-ui/src/views/playground/components/query/components/debugger/index.tsx
+++ 
b/paimon-web-ui/src/views/playground/components/query/components/debugger/index.tsx
@@ -20,7 +20,7 @@ import { FormatAlignLeftOutlined } from '@vicons/material'
 import { NInput, useMessage } from 'naive-ui'
 
 import styles from './index.module.scss'
-import { getClusterListByType } from '@/api/models/cluster'
+import { getClusterListByDeploymentMode } from '@/api/models/cluster'
 import type { Cluster } from '@/api/models/cluster/types'
 import type { JobSubmitDTO } from '@/api/models/job/types/job'
 import { createRecord, stopJob, submitJob } from '@/api/models/job'
@@ -153,7 +153,8 @@ export default defineComponent({
     }
 
     function getClusterData() {
-      getClusterListByType(debuggerVariables.conditionValue, 1, 
Number.MAX_SAFE_INTEGER).then((response) => {
+      const deploymentMode = debuggerVariables.conditionValue === 'Flink' ? 
'flink-sql-gateway' : debuggerVariables.conditionValue
+      getClusterListByDeploymentMode(deploymentMode, 1, 
Number.MAX_SAFE_INTEGER).then((response) => {
         if (response && response.data) {
           const clusterList = response.data as Cluster[]
           debuggerVariables.clusterOptions = clusterList.map(cluster => ({

Reply via email to