Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lose data after changed filters in Overview #19

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions web/config/router.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"],
},
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Licence/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
1 change: 1 addition & 0 deletions web/src/components/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export default forwardRef((props: IProps, ref: any) => {
filters,
});
}
dispatch({ type: "pagination", value: 1 })
};

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/locales/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion web/src/locales/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": "日志概要",
Expand Down
18 changes: 9 additions & 9 deletions web/src/pages/Platform/Overview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Loading