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

lizhimins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 6c19cc0db fix(studio): stop showing the cluster version as every 
nameserver's and proxy's version (#5948)
6c19cc0db is described below

commit 6c19cc0db28a600e7e20c76e1d8511e674c42ab8
Author: 烤化の初雪 <[email protected]>
AuthorDate: Fri Nov 27 12:16:52 2026 +0800

    fix(studio): stop showing the cluster version as every nameserver's and 
proxy's version (#5948)
---
 web/src/pages/studio/BrokerCluster.tsx                |  8 --------
 web/src/pages/studio/__tests__/BrokerCluster.test.tsx | 18 ++++++++++++++++++
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/web/src/pages/studio/BrokerCluster.tsx 
b/web/src/pages/studio/BrokerCluster.tsx
index 3696bb1f5..91068da80 100644
--- a/web/src/pages/studio/BrokerCluster.tsx
+++ b/web/src/pages/studio/BrokerCluster.tsx
@@ -71,7 +71,6 @@ interface NameServerRecord {
   k8sCluster: string;
   name: string;
   status: NodeStatus;
-  version: string;
   address: string;
 }
 
@@ -80,7 +79,6 @@ interface ProxyRecord {
   k8sCluster: string;
   name: string;
   status: NodeStatus;
-  version: string;
   address: string;
   grpcPort: string;
   connections: number;
@@ -101,7 +99,6 @@ const NAMESERVER_EXPORT_COLUMNS: 
CsvColumn<NameServerRecord>[] = [
   { header: 'Cluster', value: (nameServer) => nameServer.k8sCluster },
   { header: 'NameServer Name', value: (nameServer) => nameServer.name },
   { header: 'Status', value: (nameServer) => nameServer.status },
-  { header: 'Version', value: (nameServer) => nameServer.version },
   { header: 'Address', value: (nameServer) => nameServer.address },
 ];
 
@@ -109,7 +106,6 @@ const PROXY_EXPORT_COLUMNS: CsvColumn<ProxyRecord>[] = [
   { header: 'Cluster', value: (proxy) => proxy.k8sCluster },
   { header: 'Proxy Name', value: (proxy) => proxy.name },
   { header: 'Status', value: (proxy) => proxy.status },
-  { header: 'Version', value: (proxy) => proxy.version },
   { header: 'HTTP Address', value: (proxy) => proxy.address },
   { header: 'gRPC Address', value: (proxy) => proxy.grpcPort },
   { header: 'Connections', value: (proxy) => proxy.connections },
@@ -168,7 +164,6 @@ function mapClusters(clusters: ClusterInfo[]): {
         k8sCluster: clusterLabel,
         name: nameServer.addr,
         status: normalizeStatus(nameServer.status),
-        version: cluster.version,
         address: nameServer.addr,
       });
     });
@@ -180,7 +175,6 @@ function mapClusters(clusters: ClusterInfo[]): {
         k8sCluster: clusterLabel,
         name: proxy.addr,
         status: normalizeStatus(proxy.status),
-        version: cluster.version,
         address: proxy.addr,
         grpcPort: proxy.grpcPort ? `${host}:${proxy.grpcPort}` : '-',
         connections: proxy.connections ?? 0,
@@ -434,7 +428,6 @@ const BrokerClusterPage = () => {
       key: 'status',
       render: renderStatus,
     },
-    { title: t('brokerCluster.version'), dataIndex: 'version', key: 'version' 
},
     {
       title: t('common.address'),
       dataIndex: 'address',
@@ -474,7 +467,6 @@ const BrokerClusterPage = () => {
       key: 'status',
       render: renderStatus,
     },
-    { title: t('brokerCluster.version'), dataIndex: 'version', key: 'version' 
},
     {
       title: t('brokerCluster.httpAddr'),
       dataIndex: 'address',
diff --git a/web/src/pages/studio/__tests__/BrokerCluster.test.tsx 
b/web/src/pages/studio/__tests__/BrokerCluster.test.tsx
index 70676dbce..2abdb7bba 100644
--- a/web/src/pages/studio/__tests__/BrokerCluster.test.tsx
+++ b/web/src/pages/studio/__tests__/BrokerCluster.test.tsx
@@ -420,6 +420,24 @@ describe('BrokerCluster Page', () => {
     expect(screen.queryByText('运行中')).not.toBeInTheDocument();
   });
 
+  it('does not render a Version column for nameservers or proxies', async () 
=> {
+    // NameServerVO/ProxyVO carry no version, so the column used to repeat the 
cluster's version for
+    // every node (and export it to CSV) - a value no component ever reported 
for that node.
+    const user = userEvent.setup();
+    renderWithProviders(<BrokerCluster />);
+    await screen.findByText('broker-api-a');
+    // The broker tab does have one, from BrokerVO.version.
+    expect(screen.getByRole('columnheader', { name: /版本|[Vv]ersion/ 
})).toBeInTheDocument();
+
+    await user.click(screen.getByRole('tab', { name: /NameServer|Nameserver/i 
}));
+    await screen.findAllByRole('columnheader');
+    expect(screen.queryByRole('columnheader', { name: /版本|[Vv]ersion/ 
})).not.toBeInTheDocument();
+
+    await user.click(screen.getByRole('tab', { name: /Proxy/ }));
+    await screen.findAllByRole('columnheader');
+    expect(screen.queryByRole('columnheader', { name: /版本|[Vv]ersion/ 
})).not.toBeInTheDocument();
+  });
+
   it('does not render a Connections column for nameservers', async () => {
     // The backend NameServerVO has no connection count; the column used to
     // fabricate a hardcoded 0 for every nameserver (and export it to CSV).

Reply via email to