Skip to content

Commit 6098129

Browse files
authored
Merge pull request #3582 from sniok/fix-namespace-events
frontend: Overview: Use selected namespaces for events
2 parents bc04be0 + 122c2e5 commit 6098129

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

frontend/src/components/cluster/Overview.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import Event from '../../lib/k8s/event';
2525
import Node from '../../lib/k8s/node';
2626
import Pod from '../../lib/k8s/pod';
2727
import { useFilterFunc } from '../../lib/util';
28+
import { useNamespaces } from '../../redux/filterSlice';
2829
import { useTypedSelector } from '../../redux/hooks';
2930
import { OverviewChart } from '../../redux/overviewChartsSlice';
3031
import { DateLabel } from '../common/Label';
@@ -117,7 +118,11 @@ function EventsSection() {
117118
)
118119
)
119120
);
120-
const { items: events, errors: eventsErrors } = Event.useList({ limit: Event.maxLimit });
121+
const namespace = useNamespaces();
122+
const { items: events, errors: eventsErrors } = Event.useList({
123+
limit: Event.maxLimit,
124+
namespace,
125+
});
121126

122127
const warningActionFilterFunc = (event: Event, search?: string) => {
123128
if (!filterFunc(event, search)) {

0 commit comments

Comments
 (0)