Preload pods/events on nodes page (#2870)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2021-05-25 18:54:38 -04:00
1 parent f3b3d15e50
commit 0466971a6c
1 file changed
+8 -1
+8 -1
View File
@@ -21,7 +21,7 @@
import "./nodes.scss";
import React from "react";
import { observer } from "mobx-react";
import { disposeOnUnmount, observer } from "mobx-react";
import type { RouteComponentProps } from "react-router";
import { cssNames, interval } from "../../utils";
import { TabLayout } from "../layout/tab-layout";
@@ -37,6 +37,8 @@ import kebabCase from "lodash/kebabCase";
import upperFirst from "lodash/upperFirst";
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
import { Badge } from "../badge/badge";
import { kubeWatchApi } from "../../api/kube-watch-api";
import { eventStore } from "../+events/event.store";
enum columnId {
name = "name",
@@ -60,6 +62,11 @@ export class Nodes extends React.Component<Props> {
componentDidMount() {
this.metricsWatcher.start(true);
disposeOnUnmount(this, [
kubeWatchApi.subscribeStores([nodesStore, podsStore, eventStore], {
preload: true,
})
]);
}
componentWillUnmount() {