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

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


The following commit(s) were added to refs/heads/rocketmq-studio by this push:
     new 1958209a fix(ui): drop misleading selected count on alert export 
button (#1258)
1958209a is described below

commit 1958209ae854099e48eb1c0a15bfa54752bebf01
Author: 0 <[email protected]>
AuthorDate: Mon Aug 10 14:22:09 2026 +0800

    fix(ui): drop misleading selected count on alert export button (#1258)
    
    * fix(ui): drop misleading selected count on alert export button
    
    * test: drop selected count from alert export button assertions
    
    #1258 removes the count suffix from the export button; update the 
expectations accordingly.
    
    ---------
    
    Co-authored-by: lizhimins <[email protected]>
---
 web/src/pages/studio/AlertManagement.tsx                | 1 -
 web/src/pages/studio/__tests__/AlertManagement.test.tsx | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/web/src/pages/studio/AlertManagement.tsx 
b/web/src/pages/studio/AlertManagement.tsx
index aea6b06a..7b14add3 100644
--- a/web/src/pages/studio/AlertManagement.tsx
+++ b/web/src/pages/studio/AlertManagement.tsx
@@ -469,7 +469,6 @@ const AlertManagementPage: React.FC = () => {
             </Button>
             <Button icon={<DownloadSimple size={16} />} 
onClick={handleExportYaml} size="small">
               {t('alertMgmt.exportYaml')}
-              {selectedRules.length > 0 ? ` (${selectedRules.length})` : ''}
             </Button>
           </Space>
         }
diff --git a/web/src/pages/studio/__tests__/AlertManagement.test.tsx 
b/web/src/pages/studio/__tests__/AlertManagement.test.tsx
index 98a078a2..97992fb3 100644
--- a/web/src/pages/studio/__tests__/AlertManagement.test.tsx
+++ b/web/src/pages/studio/__tests__/AlertManagement.test.tsx
@@ -124,7 +124,7 @@ describe('AlertManagementPage', () => {
     const brokerRow = brokerRule.closest('tr');
     expect(brokerRow).not.toBeNull();
     await user.click(within(brokerRow!).getByRole('checkbox'));
-    await user.click(screen.getByRole('button', { name: '导出 YAML (1)' }));
+    await user.click(screen.getByRole('button', { name: '导出 YAML' }));
 
     await waitFor(() => {
       expect(queryAlertRules).toHaveBeenCalledTimes(2);
@@ -159,7 +159,7 @@ describe('AlertManagementPage', () => {
     expect(brokerRow).not.toBeNull();
 
     await user.click(within(brokerRow!).getByRole('checkbox'));
-    expect(screen.getByRole('button', { name: '导出 YAML (1)' 
})).toBeInTheDocument();
+    expect(screen.getByRole('button', { name: '导出 YAML' 
})).toBeInTheDocument();
 
     await user.click(within(brokerRow!).getByRole('switch'));
 
@@ -184,7 +184,7 @@ describe('AlertManagementPage', () => {
 
     expect(screen.queryByText('BrokerDown')).not.toBeInTheDocument();
     expect(screen.getByText('ConsumerLagHigh')).toBeInTheDocument();
-    await user.click(screen.getByRole('button', { name: '导出 YAML (1)' }));
+    await user.click(screen.getByRole('button', { name: '导出 YAML' }));
 
     const blob = createObjectURL.mock.calls[0][0] as Blob;
     const yaml = await blob.text();

Reply via email to