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 <yaojiping@infini.ltd>
This commit is contained in:
yaojp123 2024-12-10 10:07:16 +08:00 committed by GitHub
parent 667cf0580c
commit 9798ec9eb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 20 additions and 19 deletions

View File

@ -57,12 +57,12 @@ export default [
component: "./Platform/Overview/Cluster/Monitor/index",
hideInMenu: true,
},
{
path: "/cluster/monitor/hosts/:host_id",
name: "monitoring_overview_hosts",
component: "./Platform/Overview/Host/Monitor/index",
hideInMenu: true,
},
// {
// path: "/cluster/monitor/hosts/:host_id",
// name: "monitoring_overview_hosts",
// component: "./Platform/Overview/Host/Monitor/index",
// hideInMenu: true,
// },
{
path: "/cluster/monitor/:cluster_id/nodes/:node_id",
name: "monitoring_overview_nodes",
@ -456,7 +456,7 @@ export default [
},
{
path: "/system/audit",
name: "audit",
name: "audit_logs",
component: "./System/Audit/index",
authority: ["system.audit_logs:all", "system.audit_logs:read"],
},

View File

@ -45,7 +45,7 @@ export default forwardRef((props, ref) => {
const onClose = () => {
setVisible();
if (tabRef.current.resetCode) tabRef.current.resetCode();
if (tabRef.current?.resetCode) tabRef.current.resetCode();
};
return (

View File

@ -212,6 +212,7 @@ export default forwardRef((props: IProps, ref: any) => {
filters,
});
}
dispatch({ type: "pagination", value: 1 })
};
useEffect(() => {

View File

@ -254,7 +254,7 @@ export default {
"menu.system.security.users": "USERS",
"menu.system.security.certs": "CERTS",
"menu.system.audit": "AUDIT",
"menu.system.audit_logs": "AUDIT",
"menu.system.logs": "LOGS",
"menu.system.logs.overview": "OVERVIEW",

View File

@ -259,7 +259,7 @@ export default {
"menu.system.security.users": "用户管理",
"menu.system.security.certs": "证书管理",
"menu.system.audit": "审计日志",
"menu.system.audit_logs": "审计日志",
"menu.system.logs": "系统日志",
"menu.system.logs.overview": "日志概要",

View File

@ -46,15 +46,15 @@ const panes = [
return <Icon type="table" />;
},
},
{
title: "Hosts",
component: Host,
key: "hosts",
count: 0,
icon: () => {
return <Icon component={HostsSvg} />;
},
},
// {
// title: "Hosts",
// component: Host,
// key: "hosts",
// count: 0,
// icon: () => {
// return <Icon component={HostsSvg} />;
// },
// },
];
const NewOverview = (props) => {