Skip to content

Commit 9798ec9

Browse files
yaojp123yaojiping
and
yaojiping
authored
fix: lose data after changed filters in Overview (#19)
* fix: lose data after changed filters in `Overview` * chore: add locales for `Audit` --------- Co-authored-by: yaojiping <[email protected]>
1 parent 667cf05 commit 9798ec9

File tree

6 files changed

+20
-19
lines changed

6 files changed

+20
-19
lines changed

web/config/router.config.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ export default [
5757
component: "./Platform/Overview/Cluster/Monitor/index",
5858
hideInMenu: true,
5959
},
60-
{
61-
path: "/cluster/monitor/hosts/:host_id",
62-
name: "monitoring_overview_hosts",
63-
component: "./Platform/Overview/Host/Monitor/index",
64-
hideInMenu: true,
65-
},
60+
// {
61+
// path: "/cluster/monitor/hosts/:host_id",
62+
// name: "monitoring_overview_hosts",
63+
// component: "./Platform/Overview/Host/Monitor/index",
64+
// hideInMenu: true,
65+
// },
6666
{
6767
path: "/cluster/monitor/:cluster_id/nodes/:node_id",
6868
name: "monitoring_overview_nodes",
@@ -456,7 +456,7 @@ export default [
456456
},
457457
{
458458
path: "/system/audit",
459-
name: "audit",
459+
name: "audit_logs",
460460
component: "./System/Audit/index",
461461
authority: ["system.audit_logs:all", "system.audit_logs:read"],
462462
},

web/src/components/Licence/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default forwardRef((props, ref) => {
4545

4646
const onClose = () => {
4747
setVisible();
48-
if (tabRef.current.resetCode) tabRef.current.resetCode();
48+
if (tabRef.current?.resetCode) tabRef.current.resetCode();
4949
};
5050

5151
return (

web/src/components/Overview/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ export default forwardRef((props: IProps, ref: any) => {
212212
filters,
213213
});
214214
}
215+
dispatch({ type: "pagination", value: 1 })
215216
};
216217

217218
useEffect(() => {

web/src/locales/en-US.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default {
254254
"menu.system.security.users": "USERS",
255255
"menu.system.security.certs": "CERTS",
256256

257-
"menu.system.audit": "AUDIT",
257+
"menu.system.audit_logs": "AUDIT",
258258

259259
"menu.system.logs": "LOGS",
260260
"menu.system.logs.overview": "OVERVIEW",

web/src/locales/zh-CN.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export default {
259259
"menu.system.security.users": "用户管理",
260260
"menu.system.security.certs": "证书管理",
261261

262-
"menu.system.audit": "审计日志",
262+
"menu.system.audit_logs": "审计日志",
263263

264264
"menu.system.logs": "系统日志",
265265
"menu.system.logs.overview": "日志概要",

web/src/pages/Platform/Overview/index.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ const panes = [
4646
return <Icon type="table" />;
4747
},
4848
},
49-
{
50-
title: "Hosts",
51-
component: Host,
52-
key: "hosts",
53-
count: 0,
54-
icon: () => {
55-
return <Icon component={HostsSvg} />;
56-
},
57-
},
49+
// {
50+
// title: "Hosts",
51+
// component: Host,
52+
// key: "hosts",
53+
// count: 0,
54+
// icon: () => {
55+
// return <Icon component={HostsSvg} />;
56+
// },
57+
// },
5858
];
5959

6060
const NewOverview = (props) => {

0 commit comments

Comments
 (0)