Skip to content

Commit

Permalink
fix: lose data after changed filters in Overview
Browse files Browse the repository at this point in the history
  • Loading branch information
yaojiping committed Dec 10, 2024
1 parent 667cf05 commit bb549be
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
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
3 changes: 2 additions & 1 deletion 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 Expand Up @@ -262,7 +263,7 @@ export default forwardRef((props: IProps, ref: any) => {
{dispalyTypeObj[currentTab] == "card" ? (
<List
dataSource={hits}
total={result?.total?.value || 0}
total={1000}
from={queryParams.from}
pageSize={queryParams.size}
loading={loading}
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

0 comments on commit bb549be

Please sign in to comment.