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 b37ec10c refactor(web): replace deprecated Ant Design APIs (#1908)
b37ec10c is described below
commit b37ec10c1ba53e19665ea45d50fd3e1aa68c7d0a
Author: aias00 <[email protected]>
AuthorDate: Fri Aug 14 10:49:15 2026 +0800
refactor(web): replace deprecated Ant Design APIs (#1908)
---
.../pages/settings/__tests__/GeneralSettingsTab.test.tsx | 11 +++++++++++
web/src/pages/settings/index.tsx | 13 +++++++------
web/src/pages/studio/BrokerCluster.tsx | 2 +-
3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/web/src/pages/settings/__tests__/GeneralSettingsTab.test.tsx
b/web/src/pages/settings/__tests__/GeneralSettingsTab.test.tsx
index f9ceed58..50b08a26 100644
--- a/web/src/pages/settings/__tests__/GeneralSettingsTab.test.tsx
+++ b/web/src/pages/settings/__tests__/GeneralSettingsTab.test.tsx
@@ -72,4 +72,15 @@ describe('GeneralSettingsTab', () => {
await waitFor(() => expect(saveGeneralSettings).toHaveBeenCalledTimes(1));
});
+
+ it('keeps the session timeout field bound when displaying its unit', async
() => {
+ render(
+ <App>
+ <GeneralSettingsTab />
+ </App>,
+ );
+
+ expect(await screen.findByDisplayValue('30')).toBeInTheDocument();
+ expect(screen.getByLabelText('会话超时单位')).toHaveValue('分钟');
+ });
});
diff --git a/web/src/pages/settings/index.tsx b/web/src/pages/settings/index.tsx
index ff9e7b64..da0573a7 100644
--- a/web/src/pages/settings/index.tsx
+++ b/web/src/pages/settings/index.tsx
@@ -211,12 +211,13 @@ export const GeneralSettingsTab = () => {
</Title>
</Divider>
- <Form.Item
- label="会话超时"
- name="sessionTimeout"
- extra="应用于新创建的会话,已登录用户保持原到期时间"
- >
- <InputNumber min={5} max={1440} addonAfter="分钟" />
+ <Form.Item label="会话超时" extra="应用于新创建的会话,已登录用户保持原到期时间">
+ <Space.Compact>
+ <Form.Item name="sessionTimeout" noStyle>
+ <InputNumber min={5} max={1440} style={{ width: 120 }} />
+ </Form.Item>
+ <Input aria-label="会话超时单位" readOnly value="分钟" style={{ width: 64 }}
/>
+ </Space.Compact>
</Form.Item>
<Form.Item name="requireLogin" hidden>
diff --git a/web/src/pages/studio/BrokerCluster.tsx
b/web/src/pages/studio/BrokerCluster.tsx
index 961b6b43..3918bed1 100644
--- a/web/src/pages/studio/BrokerCluster.tsx
+++ b/web/src/pages/studio/BrokerCluster.tsx
@@ -476,7 +476,7 @@ const BrokerClusterPage = () => {
</div>
<Spin spinning={loading} tip={t('common.loading')}>
- <Card bordered={false} style={{ borderRadius: 8, boxShadow: '0 1px 6px
rgba(0,0,0,0.04)' }}>
+ <Card variant="borderless" style={{ borderRadius: 8, boxShadow: '0 1px
6px rgba(0,0,0,0.04)' }}>
<Tabs
activeKey={activeTab}
onChange={setActiveTab}