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 db440aebc docs(alert): explain that window aggregation reads retained 
snapshots (#4335)
db440aebc is described below

commit db440aebca00308c0320697d54a4fb81c573191b
Author: aias00 <[email protected]>
AuthorDate: Wed Sep 16 16:00:48 2026 +0800

    docs(alert): explain that window aggregation reads retained snapshots 
(#4335)
    
    Signed-off-by: liuhy <[email protected]>
---
 web/src/i18n/translations.ts                    |  4 ++++
 web/src/pages/ops/__tests__/AlertsPage.test.tsx | 18 ++++++++++++++++++
 web/src/pages/ops/alerts.tsx                    |  7 ++++++-
 3 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/web/src/i18n/translations.ts b/web/src/i18n/translations.ts
index c2e009927..612703077 100644
--- a/web/src/i18n/translations.ts
+++ b/web/src/i18n/translations.ts
@@ -796,6 +796,10 @@ const translations: Record<string, Record<Lang, string>> = 
{
   'alerts.durationRequired': { zh: '请选择持续时间', en: 'Select a duration' },
   'alerts.windowAggregation': { zh: '窗口聚合', en: 'Window aggregation' },
   'alerts.windowSeconds': { zh: '窗口秒数', en: 'Window seconds' },
+  'alerts.windowRetentionHelp': {
+    zh: '聚合只使用本地当前保留的指标快照。当前保留周期之外的历史数据不可用;调整保留时间不会使规则失效。',
+    en: 'Aggregation uses only metric snapshots currently retained locally. 
History outside the current retention period is unavailable; changing retention 
does not invalidate the rule.',
+  },
   'alerts.consecutiveSamples': { zh: '连续采样次数', en: 'Consecutive samples' },
   'alerts.consecutiveSamplesRequired': {
     zh: '请输入连续采样次数',
diff --git a/web/src/pages/ops/__tests__/AlertsPage.test.tsx 
b/web/src/pages/ops/__tests__/AlertsPage.test.tsx
index 7307a6eea..9f4f34431 100644
--- a/web/src/pages/ops/__tests__/AlertsPage.test.tsx
+++ b/web/src/pages/ops/__tests__/AlertsPage.test.tsx
@@ -217,10 +217,28 @@ describe('AlertsPage', () => {
 
     expect(screen.getByRole('button', { name: 'Test Run' 
})).toBeInTheDocument();
     expect(screen.getByText('Window aggregation')).toBeInTheDocument();
+    expect(
+      screen.getByText(
+        'Aggregation uses only metric snapshots currently retained locally. 
History outside the current retention period is unavailable; changing retention 
does not invalidate the rule.',
+      ),
+    ).toBeInTheDocument();
     expect(screen.getByText('Consecutive samples')).toBeInTheDocument();
     expect(screen.queryByText('窗口聚合')).not.toBeInTheDocument();
   });
 
+  it('explains the effective native aggregation window in Chinese', async () 
=> {
+    const user = userEvent.setup();
+    renderPage('BUSINESS');
+
+    await user.click(await screen.findByRole('button', { name: '新建规则' }));
+
+    expect(
+      screen.getByText(
+        '聚合只使用本地当前保留的指标快照。当前保留周期之外的历史数据不可用;调整保留时间不会使规则失效。',
+      ),
+    ).toBeInTheDocument();
+  });
+
   it('formats the last triggered timestamp instead of rendering the raw ISO 
value', async () => {
     const lastTriggered = '2026-08-23T10:35:38.590731';
     vi.mocked(listAlertRulesPage).mockResolvedValue(
diff --git a/web/src/pages/ops/alerts.tsx b/web/src/pages/ops/alerts.tsx
index 1efb33804..d88c97876 100644
--- a/web/src/pages/ops/alerts.tsx
+++ b/web/src/pages/ops/alerts.tsx
@@ -1253,7 +1253,12 @@ const AlertsPage = ({ domain = 'CLUSTER' }: 
AlertsPageProps) => {
                 }))}
               />
             </Form.Item>
-            <Form.Item name="windowSeconds" label={t('alerts.windowSeconds')} 
initialValue={0}>
+            <Form.Item
+              name="windowSeconds"
+              label={t('alerts.windowSeconds')}
+              initialValue={0}
+              extra={t('alerts.windowRetentionHelp')}
+            >
               <InputNumber min={0} precision={0} style={{ width: '100%' }} />
             </Form.Item>
 

Reply via email to